
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 use query() method in OpenERP/Odoo ?
Odoo web provides a helper for easy and clear questioning of models query() which functions as a shortcut for the usual combination of search() and read(). As shown in example code given below.
model.query(['name', 'login', 'user_email', 'si...
How to select option of drop down with Jquery?
Sometimes we need select option of a drop-down dynamically by clicking on a button or on some other action. We can do this by using "selected" property.
Example- In the below example I have a drop-down for distance and I want to select option ...
How to use compound context in OpenERP/Odoo ?
The context is like a "magic" argument that the web client will always give to the server when calling a method.
The context is a dictionary containing multiple keys. One of the most important key is the language of the user, used by the server ...
How to calls my_method() in OpenERP/Odoo ?
In below example a sample widget that calls my_method() and displays the result.
local.HomePage = instance.Widget.extend({
start: function() {
var self = this;
var model = new instance.web.Model("oepetstore.message_of_th...
How to communicate with the Odoo Server ?
Most operations with Odoo involve communicating with models implementing business concern, these models will then interact with some storage engine.
JQuery provides ajax function for network interactions, communicating with Odoo requires additio...
How to modify existing widgets and classes in OpenERP/Odoo ?
In the class system of the Odoo web framework allows direct modification of existing classes using the include() method.
This system is similar to the inheritance mechanism, except it will alter the target class in-place instead of creating a ne...
Functions in php
A function is a group of statements that does a special task. the function can be called repeatedly to execute the same statements.
The syntax of the user defined functions in php is as :
function functionName() {
code to be executed;
...
How to make Draw on a Canvas in Android.
How to make Draw on a Canvas in Android.
If you want to create Draw on a Canvas function check below example. In the below example I have created a Suraface class. Canvas works like as an interface. I have also used onDraw() method for drawing e...
How to use implode() function in php ?
What is tht implode() function in php ?
The implode() function basically utilized to join elements of an array with a string. So in other word we can say, it takes an array and returns a string.
syntax of implode() function
implode (sep...
How to use rsort() function in php ?
Let us know What is tht rsort() function in php ?
The rsort() function sorts array in decending order menas highest to lowest.
why use rsort() function in php ?
rsort() function basically used for sorting the elements of the array in d...
How to create Cookies With PHP
Why we create cookies ?
cookie is used to identify any user. A cookie is known as a very small file that the server copy into the user's computer browser. Whenever users request a web page using the same computer , it will send the cookie too....
Login into webview without using http requests
We know that if we want to login into some form we have to create a asyncTask to do that and then in background some lines of https requests codes and then we check for response.
But by using webivew we can directly log in into our website wit...
unlock your android phone programatically
Do you want to unlock your device after some interval then you can do that by using following procedure -
You have to create a alarm manager that will trigger after sometime of interval and then you can use KayguardManager class of android tha...
Add contacts programatically in android
In android we can easily share data across the applications and this is done by using ContactProvider. A contact provider class is a flexible java class that provides you multiple row contacts to access person data.
we can also use contact pro...
How to use sort() function in php ?
What is tht sort() function in php ?
The sort() function sorts an indexed array in ascending order means lowest to highest .
why use sort() function in php ?
Sort() function basically use for sort the elements of the array in ascending...
How to build SEO friendly website in 5 steps ?
Before i tell you 5 easy steps for creating website. Lets understand the technical terms which we should surely know to get good traffic through search engine. If you want to open your web portal , first you will have to think about your website ...
How to make Qweb template engine in OpenERP/Odoo ?
QWeb is an XML-based templating language, similar to Genshi, Thymeleaf or Facelets. It has the following characteristics:
It's implemented fully in JavaScript and rendered in the browser
Each template file (XML files) contains multiple template...
How to make your first widget in OpenERP/Odoo ?
The initial demonstration module already provides a basic widget:
For example code look like below.
local.HomePage = instance.Widget.extend({
start: function() {
console.log("pet store home page loaded");
},
});
It extend...
How to use explode() function in php ?
Firstly let us know why we use explode() function in php ?
explode() function basically used for breaking a string into an array in php.
explode() function is binary-safe in php.
explode() function syntex is given bellow:
explode(','...
Create a shortcut of your android application activity
Sometimes it is good to make a shortcut of your application activity so that we can access that activity directly. Assume that we have 10 activities in our application and all activity redirect one to another in order. And i want to see updates o...
Change image color programatically
If you want to change the color of an image then you can use the following code :
public Bitmap changeColor(Bitmap srcBitmap, int color) {
Bitmap resBitmap = Bitmap.createBitmap(srcBitmap, 0, 0,
srcBitmap.getWidth() - 1, srcBitm...
How we can use this._super() to call the original method in OpenERP/Odoo ?
If you want to use this._super() to call the original method in OpenERP/Odoo When overriding a method using inheritance below is the example.
For example code look like below.
say_hello: function () {
setTimeout(function () {
...
Change application language programatically
Now its possible to change the application specific language programatically It is working by setting locale. But you have to set it in all activities. Here is a code you can try these code.
you can get the local language using locale and can ...
Include Empty/Null Variable to Json while serialize with Gson Android
Are you using Gson for Serializing Json String from Java Bean/Model class? If yes then It may be useful for you.
Gson ignore null/empty value while serialize Object to Json String. Like
Gson gson = new Gson();
String jsonData = gson.to...
foreach loop in php
In php foreach loops are used to access all the elements of the array. The syntax is as
foreach ($array as $key =>$value)
{
}
In above syntax , the no. of times loop get executed is equal to the no of elements in the array.
the...
SEO Tip for Successful Domain Transition - Case Study
While working as an SEO specialist, I have encountered with domain transition process from old domain to new domain, which was one of the most exciting and challenging task for me. I was...
start one application from another
If you want to launch a application B from your application A then you can launch that by using intent Like this :
First define application B package name so that we can set launch intent :
Intent myIntent = getPackageManager().getLaunchIn...
Draggable and resizable a block using HTML5 and Javascript
If you want your block draggable and resizable, the following code will help you for the same:
HTML:
<section class="map">
<div class="container-fluid">
<div class="this-week panel-group dayListing" id="ac...
kill android application all activities process
We know that on back press of button in any android application can finish the app or an activity but some process of application still works in background so if you want to kill all the processes of any application you can kill app process like ...
How to make Odoo javascript module in OpenERP/Odoo ?
Javascript does not have built-in modules. As a result variables defined in different files are all mashed together and may conflict. This has given rise to various module patterns used to build clean namespaces and limit risks of naming conflic...
Two dimensional Array sorting
Here we will learn how we can sort two dimensional array:-
lets take an example :-
<?php
$activities = array (
'1' => array(
'id' => 1,
'time' => "2015-10-22 14:20:00"
),
'2' => array(
...
Run multiple async task simultaneously
Do you know that android version higher than gingerbread doesn't support multiple async task to run parellely but gingerbread ans lower version supports this functionality.
So if you want to run multiple task at a time you have to check api ve...
Stop asyncTask in background
We know that asyncTask class has four override methods and three methods runs in main ui thread but one method doInBackground runs in background thread. In case if we want to stop this background service based on same condition then we can use th...
How to make the simple module OpenERP/Odoo ?
In simple Odoo module holding basic web component configuration and letting us test the web framework.
The example module is available online and can be downloaded using the following command:
git clone http://github.com/odoo/petstore
If...
How to use initializer receives the parameters passed when using the new operator OpenERP/Odoo ?
If you use to initializer receives the parameters passed when using the new operator in OpenERP(Odoo) follow the below mentioned code and paste it in your .js file.
var MyClass = instance.web.Class.extend({
init: function(name) {
...
How to Create procurements based on quantity ordered in openerp-9
To Create procurements based on quantity ordered in openerp-9 If the quantity is increased and
new procurements are created then use this code given below in .py file
def _action_procurement_create(self):
precision = self.env['deci...
How to use instantiate classes using the new operator in OpenERP/Odoo ?
If you want to instantiate classes using the new operator in OpenERP(Odoo) follow the below mentioned code and paste it in your .js file.
var MyClass = instance.web.Class.extend({
say_hello: function() {
console.log("hello", this...
How to use classes in .js file in OpenERP/Odoo ?
In object-oriented languages, javascript does not build in classes although it provides equivalent (if lower-level mechanisms.
For simplicity and developer-friendliness Odoo web provides a class system based on John Resig's Simple JavaScript ...
How to appned li elements to ul dynamically with jQuery?
Sometimes we need to add li elements to ul dynamically based on some list. We can do this by using append() method.
Example- In the below example I have a list "users" and I want to display user names dynamically on page.
<html>
...
stop GCM notification
sometime its necessary to stop or unregister notification services in your app like from your setting screen then you can use these codes.
you have to create a static handler in your gcm register class
static Handler myHandler;
and in...
Cordova EmailComposer Plugin
The Cordova EmailComposer plugin provides the interface where user can send the message through email same as in the email composer. It manages the editing and sending the message. You can use this plugin to show the standard email view inside yo...
How to Compute the quantity invoiced If case of a refund in openerp(odoo)-9
To Compute the quantity invoiced If case of a refund in openerp to Compute the quantity invoiced. If case of a refund, the quantity invoiced is decreased. Note that this is the case only if the refund is generated from and function given below t...
get strength of wifi in your android device
If you want to get the strength of some wifi , you can use wifi manager class and can get list of available wifis like this
WifiManager manager;
manager = (WifiManager) getSystemService(WIFI_SERVICE);
List<ScanResult> res = m...
How to make set Wallpaper in Android device.
Here I have created Set Wallpaper in device method. In the below example I have created two activity and two layouts and added some function code in Android Manifest. Below example will described you how to set Wallpaper in device.
Step(1)-...
Check application screen visibility
Hey do you want to run some code on basis of screen visibility in your app..you can create an Application level class and can set every screen visibility in onResume or in onPaused like this :
public class ThisApplication extends Application {...
How to change the image in template in Joomla
You can change the image of your template by following ways:
Change the image reference of your choice in the HTML file of the template.
The images in Joomla for a template are generally placed in this folder:
/templates/templatename...
How to implement push notifications in phonegap application.
Using Google Cloud Messaging (GCM) we can send push notification from web server to the android devices that are registered.
This is how the process works:
1.Android device sends sender id to GCM server for registration.
2.GCM Server return...
How to store data in shared Preference and to fetch the stored data
If you want to store and get data in and from Shared preferences, here is the code that can help you:-
Step 1:- Create the Preference and store the values in created preferences:-
Context context=getApplicationContext();
SharedPreferenc...
How to Customize YouTube Embed Player ?
Hello Readers
The below post show the customization of youtube embed player by using some youtube defined parameters.
Now a days most of the developer use the embed iframe tag for displaying the videos because this improves the projects pla...
Make a line in Canvas on mouse click
HTML5 Canvas element is used for making 2D graphics in browser. Canvas has several methods to draw 2D graphics path, boxes, line, circle, rectangle etc. One of these we are using here is line method.
<!DOCTYPE html>
<html>
<he...
