Mock tests, Interview questions, Tutorials and Tech news
 
 

Archive

Archive for February, 2011

Google launches Google Apps Certification program

February 28th, 2011 Vinay No comments

For those of you who are looking to make a carrer in cloud computing, here is the next step offered by google.

Google is offering the app certification program.

As on data around 3 million business are using google apps and we are one of them and it has definitely been a life saver.

From Google’s blog

Google App Certification recognizes IT professionals for demonstrated abilities to sell, deploy, develop, and support Google Apps. Available today globally, is the first of these certifications, the Google Apps Certified Deployment Specialist, which certifies IT professionals who have demonstrated the fundamental knowledge and skills required to migrate to, configure, and deploy google Apps

Categories: Programming / tutorials Tags: ,

Cross Domain scripting settings on Tomcat

February 23rd, 2011 Vinay 2 comments

In last post we had explained how to configure Apache to allow cross domain scripting. details can be found here

Cross domain Scripting problem with XmlHttp

If you do not plan to use Apache and for some reasons using tomcat or any other similar web container which supports filter, here is a ready made solution, Cors Filter

This gives you a servlet filter which is compatible with any Java Servlet 2.5+ web container.

Installation is very simple. Add the jar to your libraries

In you web.xml

add this line

<filter>
<filter-name>CORS</filter-name>
<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>CORS</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

And you are all set

Setting the Cookie value through JavaScript

February 20th, 2011 Vinay No comments

These two functions will demonstrate how to set the value in cookie and get the value through java script

This function sets the value

function setCookie(){

var name= ‘Mycookie’;
var value =’true’;
var path = ‘/’;

var today= new Date();
today.setTime( today.getTime() );

//expires in one day
var expires_date = 1 * 1000 * 60 * 60 * 24;

var expires = new Date( today.getTime() + (expires_date) );

document.cookie = name + “=” +escape( value ) +
document.cookie = name + “=” +escape( value ) +
( ( expires ) ? “;expires=” + expires.toGMTString() : “” ) +
( ( path ) ? “;path=” + path : “” ) ;

}

escape is used for decoding the value

This function retrieves the value form cookie Read more…

Comparison of Google’s Honeycomb OS with Apple OS

February 17th, 2011 techNews No comments

Apple has enjoyed highest market share pie in its OS market for Tablets & Phones for the past few years. But Google’s Android OS is proving to be the tough contender for them by launching better version at consistent interval & Honeycomb OS version is the one such new product by them. Honeycomb OS version has many features which is unavailable in the Apple’s OS & is currently seen as the next biggest market player in OS market. Some of the comparison between Apple OS and Google’s Honeycomb OS are as follows:-

Read more…

Categories: Tech news Tags: ,

Google Android Honeycomb OS Features

February 17th, 2011 techNews No comments

Google has recently released some new attractive features in the newly launched honeycomb version of Android OS and since then public is vying to get a glimpse of the newly introduced Honeycomb OS features. So if you are geekozoid & looking for the quick run down on Honeycomb features then the complete ready reckoner is here for you:-

Fastest version: Google other Android OS versions like Gingerbread is faster but the Honeycomb version gives you fastest speed, letting the customers to demand more such version.

Compatible with all previous apps: - Android Honeycomb OS version is compatible with all the previously launched application whereas this feature is unavailable in Google’s other Android OS version.

Compatible with Tablets & Phones: - You can run your Android honeycomb OS on your tablet with as much ease as on phone.

Button free Tablets: - Honeycomb version has completely removed the requirement of physical button in Tablets thus making the Tablets all the more light weight in comparison to previous Tablets. By installing honeycomb version button in tablets would appear on the tablets screen & its position is smartly designed so that it will always appear on the bottom side no matter in which direction you are rotating your tablet.

Widget Friendly: - Customers often complained about limited option in Android OS widget features but you don’t have to any more as Honeycomb comes with some very handy, smooth widgets full of customized graphics & range of attractive widget features. Email widgets, calendar widgets are some of the widgets you have to watch for in the honeycomb version.

Video chat in Google talk: - Android OS honeycomb version gives you option of doing video chat in your gtalk apps which has been much awaited by customers. Read more…

Categories: Tech news Tags:

How to develop games on Android

February 14th, 2011 androidGuru 3 comments

One of the biggest markets in smart phones is games.  I am sure most of us would have played around with “Angry Birds” .  In this games tutorial you will learn different methods of developing  “Android Games”

At the end of the post is the video on how the code below works and the zip of all the source files used in this example.

Android Games can be developed in 3 ways

1)   Developing games using Android/Java libraries

2)   Developing games using External Libraries like OpenGL

3)   Developing games by porting existing c-game (pc game) to android.

Before getting started I assume that the reader is familiar with the basics of android programming like using activity, creating views, handling motion/touch events etc.

Also, apart from android sdk and eclipse some other tools are required for the game development. Details of the tools required, how to configure and use them will be explained as and when required. I will recommend to check out our last posts

Before starting with the game development lets understand the term “Main Loop”.

Main Loop:

Not just android any game written on any language consists of a set of custom views which are constantly refreshed/re-painted/re-drawn.  In some games we need to update the screen or re-draw the view elements at regular intervals.

E.g. consider two games (i) Android Snake Game (ii) Android Number Game for kids as shown.

In android snake game the snake has to move irrespective of the user input. Here the screen has to regularly re-drawn/re-painted to create the motion effect of the snake. Where as in the Number  game we need not redraw the screen now and then. The screen must be updated/re-drawn only when the user clicks/touches the screen.

So in the snake game we must re-draw the screen at regular intervals say 1sec in order to do that we make use of threads, while loops etc. and create a refresh/re-draw handler that updates screen regularly. This refresh/re-draw loop created is called “Main Loop”. Read more…

Categories: Programming / tutorials Tags: ,

Google launches contract for Java

February 9th, 2011 Vinay No comments

Contracts for Java is a new open source tool from Google that makes it easier to implement contracts in Java. According to Google’s announcement, this new tool is based on Modern Jass by Johannes Rieken and inspired by the programming language Eiffel. It was created by two Google engineers – David Morgan, Andreas Leitner – using their 20% time, and was expanded as part of an internship by Nhat Minh Le.

These guys are trying to solve one basic fundamental problem in software programming i.e How do you enforce the contract of any class or method ?

Contracts for Java enables you to write annotate your code with contracts in the form of preconditions, postconditions and invariants.

These contract annotations are

  • easy to write and read,
  • and checked at runtime.

Annotating code with contracts helps you:

Categories: Programming / tutorials Tags: ,

NoSQL Smackdown at NEJUG

February 8th, 2011 Vinay No comments

This week event on NEJUG (New England Java user group) is on NoSQL databases .

Reasons why you should attend

  1. Have you considered that SQL has remained more or less unchanged for over 20 years?
  2. NoSQL databases offer new features to support analytics
  3. NoSQL databases are designed to scale
  4. NoSQL databases are designed to support redundancy

So if you are looking to stay current with technology or if you have a large application which stores data, then you can benefit greatly by spending the evening with us and learn how your applications can benefit from one of the NoSQL databases.

Presentation: NoSQL Smackdown
Presenter: Tim Berglund
Doors Open: 5pm Thursday, October 14th
Meal: Pizza – arrives at 5:30pm

Location : 1 Sun Microsystems Way, Burlington , MA

Categories: Programming / tutorials Tags:
Get Adobe Flash playerPlugin by wpburn.com wordpress themes