
Search In
Hello Readers! if you want to find out the type of file encoding using php then the code below will help you:-
//check string strict for encoding out of list of supported encodings
$enc = mb_detect_encoding($str, mb_list_encodings(), true);
Hello Reader's If you have writing the code that makes the cookies for valid lifetime then you just need to set big number for it's validity. As the example below PHP code:-
Maximum value: 2147483647
setcookie("CookieName", "CookieValue", 21474836
Hello All,
Working with the SQL Database, I wanted to search a specific column in all the tables of database and to do that I use the following code packet.
SELECT TABLE_NAME,COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '% You
If you want to use model reference in OpenERP(Odoo) follow the below mentioned code and paste it in your (Python).py file: →
class openerp.models.Model(pool, cr)
class user(Model):
Note-Above code are created by inheriting from this clas
A search_read function is now available. It will do a search and return a list of dict.
In below code i have explain search_read
self.search_read([], ['name'])
[{'id': 3, 'name': u'Administrator'},
{'id': 7, 'name': u'Agrolait'},
{'id': 43, 'name':
When we are using cursor we should use current environment cursor:
like below code.
self.env.cr
except if we need to use threads,we use like below code.
Environment.manage():
env = Environment(cr, uid, context)
Note- Environment.manage() indica
We will have to remove .py file, rename the class and its attributes to something like
below code.
from osv import osv, fields
class travel_hostel(osv.osv):
_name = ’travel.hostel’
_inherit = ’res.partner’
_columns = {
’rooms_id’: fields.one2many(’
If you want to adding a class to their root elements in OpenERP(Odoo) follow the below mentioned code and paste it in your wizard .js file:
local.HomePage = instance.Widget.extend({
className: 'oe_petstore_homepage',
...
});
local.Greetings
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.name);
With the help of the notification "UIApplicationUserDidTakeScreenshotNotification" in our application we can detect the screenshot taken from iPhone.
Use the following line of code to generate notification for same.
[[NSNotificationCenter defaultCen
