on Tuesday, 15 April 2014
In practice, the Google Analytics code will work regardless of where you put it on the page. We recommend inserting it in the <head> section or after the opening <body> tag if possible. This is because the higher up it is inserted in your page source code, the sooner it will get executed after the user lands on your page. If you put your Analytics tracking code at the bottom of your code, it will be the last piece of script to get executed. Sometimes, if the user navigates to another page before the page has finished loading, the tag may not have time to fire and the data you collect will be less accurate. That's why the best practice is to put the tag towards the top of your page code.


DOMContentLoaded Event
DOMContentLoaded Event fired when all element of the page is fully loaded But Not resources
Load Event
Load Event fires when page is fully loaded with resources(stylesheets, images, and sub frames)
Demo
on Friday, 11 April 2014

Single Page Website

  Create a Single Page Website with No Scroll required.

If you are developed a static site and three or four pages with minimal images or information than i suggest create a single page website. Single page website is more attractive and no time loading required for web pages.easy to implement and user interactive


Ready function is execute when the DOM is fully loaded.

.ready()is guaranteed to be executed after the DOM is ready, so this is usually the best place to attach all other event handlers and run other jQuery code. When using scripts that rely on the value of CSS style properties, it's important to reference external stylesheets or embed style elements before referencing the scripts.

Two way writing Ready() method

1.$( document ).ready(function() {
// Handler for .ready() called.
});

2.$(function() {
// Handler for .ready() called.
});
on Thursday, 10 April 2014







alphapager
Simple alphanumeric pager for paging through data by e.g. A-Z.This extension is an alphanumeric pager which could be used standalone or within a Grid-/ListView.

-It is easy to implement but hard to find how to implement

How to implaement


step 1: 
Both function doing same work add element in the array and Returns the number of elements in the new array.

So whats the difference ?

PHP Push Array – array_push()

Add one or more elements onto the end of array. Returns the number of elements in the new array.

Standard method using array_push();
// create our array with 1 element
$arr = array("one");
// $count will be 3 and $arr will now be array("one","two","three");
$count = array_push($arr,"two","three");

PHP Unchift Array – array_unshift()

Add one or more elements to the beggining of an array. Returns the number of elements in the new array.

Standard method using array_unshift();
// create our array with 3 elements
$arr = array("three","four","five");
// $count will now be 5 and array will hold one - five
$count = array_unshift($arr,"one","two");
on Wednesday, 9 April 2014

Adding Yii Framework

Head over to Yii's website and download Yii Framework. Once the download completed, extract Yii to an easy to remember place inside of you htdocs folder. I went with

C:\xampp\htdocs\yii\

Now that Yii is in place, navigate to your htdocs folder from Command Prompt

C:\ > cd C:\xampp\htdocs

And run the following command to generate your first web app. Be sure to replace yii-app with your application name. At the first prompt, type yes to build the web app.

C:\xampp\htdocs\ > php.exe yii/framework/yiic.php webapp C:\xampp\htdocs\yii-app

Make your Drop down list Stylish

There was always difference in styling of drop down list in different browser.So big Question is how to make a standard drop down list ? here is easy solution make custom drop down list. Oh ! so bored now how can i make custom drop down ? Just Copy below code and use & change this code what ever you want.

See the Pen Custom drop-down list by Parth (@Parthmy007) on CodePen.
on Sunday, 6 April 2014



ALL DOS COMMAND



ADDUSERSHelps Add or list users to/from a CSV file
ARPAddress Resolution Protocol
ASSOCChange file extension associations
ASSOCIATOne step file association
ATSchedule a command to run at a later time
ATTRIBChange file attributes
BOOTCFGEdit Windows boot settings
BROWSTATGet domain, browser and PDC info
CACLSChange file permissions
CALLCall one batch program from another
CDChange Directory - move to a specific Folder
CHANGEChange Terminal Server Session properties
CHKDSKCheck Disk - check and repair disk problems
CHKNTFSCheck the NTFS file system
CHOICEAccept keyboard input to a batch file
CIPHEREncrypt or Decrypt files/folders *
CleanMgrAutomated cleanup of Temp files, recycle bin
CLEARMEMClear memory leaks
CLIPCopy STDIN to the Windows clipboard.
CLSClear the screen
CLUSTERWindows Clustering
CMDStart a new CMD shell
COLORChange colors of the CMD window
COMPCompare the contents of two files or sets of files
COMPACTCompress files or folders on an NTFS partition
COMPRESSCompress individual files on an NTFS partition
CON2PRTConnect or disconnect a Printer
CONVERTConvert a FAT drive to NTFS.
COPYCopy one or more files to another location
CSVDEImport or Export Active Directory data
DATEDisplay or set the date
DcomcnfgDCOM Configuration Utility
DEFRAGDefragment hard drive
DELDelete one or more files
DELPROFDelete NT user profiles
DELTREEDelete a folder and all subfolders
DevConDevice Manager Command Line Utility
DIRDisplay a list of files and folders
DIRUSEDisplay disk usage
DISKCOMPCompare the contents of two floppy disks
DISKCOPYCopy the contents of one floppy disk to another
DNSSTATDNS Statistics
DOSKEYEdit command line, recall commands, and create macros
DSADDAdd user (computer, group..) to active directory
DSQUERYList items in active directory
DSMODModify user (computer, group..) in active directory
ECHODisplay message on screen
ENDLOCALEnd localisation of environment changes in a batch file
ERASEDelete one or more files
EXITQuit the CMD shell
EXPANDUncompress files
EXTRACTUncompress CAB files
FCCompare two files
FDISK Disk Format and partition
FIND Search for a text string in a file
FINDSTR Search for strings in files
FOR Loop command: all options Files, Directory, List
FORFILESBatch process multiple files
FORMAT Format a disk
FREEDISKCheck free disk space (in bytes)
FSUTILFile and Volume utilities
FTPFile Transfer Protocol
FTYPEDisplay or modify file types used in file extension associations
GLOBALDisplay membership of global groups
GOTODirect a batch program to jump to a labelled line
HELPOnline Help
HFNETCHKNetwork Security Hotfix Checker
IFConditionally perform a command
IFMEMBERIs the current user in an NT Workgroup
IPCONFIGConfigure IP
KILLRemove a program from memory
LABELEdit a disk label
LOCALDisplay membership of local groups
LOGEVENTWrite text to the NT event viewer.
LOGOFFLog a user off
LOGTIMELog the date and time in a file
MEMDisplay memory usage
MD Create new folders
MODEConfigure a system device
MOREDisplay output, one screen at a time
MOUNTVOLManage a volume mount point
MOVEMove files from one folder to another
MOVEUSERMove a user from one domain to another
MSGSend a message
MSIEXECMicrosoft Windows Installer
MSINFOWindows NT diagnostics
MSTSCTerminal Server Connection (Remote Desktop Protocol)
MUNGEFind and Replace text within file(s)
MVCopy in-use files
NETManage network resources
NETDOMDomain Manager
NETSHConfigure network protocols
NETSVCCommand-line Service Controller
NBTSTATDisplay networking statistics (NetBIOS over TCP/IP)
NETSTAT Display networking statistics (TCP/IP)
NOW Display the current Date and Time
NSLOOKUPName server lookup
NTBACKUPBackup folders to tape
NTRIGHTSEdit user account rights
PATHDisplay or set a search path for executable files
PATHPINGTrace route plus network latency and packet loss
PAUSESuspend processing of a batch file and display a message
PERMSShow permissions for a user
PERFMONPerformance Monitor
PING Test a network connection
POPD Restore the previous value of the current directory saved by PUSHD
PORTQRY Display the status of ports and services
PRINTPrint a text file
PRNCNFGDisplay, configure or rename a printer
PRNMNGRAdd, delete, list printers set the default printer
PROMPTChange the command prompt
PsExecExecute process remotely
PsFile Show files opened remotely
PsGetSid Display the SID of a computer or a user
PsInfo List information about a system
PsKill Kill processes by name or process ID
PsList List detailed information about processes
PsLoggedOnWho’s logged on (locally or via resource sharing)
PsLogListEvent log records
PsPasswdChange account password
PsService View and control services
PsShutdownShutdown or reboot a computer
PsSuspendSuspend processes
PUSHDSave and then change the current directory
QGREPSearch file(s) for lines that match a given pattern.
RASDIALManage RAS connections
RASPHONE Manage RAS connections
RECOVERRecover a damaged file from a defective disk.
REGRead, Set or Delete registry keys and values
REGEDITImport or export registry settings
REGSVR32Register or unregister a DLL
REGINIChange Registry Permissions
REMRecord comments (remarks) in a batch file
RENRename a file or files.
REPLACEReplace or update one file with another
RDDelete folder(s)
RDISKCreate a Recovery Disk
RMTSHAREShare a folder or a printer
ROBOCOPYRobust File and Folder Copy
ROUTEManipulate network routing tables
RUNASExecute a program under a different user account
RUNDLL32Run a DLL command (add/remove print connections)
SCService Control
SCHTASKSCreate or Edit Scheduled Tasks
SCLISTDisplay NT Services
ScriptItControl GUI applications
SETDisplay, set, or remove environment variables
SETLOCALControl the visibility of environment variables
SETXSet environment variables permanently
SHAREList or edit a file share or print share
SHIFTShift the position of replaceable parameters in a batch file
SHORTCUTCreate a windows shortcut (.LNK file)
SHOWGRPSList the NT Workgroups a user has joined
SHOWMBRSList the Users who are members of a Workgroup
SHUTDOWNShutdown the computer
SLEEP Wait for x seconds
SOONSchedule a command to run in the near future
SORTSort input
STARTStart a separate window to run a specified program or command
SUSwitch User
SUBINACLEdit file and folder Permissions, Ownership and Domain
SUBSTAssociate a path with a drive letter
SYSTEMINFOList system configuration
TASKLISTList running applications and services
TIMEDisplay or set the system time
TIMEOUTDelay processing of a batch file
TITLESet the window title for a CMD.EXE session
TOUCH Change file timestamps
TRACERT Trace route to a remote host
TREE Graphical display of folder structure
TYPEDisplay the contents of a text file
USRSTATList domain usernames and last login
VER Display version information
VERIFY Verify that files have been saved
VOLDisplay a disk label
WHERELocate and display files in a directory tree
WHOAMIOutput the current UserName and domain
WINDIFFCompare the contents of two files or sets of files
WINMSDWindows system diagnostics
WINMSDPWindows system diagnostics II
WMICWMI Commands
XCACLSChange file permissions
XCOPYCopy files and folders



