Tuesday, 27 November 2018

SVG-SCALABLE VECTOR GRAPHIC

Introduction

icons, logo, image leh website leh mobile application-a graphic format tharlam ber leh rinrawl ber ni chho turin W3C-in kum 1999 tang daih tawh khan a lo duang a. Mahse browser te'n an support that tawk loh vangin tunhnai atang deuh chauhvin a rawn lar tan a ni. Web standard dang CSS, DOM leh SMIL(synchronized multimedia integration language) nena hman tura duan a ni a. SVG image, text leh a kaihnawih te hi XML text file hmanga siam a nih avangin programmatically-in zawn(search), chhinchhiah(index), a script ziahchawp te leh compressed te a theih vek a ni. Hei vang hian Text editor eng pawh hmanga edit theih a nih rualin graphic editor Illustrator te, Animate CC leh Photoshop CC leh a dang dang hmang tein edit theih a ni bawk.

SVG chu eng chiah nge a nih a, tunlai hian engtia web standard-ah lo lar chho ta viau nge a nih tih chu a chunga kan sawi atang pawh khian a chiang thawkhat viau awm e. Web leh mobile-a graphic standard dang kan hman tlanglawn ho jpg, png, gif, etc. te nen hian a in ang lo mai ni lovin kawng engkimah an inthlau viau a. Chu chu tun tumah hian sawi kan tum dawn a ni.

A hmasa berin a danglamna chu a hming atang hian a ni a. Scalable Vector Graphic tih hi Zo tawngah kan dah chuan: Scalable: eng size leh resolution pawha dah theih
Vector: stroke & fill (rawng leh rin) hmanga lemziakna.
Graphic: lemziah or thil lem
Tichuan SVG chu rawng leh rin hmanga lemziak a lan dan buai chuang lo va duh ang tiat tiata dah theih tiin kan sawi thei ang. A saptawng chuan Vector Graphic tiin an sawi a. PNG, JPG leh GIF kan tih te hi chu BITMAP GRAPHIC a ni a. Box te reuh te te (grid)-a rawng chi hrang hrang (pixel grid) phuahkhawm hmanga siam an nih avangin leh box te reuh te te te khan rawng chi khat bak an neih theih loh avangin duh ang size leh resolution-a dah ngawt theih a ni lo va. Kan zoom deuh hlek phei chuan a box nen lam khan kan hmu thin a, a thlalak landan a buai ta thin a ni. A pixel a tam kan tih hian a box a tam tihna a ni ber a. A box a tam chuan color chi pawh a nei tam tihna a ni a, a size a len phah hle bawk thin. Hei vang ringawt pawh hian khawih danglam reng tur (edit) atan leh siamchhawn (reproduction) atan an hman tlak loh a ni.

A dawt lehah chuan device leh platform chi hrang a tam chho tawh hle a. Developer te chuan thlalak ngai reng kha device hrang hrang mila a size leh resolution kan siam danglam a tul thin a. Hemi atan hian png, gif, jpg kan hman dawn chuan device hrang hrang mil tura a size leh resolution kan edit kual a ngai thin a. Vanduai thlak takin heng bit graphic te hi chu kan edit apiang hian a resolution (a fiahna) kan paih tel zel a ni. Hetiang buaina hi SVG chuan a ron chingfel ta vek mai a. thlalak ngai reng kha coding hmangin a size leh resolution hloh emaw belh ngai chuang lovin device leh platform hrang hrangah kan hmang thei a ni.

A pathumnaah chuan Thlalak format dang ang lo takin SVG hi code hmangin siam theih a ni a. thlalak zia, kalkawng leh awm dan zawng zawng hi maths hmangin chawhchhuah theih vek a ni a. Vanneihthlak takin chawk thiam kher lo tan pawh graphic editor hmangin kan la siam thei cheu zui bawk.

Palinaah chuan SVG thlalak te hi CSS leh JS hmanga chei leh chettir (animate) theih an ni a. Kan sawi tawh angin animation code-na SMIL a nei ve bawk. Coding vocabulary a ngah hran lo va, zir duh tan pawh zir har lutuk a ni hran lo.

SVG - Standard Graphic Format

Kan sawi tawhin svg hi thlalak a ni a. Heng editor Sketch, Illustrator, etc. hmang hian view, edit leh siam theih a ni a. Image Viewer eng emaw zatin an support tawh a.

