
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
Naming Conventions in CakePHP- Model, View, and Controller
CakePHP model, view, and controller naming conventions
If we have a database with table named users, then following standard Cake PHP naming conventions should be used:
1. For Model
filename = User.php
classname = User
directory...
Global filtering - how to use global scope in Laravel Eloquent
I have a situation which will help us to understand the use of Global Filtering.
Situation:
I have a published filter that I use for my articles. Guests can only view published articles, logged in users can view and apply filter (?published...
Using Storyboard Reference
When multiple developers are working on the same project and we have a single storyboard, we might face conflicts in the storyboard file. And the conflicts of storyboard are difficult to resolve.
Xcode 7 provides a new feature of storyboard ref...
How to Install Fedora 23 Workstation?
Hello Friends,
In this tutorial I will guide you how you can install Fedora 23 workstation on your system.
If you have any previous version installed in your system then you can check the upgrade guide else follow the below steps....
Chaneg Textview height according to text
Hi All,
If you want to change height of textView according to content height than you can follow this code.
Use auto layout to set view in story board and make IBOutlet for textview . Assign delegate to textview and dont give height constra...
How to Upgrade Fedora 22 to Fedora 23?
To upgrade Fedora in your machine follow the below steps-
Take all your important files backup to any external media or hard drive.
Verify your current fedora version by executing following commands in terminal
$ cat /etc/fedora-release
...
MFMessageCompose ViewController in swift
Step1: Import the MessageUI using :- import MessageUI
Step 2: class ViewController: UIViewController, MFMessageComposeViewControllerDelegate
Step 3: when you tap on the button the list of contact will appear and you can choose the contact ...
Show flags using Unicode
Hi All,
If you want to show flags in using unicode hex coding (U+XXXX) than you can follow this code .
UNICODE:- Unicode is a computing industry standard for the consistent encoding, representation, and handling of text expressed in most of...
Different Types Of Testing In The Cloud
Different Types Of Testing In The Cloud:-
The entire cloud testing is divided into four primary groups. Which are mentioned as below:-
Testing of the whole cloud
Testing within a cloud
Testing across cloud
SaaS testing in cloud
T...
Drupal 7 database API
Drupal database abstraction layer allow's the use of different database servers using the same code base i.e it provides
with the ability to support multiple database servers easily. The system is built a top PHP's PHP Data Objects database AP...
Putting GIF images in your Android application
Put Your GIF image in /raw folder and put the below code in your project
public class CustomGifView extends ImageView {
Movie movie;
InputStream inputStream;
private long mMovieStart;
public CustomGifView(Context contex...
How to obtain the permission to external storage?
If you are looking to get the permission to access your external storage in android, here is the solution:-
you have to add these lines in your manifest file:
<uses-permission android:name="android.permission.STORAGE" />
To store s...
Different Types Of Cloud Computing Services
Different Types Of Cloud Computing Services:-
There are primarily three significant cloud computing services. These services are utilized by the distinct organizations as per there need. These cloud computing services name are mentioned as below...
How to return multiple variables using Javascript
Hello Reader's!, If you have a condition in which you need to return two or more variable from function like below:-
functions()
{
//you calculation for result
return $a, $b;
}
Now you will face the error. But you can use the arr...
Converting innerhtml javascript to jquery using $.append
Suppose you have an html code like this.
<input type="button" id="btn-press" value="Submit!">
<div id="egText></div>
If now you want to add some text into this div,you need to attach an event handler and You should mov...
Update dropdown values based on another dropdown using jQuery
If you want to update the values of the dropdown based on the values of other dropdown. Here is the example where If I choose Chicken as my where from.
My where to should display Baked potato, Mutton, fish.
<form class="foodorder hide">...
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...
Blue Line in Excel
Hi Guys,
Can anyone tell what is this blue line I am seeing in my excel?
This excel has lot of data and formula.
Thanks
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...
