JavaScript Function
A function is a separate part of the program that performs a particular task. The code of the function can be reused by calling the same function wherever it is required to perform the same task.
A function syntax is a...
The JavaScript while loop iterates the elements for the infinite number of times. It should be used if number of iteration is not known.
The syntax of while loop is given below-
while (condition)
{
code to be executed
}
Below i...
Sorting is the process of arranging elements systematically either ascending or descending order.
The main purpose of sorting information is to optimise its usefulness for specific tasks.
Sorting arranges data in a sequence by which searching b...
SQL Injection:
If we are trying to save data into the database from webpage inputs than we have forget wide open security issue is known as SQL injection. Now the Question is how to prevent it and help to secure your script and MYSQL statement.
...
HTML5 Geolocation API
The Geolocation API specifies a general putting into effect for the objects, properties,
and methods to unite with the Geolocation interface. One object holds the whole
implementation of the W3C Geolocation APIthe Geolo...
Media type
Media types, by default the value for the media attribute is all. Without the attribute in the link element,
the user agent will apply the CSS rules in the stylesheet to 'all' media.
all - Suitable for all devices
braille - ...
Hi Readers!
There are different ways to declare Array in Swift. I will write few examples below:
Example 1:
let a : Array? = ["hello","hi"]
Now in above example this is a constant array. You cannot add/append an element in it.
E...
Java Script arrays are used to store more than one values in a single variable. In the below given example we will use script to display array (var= names) data inside a <p> (paragraph) tag of HTML with id="display".
<!DOCTYPE html>...
In JavaScript , the correct syntax for elseif is "else if" not "elseif".
else if statement is used where we have to check multiple statement.
Example :
var eating;
if(eating < 8){
document.write("Time to take brunch");
}
else if(gre...
The JavaScript loops are used to iterate the piece of code.We have for, while, do while loops. It makes the code compact.
Looping is what makes computer programming worthwhile.
There are three types of loops in JavaScript.
1)for loop
2)w...
The shift() method is used to remove the first element of an array from the zero index and shift to the consecutive index and this is also used to change the length of an array .
syntax :
array.shift();
Example :
var arr = ['Mukesh', 'Ayu...
JavaScript getDay() Method
Return the day of the week:
var d = new Date();
var n = d.getDay();
This method is used for getting the days of week from 0-6 for the date specified.
in this 0 stand for sunday and 1 stand for monday.
Synt...
If else statement like any other computer language are used for condition. If the condition satisfies it goes for first statement and if it does not than it goes for the second statement.
1.if is use to run a code if a condition is true.
2.el...
Hi friends, As we know that if we declared a variable outside the function of javascript, then it is said to be global variable. But this is not a correct way to declare global variable.
Correct way to declare global variable in JavaScript is-...
Javascript data type can hold may data type like number string arrays object and other.
To declare a variable we use var keyword
example
var length = 16; // Number
var lastName = "Johnson"; ...
I am using android studio. While debugging my app I want to jump to the specific frame and start debugging from that frame, skipping the other frames in the frames tab.
I want to see the frames that are only related to my android application a...
To use swift code in Objective-c project ->
1. Go to your objective-c project -> create a new file -> source -> Cocoa Touch Class -> change language to Swift -> create.
2. Now a alert will pop-up Would you like to configur...
Hi,
can anyone suggest me the flow of Payment Gateway integration in Angularjs Application with Java at Backend.
what is the best approach to do it?
Thanks
How to create an array in JavaScript?
Before going for the above question we should be clear about What is an Array?
An array is a sequential collection of variables or we can say an array is a special variable, which can hold more than on...
In javascrit,if you re-declare a variable, it wouldn't lose it value.
Example ->
var a=10;
var a;
alert(a);
Output : 5
Here you can see, in JavaScript the output will be same but in other languages result would be undefined o...
Traceability Matrix
A traceability matrix is a documented report from the requirements database or repository. It contains all information requirements which determine the associated information to be stored with the requirements. We can use ...
The JavaScript switch statement is used to execute one code from multiple expressions. It is just like else if statement. But it is convenient than if..else..if because it can be used with numbers, characters etc.
Syntax:
switch(expression)...
Javascript Comments
Comments like in any other computer language are used for making the code understandable ie explaining the code in simple language.
They are not executed by the javascript.
There are two ways to enter the comments
1. Sin...
The typeof Operator :
typeof is a kind of keyword that returns a string which tells the data type of an expression.
Syntax : `typeof operand`
(The operand used is an expression representing the object or primitive whose type is to be re...
A JavaScript variable is simply a name of storage location. There are two types of variables in JavaScript : local variable and global variable.
There are some rules while declaring a JavaScript variable:.
1)Name must start with a letter (a...
JavaScript is the programming language of HTML and the Web.
JavaScript can be placed in the and the sections of an HTML page.
In HTML, JavaScript code must be inserted between and tags.
<!DOCTYPE html>
<html>
<head>
...
What is Honeypots ?
A honey pot is a computer security system which is used to attract people whos motive is to penetrate the security of someone system . It is a trap to delude Hacker . Honeypot monitor the activity of the Intruder . when m...
Hi Readers,
Before Moving ahead with the Topic,Lets us Briefly have a overlook what actually a Tuple is:
* In very simple language:
A tuple is a group of zero or more values represented as one value.
For example ("Pen", "50") ...
Hi Readers!
An Optional is just an enum in Swift.
enum Optional<T> {
case None
case Some(T)
}
Here <T> is generic similar to an Array<T>
<T> could be anything like Strings, Dictionary, Array etc.
...
Making Animated Placeholder
To make a Placeholder animation we need to make custom placeholder, for this I have used span tag.
HTML -
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">...
Hi Reader !
From this blog we can learn how to add google captcha in your web site using c# .
To use a Google Captcha(or reCaptcha) in your web application, you first have to follow below steps :
1) Open url https://www.google.com/recapt...
There are three types of Recovery model in SQL server
Simple recovery model -- gives you the backup to replace the entire database in the event of a failure . In simple recovery model data is recoverable only to the most recent backup ....
Remove findViewById calls by using @Bind on widgets and fields.
Remove the click listeners by annotating methods with @OnClick and others.
class MainActivity extends Activity {
@Bind(R.id.user) EditText username;
@Bin...
Selectors help to select an element to which you want to apply a style.
selectors are patterns used to select the element(s) you want to style.
Examples: .class, #id
<div class="intro">
My name is Pranav Chhabra.
This is my first Tas...
Data Binding Guide
This document explains how to use the Data Binding Library to write declarative layouts and minimize the glue code necessary to bind your application logic and layouts.
Setting Up Work Environment:
dependencies {
...
Use following steps to create a similar content block for a particular content (Similar contents work on the basis of taxonomy. So first create a taxonomy and assign this to your content type):
1: Create a view with block view.
2: Set fiel...
In Swift if you want to check the Wifi connection in your device then use following code.
This is a function which returns Reachability instance (reachability class object) value as a returnvalue for wifi connection availability.
+ (instan...
For configuring the size of upload file, post, memory in an application developed in php we need to do the following changes in the file php.ini. The path where we can find the php.in is below:
1-> Debian/ Ubuntu : { /etc/php5/apache2/p...
For enabling server to listen on different ports we can make the changes in file port.conf in Debian/Ubuntu based linux server. The path where we can find the ports.conf file is below:
1-> Debian/ Ubuntu : { /etc/apache2/ports.conf }
...
If you want to install OpenERP-9 (Odoo9) in windows 7,8 and 10 follow the below mentioned steps:-
Step-1 Go to the link->"https://nightly.odoo.com/9.0/nightly/exe/
Step-2 Select->latest exe file like->odoo_9.0.latest.exe -> (Latest...
Step-1 Go to the link https://nightly.odoo.com/9.0/nightly/exe/
Step-2 Select->latest exe file like->odoo_9.0.latest.exe -> (Latest Date)
Step-3 click on Downloaded exe->select the languages->click on Next button.
Step-4 select...
Build Verification Testing:-
A build verification test is a set of tests execute on each new build of an application/software/product to confirm that the build is testable or not, before delivering it to the testing team. It is generally a smal...
Hi Readers !
In this Blog we will find how we can Export SQL Server table data to Excel using .net code .
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.Web...
What is CAPTCHA :
CAPTCHA stands for Completely Automated Public Turing test . CAPTCHA is implemented to differentiate between humans and machines ,it is generally used to keep machine or bots or automated scripts away from the website ...
I would like to add different kinds of dynamic views like textview, edittext, datepicker etc to already existed layout. With this existed layout have some static views which are mandatory. this dynamic views have to add based on API response co...
Sir,
how to fetch cookie information from http request headers??
I have tried google. but it is not answering my question. It is giving a way to SET and then FETCH cookie information, whereas I just want to fetch the already loaded cookie i...
Hi guys.
I have a problem in adding a button to a page. When I add a simple button to a page and reload the page it loads correctly but when I click on the button I get the following error:
"Failed to load viewstate. The control tree into which...