USPS Intelligent Mail barcode generator using php

Download  tc-lib-barcode-develop from github Enable php-int  from php.ini Then composer update composer install --prefer-dist     require ('../vendor/autoload.php'); $linear = array( 'IMB' => array('00040123456123456789-12345', ''), ); $square = array(); $barcode = new \Com\Tecnick\Barcode\Barcode(); $examples = ""; foreach ($linear as $type => $code) { $bobj = $barcode->getBarcodeObj($type, $code[0], -3, -8, 'black', array(0, 0, 0, 0)); $examples .= … Continue reading USPS Intelligent Mail barcode generator using php

Advertisements

Mysql word frequency count

DELIMITER $$ -- -- Functions -- CREATE FUNCTION `getCount` (`myStr` VARCHAR(1000), `myword` VARCHAR(100)) RETURNS INT(11) BEGIN DECLARE cnt INT DEFAULT 0; DECLARE result INT DEFAULT 1; WHILE (result > 0) DO SET result = INSTR(myStr, myword); IF(result > 0) THEN SET cnt = cnt + 1; SET myStr = SUBSTRING(myStr, result + LENGTH(myword)); END IF; … Continue reading Mysql word frequency count

Crawling google ( Last two hour data)

<?php $query="test"; $useragent = "Opera/9.80 (J2ME/MIDP; Opera Mini/4.2.14912/870; U; id) Presto/2.4.15"; $ch = curl_init (""); curl_setopt ($ch, CURLOPT_URL, "http://www.google.com/search?hl=en&tbo=d&site=github.com&source=hp&q=".$query."&tbs=qdr:h2&tbo=1"); curl_setopt ($ch, CURLOPT_USERAGENT, $useragent); // set user agent curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); echo $output = curl_exec ($ch); curl_close($ch); echo "http://www.google.com/search?hl=en&tbo=d&site=github.com&source=hp&q=".$query."&tbs=qdr:h2&tbo=1"; ?>

How to install samba server in fedora

1 Install samba Install samba with yum. $ sudo yum install -y samba $ sudo systemctl enable smb nmb 2 Port Open port with using ervice file of firewall-cmd. $ sudo firewall-cmd --add-service=samba --permanent $ sudo firewall-cmd --reload 3 SELinux Enable access to home directory without samba_share_t label. $ setsebool -P samba_enable_home_dirs on This article will not use … Continue reading How to install samba server in fedora