If anyone wants to hide the format text from the body field in drupal then try it:-
// override hook_form_alter
function CUSTOM_MODULENAME_form_alter(&$form, &$form_state, $form_id) {
if($form_id == 'restaurants_node_f...
Configuring JQuery Not to Conflict with Other Libraries
If jQuery is loaded on the same page as another JavaScript library, both libraries may
have implemented the $ variable, which results in only one of those methods working
correctly.
...
web.xml is Deployment Descriptor which consist all the basic configuration servers( like Tomcat) need to know at the time of deployment like context path, url mapping, listener, filters, error and security.
you can mentioned following in web.x...
How to Insert Data From One Table to Another Table in SQL
step1: Create two tables ContentTable1 Table and ContentTable2 Table
CREATE TABLE ContentTable1
(
ContentId1 int identity(1, 1) not null,
ContentHeading1 nvarchar(100) NULL,
...
To install ejabberd with patch file(Serve cross domain policy file for Flash).
Install erlang on your system.
Download ejabberd
wget http://www.process-one.net/downloads/ejabberd/2.1.11/ejabberd-2.1.11.tgz
tar zxf ejabberd-2.1.11.tar.gz...
How to implement google map
Code this on your .aspx page
<body onload="initialize()">
<form id="form1" runat="server">
<div id="gmap" style="width:100%; height:100%"></div>
</form></body>
...
Converting any .sxw report file that we create using Open Office is very easy and useful for future usages, as it helps creating reports for our module.
Follow the simple steps:
Create your report and send to server, created dailycash.sx...
Please go through the below details to create a Task Scheduler. It can be done by two ways either creating console application, windows application or creating a window service. What I have done is created a windows application and schedule th...
TabHosting can be used to explore and switch between different views or functional aspects of your app.
In this tutorial we will make an activity and host three activities to its tab by using tab hosting . Tab layout is used for this purp...
Printing any field on an OpenERP report on a conditional basis, you can add a simple line in your report
[[(object.field == 'Some Value') and 'value1' or 'value2']] is equivalent to
if object.field:
print value1
else:
print value2...
Write a sql query to add column's value , containing null values also in records. But the sum of the added columns must be numeric only. Output cannot be null. It can be achieve by two ways.
SELECT (COALESCE(Column1, 0) + COALESCE(Column2, ...
Hello readers !
In this blog i'll explain what is Pseudo-elements and how can we use it.
What is pseudo-classes ?
- Pseudo-classes are some special classes which are used to for special effect.
You can also use it with css ...
Here is how we can create app shortcut icon on device's home screen after app installation:
There's only a few lines of code.
if(!MyUtility.getIsFirstTime(splash).equals("true"))
{
MyUtility.setIsFirstTime(splash, "tru...
To redirect the log statements to a file instead of console call the following function at the start of function applicationDidFinishLaunching.
- (void)redirectConsoleLogToDocumentFolder
{
NSArray *paths = NSSearchPathForDirectoriesInDom...
The NSSharingServicePicker class presents a list of sharing services, so that the user can choose a service to share an item. When a service is chosen, the picker automatically executes it, which presents the sharing window.
+ (NSMenu *)menuFo...
We all web Ninja knows the value of USER EXPERIENCE. In mobile platform it requires a different approach to make a better user experience. I am listing few points one must remember while making mobile Interface.
1 .Responsive Web design
2 .The...
Sometime you may need to pass the array in the url.
You can do this as following:
<?php
$array["a"] = "A";
$array["b"] = "B";
$array["c"] = "C";
$array["d"] = "D";
$str = serialize($array);
$strenc = urlencode($str);
print $str ....
By using Java API Geocoder, it is easy to get geographical information of any location. The response will be in JSON or XML format.
Write the following example to get Latitude/Longitude from Zip code:
String postCode = "07001"; // you can u...
How to split a string
Suppose I have a string "I love Programming" and I want to get all the words seprately. Here is a simple example:-
string a = "I love Programming";
string[] words = a.Split(' ');
// We pass the value inside '' on the ...
There is some small things keep in mind & make a good design.
Structure:- Your design should organize the user interface purposefully, in meaningful and useful ways based on clear, consistent models that are apparent and recognizable t...
It's simple to create custom csv in magento .
follow the steps to create custom csv.
Create a controller to access data that you want to export in csv file like as below:
public function createcsvAction(){
$param = $thi...
Let me create an HTML sample for explanation
<input id="totalAds" value="4" type="hidden">
<input id="currentAd" value="2" type="hidden">
<a class="ads ad-1" href="http://www.tourofindia.com" style="display: none;" target=...
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
var element = document.getElementByid("parentDiv").children("#childDiv1");
element.remove();
here parentDiv have a child with id childDiv1
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...
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...
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. ...
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...
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...
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...
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 ...
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.
...
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...
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 ...
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...
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...
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...
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 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
public $components = array('Session', 'Cookie',
'Auth' => array(
'authenticate' => array('Form' => array( 'userModel' => 'Admin',
'fields' ...
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...
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....
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...
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 "<...
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...
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...
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...
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
...
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...