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

Search In

How to update records in OpenERP/Odoo ?

In update records can be updated using write(), it takes a list of records to update and a mapping of updated fields to values similar to create() .for example code is like below. models.execute_kw(db, uid, password, 'res.partner', 'write', [[id], {

How to remove default text on textbox focus

Remove text from a textbox on focus and getting the text again after loosing focus Use below .aspx code to make a textbox remove the default text on focus and again get the default text if the user leaves the textbox blank. <asp:TextBox ID="txtS

how to get remaining months between two dates in ruby

Below is the code to get remaining months between two dates date1 = '2011-03-31' date2 = '2011-02-25' (date1.to&#95;date.year * 12 + date1.to&#95;date.month) - (date2.to&#95;date.year * 12 + date2.to&#95;date.month) Above will gi

How to copy image in NSPasteBoard

To copy the image on NSPasteBoard following code can be used: - (IBAction)paste:sender { NSPasteboard *pasteboard = [NSPasteboard generalPasteboard]; NSArray *classArray = [NSArray arrayWithObject:[NSImage class]]; NSDiction

How to validate that string is email address or not.

During User registration it is very necessary to check that entered email id is valid or not. To check that following code will help you. - (BOOL)validateEmailWithString:(NSString*)email { NSString *emailRegex = @"[A-Z0-9a-z.&#95;%+-]+@[A-Za

How to get Cookies from UIWebview

The following code will get the cookies form the sever and will store in the array. Get the appropriate cookie from the array by its name. - (void)webViewDidFinishLoad:(UIWebView *)webView { NSHTTPCookieStorage *storage = [NSHTTPCookieStorage s

How to pass the method name as argument string

Sometime we don't know name of the method at compile time. So pass the method name as argument and use the following lines of code. NSString *methodname=@"calltest"; SEL aSelector = NSSelectorFromString(methodname); NSInvocation *inv = [NSInvocatio

Cakephp Not Getting All Fields From Database

If you are unable to get newly added database column in cakephp, then use the below code. Go to app / Config.php then set Configure::write('debug',0); to Configure::write('debug',2); Refresh you window and again set

Delete Directory and Files Recursively Through php Script

Hello all, If you want to delete all directory and files recursively by using php script, for this please follow the below mentioned code. <?php function deleteDirectory($filename) { if(is&#95;dir($filename)) $handle = opendir($filename); i

How to Override Inline CSS Styles

Inline styles have the highest priority of all CSS. In general, I would recommend you avoid using them and place your CSS declarations in external files. However, you may not have that luxury if you are working on a legacy system or do not have direc

1 108 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: