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

Add classes and change text using jquery function to add class and remove class on multiple buttons

You need to give class to the button and attach the .on() method with it. If you have multiple buttons that when you click one, it changes classes & the text inside. Here is the simple code to do this: $('.EgClassName').on('click', fun...

Get desired page on clicking a link using ui router in angularjs?

How to go to the desired page on clicking a link when the same link is present in more than one page using ui router in angularjs? If you have one link present in more than one page and you want to redirect to the page from where you came to t...

How to pass xml data in Jquery

Hello Reader's!, If you have given a xml data and you need to parse it into Jquery, Then you can use the parseXML function. Let's see the example below:- var xml='<Pages><Page Name="test"><controls><test>parsing into ...

Convert NSString to NSDate and vice versa

HI all, If you want to convert NSString to NSDate ,then you must use NSDateFormatter to convert please follow this code . NSString to NSDate In Objective-C :- NSString *dateString = @"11-11-2015"; NSDateFormatter *dateFormatter = [[...

Sorting an array of JavaScript objects

Hello friend, I have a javascipt array object. Now i will try to sort price in this array. For Example: var data = [ { "h_id": "3", "city": "Dallas", "state": "TX", "zip": "75201", "price"...

HTTP Long Polling

Hello readers today we discuss about "HTTP Long Polling". World-wide-web application coders can put into action an approach called HTTP extended polling, in which the client polls the server looking for brand new data. The particular server ke...

Laravel, get last insert id using Eloquent

Laravel 4.x we have a facility to get last inserted id easily. By showing one of my code you will get easily understanding. Example: $karmaNote = new Karmanote; $karmaNote ->reqid = $meetingId; $karmaNote ->conne...

How to create multilingual translated routes in Laravel 4.x

Now there are n number of site which we have to make multilingual. In Laravel we have the facility to make our site multilingual. In Laravel 4.x we will also make multilingual routes.There are few steps we have to follow to create multilingual t...

Update query with inner join

Hello readers, today we will discuss about the "SQL query with INNER JOIN". UPDATE (SELECT table1.value as OLD, table2.CODE as NEW FROM table1 INNER JOIN table2 ON table1.value = table2.DESC WHERE table1.UPDATETYPE='blah' ) t SET t...

How to Calculate the difference between two dates in PHP?

Hello readers, today we will discuss about "Calculating the difference between two dates in PHP". For example, we have 2 dates and we wants to find the difference between them in php so we can use the below code: $date1 = "2007-03-24"; $da...

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="menuCont...

Difference between client-side and server-side programming

| ----------> HTTP request | +--------------+ | +--------------+ | | | | | | browser | | | web server | | (JavaScript) | ...

How to make option menu function in android.

In this blog we are inflating the menu by using inflate()method of the menuInflater class this can be performd event handling on menu items, when we need to override then we can used onOptionItemSelected()method of activity class. Hence using bel...

How to upload large files from Android device to server

Android developers do face the exception when sending large file from Android device to a server. To send large file to a server you have to make the file into small size chunks and then send it to the server. setChunkedStreamingMode(1024), thi...

How to make controller,command using artisan in laravel 4.x

We can create controller and make command using artisan.The syntax for writing command for controller is: Syntax for writing Controller: php artisan controller:make ControllerName Example for writing Controller: php artisan control...

How to make Menu Slider function in Android?

If you are looking to create Sliding menu in android below example will help you.In android Sliding menu is used to hide and show menu items. In below example I have create multi layouts here like fragment layout using for dividing menu item . fr...

How to add class to first element with jquery?

To add class to first child of an element you will use :first selector as follow: $(selectorname:first).addclass('classname'); For example: <div class="demo"> <p>hello</p> <p>hiii</p> </div> ...

Insert a new record if not exist and update if exist, laravel eloquent

Laravel is very useful when we want to do basic operation .Suppose if we have a condition that we have to Insert a new record if not exist and update if exist, If we do this task in php then we have to put if-else condition But In Laravel 4.x we...

Get useful error messages in PHP

In case of syntax errors all you need to do to is to turn on error display in the php.ini. You may miss it because of it being turned off by default. Well, they are turned off by default because of a simple reason that a customer does not come a...

Determine which submit button has been clicked

If we have two submit buttons and want to detect which one is pressed then simply use post method i.e. $this->request->data. <?php echo $this->Form->create(false); ?> <?php echo $this->Form->text('input'); ?> &l...

Bulk Insertion in Laravel using eloquent ORM

Insertion is the very basic feature in every project. When we want to do bulk insertion there are n number of ways are available in Laravel to do bulk insertion. Some of the way to bulk insertion are: 1) By using Raw query in Laravel. 2) By ...

how to remove action name from URL in cakephp

Current URL is : http://mysite.com/MyController/view/page1 but if you want something like :http://mysite.com/MyController/page1 means you want to hide action name from URL. Then go to app/config/routes.php and type the below code. Rou...

How to impliment view Animation in Android

To implement view Animation in Android follow the steps mentioned below:- 1) Start a new project in android studio. 2) Now create a new Android resource Directory under res directory then choose interpolater option in directory type and nam...

Automatically deleting related rows in Laravel (Eloquent ORM)

I am using Laravel and I want Automatically deleting rows using Eloquent ORM .In laravel we have deleting event .By using this "deleting" event we can do all the clean up or what we want to delete we are able to delete. By using example ...

Using namespaces in Laravel 4

Namespaces plays an important feature of php. Namespaces are used to solve 2 major issues. 1) Authors of libraries 2) Applications encounter Laravel 4.x also provide namespace to solve those issues. The files are app/controllers/F...

Exception Handling In Java

