Image sprites is a collection of different images in a single image. image sprites can can be used in html page for showing different images seperately and help us to increase our image loading time. Any Web page with multiple images generates th...
This method is used to get the elements after given specified id. Using this method we can get value from the input text field. But before to get value from input field , we need to define id for the input field.
Syntax:
document.getElement...
Hello Reader's!
If you are new to wordpress and looking for the method to insert form data into table, Then you can use the Wordpress liberary code to do that:-
<?php
global $wpdb;
$wpdb->insert('wp_custom_user',
...
C has an interesting and powerful feature of pointers. It differs it from other languages. As the name suggests it points to something. Whenever we declare some data type it holds some memory. If we define a variable ptr then, &ptr is the add...
REST, is REpresentational State Transfer which provides the appropriate way of heterogeneous application-to-application communication.
REST consists of principles that define how Web standards, such as HTTP and URIs should be used
Five key pr...
isNaN() and isInfinite() methods in Java are the member functions of the java.lang.Double and java.lang.Float classes. Both the functions here are static member functions of the classes.
NaN here stands for the Not-a-Number, it specifies wheth...
If you want to get data from dictionary and add them into an array below code will help you, In this blog firstly i have created a NSMutableAarray and after that created a NSArray which contain the value like ram,13 etc then i created a NSMutable...
To create a dictionary which contain an array below tutorial will help you.
In this blog firstly we create a NSArray which contain some value and after that I have displayed all the value and then created a NSMutableDictioary and provide a key t...
Hello Reader's.
If you have a json object and you need to convert it into array then you just need to write the code below, and you will get the array converted format.
var obj = {"0":"1","1":"2","2":"3","3":"4"};
var arr = [];
for (elem ...
To provide some action on touch of any view ,UITapGestureRecognizer is used.
Write this code in viewDidLoad
- (void)viewDidLoad {
[super viewDidLoad];
myView.userInteractionEnabled = YES;
UITapGestureRecognizer *singleFingerTap =
...
Hi If you want to change the tags of HTML with another tags then you can perform this action using JS in realitme.
Let's consider and example to change the <h2> tag with <i> using JS.
<h2 class="xyzxterms" style="cursor: defaul...
How to bind a Dropdown without using Model in Asp.Net MVC
For Binding the Dropdown without using Model, we have to follow the following steps:-
Step1: Firstly in the Controller create an instance of List<selectlistitem> and add items ...
Create a property file in the package with extension '.properties' and use those properties defined in the file in jsp by importing the resource bundle package in the jsp.
Example:
config.properties
name=tom
email=tom@gmail.com
phone...
To dynammically add new elements into listview we need a Edittext(etAddItem) to input the item/element, a Button(btnAdd) for adding item to the list, and a listview which shows elements in a vertical scrolling manner.
etAddItem = (Edit...
Sub query is one the important section of database query.There are n number of situation where we want to implement sub query to fetch the data from the table. In Laravel 4.x there is no specific keyword to perform any
sub query.To perform sub q...
There are n number of situation where we want to write complex query so It is very difficult to write complex query using Laravel.So to overcome such problem Laravel provide raw query option. The syntax of writing raw query is:-
Syntax:
DB:...
While using foundation datepicker we came across on issue while picking date for the same day i.e if today is 5th then user was not able to pick it from calender as it was disabled. The issue comes when you are in timezone that is in - of UTC :
...
I have all code in github and my project is running properly in Ubuntu system . I want to run and set up my Laravel project on a Mac and I am getting error "No such file or directory" when we write the command
php artisan migrate
...
Hello Reader's!, If you need to know which is the best place for putting the JS.
You can put the js functions in the head part. But it'll be a good habit to put all of your functions in a separate file. You can also call for the external script...
Introduction:
Strict Mode is one of the new feature introduced in ECMAScript5 edition.
Strict Mode is a group of the language that remove disfavor features. The Strict mode is not mandatory, it means that if we want o...
Hello Reader's, If want to make alert when the upper/lower case letter key is pressed. Then by using Javascript you can see it in the code below:-
$('#cap').keypress(function(e) {
var s = String.fromCharCode( e.which );
if ( s.toU...
AJAX request runs a RAW parameterized Postgres SQL Query after receiving request
Suppose we have a situation like that
Here's my situation
in my php view file, I make AJAX request to the server
The AJAX request is received and runs a...
Instead of modifying existing views in place (by overwriting them), Odoo provides view inheritance where children "extension" views are applied on top of root views, and can add or remove content from their parent. Code like below->
<rec...
Hello Reader's, If you need to add some minutes to a given date, Then by using Javascript you can use as follows:-
var d1 = new Date (),
d2 = new Date ( d1 );
d2.setMinutes ( d1.getMinutes() + 50 ); //adding 50 min to the date
alert ( d...
Hello Readers
There is difference between webservice and API. A Web Service is basically a type of API, which always operates over HTTP though some (like SOAP) can use alternate transports( like SMTP).
An API is a (Application Programming I...
It is a Rails helper method that shows forms on the view
For example, while Rendering a partial form:
<%= form_for([@post, @post.comments.build]) do |f| %>
<div class="field">
<%= f.label :commenter %><br />
...
Some time TextView lost text while getting fragment from Back-stack or when screen orientation changed.
I also faced that problem. Here is the solution for save state of TextView forcefully.
Add Tag
android:freezesText="true...
Odoo provides two inheritance mechanisms to extend an existing model in a modular way.
The first inheritance mechanism allows a module to modify the behavior of a model defined in another module:
1. add fields to a model,
2. override...
If you want to make relational fields in OpenERP(Odoo) follow the below mentioned code and paste it in your model.py file: -
name = fields.Char(string="Title", required=True)
description = fields.Text()
responsible_id = fields.Many2...
Moving objects on Mouse swipe is a very interesting way of getting user input , it is very different from traditional
approach of getting input from keyboard keys . It provids user with unique experience and makes user part of the game.
Belo...
Hello Reader's!
If you learning the wordpress and want to show the contents of a page from admin panel. Then you can use the code below:-
First you need to publish the page with it's title, content and a featured image. Now open the page and...
If you want to make relations between models in OpenERP(Odoo) follow the below mentioned code and paste it in your model.py file: -
<pre>name = fields.Char(string="Title", required=True)
description = fields.Text()
class Session(model...
hello friends ,
You can check user's current notification setting by following line of codes.
// this method is deprecated in iOS 8.0
UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
i...
Hi All,
Today we will discuss in this blog how to use InAppBrowser in your Cordova Application.
-InAppBrowser is a web browser view in a Cordova application that displays when calling window.open() function.
To use the functionality in your C...
hello friends,
this is how we can create a UIButton and UILabel in swift.
Set a UILabel in swift
var label = UILabel(frame: CGRectMake(100, 100, self.view.bounds.size.width, 50))
label.center = self.view.center
la...
After downlaoding and extracting CakePHP folder, one should see the following files and folders:
app
cake
vendors
plugins
.htaccess
index.php
README
Three main folders in which one will usually work:
1.The app folder is one...
To add the blur Effect on screen please follow the below steps
Select an image on which you want to add the blur effect.
Add an imageView on screen with the size you want blur effect on screen.
Add the effect with the same size on which yo...
Migrations comes up with the convenient way to alter your database in a structured and organized pattern.
it makes use of Ruby DSL so no need to write SQL statements, allowing your schema to reflect changes independently.
Anatomy of Migrat...
MathMl is a easy way to insert math symbols, expressions and formulas into your web page. The supported browser can convert them to numeric values and symbols. To start writing the math code you have to use <math></math> tag for creat...
Bundling in Asp.Net MVC
What Bundling is actually:
It is a process of grouping files into a Bundle,
so that they can be loaded through one HTTP request and can be referenced by a unique Bundle Name.
Need of B...
Here I have created Action Bar in android. In android Action Bar is used to provide navigation and perform some actions.
In this blog I have implement a Action Bar in my Android project and perform actions such as switching fragment. Below ex...
Hello Reader's!
In wordpress you can use the base url as written below
<?php echo bloginfo('template_url'); ?>
Lets take an example:-
If you want to link the CSS
<link rel="stylesheet" href="<?php echo bloginfo('temp...
Hello Reader's! If you are new to WordPress and you have to create the menu for first time. You just have to do the steps below:-
Step1:- Open or Create a file functions.php in your theme folder and paste the code below:-
add_action( 'after...
Source: www.finalwebsites.com
PHP as a scripting language has gained immense popularity among web developers who strive to ensure that their websites are attractive and have a great functionality. Its because of PHP that developers are ab...
When a user requests a page or a resource then the CAKEPHP request cycle starts. It can be explained with the below diagram:
Let's now discuss the request cycle diagram with steps:
1.The request is redirected to webroot/index.php ba...
Hello Reader's! If you are looking for an HTML 5 validation which tell user the size of an file the code will help you:-
In HTML fileL
<input type="file" id="file" />
In the JS file
//binds to onchange event of your input fiel...
Hello Reader's
If want to detect if text box value changed the alert box open to user. Then you can perform this function by using the Javascript. The function is written below:-
$(function() {
var content = $('#txtbox').val();
$...
Hello Readers, If you developing the website to browse any file and showing its's content on the web page, Then by using Javascript you can do this as follows:-
function readSingleFile(e) {
var file = e.target.files[0];
if (!file) {
...