Security in Drupal

What Basic Steps You can take to make you drupal site to make it much more secure. Actually Drupal is configured to be secure out of the box, because it restrained it's permission, but as we extend website according to our need we get playing ...

DOM in HTML JQUERY

DOM Document Object Model DOM is structure that is used to invoke the elements of a page or a script file. It is the hierarchy of structure that a particular document have where we want to invoke the elements of that particular document. F...

What is a Web Worker?

Hi all, Below is a short description of web workers. What is a Web Worker? Web worker is JavaScript which runs in backside without affecting the performance of site and it is independent of other the scripts,. what web worker are f...

Bootstrap float

how to float an element to left or right. Bootstrap provides predefined classes pull-right and pull-left which floats an element to the left or right according to the requirement. For example if you want to float an image to the right and text...

Pattern Matching using REGEXP

REGEXP: It is similar to LIKE which is used to fetch data based on regular expression from a table. Syntax: SELECT columnname(s) FROM tablename WHERE columnname REGEXP pattern; Example 1: SELECT name FROM Employee WHERE name R...

Supported Operations in Odoo

RecordSet also support set operations you can add, union and intersect, ... recordset. For example you can see below code. record in recset1 # include record not in recset1 # not include recset1 + recset2 # extend recset1 | recs...

How to modifing Environment in Odoo?

If you need to modifiy your current context you may use the with_context() function. self.env['res.partner'].with_context(tz=x).create(vals) Be careful not to modify current RecordSet using this functionality: self = self.env['res.partner']....

How to use Cursor in Odoo ?

When we use cursor first we have to move on Record Recordset and environment share the same cursor.And you can access cursor using like below code. def my_fun(self): cursor = self._cr # or self.env.cr Note- if you need to use...

How to use thread in Odoo ?

In thread we have to move on .py file and after this using thread you have to create you own cursor and initiate a new environment for each thread. committing is done by committing the cursor,For example you can see below code. Environment.ma...

How to use New ids in Odoo ?

In new ids context all work is done in the cache. And after that check all function and ids in python file, and creating a record in a model with computed fields, the records of the recordset will be in memory only. At that time the id&...

How to use api.onchange in Odoo ?

All the work and tasks are done in the cache in on_change context. Therefore so you dont need to be worried for altering database as the recordSet will be able to altred inside your function. Thats the main difference with @api.depends. ...

How to Access old API in Odoo ?

If you want to access old api to new api you have to move on migration method and By default, using new API you have to work on a new RecordSet class instance by yourself. But old context and model are still available in old api. means you have t...

YAML in Odoo

In YAML first we have to check all xml file in addons then after get access to the new API in Python YAML tag. . For example you can see below code. !python {model: account.invoice, id: account_invoice_customer0}: | self # is now a new ...

Unittest in Odoo

In unit test first we have to check all module in addons then after access to the new API in unittest inside common.TransactionCase and others function . For example you can see below code. class test_partner_firstname(common.TransactionCase)...

Error while building Unity3D Android Game := Plugins colliding with each other

when I build the game in Unity3D , it makes error :"plugins colliding with each other" I am using Facebook SDK and Playfab.com SDK Found plugins with same names and architectures, Assets/Plugins/Android/libs/android-support-v4.jar...

logical expressions in Odoo

In given below table logical expressions are defined . Operator Meaning Example Result == equals 1 + 1 == 2 True != does not equal 3.2 != 2.5 True <  less than 10 < 5 False >  greater than 10 > 5 True ...

Range in Odoo

The range function specifies a range of integers: range(start, stop) - the integers between start (inclusive) and stop (exclusive) The third value can be accepted by specifying the change between the values. range(start, stop, step) -...

Difference between Input and raw_input in python

input : Reads a number from user input.You can assign (store) the result of input into a variable. Example: age = input("How old are you? ") print type(age) print "Your age is", age print "You have", 65 - age, "years until r...

How to integrate the Tiny Mice editor

Hello Reader's if you want to integrate the html editor in your form then by using tiny mice you can make the html editing more easy. Lets see how to integrate the tiny mice editor. first you have to open the html file and put the two JS CDN ...

Research Tool in Google Docs

The Research tool in Google Docs is an interesting feature which harnesses the power of Google search by allowing you to perform research tasks from within Google Docs. You can select the Research Tool from Tools menu or use the short cut Ctrl...

How to redirect user with session message in Codeigniter?

Hello Reader's If you want to make user redirect and show him the error message on next page then by using codeigniter you can do by following functions:- Let's say if user input wrong username/password then you'll redirect user by following c...

How to make validation for date and time using Javascript

Hello Reader's! if you want to make the Date time format validation in your form then you can use Javascript to validate. Let's see the example below:- your html will be go like this:- <form method="POST" action="/javascript/validate-...

How to break array into string in Jquery

PHP Implode convert an array into string in PHP. If you are looking same functionality in jquery, please use below code:: var arrName = ["Saab", "Volvo", "BMW"]; var allname = arrName.join(', '); alert(allname); // arrName is a javascr...

How to get all check boxes values in array under Jquery

If you would like to get all selected check boxes value in an array. Please use the below code:: <table class="demo-table"> <tr><td><input type="checkbox" name="select[]" class="ab" value="1"></td></tr> &l...

What is css gradients ?

Hello All, Earlier, we have used image for gradients effect but now we will use gradient using css3 and we will see how to use many colors in gradient and only one color in gradient. Gradients are declared by background-color but according ...