Exceptions are the abnormal conditions which generated at the time any runtime error occurred. To handle these exception is known as exception handling. The exception handling is done to maintain the normal flow of the program. In java there are...

Refresh the parent window and close the child window on clicking the button in child window

How to refresh the parent window and close the child window on clicking the button in child window using JavaScript If you want to close your child window and refresh its parent window on click of a button, we can do that with the help of foll...

User of Recursive in cakephp

It is used where ample data is fetched from the query and there are numerous levels of associations between your models. we use Recursive like this way. $this->Region->find('all', array('recursive' => 0)); These are levels of ...

Use of $this->set() in Cakephp

Hello Readers , In cakephp development framework we will use $this->set() several times . The set() method is basically use to create a variable in our view file i.e. ctp file . If suppose we have an array $userprofile and we want to ...

How to subtract days from a given date?

Hello Reader's. If you have given a date and you just need to add or subtract number of days from it then you can use the code below:- var SubDays = 15; $.datepicker.formatDate('yy/mm/dd', new Date() - SubDays) ; Or you can also calculat...

Property Animation Android

1) Here I will rotate a View around its vertical axis using the rotationY property. we will create an XML resource file in the /res/animator directory named as flip_on_vertical.xml. <objectAnimator xmlns:android="http://schemas.android.com/...

Generic DropdownList in MVC

Hi All, We in most of our projects in MVC come across creating dropdown list, that can be tricky sometimes. In this blog you all will get a preview of creating a generic function for creating dropdown for any list. The first thing we need t...

Passing variables from PHP to JavaScript in Drupal 7

Drupal provide a mean to pass information easily to JavaScript. Many applications want to pass configuration information to JavaScript that runs on a page. "Hello World!"), 'setting'); //Inline Js drupal_add_js('alert(Drupal.settings.hellow...

Image Sprites in CSS

Image sprites is a collection of different images in a single image. image sprites can can be used in html page for showing different images seperately and help us to increase our image loading time. Any Web page with multiple images generates th...

Javascript DOM -document.getElementById( ) Method

This method is used to get the elements after given specified id. Using this method we can get value from the input text field. But before to get value from input field , we need to define id for the input field. Syntax: document.getElement...

How to insert form data using Wordpress

Hello Reader's! If you are new to wordpress and looking for the method to insert form data into table, Then you can use the Wordpress liberary code to do that:- <?php global $wpdb; $wpdb->insert('wp_custom_user', ...

Pointers in C

C has an interesting and powerful feature of pointers. It differs it from other languages. As the name suggests it points to something. Whenever we declare some data type it holds some memory. If we define a variable ptr then, &ptr is the add...

REST in Rails

REST, is REpresentational State Transfer which provides the appropriate way of heterogeneous application-to-application communication. REST consists of principles that define how Web standards, such as HTTP and URIs should be used Five key pr...

isNaN() And isInfinite() in Java

isNaN() and isInfinite() methods in Java are the member functions of the java.lang.Double and java.lang.Float classes. Both the functions here are static member functions of the classes. NaN here stands for the Not-a-Number, it specifies wheth...

How to get data from dictionary and add them into an array in ios

If you want to get data from dictionary and add them into an array below code will help you, In this blog firstly i have created a NSMutableAarray and after that created a NSArray which contain the value like ram,13 etc then i created a NSMutable...

Create a dictionary which contain an array

To create a dictionary which contain an array below tutorial will help you. In this blog firstly we create a NSArray which contain some value and after that I have displayed all the value and then created a NSMutableDictioary and provide a key t...

How to convert Json Object into Json Array

Hello Reader's. If you have a json object and you need to convert it into array then you just need to write the code below, and you will get the array converted format. var obj = {"0":"1","1":"2","2":"3","3":"4"}; var arr = []; for (elem ...

add touch event to UIView

To provide some action on touch of any view ,UITapGestureRecognizer is used. Write this code in viewDidLoad - (void)viewDidLoad { [super viewDidLoad]; myView.userInteractionEnabled = YES; UITapGestureRecognizer *singleFingerTap = ...

How to change HTML tags using Javascript

Hi If you want to change the tags of HTML with another tags then you can perform this action using JS in realitme. Let's consider and example to change the <h2> tag with <i> using JS. <h2 class="xyzxterms" style="cursor: defaul...

How to bind a Dropdown without using Model in Asp.Net MVC

How to bind a Dropdown without using Model in Asp.Net MVC For Binding the Dropdown without using Model, we have to follow the following steps:- Step1: Firstly in the Controller create an instance of List<selectlistitem> and add items ...

How to read properties from property file in jsp?

Create a property file in the package with extension '.properties' and use those properties defined in the file in jsp by importing the resource bundle package in the jsp. Example: config.properties name=tom email=tom@gmail.com phone...

Dynamically adding ListViewItem to Listview

To dynammically add new elements into listview we need a Edittext(etAddItem) to input the item/element, a Button(btnAdd) for adding item to the list, and a listview which shows elements in a vertical scrolling manner. etAddItem = (Edit...

How to select from subquery using Laravel Query Builder?

Sub query is one the important section of database query.There are n number of situation where we want to implement sub query to fetch the data from the table. In Laravel 4.x there is no specific keyword to perform any sub query.To perform sub q...

Laravel 4: how to run a raw SQL?

There are n number of situation where we want to write complex query so It is very difficult to write complex query using Laravel.So to overcome such problem Laravel provide raw query option. The syntax of writing raw query is:- Syntax: DB:...

Allowing user to select same day date using foundation datepicker

While using foundation datepicker we came across on issue while picking date for the same day i.e if today is 5th then user was not able to pick it from calender as it was disabled. The issue comes when you are in timezone that is in - of UTC : ...
1 183 269
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: