
Featured
-
How Regression Testing Detects Integral Errors In Business Processes
Humans are forever changing and evolving and so to
by kristina.rigina -
Get Display Banner Advertising Opportunity on FindNerd Platform
“Do you have a product or service that nee
by manoj.rawat -
Android O Released with Top 7 New Features for App Developers
Android was founded by Andy Rubin, Rich Miner, Nic
by sudhanshu.tripathi -
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Objective C or Swift - Which Technology to Learn for iOS Development?
Swift programming language is completely based on
by siddharth.sindhi
Tags
How to find out current user, current date and version in MySQL?
To find out the current user you need to execute the following MySQL statement:
SELECT USER();
To find out the current date you need to execute the following MySQL statement:
SELECT CURDATE();
To find out the version of MySQL you ...
How to provided external identifier in test module in OpenERP/Odoo ?
In Odoo-9 by default, tests are run once right after the corresponding module has been installed. Test cases can also be configured to run after all modules have been installed, and not run right after the module installation.For example code is ...
How to make report template in Odoo ?
There are some specific variables accessible to make template reports.
1. docs : records for the current report
2. doc_ids : list of ids for the docs records
3. doc_model : model for the docs records
4. time : a reference to time from the Pyt...
Report in OpenERP/Odoo
In Odoo-9 reports are written in HTML/QWeb, like all regular views in Odoo. You can use the usual QWeb control flow tools. The PDF rendering itself is performed by pdf.For example code is below.
report
id="account_invoices"
model="ac...
Comparison of CTE, temp table and table variable
This post describes the major differences between CTE, temp table and table variables.
1) CTE
CTE stands for Common Table expressions. These are simple select queries and they do not create physical space in tempDB. Unlike temporary tabl...
Difference between truncate and delete
The following article captures the difference between truncate and delete.
1) Rollback Possibility:
It is possible rollback a DELETE operation but not a TRUNCATE operation.
2) Impact on Identity
TRUNCATE resets identity of a t...
How to login MySql using Unix shell?
Yo can login to MySQL using following command:
mysql -h hostname -u <UserName> -p <password>
Suppose you are login with hostname as 'localhost ', Username as 'root' and password as 'root'. Then the command will be as follows:
...
Drivers in MySQL
Drivers enables the developers to build database applications in their language of choice. Drivers available in Mysql:
PHP Driver:The MySQL native driver for PHP is a replacement for the MySQL Client Library for the PHP script language.
JD...
Compare two dates in iOS
To compare two dates we can use the following code :
NSComparisonResult result = [mydate1 compare:mydate2];
//where mydate1 and mydate2 are two dates we want to compare.
if (result == NSOrderedDescending) {
//mydate1 is later than myda...
Consume product with specific quantity from specific source location in openerp
The quantity from specific source location with Consumed product and param product_qty means that Consumed product quantity and param location_id is Source location and returns Consumed lines in this function. Use the below function in .py file
...
Input element character limit using Jquery
Use the following codes to count the character dynamically enter by user in the input tag.
HTML Code:-insert the following code in the form tag.
<input type="text" maxlength="12" />
<span>0</span>/12
jQuery Code:inse...
Types of Mobile Application Testing
Functional Testing- Functional testing ensures that the application is working as per the requirements. Most of the test conducted for this is driven by the user interface and call flows.
Laboratory Testing- It is done by simulating the comp...
MySQL BETWEEN Operator
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...
Future of Social Media Marketing for Business
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...
Authenticate Application In CakePHP Using Auth Component
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 ...
Detect if an Internet Connection exists in iPhone using (ARC and GCD compatible) class
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...
How to check a particular date is within past 24 hours or not?
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...
How to Override of the base.stage method in project module in openerp
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...
How to retrieve all children projects of project ids in openerp
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.
...
How to use of strtoupper() function in php.?
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() ...
Benefits of testing module in OpenERP/Odoo
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...
How to use session in php. ?
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 ...
Set in C++
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...
How to define workflow transition rules in OpenERP/Odoo ?
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...
How to set Default option methods in openerp
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 ...
How to define Access Control in OpenERP/Odoo ?
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...
How to make Email validation function in android
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...
Redirection through htaccess file
.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...
Client side validation using JQuery
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...
md5 function in PHP
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 ...
How to change the font of SearchBar's Placeholder and TextField
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...
How to use of join() function in php.?
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()...
URL rewriting with PHP using .htaccess
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...
How to use ng-repeat loops through array from scope?
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...
How to use of strtolower() function in php.?
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...
Cleint side pagination using jQuery
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>
&...
Send email using the GMail SMTP server from a PHP page
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...
What is use of ucwords() function in php.?
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...
How to expire a PHP session after 30 minutes?
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() - $...
How to parse and process HTML in PHP?
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...
Find Number of days between two given dates
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...
How to fix Headers already sent error in PHP
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...
Is there any choice to kill the application unless there is a menu option in to kill it?
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...
Wordpress hook wp_register_script
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 in PHP?
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...
How to use filter_var() function in php.?
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...
get_encodings, ustr and exception_to_unicode were originally from tools.misc in openerp
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'):
...
Change the button background color when highlighted in swift
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?
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...
load javascript files asynchronously?
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...