Blog Posts

How to read subscript/superscript using PHPExcel library?

if ($objPHPExcel->getActiveSheet()->getCell($cell)->getValue() instanceof PHPExcel_RichText)
                {
                    // $plaintext = $objPHPExcel->getActiveSheet()->getCell($cell)->getValue()->getPlainText();
                    
 $cellValueAsString = '';
$elements = $objPHPExcel->getActiveSheet()->getCell($cell)->getValue()->getRichTextElements();
foreach ($elements as $element) {
    // Rich text start?
    if ($element instanceof PHPExcel_RichText_Run) {
        if ($element->getFont()->getSuperScript()) {
            $cellValueAsString .= '<sup>';
        } else if ($element->getFont()->getSubScript()) {
            $cellValueAsString .= '<sub>';
        }
    }
    // Convert UTF8 data to PCDATA
    $cellText = $element->getText();
    $cellValueAsString .= htmlspecialchars($cellText);
    if ($element instanceof PHPExcel_RichText_Run) {
        if ($element->getFont()->getSuperScript()) {
            $cellValueAsString .= '</sup>';
        } else if ($element->getFont()->getSubScript()) {
            $cellValueAsString .= '</sub>';
        }
    }
}
echo $cellValueAsString;

Imagick create image from pdf file

$url ='file.pdf';
$path='img';
$file=$path.'/300.png';
$im = new imagick();
            $im->setResolution(300, 300);
            $im->readImage($url.'[0]');
            $im->setImageFormat('png');
            $im->setImageBackgroundColor('white');
            $im->setImageAlphaChannel(11);
            $im->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN);
            if (!file_exists($path)) {
                mkdir($path, 0777, true);
            }
            file_put_contents($file, $im);
            $im->clear();
            $im->destroy();

7 Ways to Make Money Online

YouTube

You can create YouTube channel using just a mobile. You can create any types of video and upload to youtube.

You can monetize YouTube videos and earn money online.

There are some requirement to monetize you channel. 

  1. You will need minimum 1000 subscribers
  2. 4,000 public watch hours

Blog/Website

You can create blog/website where you can post articles and earn money using google adsense.

Affiliate Marketing

Affiliate marketing is promoting some other websites product and getting some commission if someone buys product clicking after links from your website or channel.

Once you get traffic to youtube or website you can get more benefit from affiliate marketing.

Drop shipping

In drop shipping you can sell product without having inventory.

Paid services

You can offer paid services online like web design, graphic design, development etc.

Selling online courses

If you are good at anything you can create course and sell on digital platforms/websites.

Share Market

Now days everything from creating demat account and buy/sell share can be done online.

A single mobile phone is sufficient to make money from share market


Video Editing softwares free and paid

If you want to create video for YouTube or any other platform
You will definitely need video editing software
if you are beginner you must first try basic free softwares like shotcut, openshot, hitfilm express
you can do all basic stuff with these softwares..
If you have money and want to get some simple software to edit video you may go with filmora
And if you have more money and want to go with best softwares you can go with premier pro, final cut pro these softwares are used professionally to edit movies

Setting up development environment for laravel for window

For setting up  development environment for laravel. you will need following softwares

  1. php
  2. composer
  3. nodejs, npm
  4. MySQL/MariaDB
  5. git (optional)

php

for windows download thread safe zip from https://windows.php.net/download/

unzip the folder and you can add this path to environment variables

Composer 

download composer from https://getcomposer.org/ and while installing it will ask for path if you added to environment variables it will aut detect or you can manually select php path

nodejs, npm

node js can installed using exe downloaded from https://nodejs.org/en/

MySQL/MariaDB

download and install mysql from https://dev.mysql.com/downloads/ or you may download mariadb from https://mariadb.org/download/ . Both are similar to use.

git

download and install git from https://git-scm.com/