Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Search In

How to detect UTF encoding using PHP

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);

How to make a cookie with no expire lifetime

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

How to search a specific column in all the tables of database?

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

How to use model reference in openERP/Odoo ?

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

How to use search_read in OpenERP(Odoo)?

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':

How to use cursor in OpenERP(Odoo)?

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

How to change the main module file in OpenERP(Odoo)?

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(’

How to adding a class to their root elements in OpenERP/Odoo ?

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

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.name);

How to detect screenshot taken by user in iPhone.

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

1 257 408
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: