Posts

Showing posts from February, 2019

How to get 'month' from date sql?

Type the following SQL statement : SELECT  MONTH( '2017/08/25' )  AS  Month; so when the ouput will display "08" because the month from the date above is "08". For example, can go try at : https://www.w3schools.com/sql/func_sqlserver_month.asp

How to hide "print" button after print?

Image
There are two ways to hide the "print" button which is use CSS or javacript. 1) Using CSS Create CSS style name "@media only print".  Inside the CSS style you can refer the following picture and you can insert the code into the style. After that, you can add "print" button and call the CSS style 2) Using Javascript Just same like CSS, you must include the following javascript inside your html code <script> function printpage()   {   window.print()   } </script> </head> <body> <input type="button" value="Print this page" onclick="printpage()"> </body>

How to create new branch in Git?

Image
Step 1 : You must be at the master branch Step 2 :  After that, click the "Branch" button at the top Step 3 : Fill the empty form  for New Branch like this format = "feature/programmercode-processname" Step 4 : After fill the space, you can create branch

How to display same table but different column in one row?

Image
Firstly, create a model. As the example below, I created new model called "Payroll_model". Inside the model, make array for the data that you want to display and make SQL statement as example below : Next, at the controller, you can call back the previous model : At the view, you must do a looping and call the array from the controller  so that all the data can be display.

POP3 vs IMAP

Image
What is POP3 and IMAP? POP3 or Post Office Protocol 3 and IMAP is a standard protocol for receiving email. These two protocols allow people to use programs to manage their email. However, there are differences between these two protocols. Differences between POP3 and IMAP : - POP3 Email can be download from a server into a single computer. Sent messages are stored on a single device. If you want to keep messages on the server, make sure the setting "Keep email on server" is enabled or all messages are deleted from the server once downloaded to the app or software - IMAP Emails are stored on the server. Sent messages are stored on the server. Messages can be synced and accessed across multiple devices.

What is Dummy Text?

Image
Definition Dummy text is a text that used in publishing industry or web designer industry which is as a sample text and it will be replace by the real text. Example of dummy text  - Lorem Ipsum is the most common used dummy text. It  has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. 

Jadilah batu, Bukannya Pasir

Image
Berdasarkan tajuk diatas,terdapat 2 situasi yang boleh kita contohi untuk renungan bersama.  Situasi pertama : Ada satu balang kosong dan balang itu mula-mula dipenuhi dengan pasir terlebih dahulu. Apabila semua pasir telah dihabiskan, batu pula akan dimasukkan ke dalam balang tersebut. Kemudian, apabila balang tersebut telah penuh, terdapat lebihan batu yang tidak dapat dimasukkan. Situasi kedua : Terdapat satu balang kosong dan balang itu dipenuhi dengan kesemua batu terlebih dahulu. Kemudian, pasir pula akan dimasukkan dan pasir tersebut memenuhi ruang-ruang kosong yang terdapat dalam balang tersebut. Dan apabila balang tersebut telah penuh, tiada lebihan batu atau pasir yang tertinggal. Kesimpulan Berdasarkan 2 objek diatas, batu diumpamakan seperti perkara yang utama terdapat dalam kehidupan kita, manakala pasir pula diumpamakan sebagai perkara yang tidak penting. Pada situasi pertama kita dapati terdapat banyak lebihan batu yang bermaksud banyak perkara yang ...