Hi All,
To call any number with code using swift you can use this function.
private func dialNumber(phoneNumber:String) {
let phoneUrl:NSURL = NSURL(string: "tel://\(phoneNumber)")!
let application:UIApplication = UIAppli...
To integrate reCAPTCHA in your HTML form, you need a public & secret key.
You can get the both keys from this URL https://www.google.com/recaptcha/admin and it will look like
Public Key: 9Madr_cSZZADgLy9zeFTEraGn9ogHhxuh_6pquJUHYyt
...
Laravel Queue is one of the best feather of Laravel 5.x. When we want to make our site fast and we have to fetch and store large amount of data then we will run our query on back end. In Laravel 5.x by using queue we can run time consuming on bac...
Creating module is easy in drupal
Steps you need to follows are as below.
Creating the module directory
Creating the .info file
Creating the .module file
Where does your custom module goes?
Its always better to keep contrib and cu...
Quick sort can be very useful to you if you want to sort your array efficiently.
The Time complexities for quick sort
Best Case performance : O(n log n)
Average Case Performance : O(n log n)
Worst Ca...
If you are working on meeting schedule functionality in your android app and you are stuck with the timezone then this example can guide you.
If you are getting the time, timezone from server and time is in UTC then you should not have to ap...
If you declare a method that takes two parameters, on This method call , you need to pass two parameters along with it.
But, Ruby facilitates to declare methods that can work with a variable number of parameters.
Example
def evon (*t)...
It is very painful to use pagination in other framework but In Laravel 5.x it is very easy to implement pagination. By using paginate method on the query builder we will takes care of setting the proper limit and offset based on the current page ...
It is a series of Whole number where we have to find sum of the two preceding numbers. It Begins with 0 and 1, the sequence goes like this 0,1,1, 2, 3, 5, 8, 13, 21, 34, etc. using the formula n = n(-1) + n(-2), where the n(-1) is the the l...
In any project routing plays an important role.In Laravel 4.x we will define our routes in routes.php which is in app/Http/routes.php which is loaded by the App\Providers\RouteServiceProvider class. In Laravel 5.x the basic routes consist of a UR...
In rails we can apply limit and offset to arrays in different ways.
1> Using "slice" method.
slice takes 2 arguments, the first one being the "starting_index" & the second one is the "number_of_elements".
syntax :-
arrayob...
In Laravel, many times we may need to create a link to download sample CSV file. So that user can download sample CSV file from our website and upload correct formatted file.
It's a very simple task and to accomplish that we need to follow fo...
There are n number of functions of URLs in laravel 4.x which is used to perform action that are
action:
action is a function which is used to generate a URL for a given controller action.
Example:
$url = action('HomeController@getInde...
Laravel provide us the facility to create our custom middleware for user's authentication. We can create different MIddleware for different roles. To accomplish it we need to follow the following steps.
Step 1st:- Creating new Middleware for...
There are n number of functions of strings in laravel 4.x which is used to perform action in string that are
camel_case:
camel_case is a function which is used to convert the given string to camelCase.
Example:
$camel = camel_case('fo...
In Laravel many times we need to group together many routing requests having same middleware, controller, suffix, etc. We can achieve that by using Route::group. The syntax of it is stated below.
Syntax :-
Route::group(["middleware" =&g...
Spring security gives us the feature to auto login into the system just after creating an account.
Other way is to register then go to login page, and then login to the system. When we login login mechanism spring automatically creates the sess...
In Lavarel one of the best practice is to use form validation rules to validate the submitted data. There are number of ways to do it . One way is to create form validation rules both in the controller or we can create a separate file under the a...
There are n number of functions in laravel 4.x which is used to define path that are
app_path:
app_path is a function which is used to get the fully qualified path of the app directory.
Example:
$path = app_path();
base_path:
...
Hi Readers,
In iOS development of today scenario we may pass the data in different part of code either to selected class or broadcast. One way of broadcasting objects is local notification. Following is the way to implement it:
To broadcast...
array_add :
array_add function is used to add a key/value pair to the array.It will add only when there is no such key available in the existing array
Example:
$array = array('foo' => 'bar');
$array = array_add($array, 'key', 'val...
Hello Reader's if you want to write a custom code for making AJAX hit then you should choose for the best path for that, Open the file admin-ajax.php All ajax request should be made there.
On in first step open the template file and write the ...
How to make Rounded Image avatar in iphone,along with circular coloured border.
Create IBOutlet of the image from the storyboard to your View controller as-
__weak IBOutlet UIImageView *imagename;
Now in your viewDidLoad ins...
Many times we need to show our old values in a form after an error or validation stops our form from submitting. Laravel has a very nice way of retaining old values and populating it back into our form.
I myself used it in a drop down, where ...
In laravel 4.x we have lang class which will help us to retrieving string in different languages that will help us to easily support multiple languages.
The folder structure for lang files are
/app
/lang
/en
messa...
To randomly select any single record in MySQL you need to execute the following MySQL statement:
select * from tablename order by rand() limit 1
The above statement returns a single record randomly.
For multiple records you need to...
Hi all ,
To convert UIImage to NSData
Objective C
NSData *data = UIImagePNGRepresentation(self.MyImageView.image);
Swift
let imageData: NSData = UIImagePNGRepresentation(self.MyImageView.image)
To convert NSData to UIImage
...
You can take reference form below example to find the value in an array list using php in_array.
Suppose you have a list of Favorite List items (for example a list of colors names) and you want search your color is exist in list or not exist.
...
For grouping together methods, classes, and constants, we make use of module.
Modules give you two major benefits:
1) prevents name clashes.
2) implement the mixin facility.
Syntax:
module Identifier
statement1
statement2
...
Here I am writing code to load url on WebView.
We need to create WebView client where we get the event of page finished.
Then simply showing ProgressDialog and dismiss it on onPageFinished().
WebView myWebView ;
myWebView = (WebV...
How to edit column header using Handson Table
While using Handson Table, I faced a issue of making Headers editable.
The HandsonTable plugin can be downloaded from the following link:
github
The solution which I got for making head...
Project manager spend lot of time orchestrating meeting which make him comfortable running meeting with wide variety of audiences. Below mentioned are the few traits for effective project managers who really make ideas happen:
Good Communica...
Hello I love RPG games and want to create a simple RPG game too.
But don't know the best approach for this. Can anyone help in this. ?
Thanks in advance.
If two tables are connected through pointers, we can get data from both the tables using "include" key.
For example- There are two tables "Task" and "Task_Detail" and a pointer of Task_Detail is added as a column in table Task with name "detai...
Hello,
I want to create a multi-player game but I am very confused to select the back end server. I want to do this game with unity effects.
Thanks in advance.
When I implement this. I catch this event multiple time.
Would you please provide solution.
private EditText mDateOfBirth;
mDateOfBirth = (EditText) findViewById(R.id.sign_up_date_of_birth);
mDateOfBirth.setOnTouchListener(new View.OnT...
When we need strike text in android most of the time we do strike text with the help of HTML tag.
But Here is simple way to strike TextView's text in android with native code
textView.setText("This is Strike text");
textView.setPaintFl...
Hello Friends,
If you reading this Blog, you must have twitter account at least one.
Always post some meaningful and interesting content to get more and followers. Also Twitter account is not a competitio...
Following code will return the today's date in islamic calendar
NSCalendar *hijriCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSIslamicCivilCalendar];
NSDateComponents *hijriComponents = [hijriCalendar components:NSDayCal...
It is very easy to read data from Parse database, just create a query using PFQuery class over class name (table name) and request for data.
For example - There is one table "Post" with column names : title, message, postTime. Now get data fro...
To save data in parse DB table, create one PFObject and write the information that you want to save to table.
For example - I have a table name "Post" with column names : title, message, postTime. Lets save one record to this table.
PFObject ...
I am writing way to add and use date Picker Material design library to our project.
First of all we need to add library to our build.gradle file
dependencies {
compile 'com.wdullaer:materialdatetimepicker:1.5.4'
}
Then we need to imple...
Image Source: deepintheweb
Web applications are growing in popularity with every passing day due to a plethora of benefits it offers to users. With an internet connection, you can easily access a web app from any corner of the world. Unlik...
Hello Readers
In php there is a great role of php array, we will discuss about the in_array and array_key_exists in php with examples.
in_array in php:
in_array: in_array in php checks the array value it is exist or not to the given arr...
Are you Looking for a better library that can fetch all phone contacts easily and that can manage all numbers in common formats. Then LibPhoneNumber library is a better solution because this library is faster then other handmade queries. This lib...
Here I have created ProgressBar app in android in which I have used setProgress(), setMessage(), setProgressStyle(),setMax,show() function.
Below code example will help you to create RatingBar function in android.
Step(1)-activity_main.xm...
If you are working on a Google chart and need some jquery ajax requirement, then this blog is quite useful. I found this very powerful and simple to implement. Find the link at the end of details:
Google Charts with Jquery Ajax
If you are w...
If you are working on audio player and got stuck to manage audio controls and this jquery plugin is very useful. Find the link at the end of following details to use this plugin:
Custom Audio Player with Jquery Audio Controls Plugin
Introdu...
BrainTree is a very secure and easy to setup payment gateway. There are lots of features available in new Braintree and I found it very useful. Visit the link at the end of details:
Payment System with BrainTree PayPal using PHP
Are you wor...
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...