BETWEEN operator is used to test an expression within a range. Syntax of BETWEEN operator is as follows:
expr (NOT) BETWEEN begin_expr AND end_expr
-Here expr, begin_expr and end_expr is an expression which must return values.
-BETWEEN...
Source: duncanlyons.com
Worldwide social media users have crossed the 2 billion mark already, opening new avenues for businesses to use it as a robust platform for marketing. Social media...
In CakePHP,"Auth" component provides Login functionality to authenticate a user.
You just Follow the below Steps to develop authenticate application in CakePHP.
Step-1. To Use 'Auth' in AppController, you have to create $components array ...
Hi Readers,
Below are steps you need to follow when you are checking if their is an Active Internet connection in an Iphone using (ARC and GCD compatible) class.
1) Add SystemConfiguration framework to the project but dont worry about inclu...
Sometimes we need to check whether a date is within past 24 hours or not. Generally we implement this kind of functionality when we create an AuthToken or a code that we want to to be valid for some time duration.
Example: In the below example...
To Override the base.stage method in project module and Parameter of the stage search taken from the lead and also section_id if set, stages must belong to this section or be a default stage; if not set, stages must be default stages in project m...
TO retrieve all children projects of project ids in project module and return a dictionary mapping each project to appiar its parent.id in parent project in project module (or None)in openerp. use this code given below in .py file in openerp.
...
What is use of strtoupper() in php ?
The strtoupper() function is used for converting a string to uppercase.
Syntax of strtoupper() function:strtoupper(string)
string is a compulsory parameter
You can see below example of ucfirst() ...
Odoo provides support for testing modules using unittest.
To write tests, simply define a tests sub-package in your module, it will be automatically inspected for test modules. Test modules should have a name starting with test_ and should be im...
Firstly let us know what is session ?
Session variables hold information about one single user, and provide to all pages information in one application.
So, session basicallu store informatiom in a variable and provine in multiple page for a ...
Little introduction of Associative containers
In the era of computing, Associative containers refer to a group of class templates in the standard library of the C++ programming language that implement ordered associative arrays.The following...
Workflow transitions can be restricted to a specific group. Users outside the group can not trigger the transition.For example code is like below..
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<re...
Options apply standard CSS classes to the snippet. Depending on the method that you choose, the UI will behave differently.
data-select_class=" class name "
More data-select_class in the same group defines a list of classes that the user ...
Access control has a model to which it grants permissions, the permissions it grants and optionally a group.
Access controls are additive, for a given model a user has access all permissions granted to any of its groups:
if the user belongs to...
Here I have created a Email validation function .By used this function we can check user input value like example (sachin@gmail.com)in this example validation function checked string value are proper format or not .In my below code I have clearly...
.htaccess is the most useful file when we are working with php and apache. The directory level configuration of Apache server software is provided via .htaccess (Hypertext access) files. htaccess files defines mostly all the things like server se...
If you want to add client side validation in your web project using jQuery instead of server side validation like PHP, ASP.NET and JSP, then You have to include jQuery validate library in the head section of HTML.
jQuery library offer customize...
The md5 function in PHP is used to hash or encrypt a string by calculating the md5 .
The syntax is:
md5 ('string', raw)
The string here is passed to encrypt the string and the raw is an optional field,which is the format of output.It ...
To change placeholder font add the following code:
[[UILabel appearanceWhenContainedIn:[UISearchBar class], nil] setFont:[UIFont fontWithName:@"Helvetica" size:12.0]];
and,to change the font for the SearchBar textField add the following lin...
What is use of join() function.?
The join() function returns a string from the elements of an array.
The join() function alias of implode() function.
Syntax of strtolower() function:
join(" ",array)
You can see below example of join()...
Hello Readers!
If you have this URL like : url.com/picture.php?id=51
and you want to make like this : picture.php/Some-text-goes-here/51 .
In this case it can be done by using htaccess.
Add a file called .htaccess in your root folder...
ng-repeat is used to iterate over the properties of an object. I am showing how you can use ng-repeat loops through an array from scope variables.
The below code uses ng-repeat in a list that takes values through an array from scope.
Here i...
What is use of strtolower() in php ?
The strtolower() function is used for converting a string to lowercase.
Syntax of strtolower() function:strtolower(string)
string is a compulsory parameter
You can see below example of ucfirst() f...
If you want to perform table pagination using jQuery instead of server side script like PHP, ASP.NET and JSP, then You can use the below code for paginatng a table:
<table class="data">
<tr>
<th>Name</th>
&...
Hello Readers!
You people can use below code if you are using Gmail SMTP connection.
$from = '<fromaddres@gmail.com>';
$to = '<toaddress@yahoo.com>';
$subject = 'Hi!';
$body = "Hi, How are you?";
$headers = array(
'Fr...
Definition of ucwords() function
This function is used for converting the first character of each word in a string to uppercase.
Syntax of ucwords() function:ucwords(string)
string is compulsory paramere
You can see below example of...
Setting the session creation time (or an expiry time) when it is registered, and then checking that on each page load could handle that.
Example:
$_SESSION['example'] = array('foo' => 'bar', 'registered' => time());
if ((time() - $...
Hello Readers!
If you want to parse any HTML page then you would you "Simple HTML DOM Parser".
How to get HTML elements:
Create DOM from URL or file
$html = file_get_html('http://www.example.com/');
Find all images
foreach($ht...
Here, I am writing simple method to find out the number of days between two dates.
In many situations, we need to calculate it. So just pass two dates as parameters of the method and get the number of days in long data type.
publ...
Hello Readers!
You all got this error many times before and I am sure all PHP programmer at-least once got this error. To solve this error you can solve use solution as per your problem level:
Possible Solution 1:
You may have left blank...
Quit Application by Menu Item
Hello readers,
While Goggling I found this question on stackoverflow, So I thought to share it here,
many users searches for "Dose user have any choice to kill the application unless we put a menu option in...
Hello Readers,
Description
Description Registers is a script file on WordPress, and is supposed to be linked to a website later with all the wp_enqueue_script() function, which usually safely manages this script dependencies.
Scripts t...
Binary Search Tree is also known as a ordered or sorted binary tree which is a node-based binary data structure .
Binary Search Tree has the following properties.
The left side subtree of a node should always contains
only the nodes with...
What is use of filter_var() function. ?
The filter_var() function filters a variable with the specified filter.
Syntax of filter_var() functionfilter_var(var, filtername, options)
You can see below example of array_rand() function in php...
Set encoding to default and find value to get_encodings, ustr and exception_to_unicode were originally from tools.misc in openerp and use this method in openerp. Use this code in .py file in openerp
ef get_encodings(hint_encoding='utf-8'):
...
To create a button at run time in swift please use the followin code:
this code will help you in creating a button at run time. and also change the background color of the button in highlihted State..
To change the button background at the tim...
CSS selector is a part of CSS rule set which is actually selects the content of your page which you want to give style.
There are different kinds of selectors available.
Universal Selector: Apply CSS on all of the elements
* {
co...
To load javascript asynchronously, If we have latest browser where HTML5 supported then we need only to add "async" tag having the value true.
In case of having old browser, we need to create a js function that will add our javascript asynchr...
What does array_rand() function in php.?
The array_rand() function returns a random key from an array, or it returns an array of random keys if you specify that the function should return more than one key.
Syntax of array_rand() function:a...
To Called within an except block to allow converting exceptions to arbitrary responses. Anything returned (except None) will be used as response. use this code given below in openerp.
def _handle_exception(self, exception):
"""Called ...
Hello Everyone,
In this blog we will discuss about how to update multiple array elements in MongoDb using a single query.
Let say we have a collection in MongoDb named "Form" which consists of the below available documents:
> db.Form...
Hello friends,
We may change the text field placeholder color using either storyboard or using code.
Using Storyboard:
Choose the text field and under textfield runtime attributes click on the '+' button and add a key:
_placeholderLab...
Here I have created Shared Perference function. Shared PerFerence is used to display a screen with some text fields. Shared Perference saved value is used when we close application. The below code will clearly describe you how to use Shared Perfe...
This is an introductory post on how to use the async and await keywords in C# to create asynchronous background tasks. It is a common practice to use multi-threading and asynchronous tasks to avoid performance bottlenecks and to keep the appl...
Hello Readers,
This plugin is using the wp_print_styles and wp_print_scripts action hooks to load all css and javascript.
wp_print_scripts shootes with just about every page heap that can cause your javascript for you to heap everywhere whic...
The std::stack class is a container adapter that gives the programmer the functionality of a stack - specifically, a FILO (first-in, last-out) data structure.
The class template acts as a wrapper to the underlying container - only a specific s...
Hello Readers,
There are default scripts that is included with each WordPress installation. These types of scripts have reached disposal regarding style as well as plugin experts to make use of of their function. Via our experience, jQuery is ...
You have to follow below Steps to install JDK (java developement kit) on Ubuntu
Step 1: Installation of JDK
sudo apt-get install openjdk-7-jdk
Step 2: After the installation, Use command.
apt-cache search jdk
Step 3: Settin...
We can add captcha for blocking spams robots accessing our site or application. We can add captcha in our web application and website by using the below code ->
<?php
App::uses('AppController', 'Controller');
class PagesController exte...
Subqueries are generally similar to Normal queries in databases like -
They may return one column
They may return more column
They may return single rows
They may return multiple rows
Or it can be any of combination from above.
...