Latest Posts:

How to Install Virtualenv in Ubantu 16.04 or Windows?

June 7, 2019 8:17 pm

Ubantu or Linux When we are going to run any project in Python Django in the Windows or Ubantu system, we need the virtual environment installed into our system. So first we will see how to install virtual environment into our system. How to install virtual virtualenv or environment: For Ubantu or Linux System: sudo apt-get install python3-pip In Windows System, we can use this commands.. apt-get install python3-pip OR apt-get install pip Then install virtualenv using pip3 or pip For Ubantu System we can use… sudo pip3 install virtualenv OR sudo pip install virtualenv For Windows System,

Git Cheat Sheet

June 4, 2019 7:33 pm

INSTALL GIT GitHub provides desktop clients that include a graphical user interface for the most common repository actions and an automatically updating command line edition of Git for advanced scenarios. GitHub for Windows htps:// GitHub for Mac htps:// Git distributions for Linux and POSIX systems are available on the official Git SCM web site. Git for All Platforms htp:// CONFIGURE TOOLING: Configure user information for all local repositories $ git config –global “” Sets the name you want atached to your commit transactions

How to Make a Query in CakePHP?

June 2, 2019 7:03 am

To Query from Table in CakePHP we can use the below code. We can also Query like ORDER_BY, Select Table FIELDS etc. # Find Order from Order Table in CakePHP $this->Order->find(‘all’, array( ‘recursive’ => -1, ‘conditions’=>array( ‘’=>1 ), ‘fields’ => array( ‘’, ‘’, ‘’), ‘order’ => array(‘’ => ‘DESC’), )); # For Order By filter in Querry, we can use. ‘order’ => array(‘’ => ‘DESC’),

How to Get the Header Data CakePHP or PHP?

May 19, 2019 2:51 pm

I Personally Tried a lot for getting the posted header data in cakephp. The Header data required to check the posted token. Token validation , to check the posted request is valid or not. Finally I found the Solution.PHP It self has a function named, getallheaders() Syntax: getallheaders ( void ) : array Description: Fetches all HTTP headers from the current request. Return Values::An associative array of all the HTTP headers in the current request, or FALSE on failure. Example #1 getallheaders() example $headers = getallheaders(); foreach( $headers as $name => $value) { echo “$name: $value\n”;

How to Check checkbox is checked or not?

May 19, 2019 2:33 pm

By using the function we can know if the checkbox is selected or checked or not. then depending on the result we can perform operations. <script> function is_checkbox_selected(element){ if(element.checked) { // CheckBox is checked }else { // Checkbox is not checked } } </script> The Html code: Call the above function from on check or on click from javascript or Jquery. <input type=”checkbox” name=”accept” value=”1″ onclick=”is_checkbox_selected(this)” >

How to Create Unique Number in PHP?

May 19, 2019 2:01 pm

Option-1: $mt_rand = mt_rand(1000000000, 9999999999); echo $mt_rand; Option-2: $unique_id = uniqid(); echo $unique_id; uniqid( prefix, more_entropy ) prefix:Can be useful, for instance, if you generate identifiers simultaneously on several hosts that might happen to generate the identifier at the same microsecond. With an empty prefix, the returned string will be 13 characters long. If more_entropy is TRUE, it will be 23 characters. more_entropy:If set to TRUE, uniqid() will add additional entropy (using the combined linear congruential generator) at the end of the return value, which increases