Friday, 20 October 2017

EXCEL HMANG TAWH SUH

Excel leh Database software te hian in anna tam tak an nei a, chu chu ka sawi tum ber a ni lo, tun tumah chuan kan thupui ang hian database that bikna sawi ka tum a. Database nen an inan lohna hrethiam tur chuan excel chu enge a nih a, database software chu enge a nih chiah tih hi kan hriat chian hmasak a pawimawh ang.

Excel: Excel hi Microsoft Office Suite peng khat spreadsheet software a ni a, database management software a ni lo va, file management software a ni. Hard Disk-ah a mala vawn that (file anga store) a ni a, phone book lo siam dawn ta la, file pakhata i store a ngai a ni. Excel leh Lotus ang te hi chu file siamna leh maintain-na a ni a, database nena ngaih pawlh theih pawh a ni chiah lovang. A tangkaina ber chu data print nghal tur chhut nan, data khawn khawm nan. Database-a thun tur data lakkhawm nan company lian chuan an hmang nasa ber a ni. Chuvangin Database software te pawh hian excel-a data export theihna an nei deuh tlangpui thin a ni.

Database : database chu information inlaichin bik (related) lakkhawm sawina a ni a. Entirnan Phone Book database chuan heng information inlaichin bik: hming, address, phone number te hi a nei vek a, a len dan azirin heng aia information tam nei pawh a ni thei bawk ang. Database Management Software kan tih chuan information inlaichin bik te (information database) enkawlna, siamna, vawnthatna, sawngbawlna hmanrua (Software tool) kan sawina a ni.

Excel aia Database Software That Bikna

Flexibility : Program leh data te hi a hranga awm ve ve tur an ni a, data kan vawnna tanga data inlaichin lo te kan paih or tihdanglamin emaw kan vawn thatna physical storage kan thlak chang pawhin program chu kan thlak danglam a tul lo va, Excel-ah chuan program leh data hi a kal kawp tlat a, hei hi database software aia a flexible lohna leh that lohna chu a ni. Excel-ah chuan design leh data hmun khatah an awm a, hei hi errors ti tam tu leh logical tibuaitu a ni thin. Database-ah chuan a design leh data kha a hrangin a awm vek a ni. Excelah chuan data pakhat i paihin a design i siam that leh zel a ngai a, database-ah chuan engmah thlak danglam buai a ngai ve lo.

Fast response to information requests: Data te chu database pakhata an awm vek vangin, kan zawn duh vel zawnchhuah zung zung a awlsam bik hle a, excel anga file hrang hranga awm lovin database pakhata table hrang hrang te chu rang takin kan kochhuak zung zung thei a ni. Sumdawnna khawvela sum khawih nasa ber ber bank leh company te pawh hian database an hman chhan chu faster response means better customer service tih hi an hriatchian em vang a ni.

Multiple access: Excel file pakhat chu mi chi hrang hrangin vawi khatah an khawih thei lo va, khawih vaih se a buai anga, data hlu tak kha a chhe (corrupt) mai dawn a ni. Hetiang ang lo tak hian database software chu a rualin mi maktaduai pawhin khawih se a buai dawn lo a ni.

Lower user training costs: Database software te hi chu excel anga a hman dan zir chiam ngai leh thil by-heart teuh ngai ang kha a ni lo va, a hmangtu-in Mizo tawng a thiama, mouse a tihchet thiam chuan darkar 2 vel lekah pawh a zir thiam theih vek a ni. A hmangtu tan pawh productivity tam hle zawk tura ngaih a ni bawk.

Less storage: Database hian Excel te ang aiin space a heh ve lo va, redundant data  a awm lo bawk a, chuvangin excel anga data inconsistency a awm lo bawk a ni.

Security: Excel chuan Open File vekin thil a store a. Database tibuaia, eichhe thei virus mal sawi tur a awm loh laiin Excel Security hi chu a chhe hle a, virus laka data a him lo hle bawk a ni. Database-ah chuan security restriction kan hmang vek thei a. Excel-ah chuan password protect i hman pawhin data kha awlsam takin access theih vek a la ni tho mai.