1. https://www.designzzz.com/12-best-free-svg-viewers-editors/
2. http://extension.nirsoft.net/svg
ah hian en rawh le. Tin svg hi image pangai kan dah luh angin html-ah dah luh theih a ni bawk.

<img src="logo.svg" />

SVG hi web chauha hman theih tura ngaih tur a ni lo va, print atan hman theih a ni bawk a. 3D printing thlengin an hmang bawk a ni. Open format a nih angin graphic enga tan pawha hman theih a ni tihna a ni ber.

SVG - Coding

SVG hian basic shape chi hrang hrang ziahna vocabulary a nei a. Complex drawing erawh chu hun a heh loh zawk nan graphic editor hmang tih mai a tha zawk ang. Tin complex lem lo chu graphic editor hmanga tih khan a efficient lo zawk thei bawk a ni.

Real code to be continued..

Saturday, 24 November 2018

PRODUCTS OF HL SOLUTION



HL School
Management

  • CCE Integrated Module
  • MBSE IES Result Module
  • Monthly Fee Module
  • Bulk SMS Module
HL College
Management

  • Semester Fee Module
  • Rollsheet Module
  • Result Module
  • Bulk SMS Module
HL Shop
Management (POS)

  • Invoice/Quotation Module
  • GST Module
  • Report/Account Module
  • Bulk SMS Module

JAVASCRIPT FOR LOOP DETAIL

Loop hi nested a nih lem loh chuan a har hranpa em em lo va, nested a nih a, condition a tam hian lu a tihai thei viau bawk. Chuvangin loop kalkawng zawng zawng nen lam tilangin tutorial Online lama chhim tur awm lem lo kalphung dang deuhvin sawifiah kan tum ang. Tun tumah hian Vanilla JS for loop hmangin ‘Asiamchhuah dan hmangin Loop (kalkualna tiin zo tawng chuan ka dah mai a) kan zir dawn a ni.  Kan siamchhuah tur chu lo en phawt ila:

πŸ”ͺπŸ”ͺ🍏🍏🍏πŸ”ͺπŸ”ͺ 
πŸ”ͺ🍏πŸ”ͺπŸ”ͺπŸ”ͺ🍏πŸ”ͺ
πŸ”ͺ🍏πŸ”ͺπŸ”ͺπŸ”ͺ🍏πŸ”ͺ
πŸ”ͺ🍏🍏🍏🍏🍏πŸ”ͺ
πŸ”ͺ🍏πŸ”ͺπŸ”ͺπŸ”ͺ🍏πŸ”ͺ
πŸ”ͺ🍏πŸ”ͺπŸ”ͺπŸ”ͺ🍏πŸ”ͺ
πŸ”ͺ🍏πŸ”ͺπŸ”ͺπŸ”ͺ🍏πŸ”ͺ

Sawifiahna:

