Pages

Wednesday, 10 September 2014

Do hyphens (-) in MySQL table names cause issues?

Yes, it causes issues if you use it directly like

DESCRIBE my-table;

This will definately cause issues. You will get the following error:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-table' at line 1

We can resolve this issue enclosing the tablename in backticks (`). The identifier quote character is the backtick (`). So the syntax will be

DESCRIBE `my-table`;

For more details about the permitted characters in unquoted identifiers, check the MySQL identifiers HERE.


Monday, 8 September 2014

What is the difference between == and === in PHP?

The == operator just checks to see if the left and right values are equal. But, the === operator (note the extra “=”) actually checks to see if the left and right values are equal, and also checks the variable types.

Friday, 10 January 2014

How to get a free domain and free hosting?


Steps to make your free domain and free hosting:


- Click dot.tk and login [with google or facebook or email or whatever]

- Once you signed in go to the domain panel tab on top, and select add a domain domain Ex. coolwebsite.tk

- Select free domain and press next.

- Put the registration length to 12 months.

- Once you are done with your .tk domain on dot.tk, register with 000webhost.com and create your new .tk domain.

- Or login to your 000webhost.com account and create a new domain if already registered.

- Select "I want to host my own domain" and enter your .tk website name and set a password.

- When the account is created there will be a notice on top that your namedserver is not set.

- At the right you can view the account details.

- Copy the IP address and go to your dot.tk account and go to the domain panel.

- Click on "MODIFY" to add the IP address to your selected domain Ex. coolwebsite.tk

- Select "Dot TK DNS Service".

- Under the hostname put your .tk domain name [Ex. coolwebsite.tk] and under the IP enter the IP you copied from 000webhost.com and then click "Add New".

- Again under the hostname put your .tk domain name with www [Ex. www.coolwebsite.tk] and under the IP enter the IP you copied from 000webhost.com and then click "Add New".

- Click "Save Changes".

- Everything is now set perfectly.

- You will have to wait for a while around 15-20 mins to activate the server.

- You can check my website:  http://traffix.tk 

Monday, 9 December 2013

GIT Part 2

Getting started 

Let’s get started with GIT. We will start with installing. You can download it from here
Git-1.8.4-preview20130916.exe
We will be using windows. We will not use any third party softwares here, as it slows down the process. 
We will use Git Bash. So go to start and open Git Bash.
In this window type 
ssh-keygen
This command will generate a key. Out of the files that are created in the default folder location, open
the file named “id_rsa.pub”. This file contains the public key.
Now login to your github.com account (assuming that you already have a github account. If not it just takes 2 minutes. Go on and register for your free account on github.com) 
Go to properties >> SSH Key >> Add SSH Key that was created in the previous step (the one which we
created in id_rsa.pub)
Part 3 COMING SOON...

Wednesday, 16 October 2013

GIT Part 1

Linus Torvalds
Linus Torvalds

How did GIT come into existence?

Linus Torvalds, the creator of Linux, wanted to make an OS that was open source. He used to worK on UNIX. So, based on unix he started to develop his own operating system. Later on he also added in his team, the people all over the globe who were intrested in the development of Linux. Every on used VCS. But Linus Torvalds did not like the time it took just to commit a single line of code. So he decided to develop his own versioning system, which will complete the operations within approximatly 3 seconds. This is how GIT came into existance. GIT is free for public access. But if you want to make the repository private, you have to use their paid service.


What is Git?

Git is a Distributed Version Control Systems (DVCSs). In a DVCS (such as Git, Mercurial, Bazaar or Darcs), clients don’t just check out the latest snapshot of the files: they fully mirror the repository. Thus if any server dies, and these systems were collaborating via it, any of the client repositories can be copied back up to the server to restore it. Every checkout is really a full backup of all the data. Furthermore, many of these systems deal pretty well with having several remote repositories they can work with, so you can collaborate with different groups of people in different ways simultaneously within the same project. This allows you to set up several types of workflows that aren’t possible in centralized systems, such as hierarchical models. 
 

Features

Git is easy to use. It’s incredibly fast, it’s very efficient with large projects, and it has an incredible branching system for non-linear development.