High Level Data Manipulation: Data chu report hrang hrang siam nan kan hmang thei a, excel-ah chuan file hrang hranga i dah a ngai a, a chunga a that lohna kan sawi bakah khian hei hi a that lohna langsar tak a ni bawk a ni.

Easy Usage: Excel-ah chuan data leh design hmun khatah a awm vek avangin data dik dan ngaihtuah chung reng si a, a design mawina i ngaihtuah tel a ngai a, chu chu a thiam lo tan chuan thil buaithlak leh hun heh thei tak mai a ni a. Database software-ah chuan a design i ngaihtuah a ngai lo va, a data dik leh dik loh i ngaihtuah hah a ngai tawh lo, i raw data kha i provide anga, data calculation dik lo thei lo chu design mawi takah i hmuh mai theih bakah i duh dan ang thlapin format dang dangah i share leh vek thei bawk a, hetiang sharing hi excel-ah chuan a theih loh leh zel bawk a ni.

Data Recovery & backup: data recover leh backup hi excel-ah chuan a theih loh leh zel bawk a. Database-ah chuan i data recover theihna i neih mai bakah backup i nei tel bawk a, i khawl a chhiat or a bo vek pawhin i backup atangin i data i hmu let leh thei a. Bo thei lo tluk data awlsam taka khawih turin i nei reng tihna a ni.

Performance : data access chak dan hi hun heh lohna a ni bawk a, a pawimawh em em a, excel-a fee report siam tur chuan typing thiam tak i nih a ngai a, excel nuam ve pangai taka i hman thiam a tul a; excel calculation hi 100% accuracy a ni lo tih hi mithiam te sawi tam a ni, a chhan chu virus leh bug velin a tibuai thei tlat a ni. Database-ah chuan typing thiam miah lo pawhin fee report i siam thei a, mouse vawi 3 vel click a ngai mai chauh a ni. Keyboard-a type tal i duh pawhin Keyboard shortcut key pahnih vel hmeh a ni mai.

Searching: I data sang/sing chuang zinga pakhat leh thur chhuak duh ta la, excel hmang chuan i mit a that pangai viau chuan darkar fe i hman a ngai mai thei. Database hmang chuan minute khat pawh i mamawh lo. Entirnan, skul naupang pakhat Lawma chu naupang sing chuang zingah i zir chiang duh ta a, database-a i dah chuan a hming atangin awlsam takin a rei berah second 10 velah i hmuchhuak thei nghal a, a mah ber i hmuh tawh chuan a result te, a certificate te, a behaviour report te, a fee report te, a id card te i access thei nghal vek a, excel hmang ta la, engtianga nasa takin nge i buaipui ang tih chu ngaihtuah ngam chi pawh a ni lo.

Result Siam nan: Tunlai school tam berin an buaipui chu note checking, test checking te hi naupang thiamna teh fung leh endikna tha ber a ni tih hi, chuvangin private school-ah phei zirtirtute naupang test checking in an buai reng a. chutah an mark hmuh chu CCE kalphung mil turin nasa takin calculator nen an han chawk chhuak leh dap mai thin a, an hun leh tha an seng nasa hle, naupang mark chhut nana an hun leh tha sen kha checking nan hmang zawk ta se, checking uluk leh zing zawk pawh an tithei ngeiin a rinawm a ni. Chumi tihawlsamna kan hmuh hnaivai ber chu sapho leh vaiho hman duh tawh loh inconsistency ngah leh maintain buaithlak tak mai excel spreadsheet hi a ni. Excel chuan marksheet or progress report card a siam theih nghal loh a, chu chuan hna a ti tam leh a, percentage calculation te hi background value vangin a dik lo thei tlat mai, naupang result dik lo kan siamsak thei daih a ni. Ranking chawh nan phei chuan excel rank function te hi a lem ang leh chauha hman tlak loh a ni. Chuvangin database hi kan intihhmuh a tul ta hle a ni. database-ah chuan data leh design a hran avang hian engkim hi a kaltluang thlup mai a. Zirtirtu-in a check-na mark a rawn submit kha enter luhin marksheet, progress report card te, ranking, grade, percentage, cumulative evaluation, grade point average, etc. te kha kum 100 kal ta mi pawh nise second 10 chhung lekin kan print chhuak chur chur thei mai a. Excel-ah chuan hetiang thil hi a theih loh mai ni lovin a theih loh bur a ni. School Principal te tan database software hi a tha hle a, i data chu i ta a nih ang takin excel thiam kher lo pawhin awlsam takin i control thei a, tuna i information neih hmang khan i hmalam hun lokal zel tura hmalak dan thiam a har tawh lovang.