Column(tlar phei) leh Row(tlar tung) pasarih ve ve kan nei a. Apple leh chemte rem dan tur a hnuaia mi ang hian i lo sawifiah dawn teh ang.
  1. row value (hlutna) hi 1 kan neih tir ang a, 7 a tlin thlengin kan kalkual(loop) tir ang, .
    JS for loop code hmanga kan dah chuan:
    for(let row = 1; row<=7; row++){
        //vawi 7 kan kalkual ang.
    }
  2. column value pawh hi a tirah 1 kan neihtir ang a, 7 a tlin thlengin kan kalkual tir ang. Column hi row kan kalkual (loop) tir apiangin vawi 7 kan kalkual (loop) tir ve dawn a ni. Chuvangin row vawi khat kalkual apiangin column vawi 7 kan kalkual (loop) tir ve dawn tihna a nih chu.
    for(let column= 0; column<=6; column++){
        //vawi 7 kan kalkual ang.
    }
  3. 1st Row & 7 Columns: Row kalkualna(loop) hmasa berah chemte print chhuak tur chuan column kan ngaihtuah tel a ngai a. Row vawi khat kalkual apiangin column vawi 7 kalkual a ngaih bawk avangin a lema kan hmuh ang hian column vawi khatnaah leh vawi hnih kalkualnaah chemte print chhuah a ngai dawn a, a vawi 3na 4na leh 5-naah erawh chuan apple kan dah a ngai a. Voi 6na leh 7na ah chuan chemte bawk kan dah a ngai dawn a ni. A code-in lo dah dawn ta ila:

    if(  ( (column == 1 || column == 2) && row==1) || ((column==6 || column==7) && row==1)){
      //column hlutna chu 1 or 2 or 6 or 7 a nih a, row pakhat chauh a nih chuan
      // str-ah chemte dah tur
      //Column 1 & 2 =
    πŸ”ͺπŸ”ͺ
      //Colomn 6 & 7 =
    πŸ”ͺπŸ”ͺ
    }else{
      //Column 3, 4 & 5 =
    🍎 🍎 🍎

    }

    column lo remkhawm ta ila:
    1   2   3   4    5   6   7

    πŸ”ͺ   
    πŸ”ͺ    🍎    🍎       🍎     πŸ”ͺ    πŸ”ͺ
  4.  2nd Row & 7 Columns: Row  vawi hnih kalkualnaah chuan 2 column leh 6th column-ah chauh apple kan dah a ngai a. Condition chi hrang hrangin a siam theih ang. A hnuaia js code hi han bel chiang phawt ila:
    if( (row==2 && column==2) || (column == 6 && row==2)){
       //column 2 =  🍎
       //column 6 = 🍎   
    }else{
       //column 1, 3, 4, 5, 7 =  πŸ”ͺ,πŸ”ͺ,πŸ”ͺ,πŸ”ͺ,πŸ”ͺ
    }

    Hmun khatah column indawt danin lo rem leh ta ila:
    1      2      3      4      5      6      7
    πŸ”ͺ  🍎  πŸ”ͺ   πŸ”ͺ    πŸ”ͺ   🍎 πŸ”ͺ
  5. 3rd Row pawh a chunga mi ang bawk hian a condition siam tur a ni a.if( (row==3 && column==2) || (column == 6 && row==3)){
       //column 2 =  🍎
       //column 6 = 🍎   
    }else{
       //column 1, 3, 4, 5, 7 =  πŸ”ͺ,πŸ”ͺ,πŸ”ͺ,πŸ”ͺ,πŸ”ͺ
    }
    Hmun khatah column indawt danin lo rem leh ta ila:
    1      2      3      4      5      6      7
    πŸ”ͺ  🍎  πŸ”ͺ   πŸ”ͺ    πŸ”ͺ   🍎 πŸ”ͺ
  6. 4th Row thungah chuan a lema kan hmuh ang hian tlemin kan condition kan her danglam a ngai dawn a niif( (row==4 && column==1) || (column == 7 && row==4)){
       //column 1 =
    πŸ”ͺ   //column 7 = πŸ”ͺ   
    }else{
       //column 2, 3, 4, 5, 6 = 
    🍎,🍎,🍎,🍎,🍎
    }
    Hmun khatah column indawt danin lo rem leh ta ila:
    1      2      3      4      5      6      7
    πŸ”ͺ  🍎  🍎  🍎 🍎  🍎 πŸ”ͺ
  7. 5th Row -ah thung chuan row 2 leh row 3 ang chiah khan condition kan siam ang a. a row kha 5th row a ni tih hre tel bawk ila: if( (row==5 && column==2) || (column == 6 && row==5)){
       //column 2 =  🍎
       //column 6 = 🍎   
    }else{
       //column 1, 3, 4, 5, 7 =  πŸ”ͺ,πŸ”ͺ,πŸ”ͺ,πŸ”ͺ,πŸ”ͺ
    }
    Hmun khatah column indawt danin lo rem leh ta ila:
    1      2      3      4      5      6      7
    πŸ”ͺ  🍎  πŸ”ͺ   πŸ”ͺ    πŸ”ͺ   🍎 πŸ”ͺ
  8. 6th Row-ah pawh a chunga mi ang tho hian condition kan siam ang, a row kha 6-ah kan dah thung ang. if( (row==6 && column==2) || (column == 6 && row==6)){
       //column 2 =  🍎
       //column 6 = 🍎   
    }else{
       //column 1, 3, 4, 5, 7 =  πŸ”ͺ,πŸ”ͺ,πŸ”ͺ,πŸ”ͺ,πŸ”ͺ
    }
    Hmun khatah column indawt danin lo rem leh ta ila:
    1      2      3      4      5      6      7
    πŸ”ͺ  🍎  πŸ”ͺ   πŸ”ͺ    πŸ”ͺ   🍎 πŸ”ͺ
  9. 7th Row-ah pawh a chung chiah mi ang hian condition kan siam leh dawn a ni. Row kha 7 kan tluk tir thung ang. if( (row==7 && column==2) || (column == 6 && row==7)){
       //column 2 = 🍎
       //column 6 = 🍎   
    }else{
       //column 1, 3, 4, 5, 7 =  πŸ”ͺ,πŸ”ͺ,πŸ”ͺ,πŸ”ͺ,πŸ”ͺ
    }
    Hmun khatah column indawt danin lo rem leh ta ila:
    1      2      3      4      5      6      7
    πŸ”ͺ  🍎  πŸ”ͺ   πŸ”ͺ    πŸ”ͺ   🍎 πŸ”ͺ

