
Search In
Suppose, we have a table users having id, name and date_of_birth as column name. So to display upcoming birthday and days left you need to execute the following query:
SELECT id, name, date_of_birth, DATE_FORMAT( NOW( ) , '%Y' ) - DATE_FORMAT( date
Hi all,
If you want to show dots if text does not fit UILabel frame. then just copy this code.
UILabel property "numberOfLines" is 1 by default. Try to set it 0 if you dont know the exact numberOfLines and use sizeToFit method of UILable.
yourLa
Method to get a value from plist
NSString *path = [[NSBundle mainBundle] pathForResource:@"PlistX" ofType:@"plist"];
NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:path];
int number = [[[[dict objectForKey:@"One"] objec
Some time you may need to find the day, hour and min and seconds for ex:
*you entered a number 105
and you want 1h-45Min ago*
then you can simply use the following function although you can use your custom function as well depends on the need.
Fu
Hello friends,This code is to make custom right bar button in UINavigation bar. it helped me to make custom right bar button in UINavigation bar, Hope this will help you too.
UIButton *homeButton = [UIButton buttonWithType:UIButtonTypeCustom];
Hello Friends,
If you are looking to generate unique random string of numeric numbers. Please follow the below code for the same.
<?php
$uniqueKey = generateUniqueKey();
/**
* generate unique key
* @return unique key
*/
public function gener
We can validate a textbox on a button click by calling a function and using jquery.
I am using regex for integer and decimal numbers and match method for the comparison.
Here is the code:
<html>
<header ng-controller="menuController">
Hello All,
In this blog we will discuss about how to fetch the lat/long from the given address in PHP.
So we will be using curl request for fetching the same via using Google maps api.
Below is the code, you can use to generate lat/long :
public
In C++, Pure virtual method or pure virtual function is a virtual function in which virtual function does not contain a definition inside the function declaration. A pure virtual function/method is declared by assigning a function equal to 0 in decla
Using sort method we can sort any string, numbers, even classes either in ascending order or descending order .To sort an array ,you need to compare its element using <, >, <=, >= .
return -1 if x < y
return 0 if x = y
return 1 if x &
