Sunday, July 10, 2011

new interview process

This is the a way now companyies are selecting candidates. bellow is an example how play up one of leading company takes interview and select candidates. they names this as a code war

Technical Interview


After you register for Code Wars, you may have to go through a technical and personal interview. Our Human Resources team may contact you for a telephonic or an on-site interview.



Technology Stack you can use

You can use PHP, Java or Rails platform. You can use MySQL database or any other RDBMS or a NoSQL database system for backend.



2 Days

All Code Warriors are expected to bring their own laptops, and we shall provide them with Internet connectivity, snacks and refreshment.



As a Code Warrior, you will be asked to work in a team of two to four, which will be led by a Product Manager, chosen from within the team. Your team has exactly 24 hours to come up with the product idea, write the code in the development environment of your choice and submit the same for review by our selection panel. The Code Wars is a two-day event slated to kick off . Then You are allowed to work remotely after 8 PM on next day.



You can plan your product idea before the competition starts. However, please note that no creation of production assets can commence until the Code War begins. This entails production design assets, development code and test cases. You are only allowed to plan but not create.



Once the Code Wars event ends, you won't be allowed to integrate any additional feature or fix any bug(s). You will then be asked to demo your solution. You will be judged on whatever stage of product your troop is able to complete in the stipulated time frame.



Teams of Two to Four

You will be asked to participate in Code Wars in a team. The team size would vary from two to four individuals. You can either register as a team or an individual. If you register as a team, your team will need to Ideate, Code & Deploy, and manage the product/task delivery (end to end). In case of individual registration, coders will be grouped based on tasks on-site on the day of event.

In order to be eligible for the event, you will need to complete your registration by the registration end date. As the venue is subject to limited space availability, you're encouraged to register for the event before the registration deadline ends.



Source Control

You will be provided with a GitHub account to check-in your code. You are strongly encouraged to regularly check-in working code during the event as that is one of the ways the organizers will be monitoring the progress of your development project. When the event ends, you must tag your codebase with a tag "codewars" and deploy the tagged codebase.



Deployment

You must plan on deploying your final codebase to a hosting environment for us to judge your project. One of the judgment parameters will be the quality of your deployed product. You will want to make sure that there are no crashes.

For PHP projects, you will be provided with a PHPFog account for deploying your PHP codebase. For Rails projects, you will be provided with a Heroku account for deploying your Rails codebase.



User Privacy

As your product would be reviewed on the parameters of product idea, development followed by interviews in multiple stages, we're introducing a non-optional privacy policy to safeguard the interest of your product and code information.



Since your application will be subject to testing, we want to make sure that personal information that testers enter on your project is protected. You are required to not reveal any user information to any third party, except when required by law.



Code will be Judged & Rewarded

A selection panel will select the top three teams based on product quality, design and code quality and interviews. Selection panel will decide the top 3 teams by Aug 4th. We will notify the top three team members by Aug 5th.

The top three winning troops will receive full-time employment offers to join PlayUp.Each member of the winning troops will also get rewarded with some exciting prizes such as laptops, iPads, iPhones, etc.

Thursday, April 28, 2011

Function to get next Database ID

the bellow function will give you the next auto increament id of your database primary key.

function getNextID($field_id){
$db =& JFactory::getDBO();
$sql = "SELECT max(id) FROM jos_table WHERE field_name=$name";
$db->setQuery($sql);
$acl_num = $db->loadResult();
if($acl_num<>null){
return ($acl_num + 1);
}else{
return 0;
}
}

in reference to:

"Some time we need to see some string type data of different rows in comma separated or other separated in a single field. for this type of implementation mysql have a function GROUP_CONCAT(field_value) . we can add GROUP BY cluse to get comma separated values in different cases."
- Techinical tips for practical uses (view on Google Sidewiki)

Thursday, February 10, 2011

Getting row values in comma separated using GROUP by or other queries in MySQL

Hi,

Some time we need to see some string type data of different rows in comma separated or other separated in a single field. for this type of implementation mysql have a function GROUP_CONCAT(field_value) . we can add GROUP BY cluse to get comma separated values in different cases.