A chunga kan condition hrang hrang khi hmun khatah dahkhawm theih a ni a. Point hrang hrang angin lo dah ta ila:
  1. Row hmasa ber Column 1 leh 2-ah chuan chemte kan print duh a.
  2. Row hmasa ber Colum 3, 4 leh 5-ah apple kan print duh a.
  3. Row hmasa ber Column 6 leh 7-ah chemte kan print duh a ni.
  4. Row 2 leh 3 ah chuan column 2 leh 6-ah apple print kan duh thung a ni.
    If condition-in lo dah dawn ta ila.
    row 1 = if( row ==1 && (column>2 && column<6)){ }
    row 2 = if( row!=1 && ( column==2 || column==6)){ }

    row 3 = if( row!=1 && ( column==2 || column==6)){ }Hmun khata kan dah chuan:if ( ((column == 2 || column ==6) && row!= 1) 
    || ((row == 1)&& (column>2 && column < 6))){
     // Apple print tura row1-3 inkar kan column condition
     // kan fullfil loh apiang hian chemte kan print dawn a ni

    }
    row 2 leh 3-a condition hi belchiang ta ila row!=1 kan tih hian row 1 ni lo hrim hrim kan sawina a ni ber a.Row 4 ah hian Column 2- column 6 thleng apple kan print duh avangin kan condition ah hian row == 4 kan dahtel a ngai a, a bak chu kan condition ngai kha kan la ring zel thei dawn a ni.
    if ( ((column == 2 || column ==6) && row!= 1) 
      || ((row == 1|| row == 4)&& (column>2 && column < 6)) ){
        //apple printna
    }
Ti chuan A print chhuak tur chuan a hnuaia mi ang loop leh condition kan lo nei thei dawn ta a ni:

let str = "\n"; 
for(let row = 1; row <= 7; row +=1 ){ 
   for (let column = 1; column <= 7; column +=1 ){ 
        if ( ((column == 2 || column ==6) && row!= 1) 
        || ((row == 1|| row == 4)&& (column>2 && column < 6)) ){ 
           str += '🍏';//Apple 
        } else { 
           str += "πŸ”ͺ";//Chemte 
        } 
      }
     str += "\n"; 
  } 
str +="\n";
console.log(str);

Wednesday, 24 October 2018

PHP MYSQL TO DESKTOP

Recently I created a small apache php mysql package for Windows 7 and above. It is for those who want to develop Desktop Application using php and mysql database.



You can download the source from Mawia HL Github. The repo includes manual for installation. I used IE engine to render the application. I am working on the Chromium version as well.

Wednesday, 13 June 2018

PHP ARRAY IN MIZO

Array awmzia

Php code-a thil pakhat emaw a aia tam dahna (variable) a ni. Variable kan tih ber hi nakin danglam thei eng data pawh chhinchhiahna/dahthatna a ni. Entirnan PHP-ah chuan variable siam nan $ symbol kan hmang a,  
$word = "Thu";
Hetah hian $word hi variable a ni a, a hlutna or data ken chu 'Thu' a ni. Nakinah chuan $word hian 'Thu' ni kher lo pawh kan dahthar thei a. Tichuan $word chu a saptawnga a awmzia ang deuh hian danglam thei reng a ni. Mahse variable hi chuan vawikhatah thil pakhat chiah(data type) a vawng thei a, array kan tih hi chuan thil chi hrang hrang, pakhat aia tam pawh a vawng thei a ni. Data-Type hi String, Integer, Boolean, Array, Object, Null, Float etc. te a awm thei a, hengte hi variable chuan vawi khatah chi khat chauh zel a keng thei a, Array erawh thung chuan chi khat lek emaw a aia tam, chi hrang hrang in pawlh pawhin a keng thei a ni.

