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

Search In

How to find upcoming birthdays and number of days left from current date?

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

Add dots to UILabel if text does not fit frame

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

Using Property Lists (Plists)

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

Formatting time

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

Custom right bar button in UINavigationBar

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];

How to generate unique key of random numbers in PHP

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

Validate textbox only for integer and float numbers on a button click.

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">

How to get Latitude/longitude from address in PHP

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

Pure virtual function in C++

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

Sorting in Ruby

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 &

1 461 481
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: