20:11
Merbin Joe
Grep and Map
The $.grep() and $.map() are two array utilities provided by jQuery to filter an array. The main difference is that grep() method filters an array and returns the filtered array, while map() simple applies a function to each item in the array, thus returning a modified array. The following is the format and example of grep() and map().$.grep()
$.grep (array, function (value,index) {
------
------
});
The first parameter is the array we want to filter. The second parameter is the numerical index of each array’s item. The third parameter is the actual value of each item in array.
19:37
Merbin Joe
Local storage and Session storage
Local storage and session storage are part of web storage which itself is part of the HTML5 application.Local Storage
Stores data with no expiration date and this is the one we will be using because we want out to-do’s to stay on the page for as long as possible. Before HTML5 , application data had to be stored in cookies, included in every server request. Local storage is more secure, and large amounts of data can be stored locally, without affecting website performance.Unlike cookies, the storage limit is far larger (at least 5MB) and information is never transferred to the server.Local storage is per domain. All pages, from one domain, can store and access the same data.Store
localStorage.setItem("lastname", "Smith");
Create a localStorage name/value pair with name="lastname" and value="Smith"Retrieve
document.getElementById("result").innerHTML = localStorage.getItem("lastname");
Retrieve the value of "lastname" and insert it into the element with id="result"Remove Item
localStorage.removeItem("lastname");
Remove the local storage "lastname" key
Session Storage
It is same as the local storage except
that it stores the data for one session.The data is deleted when the user closes the browser
window. The following is the example of using session storage.
Set
value
sessionStorage.setItem("Name","aaa");
Get value
sessionStorage.getItem("Name");
19:20
Merbin Joe
Set alternate image html
In some situations, the image path set by user may not return any image but null value .(When image is removed from the provided path or may be due to fault in path provided in the tag.)
For these situations we can set an alternative image path if the invalid image path.
1) In line HTML
2) Call a Function when error occur
In Line HTML
In line HTML is used to give alternative image path directly.
19:03
Merbin Joe
String Functions
Usually the string is defined with in single quote or double quote in JavaScript/jQuery, in jQuery have some built in methods to manipulate the string.Types
charAt()
toUpperCase()
toLowerCase()
replace()
split()
i)charAt
Find the character position from given string.
var str="Allinworld99";
var str_val=str.charAt(3); //It returns i
ii)toUpperCase
Convert the given string to upper case letters.
var str="Allinworld99";
var str_val =str.toUpperCase(); //It returns ALLINWORLD99
iii)toLowerCase
Convert the given string to uppercase letters.
var str="ALLINWORLD99";
var str_val =str.toLowerCase(); //It returns allinworld99
iv)replace
This method is used to replace word/character by another word/character.
var str="3inworld99";
var str_val=str.replace("3","All"); //It returns Allinworld99
v)split
This method is used to split the string by using a delimiter and push it into an array.
var str="A,L,L,I,N,W,O,R,L,D";
var X=str.split(","); //It returns ["A","L","L","I","N","W","O","R","L","D"]
23:00
Merbin Joe
Telerik clientevents parameter / passing arguments to client events
In default methods you can’t able to pass argument to client event, but we can pass it through Function.prototype method.
Function.prototype.curry = function () {
var method = this, args = Array.prototype.slice.call(arguments);
return function () {
return method.apply(this,Array.prototype.slice.call(arguments).concat([args]));
};
};
Example
<script>
Function.prototype. argumentsvalue = function () {
var method = this, args = Array.prototype.slice.call(arguments);
return function () {
return method.apply(this, Array.prototype.slice.call(arguments).concat([args]));
};
};
function PostPondtimediff(sender, eventArgs,source)
{
alert(source); //source= 1=> (RadID1) 2=> (RadID2)
}
</script>
<telerik:RadTimePicker ID="RadID1" runat="server" DateInput-Enabled="false">
<ClientEvents OnDateSelected="changefunction.argumentsvalue(1)" />
</telerik:RadTimePicker>
<telerik:RadTimePicker ID="RadID2" runat="server" DateInput-Enabled="false">
<ClientEvents OnDateSelected="changefunction.argumentsvalue(2)" />
</telerik:RadTimePicker>
22:49
Merbin Joe
Rad date time picker validation
If we are using two Rad Date time pickers and first one should be lesser than second one then we need to do a validation, the validation code is shown below.Create Telerik Rad Date Time Picker
From <telerik:RadTimePicker ID="dtpfromTime" runat="server" DateInput-Enabled="false">
<TimeView ID="TimeView6" runat="server">
</TimeView>
<ClientEvents OnDateSelected="chkvalue" />
</telerik:RadTimePicker>
To:<telerik:RadTimePicker ID="dtptoTime" runat="server" DateInput-Enabled="false">
<TimeView ID="TimeView6" runat="server">
</TimeView>
<ClientEvents OnDateSelected="chkvalue" />
</telerik:RadTimePicker>
Javascript / jQuery Validation Code
<script>
function chkvalue() {
var starttime = $find("<%=dtpfromTime.ClientID %>").get_dateInput().get_value();
var endtime = $find("<%=dtptoTime.ClientID %>").get_dateInput().get_value();
if (starttime != null && endtime != null && starttime != "" && endtime != "") {
var startDate = new Date("1/1/1900 " + starttime);
var endDate = new Date("1/1/1900 " + endtime);
var difftime = endDate.getTime() - startDate.getTime();
difftime /= 1000;
var hrstomins = difftime / 60;
var hours = parseInt(difftime / 3600);
var mins = parseInt((difftime % 3600) / 60);
if (startDate >= endDate) {
alert("To Time must be greater than From time");
endtime.set_selectedDate(null);
}
else {
alert("Success");
}
}
else {
alert("No need to Check Any Conditions")
}
}
</script>
If you choose lower than, first value it should show error message.
The validation code only allow to select the valid time only.
22:31
Merbin Joe
Telerik Rad Date Time Picker
Telerik is the external plugin for .net, it includes more features like grid,date time picker, calender, etc.Rad Date time picker is used to simplify the users work, all you need to add the telerik plugin files and just call the controller and place it where you want.
Example:-
<telerik:RadTimePicker ID="RAD_ID" runat="server">
</telerik:RadTimePicker>
22:34
Merbin Joe
Basic of Create and Execute the java Program
First you need to choose a text editor like Notepad, Notepad++, Wordpad and etc, I recommended to use the Notepad++.Write a Simple Java Program and Save
After open your editor write a java program and save it same as class name (class simple) with .java extension, your file name should like classname.java.
File_name.java
where
File_name – it is a file name which used in main method.
Java – extension, it indicate the file type.
21:40
Merbin Joe
Java Development Kit (JDK)
Java development kit has collection of tools. The following tools are used to for creating the java program and for the execution.
Applet viewer - used to execute the java applet without using the webbrowers.
Javac - It is command for the java complier. It can be used to generate the java byte
code from the source code.
Java - It is a command for the java interpreter. It is used to generate the machine code
from the java byte code.
Javap - It is a java disassemble class file. It is used to change the byte code file to
program description.
Javadoc - It is a document generator, which can be used for generate the HTML document
from the java source code file.
Jdb - It is a java debugger. It can be used for find the error of the program.
Javah - It can be used for generate the header file, when program use the native
method in C, C++.
Apt - It is an annotation processing tool used in the java program.
Jar - It is an archive. This tool can manage the jar file. And this package is used to link
the class libraries into jar file.
Keytool - This tool is used to change the security certificates such as authorization
certificates, public key certificates.
pack200 - It is a JAR compression tool for generate the java program into jar file
Java development kit has collection of tools. The following tools are used to for creating the java program and for the execution.
Applet viewer - used to execute the java applet without using the webbrowers.
Javac - It is command for the java complier. It can be used to generate the java byte
code from the source code.
Java - It is a command for the java interpreter. It is used to generate the machine code
from the java byte code.
Javap - It is a java disassemble class file. It is used to change the byte code file to
program description.
Javadoc - It is a document generator, which can be used for generate the HTML document
from the java source code file.
Jdb - It is a java debugger. It can be used for find the error of the program.
Javah - It can be used for generate the header file, when program use the native
method in C, C++.
Apt - It is an annotation processing tool used in the java program.
Jar - It is an archive. This tool can manage the jar file. And this package is used to link
the class libraries into jar file.
Keytool - This tool is used to change the security certificates such as authorization
certificates, public key certificates.
pack200 - It is a JAR compression tool for generate the java program into jar file
22:55
Merbin Joe
Basics of Java
Java is an object oriented programming language. It is not a platform dependent. Java is a high level language and also it is a third generation language like C, FORTRAN. Java is a general purpose language. It is developed by James gosling and Patrick Naughton from sun Microsystems in June 1991. This programming language is not dependent on any hardware and operating System. This language was first named by Oak. Oak name was changed by Java in 1995. It is used for develop the web application.
23:41
Merbin Joe
Xara3D
Xara3D is software for design the animating image. It can be used for design the button, logo, title, and GIF image that is animated image. Using this software, you can create a high quality image. The animated image is used on web page design. Animated image can be saved in various image format such as GIF (Graphics Interchange Format) format AVI (Audio Video Interleave), SWF (Shockwave Flash). This software is also used for static image and animated image. And it can be convert any text and image to 3D form. The converting text can modify based on the size, alignment, line space, and font style and font color. It can also design the screen sever based on animation. Image can designed using the design bar in the option toolbar.
Xara3D is software for design the animating image. It can be used for design the button, logo, title, and GIF image that is animated image. Using this software, you can create a high quality image. The animated image is used on web page design. Animated image can be saved in various image format such as GIF (Graphics Interchange Format) format AVI (Audio Video Interleave), SWF (Shockwave Flash). This software is also used for static image and animated image. And it can be convert any text and image to 3D form. The converting text can modify based on the size, alignment, line space, and font style and font color. It can also design the screen sever based on animation. Image can designed using the design bar in the option toolbar.
22:51
Merbin Joe
Create website and publish to world wide
Now a day you can create a website design without any basic knowledge in HTML and CSS, Using designing tools like Dreamweaver,Macaw,web studio,Comet and etc...
- HTML
- CSS
- Javascript
- PHP (Or other Server side Program)
- Purchase Domain and Hosting
Text Box
<input type="text" />
Enter the text :
Radio Button <input name="group1" type="radio" >Option 1
<input name="group1" type="radio"> Option 2
Option 1 Option 2
Drop Down List Box <select>
<option>Name1</option>
<option>Name2</option>
<option>Name3</option>
<option>Name4</option>
<option>Name5</option>
</select>
Button <input type="button" value="Click Here" />
Enter the text :
Radio Button <input name="group1" type="radio" >Option 1
<input name="group1" type="radio"> Option 2
Option 1 Option 2
Drop Down List Box <select>
<option>Name1</option>
<option>Name2</option>
<option>Name3</option>
<option>Name4</option>
<option>Name5</option>
</select>
Button <input type="button" value="Click Here" />
CSS - CSS is defined Cascading Style Sheet, This is used for give style to html elements like color set background image and etc..
Example:-
<input style="color: red;border: 2px solid green;background: beige;" type="text" />
Javascript - Javascript is the client side program, this is mainly used for client side validation and passing the client side value to server side and etc. Many Frame works available for javascript like jQuery, AngularJS and etc
You should write your javascript code inside the <script> and </script> tag.
Javascript Code:-
Example:-
<input style="color: red;border: 2px solid green;background: beige;" type="text" />
Javascript - Javascript is the client side program, this is mainly used for client side validation and passing the client side value to server side and etc. Many Frame works available for javascript like jQuery, AngularJS and etc
You should write your javascript code inside the <script> and </script> tag.
Javascript Code:-
<script>
function calFun()
{
alert("This function was called");
}
</script>
<input type="button" onclick="calFun();" value="Click Here">
function calFun()
{
alert("This function was called");
}
</script>
<input type="button" onclick="calFun();" value="Click Here">
PHP Code - This is used to Get the value from the client side and process it to store or retrive the value from the Database.
Eg : If you enter the username and password(Client Side), client side program will check some condition like username should not contain symbol like (@#$$%%^), after verified it pass the username and password to server side program (here php), PHP program will receive the username and password and check it with data base is the user is already registered or not and username password is correct, If username and password is match the server side program will allow to redirect the page to profile page or display "Check username and password" error message.
Web Hosting - After create your website you need to buy a unique domain name and Hosting space for upload your website. Many website for web hosting some one are
godaddy
bigrock
hioxindia (Cheap)
Check your Domain name availablity
Web Hosting - After create your website you need to buy a unique domain name and Hosting space for upload your website. Many website for web hosting some one are
godaddy
bigrock
hioxindia (Cheap)
Check your Domain name availablity
21:02
Merbin Joe
DOS Command / Input Variable
Get the input value through a variable and display it on the next line using DOS commands. The %=% command is used to get input from the user in command lines and store it to a variable, we can process the value via that variable.
Syntax :-
Output:-
Get the input value through a variable and display it on the next line using DOS commands. The %=% command is used to get input from the user in command lines and store it to a variable, we can process the value via that variable.
Syntax :-
SET /P Variable=Enter the time to Connect: %=%
Example Code:-
echo off
cls
set /P Val1=Enter the time to Connect: %=%
echo Your input was: %Val1%
pause
cls
set /P Val1=Enter the time to Connect: %=%
echo Your input was: %Val1%
pause
Output:-
22:49
Merbin Joe
In the following tutorial explain you to create more directory using DOS command through batch files (.bat), you can create 100 of folder (directory) in double click.
Steps:
1) First you need to set echo off for hide the parent directory.
2) Pause command is used to pause the execution temporary.
3) Set statement is used to assign a value to variable (eg: set a=1)
4) If statement is used to check the condition and continue the execution, else then execute from the next line (eg: if %a% LSS 31 md %a%)
Conditions are check using the following method
The code is
Screenshots:-
Steps:
1) First you need to set echo off for hide the parent directory.
2) Pause command is used to pause the execution temporary.
3) Set statement is used to assign a value to variable (eg: set a=1)
4) If statement is used to check the condition and continue the execution, else then execute from the next line (eg: if %a% LSS 31 md %a%)
Conditions are check using the following method
EQU : Equal
NEQ : Not equal
LSS : Less than <
LEQ : Less than or Equal <=
GTR : Greater than >
GEQ : Greater than or equal >=
This 3 digit syntax is necessary because the > and <
symbols are recognized as redirection operators
5) Goto is used to transfer the execution to another label.NEQ : Not equal
LSS : Less than <
LEQ : Less than or Equal <=
GTR : Greater than >
GEQ : Greater than or equal >=
This 3 digit syntax is necessary because the > and <
symbols are recognized as redirection operators
The code is
echo off
pause
set a=1;
set b=30;
echo %b%
:Rept
if %a% LSS 31 md %a%
set /a a+=1
if %a% LSS 31 goto Rept
cls
set /a a-=1
echo %a% Directory Created Successfully
pause
pause
set a=1;
set b=30;
echo %b%
:Rept
if %a% LSS 31 md %a%
set /a a+=1
if %a% LSS 31 goto Rept
cls
set /a a-=1
echo %a% Directory Created Successfully
pause
Screenshots:-
22:55
Merbin Joe
Aztec code is a type of barcode. It is a 2- Dimension barcode. Aztec code is used for reduce the space when compare with the other barcode matrix. Aztec code is a symbol, which is built on a square grid with a bulls-eye pattern. Bulls-eye has 9*9 or 13*13 pixels. Aztec code is generated by using the encoding scheme.
Subscribe to:
Posts (Atom)
Labels
- javascript
- JQuery
- javascript Beginner
- materializecss
- HTML
- Tips
- Animation Program
- css
- AngularJS
- blogger
- Application
- Game
- RGraph
- SQL
- Php
- .net
- Other
- Tools
- Article
- Android
- Button
- Software
- puzzle
- asp.net
- Theme
- telerik
- Flash
- Cordova
- Website
- c#
- Java
- College
- Hardware
- Maths
- Physicsjs
- Chrome Extension
- DOS
- Naturals
- SQLite
- xml
- Batch
- CarRace
- Image
- MVC
- Networking
- Typing
- WebView
- Xara 3D