
Search In
The following code sets the desired frame to a view with animation. The animation is performed with a duration of 0.4 secs (can be set according to the requirement).
[UIView animateWithDuration:0.4 animations:^{
[animateView setFrame:frame]
When we have to create a hash in just one line we can use this particular ruby code:
@users = User.find :all
user_hash = Hash[@users.map {|x| [x.id, x.name]}]
Here we created a hash in just one line with Id as the key of hash and name of
The following code should be used:
WebElement draggable = driver.findElement(By.xpath("//Give the xpath"));
WebElement droppable = driver.findElement(By.xpath("//Give the xpath"));
Actions action = new Actions(driver);
action.dragAndDrop(draggable,
HI guys,
Do you know how to load a url in UIWebView?
Please check the below code -
UIWebView *chartsWebView;
[chartsWebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"]]];
chartsWebView.scalesPageTo
Sometime you may need to prevent from text selection on double click of mouse button. You can use use the following css3 code for the same:-
.monthReport label {-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user
Hi,
If you are stuck with printing last executed msql query in codelgniter so with the help of below code, you can print or You can view your last executed mysql query in Codelgniter.
echo $this->db->last_query();
Hi ,
If you want to check the null values in NSDictionary then use the following code :
id value = [dict valueForKey:akey];
if (value == [NSNull null] || value == nil ||
value == NULL ||
value == Nil ||
[value isKindOfCl
To make a unique field and do not allow duplicates records in openerp, below is the solution
In .py file use this code:-
class course(osv.osv):
_name="course"
_columns={
"name":fields.char("Name"),
}
_sql_constr
Hello everyone,
I am facing a problem in uploading a image to server.
I am able to successfully capture a image from the camera or select a image from the gallery,
but i have to provide a crop option before uploading the image just like in What'sapp
Hello Reader's If you need to read a given file line by line then PHP will offer you to use Fgets to do.
Lets see it's example as below:-
$handle = fopen("yourfile.txt", "r");
if ($handle) {
while (($line = fgets($handle)) !== false) {