-offline version to learn HTML

-W3School-Html  Download



$.ajax({
    beforeSend: function(req) {
        req.setRequestHeader("Accept", "text/xml");
    },
    type: "GET",
    url: "[proper url]",
    contentType: "text/plain; charset=utf-8",
    dataType: ($.browser.msie) ? "text" : "xml",
    username: '---',
    password: '-------',                                
    success: function(data) {
        var xml;
        if (typeof data == "string") {
            alert("Data is string:" + data);
            xml = new ActiveXObject("Microsoft.XMLDOM");
            xml.async = false;
            xml.loadXML(data);
        } else {
            xml = data;
            alert("Data is not string:" + $(xml).text());
        }
        // Returned data available in object "xml"
        //alert("Status is: " + xml.statusText);
        $("#ingest_history").html($(xml).text());
    }              
}); 
 
If you never view this kind of setting than this is time for you read this article  why set this setting ? ans is here : 

beforeSend :    A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object before it is sent. Use this to set custom headers.  

 Type :    "get" or "post" set HTTPRequest type.if u set "get" than ur data is view in url.so my advice  is use "Post" 

contentType:  if you set contentType to plain/text than your result allways accept plain/text    

dataType:   what kind of data you want ? xml , html ,text  

  success:   call user define function if your ajax request successfully executed     
Your Html code 
<div class="red border box">
 </div>
 
 <div class="blue border box">
 </div>
 
 <div class="green border box">
 </div>
 
 <div class="red box">
 </div>
 
 <div class="blue box">
 </div>
 
 <div class="green box">
</div>
Your css :
           
               
.box {
 width: 100px;
 height: 100px;
 margin: 10px;
 float: left;
}
.red {
 background-color: red;
}
.blue {
 background-color: blue;
}
.green {
 background-color: green;
}
.border {
 border: 3px solid black;
}
Your Html Code

<body>
    <div id=’header’><h1>Book Club</h1></div>
    <div class=’book-one’>
        <p>Travel Guide to NYC</p>
    </div>
    <div class=’book-two’>
        <p>Travel Guide to San Francisco</p>
    </div>
    <div class=’book-three’>
        <p>Travel Guide to Seattle</p>
    </div>
    <div class=’book-four’>
        <p>Travel Guide to Miami</p>
    </div>
<body>


Write Jquery Smart Code

 <script>
  $(document).ready(function() {
    $(‘.book-one, .book-two, .book-three, .book-four, #header, #footer p’).css(‘background’’’,’#ccc’’’);
  });
  </script>




No need to Hard Coding Like
 
 $(‘.book-one')..css(‘background’’’,’#ccc’’’);
$(‘.book-two')..css(‘background’’’,’#ccc’’’);
Your Html Code

<div class="book active">
data
</div>
<div class="book inactive">
data
</div>



Your Jquery

$('.book.inactive').css("background","red");
 $('.book.active').css("background","gray");

on Monday, 24 March 2014
Declare Array : $ar = array("parth","raja","nikhar");

method 1:
    echo implode($ar,",");

method 2:
     echo join(",",$ar);


both method produce same result : parth,raja,nikhar
on Tuesday, 4 March 2014

1. .parent() vs. .parents() vs. .closest()


PARENT(SELECTOR)


This simply matches the one immediate parent of the element(s).






PARENTS(SELECTOR)

This acts in much the same way as parent(), except that it is not restricted to just one level above the matched element(s). That is, it can return multiple ancestors.

CLOSEST(SELECTOR)


This is a bit of a well-kept secret, but very useful. It works like parents(), except that it returns only one parent/ancestor.
One quirk about closest() is that traversal starts from the element(s) matched by the selector, not from its parent. This means that if the selector that passed inside closest() matches the element(s) it is running on, it will return itself. For example:
$('div#div2').closest('div').css('background', '#f90'); 






This will turn #div2 itself orange, because closest() is looking for a, and the nearest to #div2 is itself.






2. .position() vs. .offset()



position() calculates positioning relative to the offset parent — or, in more understandable terms, the nearest parent or ancestor of this element that has position: relative. If no such parent or ancestor is found, the position is calculated relative to the document (i.e. the top-left corner of the viewport).
offset(), in contrast, always calculates positioning relative to the document, regardless of the position attribute of the element’s parents and ancestors.


3. .css(‘width’) and .css(‘height’) vs. .width() and .height()

.css(‘width’) and .css(‘height’) return value in string with "px"
.width() and .height() return value in integer so calculation.