When Style sheets are effectively merged into a single style sheet in the order in which they appear in the HTML source is said to be Multiple style sheets.If some properties have been defined for the same element in different style sheets, tha...
Hello Reader's
If you having the data coming from the Json array and you need it to show in html table. Then you can perform the short Jquery action for making it automated restful service.
Here the code of javascript
var _table_ = docum...
Hello Reader's If you are genrating the time in Unix time stamp and want to show it like 5 min ago or 3 hours ago then you can use the code below:-
Here we are using NOW of the unix timestamp
function timeSince(ts){
now = new Date();
...
Hello Reader's! If you are looking for functionality for reloading a web page only when user makes no activity for a while, Then you can use the ajax technology for making the html tag refresh.
Lets see the example below:-
<html>
...
How to remove this Warning ? please help
'cdv_base64EncodedString' is deprecated: Deprecated in Cordova 3.9.2. Use NSData base64EncodedStringWithOptions instead. This will be removed in 4.0.0
Thanks
In simple sql query we concat two fields by using concat keyword
SELECT CONCAT( `firstname` , ' ', `lastname` ) AS fullname
FROM user
But in cakephp we can do this by using 'virtualFields'
class User extends AppModel {
publi...
Clone copies the exact copy of the original (same address.id) and the dup copy is a new record (address.id = nil). Any changes you will made in the clone copy will be changed the original object, but any changes to the dup copy attributes will re...
Wordpress Problem
i am facing this error at time of new theme or new plug in installation
An unexpected error occurred. Something may be wrong with WordPress.org or this servers configuration. If you continue to have problems, please try the su...
Database configuration in cakePHP: Cake PHP configuration file is found in app/Config/database.php
Example of database configuration file in app/Config/database.php.default.
class DATABASE_CONFIG {
public $default = array(
'...
Hello Readers
In Cakephp framework (based on MVC) you noticed that there are two vendors folder.
1. One is it is in app folder.
2. Second one is in root folder.
Therefore, the use of two vendor folders in Cakephp is that first (whic...
Data validation becomes an important part of any of the application. It helps to make it sure that the data input by the user is proper or not.
Defining the validation rules in any application makes the form handling easier. Validation differs ...
In this example we are using two fragments Fragment1 and Fragment2 where Fragment1 consist of a button named click, this button will show the Fragment2 on clicking the Click button.
To implement Fragment in Android follow the steps mentioned b...
Hello Readers
A cookie is often used to identify a user. It is a small amount of information that sent by a server to a browser and after that sent back to the browser.
The below is the syntax of cookie:
Syntax:
setcookie(name, valu...
What is IP Address ?
IP is an address which is given to each and every device in a network.
It's a logical address given to devices in a network.
It Works in Network layer
IP Versions:
1> IPv4
- 32 bits(represented by 0 and...
Simply Use following Code & set the "size" field according to your desired font
[[UISegmentedControl appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont fontWithName:@"STHeitiSC-Medium" size:13.0], UITextA...
What Is TMM ?
TMM stands for Test Maturity Model. TMM (Test Maturity Model ) is established on the CMM (Capability Maturity Model). This model was first of all cultivated by the Illinois Institute of Technology. This model (Test Maturity Mode...
The logical center of your application, which provides interface between model and view is Controller. It is used to handle people-friendly URLs . Sessions are also managed by Controllers, providing users the facility of an ongoing interaction ...
Foreman is a gem (aka manager) for managing multiple processes that your rails application is depending upon when running in development environment and also has a option to move it into production environment as well. It is based on a Procfile t...
If you want to make data model in OpenERP(Odoo) follow the below mentioned code and paste it in your model.py file:
session_ids = fields.One2many(
'openacademy.session', 'course_id', string="Sessions")
@api.multi
def copy...
VoiceXML applications include taking orders from customers, making inquiry about any product, package tracking, driving directions, emergency notification, wake-up, flight tracking. VoiceXML is broadly used by call centres for Customer relationsh...
Benefits And Drawbacks of Model Based Testing (MBT):-
There are few benefits and few drawbacks when performing MBT (Model Based Testing). Few benefits and drawbacks are mentioned as below:-
Benefits of MBT (Model Based Testing) :- Few bene...
A domain is a list of criteria, each criterion being a triple (either a list or a tuple) of (field_name, operator, value) where:
field_name (str)
a field name of the current model, or a relationship traversal through a Many2one utilizing ...
here is my java script code
function onSuccess(position) {
var element = document.getElementById('map');
var lat=position.coords.latitude;
var lang=position.coords.longitude;
var myLatlng =...
The application runs faster after the prototype property of the GameObject is defined. As a direct result, every instance of GameObject references the methods within GameObject.prototype, taking them as their own methods.
// define the GameO...
In order to promote a mobile application there are various strategies & goals that need to be implemented, so that the targeted audience know the existence of your mobile application alo...
Volley api is powerful api to perform network operation like to perform long running network operations.
you have to create HashMap that will contain key value pair for each variable and then put that hashmap object in JsonObjectRequest as a p...
To make the clicked tab active in the navigation bar, the <li> corresponding to the clicked href in index.html introduces the css of 'active' class and removes the 'active' class from the previous <li> on click.
Example:
index....
This method is used to change the content of the elements . It change only selected elements .It can also replaces the selected content with new content.It doesn't take any arguments.
Syntax :
$(selector).html()
Return content :
$(se...
Here I am writing code to add an element to Parse Array.
It is very simple to add values to parse array.
We need to insert using add() or addUnique() instead of put() method.
So for normal column, we use put() method of ParseObject and for...
Lets talk about a constructor. It is actually a function to serve the purpose of using as a constructor. You can write a function to use it as a constructor or call it as a normal function, or use it both ways.
You can easily perform the task o...
Sometimes, we need to change some special character on String to fulfill our requirements.
For example, we need to show phone number, i.e, 2001256443 as (200)-125-6443
Now we use the substring method of String to solve it.
We just add Stri...
Javascript Date.setHours() method sets the hours for a specified date according to local time.
It set the hours, minutes, seconds, and milliseconds fields of a Date
date.setHours(hours)
date.setHours(hours, minutes)
date.setHours(hours,...
Progress dialog in android to show progress indicator/updates while downloading a file or when waiting to load a file while playing a game. Progress dialog have various features like:-
setMessage() to display message Example: Loading... (or) P...
Hello readers, today we will discuss about Crontab jobs.
Q. What is crontabs?
Ans- Cronjob is a service or we can say its a tool that run in backend periodically at fixed times, dates, or intervals.
The crontab is a list of commands that...
Sets the day of the month for a specified date object using local time.
dateObjectName.setDate(dayValue)
dateObjectName is the name of a Date object.
dayValue is an integer from one to thirty-one, representing the day of the month.
F...
The escape function returns a hexadecimal encoding of an argument in the ISO Latin-1 character set that contains the contents of charstring. The Syntax is:
escape("string")
String is a string in the ISO Latin-1 character set.
The value...
When the user types a value in an edit box or selects a value from a text-based control, the value is considered a simple group of words and the browser may not be able to identify or categorize what exists in a text-based control. The parsetInt(...
HTML Lists
i)Unordered HTML Lists
An unordered list starts with the ul tag. Each list item starts with the li tag.
Unordered HTML Lists - The Style Attribute
1)Disc: All the list items will be marked with bullets.
eg:
<ul st...
Hello
This blog is in continuation with my previous blog about the html5 input attributes.
Here is the link:
html5 new input attribute
1)FORMMETHOD
This attribute is used for submiting data to the given action url overriding the metho...
Basic one dimensional arrays
$array = array(3, 5, 2, 8);
Applicable sort functions:
sort
rsort
asort
arsort
natsort
natcasesort
ksort
krsort
These all are the sorting method which will help us to sort an one dimensional array.
There are n number of difference between client-side and server-side programming.
The below code is split into two entirely separate parts, the server side and the client side.
|
---------->
...
If you want to create a new project in Phone gap with Ionic framework, you can do that with the following lines:
First of all we have to install ionic, to install ionic in the system we have to run the following command in our terminal:
$ n...
There are two ways to use global variables:
1.$rootscope
2.service
1- We can use rootscope which is the parent of all scopes. Values exposed there will be used in all controllers and templates. We can use this in a simple way by just in...
Hello Reader's!
If you need to access your error log files in php then using Linux you can browser it as follows:-
abhishek@roor /var $ sudo updatedb
[sudo] password for abhishek:
abhishek@roor /var $ sudo locate error_log
...
Hello guys I am stucked in overriding a property field actually my issue is i want to calculate cost pirce (standard_price) when costing method is set to average from a custom field rather then calculating from line.price.unit (price) in purchase...
count is method which will return an array.It is a query builder. So to count rows from using a ->get() is
The syntax to count a row a -> get() is
$wordCount = count($wordlist);
If you have a wordlist model, then you can use Elo...
Hello Reader's!
If you are new to Wordpress and want to make a login custom page, then you can see an example below:-
First you have to create a page on the root, name it login.php
<?php
/*
* Template Name: Sign In
*/
if($_PO...
Model Based Testing:- What Is MBT (Model Based Testing) ?
Model based testing is a testing approach which defines how system performs in replication to an activity or action (resolved by a model). Furnish activity, when system acknowledges as ...