
Search In
By using next statement, control will go to next iteration of the loop.
Terminates the execution of a block if it will be called in that block.
Example
for i in 0..8
if i < 3 then
next
end
puts "Value of i is #{i}"
end
This
Hello Reader's!, If you need to know which is the best place for putting the JS.
You can put the js functions in the head part. But it'll be a good habit to put all of your functions in a separate file. You can also call for the external script refe
If you want to make a functionality that can be used anywhere in the code. For example, you want some method that can be called on the jquery selection and it can perform number of operations on the selection. For this, you can write a plugin.
For e
Api unity of returned value will return a RecordSet of specified model based on original
returned value:
In below code i have explain api_returns
@api.returns('res.partner')
def afun(self):
...
return x # a RecordSet
Note- And if an old API functi
Api.onchange will trigger the call to the decorated function if any of the fields specified in the decorator is changed in the form:
In below code you can use in your .py file.
@api.onchange('fieldx')
def do_stuff(self):
if self.fieldx == x:
self.fi
Api.depends will trigger the call to the decorated function if any of the fields specified in the decorator is altered by ORM or changed in the form:
In below code you can use in your .py file.
@api.depends('name', 'an_other_field')
def afun(self):
In count records retrieve a list of records and count them, search_count() can be used to retrieve only the number of records matching the query. It takes the same domain filter as search() and no other parameter.For example code is like below.
mode
As we know that , Node js is a single threaded application but it also support concurrency based on concept of event and callbacks.
Every api that we are doing using node.js are asynchronous and single thread,node js uses asynchronous function ca
What is the strrev() function?
strrev() function is uses for reversing a string. strrev() function is also used for reversing a number.
In the given below example you can easily understand the use of strrev() function
<?php
//here call the str
Let's say you have an array of countries and you need comma separated values of 'countries'.
Countries Array :
$countries = array("India","USA","UK");
To convert array elements into comma separated string, use this php inbuilt function called join
