
Search In
Method to cut image in Objective-c/cocoa (OSX)
-(IBAction)cutItem:(id)sender
{
hasBeenDragged = NO;
NSImage *_sourceImage = [self image];
float width = selectedArea.size.width;
float height = selectedArea.size.height;
float cente
The following code should be used to automate the slider:
WebDriver driver = new FirefoxDriver();
driver.get("http://jqueryui.com/resources/demos/slider/default.html");
driver.manage().timeouts().implicitlyWait(20L, TimeUnit.SECONDS);
WebElement sli
Atomic properties are thread safe.
To understand atomic property it is important first to take a little focus on multi-thread programming. In multi-thread programming different threads can use same property so it is must to apply thread handling. W
**
Method overLoading In Objective C:
**
method overloading concept in object oriented language we use the same method name with the different signature. Signature is the argument that we send using the function.
we just change the number of argume
Hello friends,
I am here for share the solution of a MySQL problem.
If you want to change the data type of a column from varchar or any other one to date, you should need to use following query-
UPDATE `tbl` SET `date1` = STR_TO_DATE(`date1`, '%d-%
Using php we can easily find difference in days excluding weekends. First take start date and end date and generate strtotime for these dates to convert into string. After manipulation using while loop we can easily get the count of week days excludi
Rails provide us many features which are native to Rails and not ruby.
We can ordinalize a date in rails with a method provided by active_support known as ordinalize.
If we want to ordinalize today's date we can write :-
2.1.5 :01 > t = Time.n
If you want to extract only the date, we can use the strftime method of Time/Date class, as
2.1.5 :055 > DateTime.now.strftime('%d/%m/%Y')
=> "12/30/2015"
(Here d is used to display date, m displays month and Y display the year in 4-dig
Rails: Customizing Time Ago in Words
Hi friends,
Whenever something is published to a site, we see in their posted time, it is written like about 2 minutes ago or about an hour ago. These kind of sentences displays how much time before the content wa
Its a command prompt like Unix/Linux shell where we can entered command and get output in interactive mode. REPL, i.e. Read Eval Print Loop, environment is bundled with Node.Js and REPL performs the following tasks.
Read – I