Excel that lohna: Excel siamtu Microsoft company hrim hrim pawh hi an lian a, hmelma pawh an ngah a, chuvangin virus lakah an him lo hlawm hle bawk a ni. Excel hi thil ho te te calculation nan chuan duhthusama rang leh tha a ni tih chu hai rual loh a ni a, thil lian thamah erawh buaina neuh neuh a ngah hle a ni.  Chungte chu:
  • Microsoft thil design sual pakhat internal calculation tana floating points number an hmang hi a ni.
  • Excel 2007 leh 2000-ah 850*77.1 hi 2-a sem kher loh chuan zu calculate dik thei hauh lo mai a.
  • Excel chuan 40000.223 hi 40000.2229999999-ah zu ngai tlat pek a. 41000.348 pawh hi 41000.3479999999 angin a ngai a, 52000.723 pawh hi 52000.7229999999 angin a ngai tlat bawk a ni, mahse a ni si lo.
  • Excel-ah hian calculation tih a awlsam ang bawkin tihsual a awlsam bik em em bawk a ni.
  • Excel calculation thiam tur chuan rounding kal hmang hriat thiam a ngai hle bawk.
  • I data a len viau chuan excel chu a muang tawh hle ang.
  • Excel hian Memory leaks a nei sam viau bawk a, ram leh graphic hmanga in chhan him theih pawh a ni lo leh nghal. 65,536 bak rows a awm thei lo.
  • Excel hian content security chauh a nei a, location security a nei lo.
  • JPMorgan’s internal investigative task force te chuan 2013 kum tir lam khan Excel Spreadsheet hi an zir chiang a, calculation dik lo leh a data representation dik lo an hmuhchhuah hnem em avangin khawvela worm hlauhawm ber Iran Nuclear plant run tura an siam stuxnet te ai pawha hlauhawm zawk ang hialin zu chhuah a, hei hi Khawvela chanchinbu lar ber te zinga mi Forbes chhuah ngat a ni. (Source: Microsoft's Excel Might Be The Most Dangerous Software On The Planet : Forbes Magazine).
  • Goldwater at the University of Massachusetts entitled, "Using Excel for Statistical Data Analysis - Caveats" report-in a tarlan dan chuan Excel hi statistical analysis tan chuan a tha hlawl lo tih a ni.
  • "On the Accuracy of Statistical Procedures in Microsoft Excel" by B.D. Mc Culloughan and Barry Wilson chuan excel version hrang hrangah te hian dik lo(bug) a tam avangin a function then khat leh formulae pawhin result dik lo pek chhuah theihna chance an ngah tih an hmuchhuak.
  • denizon.com-in excel that lohna hrang hrang a tarlan te chu: tihchingpen a awlsam(vulnerable to fraud), mihring tihsual a tam duh bik (susceptible to human errors), enchhin leh tihdik a harsa bik (difficult to troubleshoot or test), regulator compliance kalh tlat a ni (obstructive to regulatory compliance), business thil khawih zung zung nan a tlak loh(not fit for agile business practice), a huho-a thawhhona tur siam a ni lo(not design for colloborative work), report lakkhawm nan hman a har lutuk(hard to consolidate), decision siam zung zung nan a lak tlak loh (incapable of supporting quick decision making), business kal zel nana hmanrua tan a tlak loh (unsuit for business continuity),  scale poorly, etc.
Excel leh Database Software in anna chu data khawih nana hman ve ve an ni a, i mamawh hun leh a hmanna hriat hi a tha hle bawk a ni. Thil liantham khawih nan chuan Excel chu a hman tlak loh va, list tlem tham te te khawih nana hman hi a tha ber a, a him bawk a, tih dik loh tihdik pawh hriat a awlsamin tihdik pawh a awlsam bawk a ni.

Database Software hman hun.
  • i information chu a len/tam viau a, spreadsheet form-a manage theih a nih tawh loh chinah leh subject nei bik data a nih chuan.
  • Data chu nakin zela hman i tum chuan
  • i information chu danglam thei reng a nih chuan.
  • i information atanga report siam i mamawh chuan database tluka tha a awm lo.
Excel Spreadsheet hman hun...
  • list tlem tham te-a calculation i siam duhin.
  • list tlem tham te-a thil track nan.
  • i data tanga chart leh graph i siam duhin.
  • What if scenerio i siam duhin.

MBSE INTEGRATED EVALUATION SCHEME (IES)

MBSE chuan 2016 atanga hman tan turin Exam marking scheme thar hlak mai an rawn introduce ta a. He kalphung tharah hi chuan Board Exam-ah subject tinah schoolte'n mark 20 theuh pek ve theihna an nei a. Mark 20 hi school-in Internal Assessment a buatsaih te, attendance leh assignment atanga te-a lakkhawm tur a ni.

Internal Assessment hi Class Test vawi 4 leh Term Exam voi hnih atanga lak tur a ni a. Class Test voi 4-a student mark hmuh belhkhawm leh First Term leh Second Term Exam atang hian a mark sang pahnih (Best of two) thlan chhuah a, chu chu 15%-a lak tur a ni a, 2% dang chu First Term leh Second Term Assignment atanga lak tur a ni leh a, tin attendance hian 3% a pu bawk ang.
Heng zawng zawng chawhchhuah hi Subject mal leh hlawmin MBSE-ah submit tur a ni a. Hei hi school tam tak tan thil awlsam a ni hauh lovang. Excel atang pawhin hei zet hi chu chawhtham leh tihsual tam tak awm thei a ni ve ta. He application HL Mark Calculator for HSLC hi i hman chuan zirlai detail tlem dah luh leh an mark hmuh dan dik taka entir bak engmah dang tih ngai lovin awlsam takin report submit tur engkim i nei nghal thei ang.

HL Mark Management for HSLC hi tun thla chhunga download theih tura dah hman tum a ni a. Free Version leh Commercial Version a awm dawn a. Free Version chauh hmang pawhin mark calculation engkim tih theih vek a ni tho ang.

Project thil tum:
He project siam nan hian ka thiam tawk loh vang pawh a ni mahna, hun leh tha ka seng ve nasa hle a. Ka tum ber chu:
  1. Excel hmanga mark calculation kan tih thin hi chin dan tha a ni lo va, excel khawih thiam te chauh hman theih a ni te, calculation buai a awm duh te, file leh hming zawn a buaithlak lutuk te. A khawihtu bik an dam loh changa buaina tam tak awm thei leh virus vanga excel file bo thin te hi a thiam leh thiam vak lo tan pawh hna titamtu leh thil manage buaithlak tak sut kian nan. (Excel that lohzia chu hetah hian chhiar theih a ni)
  2. MBSE-in school zawng zawngin mark calculation leh pek dan tur a duan a hman tir tan a, chutihrualin calculation tihna tur apps engmah pek emaw suggestion pawh a neih loh avang leh school zawng zawngin MBSE-ah an zirlai mark hmuh an submit tur awlsam zawka an manage theihna tur  hi school tin tana tangkai tur a nih ka beisei avangin.
  3. School zawngzawng deuh thaw-ah hian zirtirtu te'n an zirlai te mark hmuh calculation zawng zawng hi an profession baka an tih thin a ni a, he application hian a chhawk zangkhai ngei ka beisei avangin.
  4. Miin software tangkaina an hriatchian leh zual nan
  5. School tinin he application an hman theih nan a free version siam a ni.
HL Mark Calculator Screen Shot: A screenshot hi a hman dan tur indawt anga dah a ni.

Add New  Student: Class IX leh X student te chu he interface atang hian dahluh vek phawt tur a ni.

Add New Student

List View of Student: Heta tang hian student profile kan en (view) thei a, en turin an hmingah zel hian click tur a ni ang. Tin Student edit leh delete-na pawh a awm nghal bawk a ni. Professional Version-ah chuan Student list hi Excel(xlsx) leh PDF-a export a awm tel bawk.

Student List View
Student's Profile View: Student profile view atang hian student detail dah a ni a. Professional Version chuan student zawnawlna leh an mark hmuh dan detail a tarlang tel vek bawk a ni. Student kan add thar apiangin an profile-ah kan lut nghal zel bawk a ni.

Student Profile (Minimal View)
Mark Entry: Mark enter tur hian Class select phawt a, entry date hi vawn a nih loh chuan mahni duhdana datepicker atanga thlan tur a ni a. Entry Name hi CT1(Class test 1), CT2, CT3, CT4, First Term Assignment, Second Term Assignment, First Term Exam leh Second Term Exam te an ni a, duh ber thlan tur a ni. Subject hi Class kan thlan a zirin, class tan bik a rawn awm zel ang a. Thlan tur a ni a, session hi thlan a ngaih chuan thlan leh tur a ni. A tawp berah fullmark hi chhut leh tur a ni. Load student click zawh hian mark obtained enter-na tur student zawnah theuh a lo awm tawh ang. Full mark hi duh duh hman a remchang bawk a. Mark enter tawh enter nawn theih a ni lo va, enter sual a awm chuan Mark Edit/Delete atangin paih emaw edit that mai tur a ni.
Mark Entry Form

Test Report: Class Test 1, Class Test 2 hi First Term chhunga neih tur a ni a, Class Test 3 leh 4 hi Second Term huam chhunga neih tur a ni bawk. Test Report atang hian Class test leh Assignment Mark Report te kan hmu thei:
Form for generating Class Test & Assignment
Test report hian Professional Version-ah chuan Excel leh PDF export a nei tel a, Individual student Test Report Sheet a tel nghal bawk.
Test Report
Term Report: First Term leh Second Term Exam report generate-na a ni. Professional version-ah chuan Individual Student marksheet print-na a awm nghal a, PDF leh Excel format-a export-na a awm tel bawk a ni.
Terminal Exam Report
Single Subject Report: He report hi MBSE-a submit tur subject mala student mark hmuh tarlanna a ni a, Professional Version chuan Print-ready Excel leh PDF version a nei nghal bawk a, Individual marksheet a awm tel bawk.
Internal Assessment to be submitted to MBSE (Single Subject)
All Subject Reports: Hei pawh hi MBSE submit tur tho a ni a. Subject zawng zawnga students te mark hmuh tarlanna a ni. Professional Version chuan Print-ready Excel leh PDF version a nei nghal bawk a, Individual marksheet a awm tel bawk.
Internal Assessment to be submitted to MBSE(All Subjects)

He Application hi school mamawh dan anga thlak danglam vek theih a ni. Professional Version hian man hranpa em em a nei chuang lo va. Project hi nakin zel pawha a nun reng theih nan pawisa tlem lo donate ve mai khan neih theih a ni a. Help & Support man erawh free version leh professional version-ah hian a awm ve ve.
Download 32bit Version 
Serial No. 123-456
Note: HL School Management Software thar berah chuan CLASS-IX - CLASS-XII Integrated Evaluation Scheme dah thar a ni.

Advanced Namespace in PHP

Namespace chungchang hi post hmasa lamah khan kan cover nual tawh a. Tun tumah hian PHP7-a a lo danglam tak dan chungchang tlem zawng han thur chhuah leh zeuh ka tum dawn a ni. Post hmasa lama mi kha chu a basic leh sawifiahna angah ngai ila, tun tuma mi hi chu PHP 7 hnuai lama hman theih loh mahse PHP7 hmang pha chin tan chuan thiltih ti awlsam em em tu a ni ang. Kan hriat angin __autoload(), class lakluh nana kan hman thin chu PHP 7.2 atang chuan remove a ni ta, spl_autoload_register() erawh a la tha viau a ni ang, an la paih em lo. Tun tuma tan chuan require_once leh phawt ang. 
PHP5-ah chuan namespace-a class kan lakluh dawn hian post hmasaa kan sawi tawh ang khan use declaration kan hman ngei ngei a ngai a. Class panga vel pawh lo lalut (import) dawn i la, use declaration hi voi nga kan hman a ngai tihna a ni. Mahse vanneihthlak takin PHP7 ah chuan use declaration hi group theih a lo ni ta. PHP5 lama kan hman dan lo en hmasa ta ila. Example atan hian file pathum ka hmang a, chung te chu: index.php, Php.php leh Javascript.php te an ni a, folder thuhmunah ka dah vek a ni.
index.php
<?php 
require_once 'Php.php';
require_once 'Javascript.php';
use Mizo\Web\Php\Website;
use Mizo\Web\Php\PHP;
use Mizo\Web\Php\Uprint;
use Mizo\Web\JS\Javascript;
new Javascript();
echo Website::$site;
echo PHP::$php;
echo Uprint::printUnicode("U+20B9");
?>
Php.php

<?php 
namespace Mizo\Web\Php;
class PHP{
    public static $php = "Hypertext Preprocessor\n";
}
class Website {
   public static $site = "Joomla, Wordpress and Drupal are using PHP\n";
}
interface UnicodePrinter{
   public static function printUnicode($code);
}
class Uprint implements UnicodePrinter{
     public static $char = null;
     public static function printUnicode($code){ 
           self::$char = preg_replace('/U\+([0-9A-F]{4,5})/', '&#x\\1;', $code);
     return self::$char? "$code => ".html_entity_decode(self::$char, ENT_NOQUOTES,'UTF-8')."\n" : "No Input";
     }
}
?>
Javascript.php

<?php
namespace Mizo\Web\JS;
class Javascript{
 public function __construct()
 {
   echo "Javascript is the language of modern browsers\n";
 }
}
const BUAIKUM = "Buai Kum: 1966\n";
const MAUTAM = "Mautam Kum: 1950\n";
function printTotal(...$num){
 return implode('+',$num)." => ".array_sum($num)."\n";
}

function printList($items){
 return "<ol>\n<li>".implode("</li>\n<li>", $items)."</li>\n</ol>\n";
}
?>
A chunga code kan hman te hi PHP5 leh PHP7-ah hman theih ve ve a ni a, buaina em em a awm hran lo. index.php-a kan hmuh ang hian Class tin hman chhuah nan use keyword kan hman zel a ngai a. Hei hi PHP7-ah chuan group dan thar a awm a ni. use keyword lai hi lo tarlang leh ila:
use Mizo\Web\Php\Website;
use Mizo\Web\Php\PHP;
use Mizo\Web\Php\Uprint;
use Mizo\Web\JS\Javascript;
Mizo\Web\PHP hi pathum lai kan nei a, hei hi voi thum chhu nawn kher lovin a hnuaia mi ang hian PHP7-ah chuan tih theih a ni.
use Mizo\Web\Php\ {Website, PHP, Uprint};
use Mizo\Web\JS\Javascript;
Kan hmuh ang hian Class hming te theuh hi { } chhungah dahin coma(,)-in kan daidang a. Hetiang hian namespace thuhmuna class awm te chu kan dah thei a ni. A tawi thianghlim fel ta at mai. Tin use keyword hi voi khat chiah kan hmang duh a nih chuan a hnuaia mi ang hian kan group leh thei bawk a ni.
use Mizo\Web\ {
   Php\Website, //Alias Php\Website AS Site tiin dah theih a ni ve bawk
   Php\PHP,
   Php\Uprint,
   JS\Javascript
}
Hetiang deuh chiah hian const (constant) leh function te pawh lakluh ve theih a ni bawk. Javascript.php ah hian const leh function kan nei a. A hnuai mi ang hian kan lalut thei ang.
use function Mizo\Web\JS\ {printTotal,printList};
use const Mizo\Web\JS\ {BUAIKUM, MAUTAM};
Kan duh phawt chuan use Declaration pakhat chauh hmangin a vaiin kan la lut thei vek bawk a:
use Mizo\Web\ {
   Php\Website,
   Php\PHP,
   Php\Uprint,
   JS\Javascript, 
   function JS\printTotal, 
   function JS\printList, 
   const JS\BUAIKUM, 
   const JS\MAUTAM
};
//a tawpa semi-colon te hi theihnghilh a awl reuh hle.
use keywork hman tluk tluk ngai lovin ti khan kan duh ang namespace chu kan la lut vek thei ta. A tawp nan kan unicode character print-na hi PHP7 feature null coalescing milin in dahrem leh zuai teh ang:
return "$code => ".html_entity_decode(self::$char, ENT_NOQUOTES,'UTF-8')."\n" ?? "No Input"; 
#Index.php
<?php 
require_once 'Php.php';
require_once 'Javascript.php';
use Mizo\Web\ {
   Php\Website,
   Php\PHP,
   Php\Uprint,
   JS\Javascript, 
   function JS\printTotal, 
   function JS\printList, 
   const JS\BUAIKUM, 
   const JS\MAUTAM
};
new Javascript();
echo Website::$site;
echo PHP::$php;
echo Uprint::printUnicode("U+20B9");
echo printTotal(2,3,4);
echo BUAIKUM;
echo MAUTAM;
$project = ['Presentation Sekibuhchhuak','Pocket Store','Homework Solver'];
echo printList($project);
?>
Output:
Javascript is the language of modern browsers
Joomla, Wordpress and Drupal are using PHP
Hypertext Preprocessor
U+20B9 =&gt; ₹
2+3+4 =&gt; 9
Buai Kum: 1966
Mautam Kum: 1950
<ol>
    <li>Presentation Sekibuhchhuak</li>
    <li>Pocket Store</li>
    <li>Homework Solver</li>
</ol>
Source: PHP.NET Note: Test vel nan SublimeText Build Console ka hman avangin \n hi ka dah deuh vek a ni. Image: bccfalna.com

Wednesday, 18 October 2017

SPACESHIP OPERATOR IN PHP

🚀 SPACESHIP OPERATOR Tun tumah hian PHP 7-a feature thar Spaceship Operator an tih <=> hman tangkai dan tur ka hriat ve chhun han share che u ka duh a. Online taima deuh tan chuan a use case hi a awm nual mai thei.
PHP chungchang kan sawi dawn leh project khawih lai pawha ka rawn tam ber thin PHP.NET documentation-in a sawi dan leh ziak dan hi Bible ang deuha ka rin ber a ni chung hian hriat thiam loh ka ngah hle. Tuna Spaceship operator kan sawi tur pawh hi hetiang hian a sawi thla then mai a. $a <=> $bAn integer less than, equal to, or greater than zero when $a is respectively less than, equal to, or greater than $b. Available as of PHP 7.”
English
thiam ang tawkin a ngial a nganin (Literally) han letling ta ila: “$a hi $b aia te zawk emaw, lian zawk emaw, $b tluk chiah a nih hian Integer (Nambar thensawm loh) bial tluk emaw, bial aia lian emaw, bial aia te zawk emaw a ni. PHP7 chinah hman theih a ni.” A awmzia ber chu dan pathum: intluk, lian zawk, te zawk hmanga comparison siamna a ni.
💡
EXAMPLE PHP.NET-in example a tarlan tlema zawng hi in belchiang leh dawn teh ang: <?php // Integers Compare echo 1 <=> 1; // 0 echo 1 <=> 2; // -1 echo 2 <=> 1; // 1 // Floats Compare echo 1.5 <=> 1.5; // 0 echo 1.5 <=> 2.5; // -1 echo 2.5 <=> 1.5; // 1 // Strings Compare echo "a" <=> "a"; // 0 echo "a" <=> "b"; // -1 echo "b" <=> "a"; // 1 echo "a" <=> "aa"; // -1 echo "zz" <=> "aa"; // 1 // Arrays Compare echo [] <=> []; // 0 echo [1, 2, 3] <=> [1, 2, 3]; // 0 echo [1, 2, 3] <=> []; // 1 echo [1, 2, 3] <=> [1, 2, 1]; // 1 echo [1, 2, 3] <=> [1, 2, 4]; // -1 // Objects Compare $a = (object) ["a" => "b"]; $b = (object) ["a" => "b"]; echo $a <=> $b; // 0 $a = (object) ["a" => "b"]; $b = (object) ["a" => "c"]; echo $a <=> $b; // -1 $a = (object) ["a" => "c"]; $b = (object) ["a" => "b"]; echo $a <=> $b; // 1 // only values are compared $a = (object) ["a" => "b"]; $b = (object) ["b" => "b"]; echo $a <=> $b; // 1
PHP.NET example atanga kan hmuh dan leh a definitiona kan sawi tawh angin Spaceship Operator hian thil chi pathum Zero(0), Negative (-1) leh Positive (1) min chhawpchhuahsak a ni. Tichuan Kan variable compare chu Object, Array, Integer, Float eng pawh lo ni se, a result tur chu 0 or -1 or 1 bak a ni dawn lo a ni.
☑️
USE CASE
$names = []; //
File kan sort duh avangin blank array kan siam $file = new SplFileObject('contact.csv');//File suasamna //$file->setFlags(SplFileObject::READ_CSV); $file->getCurrentLine();//Column header paihna while(!$file->eof()){ //File tawpna a nih loh chuan $line = $file->fgetcsv();//CVS file chhiar nan if(!is_null($line[0])){//Blank line a nih loh chuan $names[]= $line;//CSV file line tin chu array-ah kan dahtha } } usort($names, function($a, $b){//sorting chak tak a ni return [$a[1], $a[0]]<=>[$b[1], $b[0]]; //Vei lam value hi a dinglam aia a tet chuan = -1 //Vei lam leh dinglam value hi a in ang chuan = 0 //Vei lam value hi a len zawk chuan = 1 });
🗨️ usort hi chu sorting ril zet a ni a, experience coder tan lo chuan hriatthiam a har nak mai. function kan siamchawp hmanga array sort-na a ni. A sort dan kalphung ber chu lian zawk, te zawk, in ang tih hi a ni. Ascending order hi a sort chhuah dan ber chu a ni a. CSV-a kan file chu kan print chhuak ang.
//foreach ($names as $name){ // echo implode(' ', $name)."\n"; //} echo hlConsole($names); //hlConsole()hmangin table-ah result kan display ang. +---------+-----------+ | Avana | Aizawl | | Muana | Aizawl | | Rama | Champhai | | Duhawma | Kolasib | | Zara | Kolasib | | Bma | Lunglei | | Zova | Seling | | Chama | Serchhip | | Kima | Sialsuk | | Hruaia | Thenzawl | | Faka | Zawlnuam | +---------+-----------+
PHP hian built-in sorting function descending leh ascending-a sort theihna bakah thil leh leh te thliar zung zungna entirnan min(), max() function te a nei a, array-ah minimum value or maximum value pakhat aia tam lakchhuah kan duh chuan chuan array_slice hmangin kan sort ang a, ascending-in kan sort chhuak tihna a ni ang, descending kan duh array_reverse kan hmang leh thei ang. Hengte hi an tangkai thei viau ang. Mahse Array hnuaia subarray or object compare a lo ngaih chuan hengte hi kan hmang thei tawh lo. Hetiang compare nan tak hianusort(), uasort(), leh uksort() te a lo awm a ni. Array subelement te hi array values or object properties te an ni thei a, chutiang compare nan chuan usort hi kan hmang thei a ni.
function sortAsc($a, $b){ return ($a->published< $b->published) ? -1 : 1; //array of object->property `
published` chu $a, $b dah-in a lian zawk te zawk kan khaikhin a, $a a tet a piangin -1 kan return a, a nih loh chuan 1 kan return thung }
Space lamah lo let leh tawh ila. Kan use case example-a mi hi spaceship tel miah lovin dah dawn ta ila:
usort($names, function($a, $b){ //return [$a[1], $a[0]]<=>[$b[1], $b[0]]; return ([$a[1],$a[0]]<[$b[1], $b[0]]) ? -1:(([$a[1],$a[0]]>[$b[1], $b[0]]) ? 1:0);
});
tia kan ziah duah a ngai dawn a, hnawksak tham viau a ni. Ti zawng kha ni mai teh se.