
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
Android - basic gesture detection using MotionEventCompat class
Android - basic gesture detection using MotionEventCompat class
A touch gesture occurs when a user places one or more fingers on the touch screen.
In order to get a touch gesture of a touch event we can use GestureDetectorCompat or MotionEven...
Why I switched from CakePHP to Symfony2
CakePHP or Symphony2? This is a common question that are arising in the developers community and topic lists this may lead developers sometimes get undermine to clarify users as which is the best framework in php.
Lets talk about Symphony2...
TestNG Annotations
TestNG is a testing framework and there are many annotations supported by testNG
@BeforeSuite: The annotated method will be executed before all tests in the suite.
@AfterSuite: The annotated method will be executed after all tests in this s...
Difference between WebApplicationContext and ApplicationContext in SpringsMVC
Well, when we start off with SpringMVC first of all we have Dependency Injection in mind and then comes ApplicationContext but when we dig deep we get stuck with a lot of issues one of which is Difference between ApplicationContext and WebApplica...
Difference between assert and verify?
Assertion:
In Assertion if the verification fails in any of the testcase then the further execution of same testcase will not take place and the error will be logged but then the next testcase will be executed.
For eg: If we are on the login...
How to configure PhoneGap project in Eclipse
To configure PhoneGap project in Eclipse follow the below steps-
Step -1 Go to Terminal
Step -2 Install frist - $ sudo npm install -g cordova.
Step -3 $ cd Desktop/
Step - 4 $ cordova create Raj007 com .example.Raj007 raj
Ste...
How to set the incoming email servers in OpenERP (Odoo)?
How to set the incoming email servers in OpenERP (Odoo)?
Step-1 Go to settings -> General Settings
Step-2 Click on configure incoming email servers->Create
Step-4 Name->Server Type ->POP Server
Step-5 Click On Server Informatio...
Manifest file __openerp__.py in OpenERP
In OpenERP all the content is included in Manifest file __openerp__.py.
This file, which must be a Python dict literal, is responsible to-
1- Determine the XML files that will be parsed during the initialization of the server.
2- Determine...
C Loops Syntax
C provides following types of loops:
for loop.
while loop.
do-while loop.
nested loop.
For Loop :
Syntax:
for( initialization; condition; increment/decrement) {
// Statement1
//Statement2
...
Category on View to animate subview like popup in iPhone sdk
Hi Readers,
In our app we usually make custom alerts which we need to animate at the time adding it on its superview.
To achieve it with you custom view make a category like this :
Put this code into your .h file of category named as...
How to get date of past days in java?
To get the date of the past day you can use the below code. You can pass any number of day for which you want to get date instead of 7, I'm getting date of past 7 days in the below example:
/**
* Get date before past 7 days
*
* @return...
How to convert Model Object into JSON string and JSON string into Model Object in Java?
Sometimes we need to get JSON string direct from Model object and to read JSON values from Model object. We can do this functionality very easily by using Jackson Mapper.
Follow to steps in order to do conversion from Model Object to JSON stri...
base_url in CakePHP
Hello if you want current base url(Include Domain) or Get current url.
Lets take an example
http:// localhost/root_folder.
you just need to write the following code below:-
<?php echo $this->Html->url('/', true)?>
How to disable caching completely in Cakephp?
Hello if you want to disable you website's caching complety you just need to write configure code in core.php file
ex
You will have to look into /app/config/core.php and look for the line
Open app/config/core.php file and try to find
Con...
How to implement onClickListener on a view
Hello again, this tutorial describe you to implement an OnClickListener on a view in android.
This tutorial describes the two ways to implement an OnClickListener.
How to set the priority of testcases in testng.xml file?
We use @Test method to make a class as a part of our testcase.
We can set priority by using "priority=" with @Test annotation in testng.xml file.
@Test(priority=1)
@Test(priority=0)
Priority 0 testcase will be executed first and the...
Change password from Custom portlet in liferay
Hello
Below code will help you to implement change password from custom portlet.
Please follow below steps :
step 1 : create Action URL
<portlet:actionURL name="updatePassword" var="updatePassword"/>
step 2 : Write below c...
Data binding in AngularJs
Data-binding in AngularJs refers to the synchronization of data b/w the model and view components.
When the model changes i.e if user changes in something then the view reflects the changes done.
So in below example i am demonstrating you th...
How to convert NSData to NSString or vice versa in Objective C and Swift
Hi Readers!
In this blog you can find both versions (Obj C & Swift) for converting NSData to NSString or vice-versa.
Objective C
NSString * str = @"Hello";
NSData * data =[str dataUsingEncoding:NSUTF8StringEncoding];
NSLog(@"Data = ...
How to configure testNG in Eclipse?
Follow the following steps to configure testNG in eclipse:
Open Eclipse
Goto Help >> Install new Software
Enter URL http://beust.com/eclipse/ in "Work with" textbox and press enter.
Select testNG and press next button.
Now restart ...
Difference between var and dynamic in C#
"Difference between var and dynamic in C#"
To understand the differences more clearly, let us go through the following table:
VAR
DYNAMIC
This was introduced in C# 3.0
This was introduced i...
Add your Application on Gallery Sharing option
Add your App on Gallery Sharing option.
If you want to add image sharing from gallery option to your application, there is a perfect code for this requirement..
You just need to add these lines to your manifest file on that activity which y...
How to set the outgoing email servers in OpenERP (Odoo)?
To set the outgoing email servers in OpenERP (Odoo) follow the below steps?
Step-1 Go to settings -> General Settings
Step-2 Click on configure outgoing email servers->Create
Step-4 Description ->Priority ->SMTP Server ->SMT...
How to configure maven in Eclipse?
Maven can be configured in two ways in eclipse.
Ist method:
Open Eclipse
Goto Help >> Install New Software.
Enter the URL "http://download.eclipse.org/technology/m2e/releases "in Work" with field and press enter button.
Select m...
How to get current date with start time and end time?
Sometimes we need to get current date but we need to get time with date that starts from 12 O'clock morning and sometimes ends with 12 O'clock night.
To achieve this use the below code:
1- Write the below code to set time fields to start
...
Spring MVC : How to perform validation?
Here I'm giving the example of validating form fields in a Spring Web MVC application using Bean Validation API. We'll develop a login form in Spring MVC in which we'll apply validation constraints on two fields email and password.
We use the ...
Difference between px,dp,sp,dip in android
Difference between px,dp,sp,dip
They all make UI compatible for Android Devices
px: Its the standard pixel. We cas say actual pixel on the screen or one pixel.
px = dp * (dpi / 160)
dp: (Density Pixels). Its based on physical ...
How to Restore database in PostgreSQL in ubuntu
To restore database in PostgreSQL in ubuntu follow these step in terminal
1- sudo su - postgres
2- psql
3- psql -d abc1 < /home/sachin/pqr.sql
abc1 = is dbname from where I am restoring backup
pqr = backup file which will res...
How to set checkbox to checked in CakePhp
Hi All,
In this blog we will discuss about how to set checkbox checked in cakePhp application.
You should set the checkbox checked/selected with the 'selected' option.
For example-
You can find a list of categories from the database t...
How to take backup database in PostgreSQL in ubuntu
To take backup database in PostgreSQL in ubuntu follow these step in terminal
1- sudo su - postgres
2- psql
3- pg_dump abctest_db > /home/sachin/abc.sql
Here,
abctest_db = is a dbname whose backup I want to take
abc.sql fil...
Factory Pattern
Factory Method Design Pattern
What is Factory Pattern?
Factory pattern is one of the most commonly used design pattern. It comes under creational design pattern as we have control on object creation logic. In this approach we have control o...
AutoComplete TextView in Android
AutoComplete TextView in Android
AutocompleteTextView is an editable textview, It shows dropdown box of suggested item based on the reserved word.
So by using this we don't need to write complete letter.
Basically AutoCompleteTextView is...
Fat models with skinny controllers in cakephp
In fat model and skinny controllers method we write our database query in model. Normally we use validation rules and model binding in our model and all query write in controllers but as we know that when url routing requests first comes to contr...
How to change user password in CakePhp using Auth
Hi All,
In this blog we will discuss how to change the password in cakePhp by using Auth.
Firstly, in your model you have to define a function beforeSave which will hash your password to auth password, you can do this by writing the below co...
How to use chart control in asp.net
Hello all,
Working with asp.net, at times, we have to show graphical reports user which can be implemented using Chart like Area Chart, Bar Chart, Box Plot Chart, Bubble Chart, Column Chart, Doughnut Chart, Line Chart, Pie Chart etc.
In my ...
Submitting current timestamp in CakePHP
Hi
If you want to send curret_timestamp, you can store it by using function below.
DboSource::expression('NOW()');
Lets take an example, save your timestamp in a key 'your_datetime_field'
$this->data['SomeModel']['your_datetime_f...
How to Change HTML Content in JavaScript
With the help of this javascript function we can change the html content of an element., when we will click on button it will manipulate the DOM (change HTML contents).
<p class="demo">Hello everyone </p>
<button type="b...
Checking an Ajax request incakephp
For checking the ajax request one have to use the request handler component.
In Cake PHP to obtain the information about the HTTP request as a form of AJAX which are requested into your application for that the Component Request Handler is use...
How to use another model in current model using cakephp?
Hi
If you want a condition where you can load another model inside you model. you can do as I code, see the example below
App::import('Model', 'MyModel'); $my_model = new MyModel();
Or you can write
$this->SomeModel->MyModel;...
How to load Vendors in CakePhp
Loading vendors usually means you are loading packages , so in CakePHP you can use:
App::import('Vendor','');
As an expample if you want to load a vendor named recurly which is saved in your app's Vendor folder and you want to access the...
How to create a DropDownList from an Enum in ASP.NET MVC
"Creating a DropDownList from an Enum in ASP.NET MVC"
In this article I will try to explain, how can we bind an Enum to a DropDownList in ASP.NET MVC.
Let us understand it with the help of an example:
Step 1: Crea...
Updating one field in database using CakePhp
Updation in CakePHP is basically based on knowing the primary key(Id) of the records one wants to change/edit.
You can update a field in CakePhp by two ways:-
a)By using saveField method
$this->ModelName->id=$id;
$this->Mode...
cakephp excel/csv export component
Hello,
If you want to add CSV export component using cake php, for that you can do by following steps:-
First take the controller file and create an action, the code will go like this:-
<?php
class Export_my_dataController extend...
Directives in Angular Js
AngularJS directives are what controls the rendering of the HTML inside an AngularJS application, it also lets you to extends HTML by adding the directives.
In angular js directives are represented by prefix ng-
Some of the mostly used di...
What is the equivalent to getLastInsertId() in Cakephp?
Hello if you want to get last insert id or something equivalent to this you can try following steps:-
Lets take this example, Here I just inserted the field in column
$data = array('menuName' =$_REQUEST['menuname'])
$this->Menu...
Implementing Singleton in C#
Hello Friends,
This blog explains how to implement singleton design pattern in c#. So lets start with few basic things:--
What is Singleton ?
A singleton is a class which only allows one instance of itself to be created - and gives s...
Variables in JAVA
Variable is a name. Variable name reserved an area which is allocated in memory.
In java each and every variable has some specific type, this specific type defines the size in variable's memory.
One should declare variables before used.
Eg. ...
How to load xml data into sql server table using SqlBulkCopy
Hello all
Working with SQL Server we have to copy data from multiple sources and from this purpose we can use SqlBulkCopy Class which helps us to bulk copy data from different data sources to SQL Server database. This class is present in the S...
What is a .ctp file used for in CakePHP?
CakePHP provides user to do advance view designing and making custom architecture for designing, for quick web developments. The CTP file extension is associated with the CakePHP. Ctp file contains template CakePHP template.
It is as same as a...