
Featured
-
How Regression Testing Detects Integral Errors In Business Processes
Humans are forever changing and evolving and so to
by kristina.rigina -
Get Display Banner Advertising Opportunity on FindNerd Platform
“Do you have a product or service that nee
by manoj.rawat -
Android O Released with Top 7 New Features for App Developers
Android was founded by Andy Rubin, Rich Miner, Nic
by sudhanshu.tripathi -
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Objective C or Swift - Which Technology to Learn for iOS Development?
Swift programming language is completely based on
by siddharth.sindhi
Tags
How to get last insert id in Wordpress
Hello Friends,
Programmer generally need last insert id for their coding requirement. If you are new in Wordpress and you need to fetch last insert id after insertion. Please follow the code below:
// Define the DB object
global $wpdb;
...
How to ordinalize current date in rails
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 > ...
How to create database in MySQL using PHP?
In PHP, to create database in MySQL functions mysql_create_db() or mysql_query() is used. To create database using mysql mysql_create_db() syntax is as follows:
mysql_create_db($dbname);
For example:
Suppose we want to create a database...
Dos and Don't's for an Effective Communication
In my recent blog about How to Improve Your Listening Skills,I have explained clearly what are the parameter by following which you can become a good listeners and will transform into a ...
Multithreaded Priority Queue in Python
With the help of Queue module we can create a new queue object that can hold a specific number of items and threads. Queue module have following method which is given below.
get(): The get() removes and returns an item from the queue.
put(): Th...
How to get all month names in the current locale in Rails
There are number of ways to get the names of the all the months in the current locale. I am using the Ruby I18n gem which comes along with Rails.
This gem provides number of methods to perform these localisation tasks.
To get the month ...
Get screenname of current user in liferay
Hello Guys
ScreenName is nik name or unique identification of the user and we need to use screenname for user tagging and identify the user in liferay.
There are two ways to get screenname of current user :
Step 1: Get screenname ...
Synchronizing Threads in Python
With the help of threading module we can implement locking mechanism that allows you to synchronize threads. And a new lock is created by calling the Lock() method, which returns the new lock and thread in threads module.
For example you can see...
How to handle Simple Mail Transfer Protocol (SMTP) in python
In python Simple Mail Transfer Protocol (SMTP) is a protocol. Python provide smtplib module to handle the email system and SMTP client session object which is used to send mail to any Internet machine with an SMTP or ESMTP listener daemon along w...
Compute difference between two arrays in PHP
This article defines an array function of PHP, which is used to find the difference between two arrays. The details of function are given below :
array_diff() : array_diff() is used to compare two or more arrays to find the difference. The fun...
Creating Thread Using Threading Module in Python
If you want to implement a new thread using the threading module, you have to follow the following steps which is given below
Step-1 Define a new subclass of the Thread class.
Step-2 Override the __init__(self [,args]) method to add additional ...
How to make Menu Groups in android
In the below code I have created Menu Groups. Simply I have added menu items in menu folder, all menu item are added in group. See the below code it will clearly described how to make Menu Groups .
Step(1)-MainActivity-
public class MainAct...
Laravel 5.0 Illuminate, Facades, Service Container, Service Providers
Hi Readers,
If you are new to Laravel 5 you will definitely come across following terms and you will be using them without actually understanding what they stands for. But it always helpful to understand what are they stands for and why do...
How to run mysql join in Codelgniter
Hello Friends,
If you are looking for mysql join in codelgniter. Please review the code as below:
// Initialize select query
$this->db->select('*');
$this->db->from('users');
// Define join in last parameter define left ...
What Is Path Testing ?
What Is Path Testing ?
Path testing is a kind of structural testing approach. Path testing generally depend on the algorithm and the source code of the application. This testing does not depends on the requirements or clarifications. Path test...
Get user by using screenname in liferay
Hello Guys
ScreenName is uniquely identify to user and we can use screenname as user tag name in liferay.
Here, two ways to get user by using screenname with companyId :
Step 1: Get user by using screenname in jsp(view.jsp) page...
Laravel 5.0 Difference between Fillable and Guarded
Hi Readers,
If you are new to Laravel you will definitely come across two properties in the model one is Fillable and another one is Guarded. I myself did not get the use of these properties but once I get along I understood the actual use...
How to apply swipe feature on imageView in Android
If you are looking to perform certain task on swiping on the imageView or other widgets in android (the task may be change of activity, or change of the image on imageview).
Here is the code snippet that can help you out with this.
Step 1:- ...
Calculate distance between two point and draw route on map
Hi all,
Let take you have two points, Point1 (In Boston) and Point2 (In Atlanta), Now you have to show the route between two points.
In below method , you have to pass two param's i.e.. two point of map.
- (void)displayRouteFrom:(CLLoca...
How to insert multiple records into MySQL Using MySQLi/PDO
Here we will learn how to insert multiple records into MySQL Using MySQLi/PDO using the mysqli_query()/exec function in MySQLi and PDO respectively.The examples below insert two new records to the "Employee" table:
For example:
MySQLi m...
Deleting Data in cakephp2.x
If we are required to delete a record, cakephp 's model class offers a way for the same.
Deleting the record with the perticular id can be done by using delete() function :
delete(integer $id = null, boolean $cascade = true);
The abo...
Change color of polyline
Hi all,
If you want to change the color of a polyline or route on map just change the color in this delegate of map.
- (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id <MKOverlay>)overlay
{
MKPolylineRen...
Javascript Math Object
This object is used to perform mathematical tasks. It has various mathmatical methods. Using this object we can also create the random numbers.
1)Math.random()
Example :
<html>
<body>
<p>Math.random() returns a random n...
How to run select query in Codelgniter
Hello Friends,
If you are looking to execute select query in codelgniter. Please review the code below:
// Pass the table attributes you need to fetch
$this->db->select('id, first_name, lastname');
OR
$this->db->select('*'...
How to Sanitize Email ID and URL in PHP
Hello Everyone, today I will guide you "To Sanitize a String in PHP"
SANITIZE :- Data affirmation is usually an inclusive element of working with varieties. Not merely may be published files result in protection problems, nevertheless addition...
Passing Information Using POST Method in Python
We pass information to a CGI program in the POST method. And post packages give the information in exactly the same way as GET methods but instead of sending it as a text string after using post. In the URL it sends it as a separate message. This...
How to removes a directory in php ?
Hi Reader's,
Welcome to FindNerd, today we are going to discuss how to removes a directory in php ?
If you want removes a directory then you should use The rmdir() function that is removes an empty directory.
The rmdir() function retu...
What is process to unlink a directory in PHP ?
Hi Reader's,
Welcome to FindNerd, today we are going to discuss how to unlink a directory by using PHP ?
The unlink() function is used to deleted a file.unlink() function returns TRUE on success and FALSE on failure.
syntax of unlink(...
How to get filetype from a filename?
To get a filetype from a filename we have define a function GetFiletype() in which we have a passed a parameter i.e.,the name of the file. Using this function we will extract the '.' operator from the filename and use the extension to get filetyp...
How to check validate url in php ?
Hi Reader's,
Welcome to FindNerd, today we are going to discuss how to check validate url in php ?
If want to check validate url in php then you can use FILTER_VALIDATE_URL.This is filter validates a URL.
you can see below example
&...
What is process to get the vedio views from youtube using API in PHP ?
Hi Reader's,
Welcome to FindNerd, today we are going to discuss how to get the video views from youtube using API in PHP ?
If you want to see the total counts of a views on youtube video by api, then you should use below code:
<?php...
How to resize image in codelgniter
Hello Friends,
Generally we resize image after uploading. If you are looking to resize image with codelgniter. Please follow the code below:
// Include gd library
$config['image_library'] = 'gd2';
// Define your source image path
$co...
How to use the dis Module in python
In python dis module converts byte codes to a format and You can run the disassembler from the command line and It compiles the given script and prints the disassembled byte codes to the stdout . The dis function takes a class, method, function o...
Jquery draggable
Hello Readers ,
While building a web application , several times we need a box or a div which can be draggable so below is the code for explaining that .
Example :
<!DOCTYPE html>
<head>
<link href="http://code.jqu...
Calculate sum and product of all values in the array
Many times we need to calculate sum or product of values stored in an array. The most common way is to calculate sum or product by using for or foreach loop. For example we have an array with some numeric values, now we want to calculate the tota...
Jquery serialize function.
Hello Readers ,
jQuery serialize() method is used to create a text string in standard URL-encoded notation.
It is used in form controls like input, textarea, select etc.
It serializes the form values in such a way
so that its serialize...
How to create the media player in android?
If you are looking to create a music layer in android , here is the simple code snippet that can help you for this :-
Step 1:- Create an xml file for music player say"music_player.xml"
<RelativeLayout xmlns:android="http://schemas.andr...
How to make Spinner in Popup Window in android.
In the below example I have created Display spinner in Popup Window. Here I have created a popup.xml layout. In popup layot i have added TextView, ImageView, Spinner and button. And in activity_main.xml layout I have added a button to open spinne...
How to use addClass() in jquery
The addclass() method is used to add one or more class name to the selected element.
This method is used only to add one or more class names to the class attributes not to remove the existing class attributes.
Syntax :
$(selector).addCla...
Adding card with braintree
Hi All ,
These are simple steps to add card to braintree account in iOS.
1.Initialize braintree object with valid client token.
BTAPIClient *token = [[BTAPIClient alloc] initWithAuthorization:@"cleintToken received from tree"];
...
Modify or change the URL without reloading the page using javascript
Hello Guys
Here, We can update address bar with new URL without hash or reloading the page by using javascript.
Following examples help you to better understanding :
function processAjaxData(response, urlPath){
document.getElem...
Jquery append()
The jQuery append() method is used to insert specified content at the end of the selected elements in the jQuery collection.
Syntax :
$(selector).append(content, function(index, html))
Example :
<!DOCTYPE html>
<html&g...
Maintaining scroll after postback
While handling postback if we have pages with large data it should scrolls. So when doing that postback occurs and the position where last scroll is done gets lost by the browser.
So for doing that we can use the page property which can make t...
How to use jquery attr()
The jQuery attr() method is used to set or return attributes and values of the selected elements.
Syntax :
$(selector).attr(attribute)
Example:
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax....
Building Services in Android Using C# and Xamarin
In Xamarin we have functionality to build app using C# and other Visual Studio supportive languages.
We can build apps by implementing services into it.
For using and implementing services we can use interfaces and classes that con...
How to Improve Your Listening Skills?
Whether you are a learner or a professional coach, the one thing that matters a lot is your listening skills. As a good listeners it is always considered how effectively you listen to so...
How to validate IP Address using PHP Filter Extension
Hello readers, In this blog I will guide you "To validate IP Address using PHP Filter Extension".
The below code validate your IP Address is valid or not using filter_var() function.
<?php
$ipAddress = "107.20.120.5";
if (...
How to add a Favicon to your Wordpress Blog
Many of the wordpress themes are having options in admin panel for uploading and changing the favicon image. But if we want to make a custom favicon image or we do not have any option in theme then we can create a custom favicon for every wordpre...
How to get current working directory in php ?
Hi Reader's,
Welcome to FindNerd, today we are going to discuss how to get current working directory in php ?
So basically The getcwd() function is used for returning the current working directory.
This function always returns the curre...
Mutation Testing And It's Benefits
Mutation Testing:-
Mutation testing is a kind of structural testing approach. In this normally users utilizes the pattern of the code to conduct the testing method. In the high level, this is also a method of amendment to the source code in t...