How to implement "Select All" in Jquery

If you would like to implement Select All/UnSelect check-boxes with jquery please follow the below code:: <table class="demo-table"> <tr><td><input type="checkbox" name="selectall" id="selectall">Select All</td>&...

What is Test Driven Development?

Test-driven development is a programming approach is compulsory for you to write real code and automated the test code together. This confirms that you test your codeand permits you to re verify your code fast and easily, since it's automated. ...

How to Create a Group in StumbleUpon and Viral Your Content

  Internet marketing is a very diverse field and promoting your content over the internet is the best way if you want to make your product or ...

Laravel Eloquent - Attach vs Sync

Attach and Sync are the two methods which we used in our Laravel Eloquent. We can describe this as follow: attach(): 1) This is used for Insert related models. This method is used when we want to work with many-to-many relations. 2) When w...

SIF API to Generate Match Tokens on Record

Following example illustrate how you can Generate Match Token for record in Base Object using SIF API: TokenizeRequest request = new TokenizeRequest(); request.setSiperianObjectUid("BASE_OBJECT.MY_BASE_OBJECT"); // Name of the Base Object Re...

How to send any character in uppercase in Appium ?

Appium provides keycodes for the alphabets only in the lowercase. If we have to send any alphabet in uppercase then we have to send the keycode of that alphabet with the shift keycode. Practically also we first press the shift key and then press ...

How to use INSERT INTO SELECT in SQL

By using INSERT INTO SELECT Statement one can copy data from one table to other existing table. Syntax: To copy all the columns from one table to another table: INSERT INTO table_name1 (SELECT * from table_name); To copy only the selec...

Get all routes using Laravel 4

I have a situation where I want that every request that comes to my laravel 4 application for this I will use one controller at the moment which should handle every request. For handling this query the solution is as follow: This is the quest...

How to make a class/method abstract in php

Here we will learn about the abstract classes and methods. When we define a classes as an abstract then we have to follow the below rules: 1- We can not create an object of this abstract class. 2- The class becomes abstract if the class conta...

SIF API to Restore Record in Base Object

Following example illustrate how record in Base Object can be restored using SIF API. Restore SIF API will change the status of HUB_STATE_IND from -1 to 1 i.e. it will restore the record from soft delete. RestoreRequest request = new RestoreRe...

Use of "Final" keyword in php

This tutorial will help us to see the use of final keyword with a method of a class and a class individually. Example: class parentClass { public function test1() { echo "This is test1 method of parentClass"; } final...

What is semantic elements ?

Hello all, Semantic elements clearly defines its content. It means that elements which are recognize by their name in html for example <hedaer > , <nav> , <footer>. You can say it helps understand what is happening on the pag...

SIF API to delete record from Base Object

If you want to soft delete the record from Base Object you can use following code, please put corresponding values for items on which comment has been written: DeleteRequest request = new DeleteRequest(); RecordKey recordKey =...

How to create a report for the Session model in Odoo-9

If you want to create report for the session model ,first you have to move on .py file and setup all dependencies module. And For each session, it should display session's name, its start and end, and list the session's time date and unique numbe...

Thin Client

Thin Client A thin client is a desktop terminal that has no hard drive. All features typically found on the desktop PC, including applications,memory,RAM except of the hard disk. You have your data at the main server and all the system act...

Using async with ASP.NET MVC 5

ASP.NET has a pool of threads to service incoming requests. Once a new request is received a new thread is picked from the thread pool to service this request and this thread cannot serve any other request until the current request gets complet...

Mysql order by values within IN() function

Hello guys, Most of time we face the problem order by within IN() values . Mysql provides the function FIELD(), It will sort fetched IN() data according to requirment . The FIELD function returns the position of the first string in the remaining...

SIF API to create entry in Base Object

If requirement is to create entry in Base Object using SIF API you can use following code: PutRequest request = new PutRequest(); request.setGenerateSourceKey(true); RecordKey identity = new RecordKey(); ide...

Import & Export Category in Magento

How to import and export category in magento If you want to add all categories of one project to your new empty project in magento, then You have to download Mage works import- export extension from the Zip File which is given in the end of th...

substr() method in JavaScript String

JavaScript String substr() method : The substr() method is used to extract the sub-string from a string. It counts the index from 0. It returns the number of characters starts from the first parameter upto second parameter if passed. It doesn't m...

How to Print reports in Odoo-9

If any report have a combination of two elements,like below-> 1-in reporting all session contain an ir.actions.report.xml, for which a <report> shortcut element is provided, for example code is below--> <report id="account_inv...

How to create Reading & Writing program in android

Hello'friend's If you want to create Read and write function you can take help from below example. In below example i have created two buttons and one TextView. Step(1)-MainActivity- public class MainActivity extends Activity { p...

setInterval() method in JavaScript

In javascript sometime you have to perform task repeatedly, in that case setInterval() method can be handy to use. Syntax:- setInterval(function,time_in_milliseconds,param); setInterval accept time in millisecond, let try an example:...

split() method in JavaScript String

JavaScript String split() method : The split() method breaks the string into array of strings for a given expression. The string breaks from every point where the expression matched. For example if we give the blank expression then it will break...

ASP.NET MVC 5 : New Features

ASP.NET MVC 5 is the a major new release which has introduced new features as below: 1) One ASP.NET On selecting a New Project from the VS 2013 unlike in previous version we will see one template called ASP.NET Web Application.After ...
1 175 292