Saturday, April 27, 2013

Lightbox and colorbox jquery


Colorbox - a jQuery lightbox


Features

  • Supports photos, grouping, slideshow, ajax, inline, and iframed content.
  • Lightweight: 10KB of JavaScript (less than 5KBs gzipped).
  • Appearance is controlled through CSS so it can be restyled.
  • Can be extended with callbacks & event-hooks without altering the source files.
  • Completely unobtrusive, options are set in the JS and require no changes to existing HTML.
  • Preloads upcoming images in a photo group.
  • Well vetted and currently in use in over 600,000 websites.

Usage

Colorbox accepts settings from an object of key/value pairs, and can be assigned to any HTML element.
// Format:
$(selector).colorbox({key:value, key:value, key:value});
// Examples:
// Image links displayed as a group
$('a.gallery').colorbox({rel:'gal'});

// Ajax
$('a#login').colorbox();

// Called directly, without assignment to an element:
$.colorbox({href:"thankyou.html"});

// Called directly with HTML
$.colorbox({html:"<h1>Welcome</h1>"});

// Colorbox can accept a function in place of a static value:
$("a.gallery").colorbox({rel: 'gal', title: function(){
  var url = $(this).attr('href');
  return '<a href="' + url + '" target="_blank">Open In New Window</a>';
}});

View Demos

1 2 3 4 5

Sunday, April 14, 2013

What is WordPress and How to Install WordPress








WordPress is a free and open source blogging tool and a content management system (CMS) based on PHP and MySQL. It has many features including a plug-in architecture and a template system. WordPress is used by over 14.7% of Alexa Internet's "top 1 million" websites and as of August 2011 manages 22% of all new websites. WordPress is currently the most popular blogging system in use on the Web, powering over 60 million websites worldwide
It was first released on May 27, 2003, by founders Matt Mullenweg and Mike Little as a fork of b2/cafelog. As of December 2011, version 3.0 had been downloaded over 65 million times.



INSTALL

installing on localhost you need to run XAMPP or WAMP server , Installing direct on server you need to have Cpanel addon called Softaculous Auto Installer installed that all you need try it and start your own blog right now..

Monday, April 1, 2013

Arrays in php


An array stores multiple values in one single variable:

<?php
$cars=array("Volvo","BMW","Toyota");
echo "I like " . $cars[0] . ", " . $cars[1] . " and " . $cars[2] . ".";
?>



Array in PHP

In PHP, the array() function is used to create an array:
array();
In PHP, there are three types of arrays:
  • Indexed arrays - Arrays with numeric index
  • Associative arrays - Arrays with named keys
  • Multidimensional arrays - Arrays containing one or more arrays

Thursday, March 28, 2013

Internet Attack March 2013


Huge cyber-attack causes worldwide disruption


A record-breaking cyber-attack targeting an anti-spam watchdog group has sent ripples of disruption coursing across the internet, experts have said.
Spamhaus, a site responsible for keeping ads for counterfeit Viagra and bogus weight-loss pills out of the world's inboxes, said it had been buffeted by the monster denial-of-service attack since mid-March, apparently from groups angry at being blacklisted by the Swiss-British group.
"It is a small miracle that we're still online," Spamhaus researcher Vincent Hanna said on Wednesday.
Denial-of-service attacks overwhelm a server with traffic, like hundreds of letters being jammed through a mail slot at the same time.
Security experts measure those attacks in bits of data per second. Recent cyberattacks, like the ones that caused persistent outages at US banking sites late last year, have tended to peak at 100 billion bits per second.
But the furious assault on Spamhaus has shattered the charts, clocking in at 300 billion bits per second, according to San Francisco-based CloudFlare Inc, which Spamhaus has enlisted to help it weather the attack.
"It was likely quite a bit more, but at some point measurement systems can't keep up," CloudFlare chief executive Matthew Prince wrote in an email.
Patrick Gilmore of Akamai Technologies said that was not an understatement.
"This attack is the largest that has been publicly disclosed, ever, in the history of the Internet,'' he said.
Disgruntled service providers
It is unclear who exactly was behind the attack, although a man who identified himself as Sven Olaf Kamphuis said he was in touch with the attackers and described them as mainly consisting of disgruntled Russian internet service providers who had found themselves on Spamhaus' blacklists.
There was no immediate way to verify his claim.
He accused the watchdog of arbitrarily blocking content that it did not like.
Spamhaus has widely used and constantly updated blacklists of sites that send spam.
"They abuse their position not to stop spam but to exercise censorship without a court order," Kamphuis said.
Gilmore and Prince said the attack's perpetrators had taken advantage of weaknesses in the Internet's infrastructure to trick thousands of servers into routing a torrent of junk traffic to Spamhaus every second.
Both experts said the attack's sheer size had sent ripples of disruptions across the internet as servers moved mountains of junk traffic back and forth across the web.
"At a minimum there would have been slowness," Prince said, adding in a blog post that "if the Internet felt a bit more sluggish for you over the last few days in Europe, this may be part of the reason why."
At the London Internet Exchange, where service providers exchange traffic across the globe, spokesman Malcolm Hutty said his organisation had seen "a minor degree of congestion in a small portion of the network."
But he said it was unlikely that any ordinary users had been affected by the attack.
Source : Aljazeera