PHP language-a thiam taka coding thei tur chuan array laimu leh hman dan kan zei hle a ngai a, stackoverflow-a PHP-a zawhna tam ber pawh hi array kaihhnawih deuh hlir an ni. Tun tumah hian PHP-in array-a hnathawhna tur min chhawpchhuahsak sa (builtin function) hrang hrang Duhlian tawngin kan sawifiah dawn a ni. 

PHP Array siam dan

PHP array siam nan hian array keyword leh [ ] hman ve ve theih a ni.
Example 1:
$mizo[] = "Sailo";
$mizo[] = "Pachuau";
Example 2:
$mizo[0] = "Sailo";
$mizo[1] = "Pachuau";
Example 3:
$mizo = array("Sailo", "Pachuau");
Example 4:
$mizo = ["Sailo", "Pachuau"];
A chunga Example 1-4 hi  array kan siam hi a in ang vek a, a siam dan a hrang mai chauh a ni. A hnuaia mi ang hian print_r($mizo) kan run chuan a rawn lang dawn a ni:
Array
(
    [0] => Sailo
    [1] => Pachuau
)
Array hi Key leh Value nei turin a siam theih a, kan example ah hi chuan a value ang chauh kan dah a, a key hi php-in a rawn siam chawp a, chu chu zero(0) atangin a in tan zel thin a ni. key hi a value kengtu chhinchhiahna a ni a, kan peksa loh chuan number zero atangin a in tan thin a, a key kan dahtel erawh chuan kan dahtel ang khan a hmang zawk a ni. Key hi String data type emaw, Integer data Type a ni thei. Example-ah hian key kan dah lo va, kan output kan en chuan 0 leh 1 kan hmuh tho hi. Example 2 ah hi chuan key hi kan dahtel a. Example 3 leh Example 4-ah hian kan dah lo ve ve a, mahse output kan hmuh ang hian a rawn print chhuak tho a ni.  Hetianga key atana number a awm hian Numerical Indexed (Numbera chhinchhiahna) Arrays an ti a, number ni lo kan hman chuan Associative Arrays tiin an sawi thung.

Associative Arrays siam Dan

Array hi Database ang deuhva data kentir  kan duh chuan a key tan string emaw kan duh ang datatype kan kentir thei a ni.

Example 5:
$student=["Name"=>"Zorama","Age"=>14,"Address"=>"Tuikual"];
print_r($student);
Output:
Array
(
    [Name] => Zorama
    [Age] => 14
    [Address] => Tuikual
)
$student Output kan hmuh ang hian [ ] chhunga awm zawng hi a key a ni a, dinglama Zorama, 14 leh Tuikual hi a value a ni.  A key hi database-a field name angah ngai ta ila, a value te hi row angah ngaih tur chu a ni ang. 

A chunga array hi array chhungah kan dah leh chuan Multidimensional Array tiin an sawi a, chu chu entirna nen lo en leh ila:
Example 6:
$student=[
       ["Name"=>"Zorama","Age"=>14,"Address"=>"Tuikual"],
       ["Name"=>"Pari","Age"=>12,"Address"=>"Zotlang"],
       ["Name"=>"Rama","Age"=>15,"Address"=>"Ramthar"]
    ];
print_r($student);
php 5.4 hnuai lamah chuan a hnuaia mi ang hian ziah tur a ni thung:
$student=array(
    array("Name"=>"Zorama","Age"=>14,"Address"=>"Tuikual"),
    array("Name"=>"Pari","Age"=>12,"Address"=>"Zotlang"),
    array("Name"=>"Rama","Age"=>15,"Address"=>"Ramthar")
);

print_r($student);
Output:
Array
(
    [0] => Array
        (
            [Name] => Zorama
            [Age] => 14
            [Address] => Tuikual
        )
    [1] => Array
        (
            [Name] => Pari
            [Age] => 12
            [Address] => Zotlang
        )
    [2] => Array
        (
            [Name] => Rama
            [Age] => 15
            [Address] => Ramthar
        )
)
A chunga kan hmuh ang hian array chhungah key leh value tan array kan hmang leh zel thei a ni.  A dang kan sawi belh leh hmain array chhunga element (data) te lakchhuah (get) or print chhuah dan kan sawi leh lawk ang. Example 4-a mi Sailo tih hi lo print dawn ta ila, a hnuaia mi ang hian kan print thei ang:
Example 7:
echo $mizo[0];
Sailo leh pachuau hi print ve ve kan duh chuan a key atangin vekin kan print leh thei a;
echo $mizo[0].'<br> '.$mizo[1];
Duh chuan foreach loop hmangin:
foreach($mizo as $hnam):
 echo $hnam.'<br>';