Example:

GROUP_CONCAT([DISTINCT] expr [,expr ...]
[ORDER BY {unsigned_integer | col_name | expr}
[ASC | DESC] [,col_name ...]]
[SEPARATOR str_val])

mysql> SELECT student_name,
-> GROUP_CONCAT(test_score)
-> FROM student
-> GROUP BY student_name;
in reference to: Aniruddh (view on Google Sidewiki)

Thursday, January 20, 2011

Searching non alpha numeric character through REGEX through PHP

Hi,
you can search non-alpha numeric characters by simple adding a negation regex charactor in the regex string (^).

below is the Example

preg_replace('/[^A-Za-z0-9_]/', '', 'D"usseldorfer H"auptstrasse');

Thanks

in reference to: Aniruddh (view on Google Sidewiki)

Monday, December 20, 2010

Checking the Request is Ajax

//function to check if the request is made through ajax
function isAjax() {
return (isset($_SERVER['HTTP_X_REQUESTED_WITH']) &&
($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'));
}
}

in reference to: http://php.net/ (view on Google Sidewiki)

Thursday, December 9, 2010

boy kma

The boy that is in koma

in reference to:

"mmer or database administrator who uses SQL in your day-to-day work, this popular pocket guide is the ideal on-the-job reference. You’ll find many examples that address the language’s complexity, along with key aspects of SQL used in IBM DB2 Relea"
- boykma.com (view on Google Sidewiki)

Friday, November 12, 2010

file copy from url in java

public int copyfile(String filesToTransfor[]) {
int oneChar, count = 0;
if (filesToTransfor.length < 1) {
System.err.println("Two file path is required to complete the process");
System.exit(1);
}
try {
URL url = new URL(filesToTransfor[0]);
System.out.println("Opening connection to " + filesToTransfor[0] + "...");
URLConnection urlC = url.openConnection();
// Copy resource to local file, use remote file
// if no local file name specified
InputStream is = url.openStream();
// Print info about resource
System.out
.println("Copying resource (type: " + urlC.getContentType());
// Date date=new Date(urlC.getLastModified());
// System.out.println(", salesnet file modified on: " + date.toString() + ")...");
System.out.flush();
FileOutputStream fos = null;
if (filesToTransfor.length < 2) {
String localFile = null;
// Get only file name
StringTokenizer st = new StringTokenizer(url.getFile(), "/");
while (st.hasMoreTokens())
localFile = st.nextToken();
fos = new FileOutputStream(localFile);
} else
fos = new FileOutputStream(filesToTransfor[1]);

while ((oneChar = is.read()) != -1) {
fos.write(oneChar);
count++;
}
is.close();
fos.close();
System.out.println(count + " byte(s) copied");

} catch (MalformedURLException e) {
System.err.println(e.toString());
} catch (IOException e) {
System.err.println(e.toString());
}

return count;
}

in reference to: Google Toolbar Installed (view on Google Sidewiki)

Saturday, September 4, 2010

example of object in javascript (privileges)

javascript private members of a object

Private Members in JavaScript

Douglas Crockford
www.crockford.com



JavaScript is the world's most misunderstood programming language. Some believe that it lacks the property of information hiding because objects cannot have private instance variables and methods. But this is a misunderstanding. JavaScript objects can have private members. Here's how.
Objects

JavaScript is fundamentally about objects. Arrays are objects. Functions are objects. Objects are objects. So what are objects? Objects are collections of name-value pairs. The names are strings, and the values are strings, numbers, booleans, and objects (including arrays and functions). Objects are usually implemented as hashtables so values can be retrieved quickly.

If a value is a function, we can consider it a method. When a method of an object is invoked, the this variable is set to the object. The method can then access the instance variables through the this variable.

Objects can be produced by constructors, which are functions which initialize objects. Constructors provide the features that classes provide in other languages, including static variables and methods.
Public

The members of an object are all public members. Any function can access, modify, or delete those members, or add new members. There are two main ways of putting members in a new object:
In the constructor

This technique is usually used to initialize public instance variables. The constructor's this variable is used to add members to the object.

function Container(param) {
this.member = param;
}

So, if we construct a new object

var myContainer = new Container('abc');

then myContainer.member contains 'abc'.
In the prototype

This technique is usually used to add public methods. When a member is sought and it isn't found in the object itself, then it is taken from the object's constructor's prototype member. The prototype mechanism is used for inheritance. It also conserves memory. To add a method to all objects made by a constructor, add a function to the constructor's prototype:

Container.prototype.stamp = function (string) {
return this.member + string;
}

So, we can invoke the method

myContainer.stamp('def')

which produces 'abcdef'.
Private

Private members are made by the constructor. Ordinary vars and parameters of the constructor becomes the private members.

function Container(param) {
this.member = param;
var secret = 3;
var that = this;
}

This constructor makes three private instance variables: param, secret, and that. They are attached to the object, but they are not accessible to the outside, nor are they accessible to the object's own public methods. They are accessible to private methods. Private methods are inner functions of the constructor.

function Container(param) {

function dec() {
if (secret > 0) {
secret -= 1;
return true;
} else {
return false;
}
}

this.member = param;
var secret = 3;
var that = this;
}

The private method dec examines the secret instance variable. If it is greater than zero, it decrements secret and returns true. Otherwise it returns false. It can be used to make this object limited to three uses.

By convention, we make a private that parameter. This is used to make the object available to the private methods. This is a workaround for an error in the ECMAScript Language Specification which causes this to be set incorrectly for inner functions.

Private methods cannot be called by public methods. To make private methods useful, we need to introduce a privileged method.
Privileged

A privileged method is able to access the private variables and methods, and is itself accessible to the public methods and the outside. It is possible to delete or replace a privileged method, but it is not possible to alter it, or to force it to give up its secrets.

Privileged methods are assigned with this within the constructor.

function Container

in reference to: Contribute with Sidewiki - Toolbar Help (view on Google Sidewiki)

Thursday, June 24, 2010

learning spanish

few words

I -> estoy
Excuse me -> perdone senora

good morning -> buenos dias
if not morning -> buenos noches

how are you feeling -> como esta?
i am fine -> Estoy ben.

what is your name -> como iiama

my name is anirudda -> me iiama aniruddha

its nice to meet you -> mucho gusto

Thanks

in reference to: Edit My Profile (view on Google Sidewiki)

Wednesday, May 26, 2010

JSON (javascript object notification)

Hi all,

This is one of the technology you can use to make your javascript and ajax objects more powerfull.

declaring object:

var newJsonObj = {}
vat newJsonArr = [];

newJsonObj = { "tty" : android,
"name", aniruddha das,
"posts" : [
{"":thid,}
]
}

in reference to: 4shared.com - free file sharing and storage (view on Google Sidewiki)

Sunday, May 23, 2010

generating a popup calender in javascript

// written by Tan Ling Wee on 2 Dec 2001
// last updated 10 Apr 2002
// email : fuushikaden@yahoo.com

var fixedX = -1 // x position (-1 if to appear below control)
var fixedY = -1 // y position (-1 if to appear below control)
var startAt = 1 // 0 - sunday ; 1 - monday
var showWeekNumber = 1 // 0 - don't show; 1 - show
var showToday = 1 // 0 - don't show; 1 - show
var imgDir = "images/" // directory for images ... e.g. var imgDir="/img/"

var gotoString = "Go To Current Month"
var todayString = "Today is"
var weekString = "Wk"
var scrollLeftMessage = "Click to scroll to previous month."
var scrollRightMessage = "Click to scroll to next month."
var selectMonthMessage = "Click to select a month."
var selectYearMessage = "Click to select a year."
var selectDateMessage = "Select [date] as date." // do not replace [date], it will be replaced by date.

var crossobj, crossMonthObj, crossYearObj, monthSelected, yearSelected, dateSelected, omonthSelected, oyearSelected, odateSelected, monthConstructed, yearConstructed, intervalID1, intervalID2, timeoutID1, timeoutID2, ctlToPlaceValue, ctlNow, dateFormat, nStartingYear

var bPageLoaded=false
var ie=document.all
var dom=document.getElementById

var ns4=document.layers
var today = new Date()
var dateNow = today.getDate()
var monthNow = today.getMonth()
var yearNow = today.getYear()
var imgsrc = new Array("drop1.gif","drop2.gif","left1.gif","left2.gif","right1.gif","right2.gif")
var img = new Array()

var bShow = false;

/* hides and objects (for IE only) */
function hideElement( elmID, overDiv )
{
if( ie )
{
for( i = 0; i < document.all.tags( elmID ).length; i++ )
{
obj = document.all.tags( elmID )[i];
if( !obj || !obj.offsetParent )
{
continue;
}

// Find the element's offsetTop and offsetLeft relative to the BODY tag.
objLeft = obj.offsetLeft;
objTop = obj.offsetTop;
objParent = obj.offsetParent;

while( objParent.tagName.toUpperCase() != "BODY" )
{
objLeft += objParent.offsetLeft;
objTop += objParent.offsetTop;
objParent = objParent.offsetParent;
}

objHeight = obj.offsetHeight;
objWidth = obj.offsetWidth;

if(( overDiv.offsetLeft + overDiv.offsetWidth ) <= objLeft );
else if(( overDiv.offsetTop + overDiv.offsetHeight ) <= objTop );
else if( overDiv.offsetTop >= ( objTop + objHeight ));
else if( overDiv.offsetLeft >= ( objLeft + objWidth ));
else
{
obj.style.visibility = "hidden";
}
}
}
}

/*
* unhides and objects (for IE only)
*/
function showElement( elmID )
{
if( ie )
{
for( i = 0; i < document.all.tags( elmID ).length; i++ )
{
obj = document.all.tags( elmID )[i];

if( !obj || !obj.offsetParent )
{
continue;
}

obj.style.visibility = "";
}
}
}

function HolidayRec (d, m, y, desc)
{
this.d = d
this.m = m
this.y = y
this.desc = desc
}

var HolidaysCounter = 0
var Holidays = new Array()

function addHoliday (d, m, y, desc)
{
Holidays[HolidaysCounter++] = new HolidayRec ( d, m, y, desc )
}

if (dom)
{
for (i=0;i<

in reference to: Google (view on Google Sidewiki)

opening a new divisin window in javascript and handling ajax operation

//generate the message window

function showWindow(varTotalTax,evt)
{

//var evt = (evt) ? evt : ((window.event) ? window.event : "")
if(evt)
{
var elem = (evt.target) ? evt.target : evt.srcElement
var id = elem.id;
var x = evt.clientX - 10;
var y = evt.clientY + document.body.scrollTop+4;
var divObj = document.getElementById("popupdiv");
divObj.style.display = "block";
divObj.style.position = "absolute";
divObj.style.left = x;
divObj.style.top = y;
if(varTotalTax !=0)
{
divObj.innerHTML = "

"+varTotalTax+"

"
}
else
{
divObj.innerHTML = "Notes not available
X "
}
}
}

// close the generated window
function divclose(name)
{
var divObj;
divObj= document.getElementById(name);
divObj.style.display = "none";
}

in reference to: Google (view on Google Sidewiki)

sending ajax request

function selectState(e)
{
if(e==212)
{
//document.getElementById("countryLvl").innerHTML = "";
document.getElementById("stateLebel").innerHTML = "County : ";
document.getElementById("state").innerHTML = "";
//document.getElementById("countryLvl").innerHTML = "";

}
else
{
document.getElementById("stateLebel").innerHTML = "State : ";
if(xmlHttp)
{
try {
xmlHttp.open("GET","SelectState.php?country="+e, true);
xmlHttp.onreadystatechange = handleServerResponse;
xmlHttp.send(null);
} catch(e) {
alert("Can't connect to server:\n" + e.toString());
}
}
}
}

/*function selectCity(e)
{
var myDivLebel = document.getElementById("cityLebel"); //.innerHTML;
myDivLebel.innerHTML = "City : ";

if(xmlHttp)
{
try {
var country = document.getElementById("countryId").value;
xmlHttp.open("GET","SelectState.php?country="+country+"&state="+e, true);
xmlHttp.onreadystatechange = handleServerResponseCity;
xmlHttp.send(null);
} catch(e) {
alert("Can't connect to server:\n" + e.toString());
}
}
}*/

function handleServerResponse()
{
myDiv = document.getElementById("state");
// display the status o the request
/* if (xmlHttp.readyState == 1)
{
myDiv.innerHTML = "Request status: 1 (loading)
";
}
else if (xmlHttp.readyState == 2)
{
myDiv.innerHTML = "Request status: 2 (loading)
";
}
else if (xmlHttp.readyState == 3)
{
myDiv.innerHTML = "Request status: 3 (loading)
";
}
else*/ if (xmlHttp.readyState == 4)
{
// continue only if HTTP status is "OK"
if (xmlHttp.status == 200)
{
try {
response = xmlHttp.responseText;
//myDiv.innerHTML += "Request status: 4 (complete). Server said:
";
myDiv.innerHTML = response;
} catch(e) {
alert("Error reading the response: " + e.toString());
}
}
}
}

function handleServerResponseCity()
{
myDiv = document.getElementById("city");
/* if (xmlHttp.readyState == 1)
{
myDiv.innerHTML = "Request status: 1 (loading)
";
}
else if (xmlHttp.readyState == 2)
{
myDiv.innerHTML = "Request status: 2 (loading)
";
}
else if (xmlHttp.readyState == 3)
{
myDiv.innerHTML = "Request status: 3 (loading)
";
}
else*/ if (xmlHttp.readyState == 4)
{
// continue only if HTTP status is "OK"
if (xmlHttp.status == 200)
{
try {
response = xmlHttp.responseText;
//myDiv.innerHTML += "Request status: 4 (complete). Server said:
";
myDiv.innerHTML = response;
} catch(e) {
alert("Error reading the response: " + e.toString());
}
}
}
}

in reference to: Google (view on Google Sidewiki)

ajax object xmlHttpRequest and xmlHttpResponse

var xmlHttp = createXmlHttpRequestObject();

function createXmlHttpRequestObject()
{
var xmlHttp;
// if running Internet Explorer
if(window.ActiveXObject)
{
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlHttp = false;
}
}
}
// if running Mozilla or other browsers
else
{
if(!xmlHttp && typeof ActiveXObject == "undefined")
{
try {
xmlHttp = new XMLHttpRequest();
} catch (e) {
xmlHttp = false;
}
}
}
// return the created object or display an error message
if (!xmlHttp)
{
alert("Error creating the XMLHttpRequest object.");
}
else
{
return xmlHttp;
}
}

in reference to: Google (view on Google Sidewiki)

Tuesday, May 18, 2010

jave project arcteture

Hi,

Project Architecure means what are the tiers in our project with flow diagram.

supposoe our project contains five tiers like client tier ,presentation tier, Business tier,Integration tier,Data tier. then we draw the all tiers flow.

project approch is different from project architecure. sorry here i can't insert my own project architecure diagram. if any one want project architecure , project approch then mail me.

Client tier:

• IE Browser (default) from which the end user will access the application
• The request from the browser will be submitted to the Application Server using HTTP protocol.
• The Response from the presentation layer (struts framework) will be interpreted into html pages to view on the browsers.
• Presentation Tier:

Struts Framework with Tiles
• On Request from the browser, the appropriate Action Class handles the user request. The Action class then connects to the business tier via Service Business Delegate.
• Tiles have been used to create a set of pages with a consistent user interface (e.g.: the same navigation bar, header, footer, etc.).
• Taglibs are used for displaying tabular data (e.g. search results) in a consistent fashion, with pagination.
Business Delegate layer
• Enable the Struts Action classes to be unaware of underlying Session Beans
• Encapsulates the invocation of Service Locator to locate them.

Advantages of Struts
‘Centralized File-Based Configuration’, i.e. rather than hard-coding information into Java programs, many Struts values are represented in XML or property files.
This loose coupling means that many changes can be made without modifying or recompiling Java code.
Validation of the user entry fields in the jsps to be handled by entries in the validation.xml and defining validation rules in validator-rules.xml.
Internationalization of the static components of the screen as field and button labels, titles, error messages etc.
This approach also lets Java and Web developers to focus on their specific tasks (like implementing business logic, presenting certain values to clients.) without needing to know about the overall system layout.

Business Tier

• The Business Delegate identifies the business service class (the Session EJBs) and delegates client request to the EJBs. Internally, the session beans are shallow, and delegate all business logic requests to business logic POJOs, which in turn implement the actual functionality.
• The Business Logic POJOs encapsulate the server side business logic. They do not use Hibernate directly, but instead call upon Data Access Objects (DAO) to work with the model. Parameters and return values are modeled as Data Transfer Objects (DTO), and hence no Hibernate model classes will ever leave the DAO layer. The business logic is made available in the business service class, which increases maintainability and easy debugging, if necessary.

Hibernate/DB Tier
The DAOs encapsulates the database access. For all practical purposes, we are using Hibernate (v 2.1) as the OR mapping layer. This saves development time to write SQLs for executing insert and update statements, find by primary key etc. For each value object that directly or compositely represent a table in the database, we have Hibernate mapping files.
For some complex data retrieval, however we will be using raw SQLs (independent of database) from the DAOs and populate the Value Object POJOs. In those specific cases, the DAOs will be having direct access to the Databases using the available connection. The connection properties of the ‘DB Manager’, holding the data sources, direct the request to the appropriate database.

Issues that may rise of Hibernate
• Hibernate no longer supports dynamic proxies
• The Hibernate has issues using Microsoft's driver especially when using SqlServer2000. It appears that the failures are due to some strange handling of dates.
• Hibernate has issues with Informix Databases due to the way JDBC implementation is done in Informix.

keeps smiling and mailing

bora_srinivasarao@yahoo.co.in
Hyderabad

"HELP EVER HU

in reference to: Google (view on Google Sidewiki)

hi

you coan find google android developement helps in developer.android.com

in reference to: Google (view on Google Sidewiki)

Friday, May 14, 2010

code book

goooing to be realy amagin..

in reference to:

"still he"
- orkut - my orkut (view on Google Sidewiki)

waw its amaging and can be a new innovative way to communicating the web with google wave.

u guys can check the videos from youtube to use google wave both for developer and end users

in reference to: orkut - my orkut (view on Google Sidewiki)

Wednesday, April 28, 2010

android

is there anyone to help me to teach android and help me to make application i will pay for that

in reference to: Google (view on Google Sidewiki)

Saturday, April 17, 2010

yes google is the best

yes you are right,,

i m not ever finded the search engin like google..
it cant be compairable to others

in reference to: Google (view on Google Sidewiki)

its better to follow the wiki for result

hi,

its better you follow this wiki link for the relation between anciant math and art


http://simple.wikipedia.org/wiki/Category:Ancient_mathematicians

in reference to: Nivedita .. - Google Profile (view on Google Sidewiki)

Sunday, April 4, 2010

....

.....

in reference to: Google (view on Google Sidewiki)

hi all ...do the best you can and live the life as you can&gt;&gt;&gt;&gt;&gt;

hi all ...do the best you can and live the life as you can>>>>>


this is one life and can not be back again.


waw.....

in reference to: Google (view on Google Sidewiki)

Monday, March 8, 2010

link for phpcodebook post

my wiki profile -aniruddhadas9

please find me in wiki as user aniruddhadas9

in reference to: Problem loading page (view on Google Sidewiki)

php code book contains help for coder of php who need help for coding

I invite all you to php code book

you can ask helps and see all my works of coding in my site http://www.phpcodebook.com

you can share your valuable experience with others with this site for which others will get help from you.

in reference to: Problem loading page (view on Google Sidewiki)

Monday, February 15, 2010

WWW.PHPCODEBOOK.COM

Hi to All,

www.phpcodebook.com is a free and use full site for getting php code information ,coding standard ,php code format and other lelavant information ,