Saturday, March 23, 2013

What technology facebook use



Careers at Facebook



Facebook uses the LAMP stack, so if you want to get a career with them you're going to want to focus on that. In addition they often have C++ and/or Java listed in their requirements as well.
One of the postings includes the following requirements:
  • Expertise with C++ and/or Java
  • Knowledge of perl or PHP or python
  • Knowledge of relational databases and SQL, preferably MySQL and Oracle
Another:
  • Expertise in PHP, JavaScript, and CSS.
Another:
  • Knowledge of perl or PHP or python
  • Knowledge of relational databases and
  • SQL, preferably MySQL Knowledge of
  • web technologies: XHTML, JavaScript Experience with C, C++ a plus
check it out careers at facebook 

Object Oriented JavaScript Frameworks


Some Object Oriented JavaScript Frameworks which help you to build are rock your website


Sunday, March 17, 2013

Some Basic Linux Commands


cat – Shows the contents of files to the screen.
Usage:
1
2
# cat file.txt
# Hello World
Also this command can be used to count the number of lines, words and characters in a file:
1
cat  | wc -l
- number of lines
1
cat  | wc -w
- number of words
1
cat  | wc -c
- number of characters
To search for a word in a file you can use:
1
# cat  | grep <some word>
cd – Change directory
the ‘cd’ command should be used followed by the name of a directory including the full path to that directory. If you execute ‘cd’ without arguments the working directory will be switched to your ‘home directory’.
Usage:
1
# cd /path/to/directory_name/
To move one directory up, you can use the shortcut command:
1
# cd ..
cp – Copy files and directories
Usage:
1
# cp <SOURCE> <DESTINATION>
Example:
1
# cp /root/file /tmp/
With this command you will make a copy of ‘file’ located in the ‘/root’ directory to the ‘/tmp’ directory if it does not exist. It will overwrite it in case the ‘file’ already exists.
df – Check the amount of free disk space on the filesystems.
Usage:
1
# df
To get a more easily readable (human-readable) output of the command use:
1
# df -h
free – Gives information about used and free memory and swap space on a Linux machine.
Usage:
1
# free
The -b option shows the amount of memory in bytes; the -k option (set by default) shows it in kilobytes; the -m options shows it in megabytes.
rm – Removes directories, files, symbolic links, etc. from the filesystem.
Usage:
1
# rm <OPTION> <FILE>
Most common options for this command are:
-f : ignore nonexistent files, never prompt
-r : remove directories and their contents recursively
-v : explain what is being removed
Note: Always double check before removing any file or directory.
ls – Displays a list of files and directories in a specific directory.
If you enter just ‘ls’ without specifying a directory, it will display a list of files and directories in the working directory.
Usage:
1
# ls
Most common options for this command are:
-a : shows all files and folders including the hidden ones.
-l : use a long listing format
mv – Moves files and directories from one directory to another or renames a file or directory.
Usage:
Move ‘file’ from ‘/root’ to ‘/tmp’ directory
1
# mv /root/file /tmp/
Rename ‘file1′ to ‘file2′
1
# mv file1 file2
passwd – change user password
Usage:
1
# passwd <USERNAME>
If you execute just ‘passwd’ without specifying the username, you will change your root password.
Note: Never use passwords that are easily guessable, such as passwords based upon names, street addresses, dictionary words, significant dates, etc… A strong password consists of a combination of letters (both upper and lower case), numbers and special characters and it should be at least 8 characters long.
mkdir – Creates directory(ies) if they don’t already exist
Usage:
1
# mkdir <NEW_DIRECTORY>
Example:
1
# mkdir /var/www/<NEW_DIRECTORY>