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

Spring MVC Exception handling using @ControllerAdvice Annotation

Spring MVC provides a great way to handle exceptions and errors. @ExceptionHandler annotation is core to this feature. For each Spring controller we can simply define a method that automatically gets called if a given exception occurs. For e...

How to remove a child element by ID of a parent div

How to remove a child element by ID of a parent div var element = document.getElementByid("parentDiv").children("#childDiv1"); element.remove(); here parentDiv have a child with id childDiv1

How to check network availability in iPhone programmatically

We can easily find out network availability using CFNetwork.framework. Following method can be used for this task : -(BOOL)isNetworkAvailable { CFNetDiagnosticRef dReference; dReference = CFNetDiagnosticCreateWithURL (N...

Benefits of Simplicity

A Flat design is something with a brilliant, precise and minimal color use. These designs are crisp, stripping off the 3D look. Based on the simplicity principle embracing minimal functionality and color use, irrespective of the gradient and the...

Amazon SES Client Mail Integration in Java

Using the Amazon SES SMTP Interface to Send Email To send email using the Amazon SES SMTP interface, you will need the following: An AWS account. For more information, see Signing up for AWS. The SMTP interface hostname and port number. ...

Save ArrayList of Object into Shared Preferences in Android

Sometime we need to save ArrayList of Objects into Shared preferences so that we can use that data in multiple Activities when required. We can do that easily as below: Suppose we have model Users as below: public class Users { privat...

Impleneting a Navigation Drawer in Android

Navigation drawer :It can used as an app's main navigation option on the left edge of the screen. it it hidden all the time and revealed on the click of the app icon or swipe gesture from the left of the screen. Navigation drawer is used...

Create many2one and one2many relationship in OpenERP

In OpenERP we can create many2one and one2many relationships between models very easily by creating many2one and one2many fields. You just need to declare a field in _columns and then using this field normally in the rest programming and views a...

Creating a functional field in OpenERP

Functional field is a field which gets its value on the basis of a function, for example an amount can be calculated using the various others values of the invoice like taxes, discounts, labor charges, extra charges etc, you will need a function ...

Find MYSQL server version information

To find the version information of MYSQL server from command line log into MYSQL server using command mysql -h hostname -uusername -p You would be prompted for the password for the user on the server type the same and press Enter key. ...

Function calling on button click in OpenERP

Adding a button on an OpenERP view is very easy and calling a function on it too. For example I created a function to add cartage amount on the sales order, I created a field to add cartage amount on it and then on button click it will be added t...

Picker View

A picker view is a funky way to allow users to select one item from a group of items. It consists of a rotating wheel which contains the given options. The user can turn the wheel up or down by swiping motion and the option in front of the wheel ...

Create thumbnails from a UIImage

Hi there, often programmers are required to display a large number of images on a a single screen, for example in a photo gallery. Displaying a group of images in their full size can be a bit tricky because it will take a lot of space and the the...

How to cut a String in C#

String.Substring :-To remove characters from begining use like this:- string a = "India"; string sub = a.Substring(0, 3); // Here 0 means from which character you have to start cutting. Index will start from 0 // 3 means how many charact...

Easy methods of incorporating Google maps for Android

First create a layout for Map Activity. The name of layout is activity_main.xml <fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map" class="com.google...

Format of Test Cases Templates in Testing

The Test Case Templates are the document that describe and cover the Inputs, events and Expected results of the Application. Templates determine that the Features of an application Is Working Correctly. Test case templates contain all particular...

Bug Life Cycle

Bug life Cycle starts with a defect or flaw in the software which creates a bug and end when the developer fixes the assigned bug. When a bug is found it should be assigned to the developer that can fix it. Once the bug is fix it should be retest...

How use auth login in different model in cakephp

How use auth login in different model in cakephp public $components = array('Session', 'Cookie', 'Auth' => array( 'authenticate' => array('Form' => array( 'userModel' => 'Admin', 'fields' ...

System Study Guidelines

1.Find out in which domain category does the application falls -Banking -Insurance -ERP -CRM -BIO-Technology -Healhcare -Retail -Others 2.Find out the following details about application -Front-end -Back-end -Database Servers -Midd...

Test Data Preparation Guidelines

In the First Stage 1.One dedicated resource should be allotted for preparing the test data. 2.The dedicated resource should understand the system as a whole. 3.Identification of total no. of Database tables. 4.Listing of Master tables. 5....

How to handle alert popup in Selenium

Alerts are handled in selenium through the method of alert class. WebDriver driver = new FirefoxDriver(); driver.navigate().to("http://www.rediff.com/"); driver.findElement(By.xpath("//*[@id='signin_info']/a[1]")).click(); driver.findElemen...

Create new html tag in Drupal

Sometimes we need to use some unique tags which are not available in HTML. For this we can just use these tags in our html coding, but in some specific cases our browser will not display them because these are not identified and comes within "<...

What is Quality Assurance (QA) & Quality Control (QC)

Terms Quality Assurance Quality Control Definition QA is a set of activities for ensuring quality in the processes by which products are developed. QC is a set of activities for ensuring quality in products. The activ...

Change Facebook Login button Image of facebook SDK in iPhone

Simple steps to change the default facebook login button image of facebook SDK. After downloading Facebook SDK and its bundle resources add them to your xcode project Step 1. Click on your xcode Navigator Framework folder then, Step 2. Cl...

How to handle multiple windows in selenium

Most of the time when on any action, a new window is opened then the control remains on the first window but the element is on the second window, so we receives an error message that "element not found". In this case we have to move the control e...

How to make UL/LI tree from a normal array

We usally wants to male a ul/li tree from an array having parent id within each individual record : $subjecttopic=Array ( [0] => Array ( [id] => 52b28146f484a5a410000029 [name] => Addtion ...

API Testing-Guideline for Testcase Design

1.Functional Requirements or usecase document or functional specification. 2.Study of the detailed design of the API to be tested(E Speak and WES) -Interfaces could Java classes -Interfaces could be EJB's -Interfaces could be C++ or VC++ cl...

Use SDWebImage SDK for image caching in Objective C

Best approach for Image loading in iOS apps Best way to load Images in iOS apps than image sync. Download SDWebImage framework and Unzip it. **Steps to follow**:- Step 1. Add SDWebImage framework into your project. On Project navigator Cl...

How to maximize window in selenium

Selenium whenever launches a browser, it is not in maximize form. To maximize the window use the following code: driver.manage().window().maximize(); Eg: WebDriver driver = new FirefoxDriver(); driver.navigate().to("http://www.hdfcbank....

Create a data object class and use its properties by passing this object in Objective C

Access your data using class object. Steps to follow:- 1. Create a NSObject class called DataObject. 2. Declare properties as below... Write below code in DataObject.h file @interface DataObject : NSObject @property (strong, nonat...

General Testing Areas in Web Portals

1.Functionality Testing -Links -Forms -HTML Validations -Web Indexing -Programming Language -Unit and Integration Testing -Regression Testing -Dynamic Interface Components -Database 2.Usability -Navigation -Graphics -Contents -Sta...

Ruby Sort an array of objects in hash with case insensitive attribute

To sort an array of objects in hash @users = User.find(:all) @users.sort&#95;by(&:employee&#95;name) Above code will sort @users object with all employee name with Capital letter first and then small letter. ...

Import Data from Excel

Import Data from Excel in C# Use the code below to import data from excel OleDbConnection cnn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=""E:\Book1.xlsx""; Extended Properties=Excel 12.0;"); OleDbCommand oconn =...

MultipeerConnectivity in iOS 7

New framework introduced in iOS 7 1) MultipeerConnectivity.framework This framework help to communicate nearby iOS devices using following infrastructure a) wi-fi network b) peer to peer wifi 3) bluetooth This framework is used...

How to select values from dropdown in Selenium

Value can be selected from the drop down, using the "Select" class: Select sel = new Select(driver.findElement(By.xpath("xpath_of_dropdown"))); sel.selectByIndex(index_of_value_to_select); OR Select sel = new Select(driver.findElemen...

Barcode and QR Code Reader

Hi there, today we are going to make a really simple app that scans the Bar Codes and QR Codes using the camera of your iPhone and displays the data stored in the code. The very first thing that we have to do is download and install the ZBarSD...

To setup custom webroot for Apache in Maverick

Apache by default serves files from the Document root i.e. /Library/WebServer/Documents/ But what if you want your custom folder to serve webfiles. This tutorial walks you through the complete process. Create a new folder at the root lev...

How to Work with a Stored Procedure

How to Work with a Stored Procedure DELIMITER // CREATE PROCEDURE `p2` () LANGUAGE SQL DETERMINISTIC SQL SECURITY DEFINER COMMENT 'A procedure' BEGIN SELECT 'Hello World !'; END// The four characteristics of a procedure are:...

Internationalization of cakephp site

Internationalization of cakephp site: STEP 1) Write the following code in cakePhp routes.php file Router::connect('/:language/:controller/:action/*', array(), array('language' => '[a-z]{3}')); ...

how to get a label Text or DataKey value on button click in a gridview

Get a label Text or DataKey value on button click in a gridview Write the .aspx code as below:-- <asp:GridView ID="grdtest" runat="server" AutoGenerateColumns="false" <Columns> <asp:TemplateField> <ItemTemplate...

How to open and close div using css

Hello! readers, There is an example to show a div on click using only css. You can use it as popup box also. --css-- .show , .hide{color:#FC6} #contain {display: none; border:1px solid #999;padding:10px;width:200px;margin-top:10px} ...

How to get DataKey value on check box checked event in a GridView

Get DataKey value on check box checked event in a GridView Here is the .aspx code for the following:- <asp:GridView ID="grdTest" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"> <Columns> <asp:Templat...

Import Data from CSV in C#

How to import data from CSV to Database Use the function below to import the data from excel to the database connected public void importdatafromexcel(string excelfilepath) { try { DataTable tblReadCSV= new DataTable(); ...

How to Export data to Excel in C#

Export Data to Excel First get the data in a DataTable and call the below function. if (dtGetData.Rows.Count > 0) { string filename = "ExcelName.xls"; System.IO.StringWriter tw = new System.IO.StringWrite...

How to debug MYSQL database Issue while using DatePicker

As we all know that MYSQL (phpmyadmin) database require " YYYY-MM-DD " format while saving a certain DATE . So if we are using Datepicker we have to adjust the date format. $(function() { $( "#datepicker" ).datepicker({ dateFo...

Removing file using Spreadsheet in windows( Errno::EACCESS(Permission denied))

There is no close method in spreadsheet.If you opened the spreadsheet and after reading you need to delete it then FIleUtils.rm(file_name) will work smoothly in linux but in windows it will give permission error Errno::EACCESS(Permission den...

Cost of a bug

Suppose you do a typo, a simple spelling mistake in your code. What is the cost of the bug? If it is caught: at development environment - 1 min of developer's time at code review - Reviewer's time and developer's time . at testing envir...

Not able to add Foreign key on table column

Error Code : 1005 Can't create table 'DatabaseName.#sql-9cc_1' (errno: 150) (0 ms taken) After searching a lot i have got solution for the above problem while i was adding FK to a column. The error was because of different MySQL engine. The...

Set Alarm Using TimePicker in Android

This tutorial will help you in creating an android application to set alarm using TimePicker. This is a basic android tutorial which will make you familiar with Intents , Pending Intents and BroadcastReceiver. Step 1: Create an android ...

Importing a MYSQL database dump from command line

While importing databases dump that are of large sizes in GB you may find issues with PHPmyadmin and some other clients also. To import the database you can use the command. mysql -uusername -p databasename < sqldump.sql where userna...
1 257 265
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: