Slide-Out Navigation is quite popular nowadays. It enhances usability and gives a different look and feel to the app. Apps like Facebook, Path and many others use this feature. Attached with this blog is a nice library called SWRevealViewControll...
Following function will expect a generic List and serialize into xml and make an http post request and after receiving response it will again deserialize xml into generic list:-
public customer CreateOrder(customer objCustomerRequest)
...
I would like to share an interesting feature that I found as I was trying to submit form through JavaScript.
If you are trying to "form.submit()" through javascript and any form elements present with the name of "submit" in it, then in that case...
What is SEO
A three letter word SEO, seems to be very short but having so much worth in its significance. SEO stands for Search Engine Optimization which means optimizing websites for the search engines so that they can match the exact guidelin...
A trigger is SQL code which runs just before or just after an
INSERT, UPDATE or DELETE event occurs on a particular database table.
Creating a Trigger:
Consider we have two tables:
CREATE TABLE `blog` (
`id` mediumint(8) unsigned...
Adding Button Selector
to add button selector to the button in the android xlm layout file, create a new xml file named button selector and use the following code :
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:andr...
A relatively new feature of iOS is the UICollectionViews.
The UICollectionView allows the programmer to arrange the data into cells, which in turn can be arranged in grids. The photos in the photo gallery of phone can be seen in thumbnails, a...
Many a times we need to take out time difference between two time zone using Date class in php. We can use the following code :-
$timeZone = ['Any Timezone'];
$default = date("Y-m-d h:i:s A");// UTC
$dateTimeZone =...
In the early stage of the nineties when the Internet has just reached our doorstep, then we considered it as much puzzled and useless thing, as it was a new technology to everyone and we all were not familiar with the basics of the interconnected...
/* Header file to includes.
fopen is use to open a file in write mode here.
fputcsv function is use to output the CSV file having the name of columns and data coming from database. */
header('Content-Type: text/csv; charset=utf-8');
header('...
A histogram,
You might have seen after you open Photoshop, using camera raw. Its a graph playing with color highlights and tones of an image.
While it may be intimidating looking, histograms are nothing really all that complex. What they repres...
To add pause/stop functionality on mouse hover using easySlider1.7
Step 1: Open easySlider JS file in editor like notepad, notepad++ etc.
Step 2: Go to line number 56, and add below bold marked line.
continuous: false,
numeric: ...
Sometime you may need to form a tree structure from the values of the database table.
For Ex-
You may need to form a hierarchy of categories and subcategories like this:
My Categories
Fun
Sport
Surfing
...
Hi All,
I was confused about how to implement patches into our Drupal modules or in other files. There is a way to apply these patches automatically. We have to install git bash and then we can apply available patches and as well as create new...
In many android applications, we need to set rounded corner image in ImageView. The bad part is that ImageView does not provide any property for this. So for this the following method will help you get rounded corner Bitmap:-
public static Bit...
The following code will present viewController which will show all the contacts of phone book
Please do add Addressbook.framework in your code. Also import AddressBookUI file to use the following code.
ABPeoplePickerNavigationController *pic...
*It's simple to send custom emails in magento by using zend mail function
with success and error messages see the following code *
public function postAction()
{
$params = $this->getRequest()->getPost();
$re...
we can redirect urls in magento with parameters by using magento's default
_redirect() function
you have to create an array for parameters you want to use in url
see the following example:
$param = array(
'_query'=&g...
You Can Use Below Code to Make A Simple Drop Down In HTML With The Help Of Jquery And CSS
***Jquery***
<script>
$(function(){
$('.DropDown > ul > li').on('click', function(){
$('.DropDown ul ul').slideUp();
...
Language
US English should be used.
Preferred:
UIColor *myColor = [UIColor whiteColor];
Not Preferred:
UIColor *myColour = [UIColor whiteColor];
Code Organization
Use #pragma mark - to categorize methods in functional groupin...
We usually face this kind of issue when we are doing programing with respect to a column with varchar data-type. If we don't add any value to a particular column it takes it as NULL. Thus forcing the developer to check for NULL every-time other t...
The terms Priority & Severity are used in bug tracking to share the importance of the bug among the team & to fix it.
Priority: The priority status set by the team lead & he is consulting with client as per project requirement.
Pr...
Following code will help you to add or delete file from document directory.
-(NSString *)saveFileWithOldName:(NSString*)oldNameStr
{
NSArray *dirPaths;
NSString *docsDirs;
NSString *tempStr2;
dirPaths = NSSearchPathForDire...
Here is a short function to get the difference between two timezones in PHP:-
function diff(){
$date1 = "2014-02-27T20:00:00+04:00";
$date2 = "2014-02-28T07:20:00+08:00";
$diff = abs(strtotime($date2) - strtotime($date1));...
Hi,
We can get user's timezone if we have only address or zipcode of that user. First of all we need to get latitude and longitude then using these lat and long we can get timezone. However this is 2 step approach but it is much accurate becau...
Fetch data from XML file and insert into SQL Database
Step1. Create a Stored procedure in Sql database which takes one input parameter and one output parameter which returns Success /Failure
Create PROCEDURE [dbo].[SP_Insert_...
Lets say we have models User and Friend related by User hasMany Friend relation. If we are required to pull out all users along with their female friends then how do we do that?
Usually people think like this :
$this->User->find('all...
Following example illustrate filling state (province) drop-down on basis of country.
Drop-down HTML
<select id="countryDropBox">
<option value="">--Select Country--</option>
<option value="1">India</option...
Occasionally the programmer needs to communicate with the server to send and receive data from the iPhone. Usually the communication is done to get data from the database that is in the server. To communicate with the server the programmer has to...
This blog will help you in getting geographical information of any location by using latitude/longitude.
By using Java API Geocoder, it is easy to get geographical information of any location. The response will be in JSON or XML format.
Wri...
Here is the brief explanation of Leverage Browser Caching and how to use it to improve website performance.
When a web browser i.e. Chrome, Firefox, Internet Explorer, Safari etc displays webpage it has to load several things like css files, j...
Create zip file of existing folder on linux server use below command -
"zip -r folder.zip target_foldername"
To unzip an zip file -
"unzip filename.zip"
To restart MySql on Linux server through command prompt follow the below steps -
i) First go to root through -
"sudo -i "
ii) Then use the below command -
"service mysqld restart"
Sometime we need to save images on SDcard that we click or get from server in many applications, and you can do it very easily by using the below code.
To save Images on SDcard on Android Device, write the following code:
ByteArrayOutputStr...
Image rotate with the help
of css3 Animation
HTML
<ul>
<li><span><img src="img/left.png"width="20"height="20" /></span></li>
</ul>
css
nav ul li span.animate{
...
When we use Auth component for login in cake php then we are restricted to use 2 column in users table 'password' and 'username' .If we want to use our own column name then follow these steps: Step 1: Include the below function in YoursController...
In the MVC application we have architecture with three main directories Model, View and controller. These sections are as follows:
Model: It contains the models or classes that we are going to use in our application. For eq. Person.cs class wi...
In cakephp you can handle different session time outs for admin and front end users.I added the following lines in core.php file and it works for me.
if(strripos($_SERVER['REQUEST_URI'],"admin")) {
Configure::write('Session', array(
'd...
The following code will get the cookies form the sever and will store in the array.
Get the appropriate cookie from the array by its name.
- (void)webViewDidFinishLoad:(UIWebView *)webView {
NSHTTPCookieStorage *storage = [NSHTTPCookie...
In terms of publicity or advertisement of an iOS app there is a feature where we can make our iOS app social or can share on facebook.
Accepting a request from a app will direct the person to the Canvas Page URL of the app that sent the Request....
Regression Testing
Re-executing the old test cases across multiple releases or built to make sure that changes or bug fixes has not affected the existing functionalities is known as regression testing.
Whenever some code changes or bug fixe...
Feeds module provides functionality to import contents from feed urls.
We can setup feeds module according to:
https://drupal.org/documentation/modules/feeds
There are 2 ways to import feeds
1: attach to any content type
2: Use a sta...
The delegate method iOS 5 used was as follows
-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
This delegate method used to access two locations name...
Primarily, Selenium was created by Jason Huggins in 2004. An engineer at ThoughtWorks, he was working on a web application that required frequent testing.It came from a joke which Jason cracked one time to his team at that point of time another a...
NVL function helps you convert a null to an actual value.
Syntax:- NVL (expr1, expr2)
In the syntax:
expr1 is the source value or expression that may contain a null
expr2 is the target value for converting the null
Guidelines for N...
1. Have a professional logo--and link it to your home page. "Your logo is an important part of your brand, so make sure it's located prominently on your site. "Use a high-resolution image and feature it in the upper left corner of each of your p...
When i was working on a class i have got the following error..
Access restriction: The type BASE64Encoder is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar
I resolved it by looking up on google, ...
Making a group by query in traditional database like MySQL,MySQL etc in quite easy but when its come to NoSQL like MongoDb we have to twist it a bit to get result we want :
There are two ways in which you can do group by in MongoDb :
a) Usi...
In this sample application you will find different types of animations. For example :- Bounce, Fade In/out, Blink, Sequential Animation etc. If you want to use any animation in your app you just have to add that particular piece of code in your ...