endforeach;
for loop hmanga kan print duh chuan:
for($i=0; $i<count($mizo); $i++):
    echo $mizo[$i].'<br>';

endfor;
list() hmangin a print chhuah theih bawk a:
list($sailo, $pachuau) = $mizo;
echo $sailo.'<br>'.$pachuau; 
Heng bakah hian extract() hmangin Associative Array te chu lakchhuah theih an ni leh a, Numerical Indexed Arrays chu a theih ve loh a ni. Entirnan Example 5-a mi hi a hnuaia mi ang hian la chhuak thei a ni.
Example 8:
extract($student);
echo $Name.' '.$Age.' '.$Address;
Kan hmuh ang hian kan key te kha print chhuahna variable a tan kan hmang a ni. Multidimensional array te chu nested foreach loop hmangin eng anga inthuah nasa pawh print chhuah vek theih a ni. Entirnan example 6-a mi hi kan print duh chuan a hnuaia mi ang hian:
foreach($students as $key=>$field){          
        foreach($field as $row){
            echo $row."\n";
        }
    }

PHP Array Built-in Function:

1. print_r()/var_dump(): Hei hi array i suasam tur a chhung awm dan en nan hman a ni. Kan exampleah hian kan hman bawk hi.
print_r($mizo);//Sailo & Pachuau
var_dump($mizo);//Sailo & Pachuau
2. count(): Array chhunga data awmzat chhiar nan kan hmang a ni.
count($mizo)//2
3. explode(): Hei hi String  pangai arraya dah nan kan hmang
$hnam = "Sailo, Pachuau";
$mizo = explode(",",$hnam);
print_r($mizo);
4. implode(): Hei hi a chunga mi opposite chiah hi a ni a, array pangai stringa dahna hman a ni.
$hnam = implode(",",$mizo);
echo $hnam;//Sailo, Pachuau
5. array_flip(): Array key leh Value awmna thlak thleng nan:
$student=array("Name"=>"Zorama","Age"=>14,"Address"=>"Tuikual");print_r(array_flip($student)); 
Output:
 Array
(
    [Zorama] => Name
    [14] => Age
    [Tuikual] => Address
)
6. array_push(): Array kan neihsa tawpa data dang dah belh nan:
$cms = ["Ch Chhunga","Brigadier","Hawla"];
print_r($cms); 
Array
(
    [0] => Ch Chhunga
    [1] => Brigadier
    [2] => Hawla
)
array_push($cms,"Zorama");

print_r($cms);
Array
(
    [0] => Ch Chhunga
    [1] => Brigadier
    [2] => Hawla
    [3] => Zorama
)

7. array_shift(): Array data hmasa ber paihna:
$cms = ["Ch Chhunga","Brigadier","Hawla"];
print_r($cms); 
Array
(
    [0] => Ch Chhunga
    [1] => Brigadier
    [2] => Hawla
)
array_shift($cms);

print_r($cms);
Array
(
    [0] => Hawla
    [1] => Zorama
)
8. array_unshift(): Array-a data hmasa ber tur dah chawpna, array_push opposite chiah kha ni mai:
$cms = ["Ch Chhunga","Brigadier","Hawla"];
print_r($cms); 
Array
(
    [0] => Ch Chhunga
    [1] => Brigadier
    [2] => Hawla
)
array_unshift($cms,"Zorama");

print_r($cms);
Array
(
    [0] => Zorama
    [1] => Ch Chhunga
    [2] => Brigadier
    [3] => Hawla
)
9. array_pop(): Array-a data hnuhnung ber paihna, array_shift opposite chiah kha ni mai:
$cms = ["Ch Chhunga","Brigadier","Hawla"];
print_r($cms); 
Array
(
    [0] => Ch Chhunga
    [1] => Brigadier
    [2] => Hawla
)
array_pop($cms);

print_r($cms);
Array
(
    [0] =>
Ch Chhunga    [1] => Brigadier
)
10. array_splice(): Array-a data awmsa a lai hawl vela mi paih leh a lai hawl vela data dahbelhna:
$cms = ["Ch Chhunga","Brigadier","Hawla", "Zorama"];
print_r($cms); 
Array
(
    [0] => Ch Chhunga
    [1] => Brigadier
    [2] => Hawla

          [3] => Zorama)
array_splice($cms, 1,2);//1=index1, 2=paih tur zat

print_r($cms);
Array
(
    [0] =>
Ch Chhunga    [1] => Zorama
)
Zero index atanga chhiarin 1-na chu Brigadier a ni a, data pahnih kan paih a ni. Data dahbelh kan duh chuan: 
Zorama leh Hawla inkarah Lalduhawma dahbelh dawn ta ila
$cms = ["Ch Chhunga","Brigadier","Hawla","Zorama"];
print_r($cms);

Array
(
    [0] => Ch Chhunga
    [1] => Brigadier
    [2] => Hawla
    [3] => Zorama
)
array_splice($cms, 3, 0, array("Lalduhawma"));//Duhawma hi a 3-na tur tihna
print_r($cms);

Array
(
    [0] => Ch Chhunga
    [1] => Brigadier
    [2] => Hawla
    [3] => Lalduhawma
    [4] => Zorama
)

11. array_slice(): Array-a data awmsa a lai hawl vela mi lakchhuahna a ni ber a, array_splice nen an in an lohna chu kan original array a tidanglam ve lo a ni. Brigadeir leh Hawla hi lo lachhuak dawn ta ila:
$cms = ["Ch Chhunga","Brigadier","Hawla","Zorama"];
print_r($cms);
Array
(
    [0] => Ch Chhunga
    [1] => Brigadier
    [2] => Hawla
    [3] => Zorama
)
$thar = array_slice($cms, 1, 2);//Chhiar tanna 1 hi Brigedier, lak zat tur hi 2
print_r($thar);
Array
(
    [0] => Brigadier
    [1] => Hawla
)
12. array_unique(): Array-a Duplicate data paihna:
$cms = ["Ch Chhunga","Brigadier","Hawla","Zorama", "Hawla",];
print_r($cms);
Array
(
    [0] => Ch Chhunga
    [1] => Brigadier
    [2] => Hawla
    [3] => Zorama
    [4] => Hawla
)
$thar = array_unique($cms);//Hawla hi 2 a awm a, pakhat kan paih
print_r($thar);
Array
(
    [0] => Ch Chhunga
    [1] => Brigadier
    [2] => Hawla
    [3] => Zorama
)
13. array_values(): Associative array value lakchhuahna a ni ber a, numerical index a siam nghal bawk.
$student=["Name"=>"Zorama","Age"=>14,"Address"=>"Tuikual"];
print_r($student);
Array
(
    [Name] => Zorama
    [Age] => 14
    [Address] => Tuikual
)
$thar = array_values($student);
print_r($thar);
Array
(
    [0] => Zorama
    [1] => 14
    [2] => Tuikual
)
14. array_keys(): Associative array key lakchhuahna a ni ber a, numerical index a siam nghal bawk.
$student=["Name"=>"Zorama","Age"=>14,"Address"=>"Tuikual"];
print_r($student);

Array
(
    [Name] => Zorama
    [Age] => 14
    [Address] => Tuikual
)
$thar = array_keys($student);
print_r($thar);

