Why Char array is better than String for storing secure data like Password in Java?
As we know that String is immutable in Java if we store password as String, it will be available in memory (Heap) until Garbage collector clears it and since S...
Unity 3D has number of useful tools which makes our game development easy and interactive,which we use through IDE.Some of the major components we will be using throughout game development in Unity include:
1)Toolbar-It remains at the top of...
1) Iterate List/HashMap in JSP using JSTL
To use JSTL in your jsp file, you should first include below statements
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="ht...
class rect
{
public $length=0;
public $width=0;
public $area=0;
public function getData()
{
$this->length=10;
$this->width=20;
}
public function area()
{
$this->area = $this->leng...
A common problem with float-based layouts is that the floats' container doesn't want to stretch up to accomodate the floats. If you want to add, say, a border around all floats (ie. a border around the container) you'll have to command the browse...
Creating a form which contains two text fields and a submit button.Main aim is to save data and get the sabed values when needed. variableset() and variableget() functions to store and retrieve data.
/*
* Create a form
*/
function mymenu_...
Gradient Annotator in Illustrator :
Hello all :-), I have been using the Gradient tool in my Illustrations for 2-3 years & many times I had faced the same problem that Gradient tool bar wasnt showing up on the object & I wouldnt know ...
If we are traversing an array and need to update an element in some condition then it is quite tricky to do that in foreach loop.
For example, if we need to increase each element by 2 of an integer array then we can do that using for loop in t...
This tutorial helps you how to use Fragment Class in android Application
the sample code give you the brief on how you can use an fragment class.
In main Activity we have created four fragments. And use FragmentManager and FragmentTransaction...
Document type declaration ( Or DOCTYPE )
What is Doctype ?
The<!DOCTYPE> is not a HTML tag. It is an instruction to web browser about what version of HTML the page is written in.
In HTML 4.0...
JavaScript Validation for Mobile Number in Asp.Net
Validate Mobile number in a web page using JavaScript validation in ASP.Net.
In this example I am using one TextBox . The TextBox accepts Mobile number, it only allows 10 digit numbers.
&...
Days are gone when web designers use to spend their time and effort creating Flashy animation and illustration filled with gradient and sparkling gif images and getting appreciation by audience, then came the trend bringing real life images wi...
We can use Bakery SSO module for single sign on in drupal 7. It works with portal or master site and sub-sites or slaves sites, it provides the following features:-
1) If login into the portal site and navigate to sub-site, user will be auto-l...
Different way to configure hibernate 3 with spring?
As per my knowledge There are 3 different way to configure Hibernate 3 with spring 3. Let us sort discuss on each of three configuration method and lastly conclude witch method is best.
Me...
The difference may seem very small but it makes a lot of changes in the ways things work.The year when written in small letters (setDateFormat:@"MM/dd/yyyy") is the ordinary calendar and will return normal year, but in case of the capital YYYY, (...
The SplFileObject class provides an object oriented interface for a file.
$file="upload_file.csv"; //file to parse
Steps:
1) Create SplFileObject class object to the csv file.
$srcFile = new SplFileObject($file);
2)Now loop ti...
If you want to crop the image without changing its quality in Objective-c/cocoa (OSX) then you can use the following method
-(IBAction)crop:(id)sender{
hasBeenDragged = NO;
NSImage *_sourceImage = [self image];
float width = sel...
If some parameter is missing in json or dictionary. For example-
json = (
{
"created_time" = "2013-11-18T14:40:37+0000";
from = {
id = 15400100;
name = "Alexandra";
...
Steps to create Ramdisk and take backup in oracle
Install SoftPerfect Ram disk software(eg installed location is C:\Program Files\SoftPerfect)
Create a .bat with following content and run it:
REM stop db
oradim -SHUTDOWN -SID DB_SID
REM ...
The steps below guide you through setting the configuration files required for Firefox to not only turn off updates, but deny the setting entirely.
Also note, this is on a per computer basis. This process will need to be replicated on each compu...
Ctfmon.exe is a Microsoft Office process that works with the Windows operating system. This process activates the language bar and alternative user input. It is a non- essential system process which runs in the background even after quitting all ...
Creating a module in OpenErp 7.0 is quite different from how it has been in 6.1. Already discussed earlier to create a module in version 6.1, its time to throw some light on a basic module created in OpenErp 7.0.
To start with the basic struct...
We should consider the following factors before starting the Automation Project:
1.Stability of the application under test
If the application is not stable , it may lead to failure of many scripts during execution even though if the scripts...
To export a table data from Postgres database to a CSV file, use the "COPY to" command. You can create a CSV file using MS-Excel or directly create a file from the command.
Syntax: COPY (SELECT * FROM table_name) to E'C:\Users\main\Documents\...
For Remove Shipping Methods you need to change its function
This code is working for me in 1.7.0.2 but you can try this for older version also
A) Open Mage/checkout/controllers/Onepagecontroller.php
In this File Go to on function saveBil...
Make your Content Editable:
Contenteditable is nice feature added in HTML5. As the name clarify, it allows the user to edit any of the text contained within the element, including its children. There are a variety of uses for something like th...
Quality Assurance:
Here the testing team define the procedures, processes, policies, standards and the checklist in the document which is going to be follow during the entire project life cycle,It is also referred as 'Verification'.
Example:...
Suppose, we have this html where div element have 2 child p elements and 1 child anchor element.
<div>
<p> I am para one</p>
<p> I am para two</p>
<a href="http:nowheretogo.com">I am a link<...
Links are like network bridges carrying you from one web page to the other. They can either be withing the same site or take you to a new website all together. Good link building is one of the parameters for all search engine ranking algorithms t...
In Linux if your filesystem gets corrupted there is a command that can be used to fix the issue.
To fix the file system related issues type command
fsck
on system's recovery console. This would fix the errors on your file system to get...
New features in Joomla 3.2.
As I am working with few technologies and Joomla is one of them, I thought let me update you with information regarding the new release in of Joomla 3.2.
Joomla team has recently released a new version of Jooml...
Recently while working for a project I faced an issue while making the site live.
The site was developed with kohana framework and was to be hosted on Godaddy Server (Shared Hosting) and I faced a peculiar issue on the server giving me an erro...
To **delete the test sales/Order data from magento** run the below queries in your magento database --
SET FOREIGN_KEY_CHECKS=0;
##############################
# SALES RELATED TABLES
##############################
TRUNCATE `sales_flat_c...
Subtract date in javascript : -
var current = new Date();
//It will give the current date and time in default format.
var future_date = new Date(now .setHours(now .getHours()+48));
//in this we add 48 hours in present time .
...
SINGLETON CLASS
In object-oriented programming , a singleton class is a class that can have only one object (an instance of the class) at a time.
It's good when you only want one object across the whole of your application
It is usually used...
We are change the input type file title with the help of this script
Like Browse Title Change in to Choice File
use this script for change Title
function browseclick(){
var fileinput = document.getElementById("browse"); // use in...
Here I will explain what things need to verify while accepting new test build from the developer side.
Build Version#: Every build has a unique no. to differentiate from other builds and tester gives test result against that build no.
Resol...
Steps to Create a WCF service in Visual Studio 2010
1.To create a new WCF service application project, go to File->New->Project. Then select WCF under Visual C# installed templates and then select wcf service application.
2.In the sol...
A drop-down box for colors and want to add new colors to it, as well as remove options from it.
<label for="colors">Colors</label>
<select id="colors" multiple="multiple">
<option>Black</options>
<option>...
Hello friends,
I was using to document directory to save images and video and after saving a lot my app use to crash due to memory warnings.
So there is a way to delete content of document directory.
-(void)deleteDD
{
{
NSLog...
ViewPagers have built-in swipe gestures to transition through pages
You don't need to add any animation.
sample code :
Set your main Activity layout as:
in mainactivity Layout xml file set relative layout,in it set the view p...
From my previous blog,we all know that what prefabs are. Now,I want to explain how we instantiate prefabs and what are its advantages.
public class preafabDemo : MonoBehaviour
{
var ball:GameObject;
// Use this for ini...
iPhone provides number of fonts for developing the app but not all.
Sometimes we need to go beyond the fonts provided by iOS sdk.
Following steps will do the needful
1) Add desired font to project (It must be .tff or .otf);
2) Go to info....
So, this thing took lot of my time. I hope it will save yours.
Here, we need a parent div and a child div. Parent div will have the image in background, I am using inline style so that one can use it in as many pages as he/she wants.
Here's...
Sometimes a user is required to input a date in the application for example to provide the date of birth. The programmer have to make sure that the date entered by the user is in correct format that can be used by the app or the server. If a nump...