Signin Sina Weibo Open Platform, get App Key and App Secret, reference PHP SDK. The main principle is after authority on Sina Weibo, store uid, access_token and other information in local database. Determine the access_token at user next signin. Create…
Custom Pagination in Laravel
Views // paginator.blade.php <?php $presenter = new Illuminate\Pagination\BootstrapPresenter($paginator); $trans = $environment->getTranslator(); if ($paginator->getLastPage() > 1): /* How many pages need to be shown before and after the current page */ $showBeforeAndAfter = 3; /* Current Page */ $currentPage = $paginator->getCurrentPage();…
Assembly Binary Convert
Using assembly implementation convert binary to octal, decimal and hexadecimal. Source Code ;conver.asm DATA SEGMENT MENU db'Please Input your Choice:',0dh,0ah db'1:Bin-->Oct8',0dh,0ah db'2:Bin-->Dec10',0dh,0ah db'3:Bin-->Hex16',0dh,0ah db'0:Exit',0dh,0ah,'$' mess1 db'Please Input a Bin number:$' mess2 db'Output Oct is:$' mess3 db'Output Dec is:$' mess4 db'Output…
Set WordPress Category and Articles Diff Style
In this post let's talk about how to set different categories using different categories list style, the article under Different categories use different articles style in WordPress. First we should to know two function of WordPress is_category and in_category, please…