Array
(
    [0] => Name
    [1] => Age
    [2] => Address

Array Built-in function tam tak a awm a, hetah hian kan sawi vek seng rih lo a ni ber a. A duh tan chuan hetah hian click mai tur.

Array-a thil zawn:

He topic hi pawimawh tak nia ka hriat vangin ka telh leh hram nge. Array thil zawn hi array nihphung hrefiah vak lo tan chuan a har hle a ni, chuvangin hnathawhna ti awlsam tur lam chi ang zawng deuhvin tlem kan tarlang dawn a ni.

Key zawn nan: array_key_exists();
Example 5-a mi ang associative array-a key zawn duh kan neih chuan
echo array_key_exists("Age", $student) ? "exists" :"not exist";
Value zawn nan: in_array();
Example 5-a mi ang associative array-a value zawn duh kan neih chuan
echo in_array("Zorama", $student) ? "exists" :"not exist";
Multidimensional array key i zawn duh chuan custom function a ngai a, hetiang hian:
$arr = array( 
    '21' => array(),
    '24' => array( 
        '22' => array(),
        '25' => array( 
            '26' => 'exists' 
        ) 
    ) 
);
var_dump(multiKeyExists($arr, 22));
var_dump(multiKeyExists($arr, 23));
var_dump(multiKeyExists($arr, 26));
function multiKeyExists(array $arr, $key) {        
    // is in base array?
    if (array_key_exists($key, $arr)) {
        return true;
    }
    // check arrays contained in this array
    foreach ($arr as $element) {
        if (is_array($element)) {
            if (multiKeyExists($element, $key)) {
                return true;
            }
        }
        
    }
    return false;
}

Multidimensional array-a value i zawng duh a nih chuan php in_array hmang ringawtin a zawn theih loh va, mahni custom function siam ve a ngai tawh a ni. A hnuai mi hi en ila:

function in_arraym($needle, $haystack, $strict = false) {
    foreach ($haystack as $item) {
        if (($strict ? $item === $needle : $item == $needle) 
    || (is_array($item) && in_array_r($needle, $item, $strict))) {
            return true;
        }
    }
    return false;
}
$b = array(array("Mac", "NT"), array("Irix", "Linux"));
echo in_arraym("Irix", $b) ? 'found' : 'not found'; 

Note: Chawl rih phawt ang:


 
 
 




 




 




























Wednesday, 18 April 2018

ELECTRIC BILL PEK LEH HAIHAWT

Vawi khat chu haihawt vang liau liauin zing dar 10 velah Electric Bill pek a ngai tih ka hrechhuak thut a. Due Date ni mah se chaw hma a la ni bawk a, ka la pek theih dawn hi tiin Firefox Browser-ah chuan P & E site chu kan keu ta a. Mahse vanduaithlak takin khar a nih tawh thu a rawn lang tlat mai a. Due date awmzia Duhlian tawnga ka hriat dan te ka ringhlel ta rum rum mai a.
Ka Cambridge Dictionary ka keu nghal a, tiang hian a lo inziak a: “the date on which something is expected to happen, especially the date on which a sum of money is expected to be paid" a lo inti kulh mai a. Pek Ni tura beisei, thlen ni tura ruat tihna lam a ni a. 
Oxford Dictionary chuan "The date on which something falls due, especially the payment of a bill or the expected birth of a baby" tiin a dah thung a. Bill pekfel hun emaw naupian hun tura ruat ni tihna a ni ber. 
Meriam Webster chuan "the day by which something must be done, paid". 
Online Business Dictionary chuan "Date on which a bill of exchange (check, draft, letter of credit, etc.) is payable." tiin an dah thung. Hei chuan pek theih ni tiin a sawi thung a. Payment Due Date chu "The date when payment should be received by the company." tiin an ziak thung. Pawisa dawng tur lamin an dawn ngei hun/ni tihna a ni ber.
Collins Dictionary chuan “The due date for a payment is the date by which it is to be paid”. Pekfel Ni a ti deuh tawp.
Free Dictionary chuan “Date on which a debt must be paid.” Ba rulh ni.
FindLaw Legal Dictionary chuan “The due date is always indicated and means that the payment must be received on or before the specified date.tiin a dah. Pek theih ni or a hma ni.  
Ka chhuanvawr ber JF Dictionary chuan due (adj) chu hetiang hian a letling a: ba, bat, bΓ’k, hmabΓ’k, dik, mawihnai, awm, thleng tΓ»ra ruat. Date(n) chu: ni, tarik, thil thlen hun. A tawi zawngin Due date chu tarik tiin a sawi theih ang. Tichuan Mizo tawnga ka hriat thiam theih dan ril ber chu PΓͺktlΓ’k Ni or Pektlak Ni tura ruat tih hi a ni.
A chunga hrilhfiahna (definition) atang hi chuan la pΓͺk theih awm tak turah ka ngai a; an khar (close) tawh bawk si avangin a thla leha pek ka ngaih phah ta a, late fee ka chawi a ngai zui bawk.
Due Date chaw hma thleng tal hi chu la hawng se Due Date hi a chanve talin a English awmzia hi an hmang dik deuh tur. Business Terminology atang chuan Due Date a la liam em loh chuan la pek theih tur awm tak a ni a. A nih loh vek pawhin Payment not receiveable on due date te ti ta se. Eng le khaw le Haihawt thlen chang a awm theih avangin Due Date hma ngeia Bill pe thei ngei turin alarm te pawh set mai a tul dawn ni te pawhin a lang. Haihawt hian man a nei a ni.
When you owe someone money it is very important that you always pay them back before the due date has passed. 
References: 
JF Dicitonary (Android) by Lalsangpuia Ralte