How to Check checkbox is checked or not?

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.

function is_checkbox_selected(element){

    if(element.checked) {
        // CheckBox is checked
    }else {
        // Checkbox is not checked


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?


$mt_rand = mt_rand(1000000000, 9999999999); 
echo $mt_rand;


$unique_id = uniqid();
echo $unique_id;
 uniqid( prefix, more_entropy ) 

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.

If set to TRUE, uniqid() will add additional entropy (using the combined linear congruential generator) at the end of the return value, which increases the likelihood that the result will be unique.



$mt_rand = mt_rand(1000000000, 9999999999);
$timestamp = time();
$temp = $mt_rand + $timestamp;
$temp2= substr($tmp, 0,10);

echo $temp2;

How to add a Facebook LIKE Button in the Website??

To Create the Like & Share Button Click on The Facebook Developers Page

Facebook Like
Facebook Like Button

A single click on the Like button will ‘like’ pieces of content on the web and share them on Facebook. You can also display a Share button next to the Like button to let people add a personal message and customize who they share with.


  1. Choose URL or Page
    Pick the URL of a website or Facebook Page you want to use with the like button.
  2. Code Configurator
    Paste the URL to the code configurator and adjust settings like the width of your like button. Click the Get Code button to generate your like button code.
  3. Copy & Paste HTML Snippet
    Copy and past the snippet into the HTML of the destination website.
  4. Remove Duplication If Necessary
    If you already have code to activate logging of app events, remove the autoLogAppEvents=1 statement from the pasted code to prevent duplicate logging.

In addition to the settings above, you can also change the following:

SettingHTML5 AttributeDescriptionDefault
actiondata-actionThe verb to display on the button. Can be either likeor recommendlike
colorschemedata-colorschemeThe color scheme used by the plugin for any text outside of the button itself. Can be light or dark.light
hrefdata-hrefThe absolute URL of the page that will be liked.Current URL.
kid_directed_sitedata-kid-directed-siteIf your web site or online service, or a portion of your service, is directed to children under 13 you must enable thisfalse
layoutdata-layoutSelects one of the different layouts that are available for the plugin. Can be one of standardbutton_countbuttonor box_count. See the FAQ for more details.standard
refdata-refA label for tracking referrals which must be less than 50 characters and can contain alphanumeric characters and some punctuation (currently +/=-.:_). See the FAQ for more details.None
sharedata-shareSpecifies whether to include a share button beside the Like button. This only works with the XFBML version.false
show_facesdata-show-facesSpecifies whether to display profile photos below the button (standard layout only). You must not enable this on child-directed sites.false
sizedata-sizeThe button is offered in 2 sizes i.e. large and small.small
widthdata-widthThe width of the plugin (standard layout only), which is subject to the minimum and default width. Please see Layout Settings below for more details.See standard in Layout Settings

For More Details Please Visit:

#Stackofcodes #FacebookLike #FacebookShare #FacebookPlugin #HowToAddFacebookLikeButton #AddFacebookShareButton #DevelopersStackofcodes #StackofcodesDevelopers

Google+ is no longer available for consumer (personal) and brand accounts

What happened to Google+?

In December 2018, we announced our decision to shut down Google+ for consumers in April 2019.Other Google products (such as Gmail, Google Photos, Google Drive, YouTube) were not shut down as part of the consumer Google+ shutdown and you can continue using those products. The Google Account you use to sign in to these services will remain. Note that photos and videos already backed up in Google Photos will not be deleted. Learn more

What happened to my Google+ content?

We are in the process of deleting content from consumer Google+ accounts and Google+ pages. This process will take a few months to complete, and content may remain through this time. In the meantime, if you previously created content on Google+, you may be able to download and save your remaining Google+ content and delete your Google+ profile. You may also be able to view and delete your remaining Google+ activity.

If I also use Google+ with my G Suite account, for example at work or school, how will I be impacted?Google+ for G Suite will continue as a way for people across an organization to have discussions. Learn more about how we’re continuing our investment in Google+ for G Suite.If you’re not sure if your organization uses G Suite, you can check here. G Suite customers may see some changes to Google+ features related to the consumer Google+ shutdown. You can find more details here or you can talk to your G Suite administrator to learn more.

Source: Contents form Google Plus & Google

Most Useful Git commands for Terminal use


Downloads an Existing Git repository to your local computer.

git clone

// Example: git clone

The “clone” command downloads an existing Git repository to your local computer. You will then have a full-blown, local version of that Git repo and can start working on the project.

Typically, the “original” repository is located on a remote server, often from a service like GitHub, Bitbucket, or GitLab). That remote repository’s URL is then later referred to as the “origin”.

** Example::
In its simplest (and most common) form, only the repository URL is specified:

cd folder/to/clone-into/

This will download the project to a folder named after the Git repository (“git-crash-course” in this case). If you want a different folder name, simply specify it as the last parameter:

git clone

This will download the project to a folder named after the Git repository (“git-crash-course” in this case). If you want a different folder name, simply specify it as the last parameter:

git clone other-name

# Update <MyBranch> with Local

Update with Local Branch

Check current Branch:

git branch

Checkout the <MyBranch>

git checkout MyBranch

Check Status of Files:

git status

Add changes files

git add .

Commit Changes Files:

git commit -m "Any Message againt update"

Update Git repository:

git push

# Update Master with <MyBranch>

Update Master with

merge master branch with current branch:
(Currently on branch development)

$ git merge master

** here, After merge master if any merge conflicts found, resolve conflicts here & run check if it is ok.

Checkout Master:

git checkout master

Merge into Development branch:

(now, there won’t be any conflicts in Master as solved in development branch)

git merge development

git merge development 

or, Merge Branch Development with master Branch with a Commit Message

git merge <development> --commit -m "merge branch development to master"