Monday, July 9, 2012

How to prepare NIC recruitment

In my batch, they used objective question with -ve marks. But in old pattern, they used descriptive questions.

We should have to refresh all basic topics and academic curriculum syllabus.
like., C,Digital Electronics & Communication, Networking,Java,Software engg., & DBMS.
So, u have to equip with all basics stuffs.


The exam may cover the following topics ..
Data structures: 
Programming Methodology - C,C++ and Java
Algorithms for problem solving
Compiler Design:
Databases
Computer Networks
Digital Logic
Computer Organization & Architecture
Software Engineering 
Theory of Computation
Web Programming - HTML & JavaScript 


After refresh the basic stuff on the topics, Give some time wit this book
Multiple-choice Questions In Computer Science by Williams Timothy J.

One more thing, just refresh technical innovation and new trends in IT.
First round is written test, (Technical and recent trends)
second is Personal Interview to be held  at Delhi .
Write your mail Id, for last year sample question papers and materials.

Thursday, October 28, 2010

IRCTC Tatkal Waiting List queries resolved

Below I am pasting a mail I sent to IRCTC and also the clear reply I got from them. I am sure most of you would have faced below queries regarding Tatkal Waitinglist tickets under IRCTC:

Hi,

I would like information on below cases (as the same is not clearly mentioned on IRCTC website):

What does ticket status CKWL stand for? I understand this is for Tatkal Waiting list. Please confirm / correct me.

What are the cancellation terms for Tatkal Waiting List?

If a passenger cancels the ticket, will the entire amount excluding Rs 20 be refunded?

If the ticket is dropped by Indian Railways due to non-availability of seats at the time of chart preparation, will the entire amount excluding Rs 20 be refunded?

How differently is the clearing of a Tatkal Waiting List ticket treated compared to General Waiting List tickets if a General confirmed ticket is cancelled?

I understand that only a cancellation of Tatkal confirmed ticket would ensure confirmation of Tatkal Waitlisted ticket. Is this true?



Kindly provide the replies. Also, I would suggest inclusion of above clarifications on the IRCTC website as lot of internet users seem to have the same doubts and a lot of posts are seen online regarding the same.


Reply from IRCTC:

Dear Customer,

With regard to your mail, we would like to inform your query step by step as given below: -


a) CKWL is stands for tatkal waitlist .

b) Charges : - As per Indian Railway rules in case of waitlisted ticket including tatkal ticket, cancellation charges Rs. 20/- per passenger shall be deducted and rest of the amount including tatkal charges will be refunded to the same account from which the amount is being paid.
c)It is true that cancellation of Tatkal confirmed ticket would ensure confirmation of Tatkal Waitlisted ticket.

Thanks & Regards,
Megha
Care@irctc.co.in
www.irctc.co.in
011-39340000

Wednesday, December 17, 2008

Dynamic Table Mapping in Hibernate

Everyone working in hibernate surely come across dynamic table mapping problem.

Let us illustrate this problem with example.,

Suppose we want to use same mapping file and POJO file for two tables report1 and report2. These two tables schema is same. but the names of the table only differ. The technique is simple.,
Just open HBM file and modify the table value to report_2 by using SAXBuilder.

For more details refer the following in forums.hibernate.org.
http://forum.hibernate.org/viewtopic.php?t=991814

Friday, September 26, 2008

Google offers $10 mn for world's best ideas

SAN FRANCISCO: Google is offering $10 million as prize money in a competition aimed at transforming the world's best ideas into useful products. As part of the company's 10th anniversary celebrations, Project 10 to the 100th asks people to submit ideas in seven categories to the project. 

"Never in history have so many people had so much information, so many tools at their disposal, so many ways of making good ideas come to life," said an announcement Thursday on the website. "Yet at the same time, so many people, of all walks of life, could use so much help, in both little ways and big." 

The competition is open to anyone. The seven categories include sustainable energy use, environment, health, education, shelter, encouraging communities, and building opportunities to help people better provide for themselves and their families. An eighth category is simply titled "everything else". 

Ideas can be submitted through a form available on the website, which poses questions including, "If your idea were to become a reality, who would benefit the most and how?" and "Describe the optimal outcome should your idea be selected and successfully implemented". 

A panel of independent judges will choose the best ideas and divide the prize money equally among the winners. The website says that Google is looking for simple ideas that will help large numbers of people, especially those with urgent needs. 

Among the products cited on the website is the Hippo Water Roller, a 90-liter container that holds water and can be easily rolled on the ground with a handle, taking some of the burden off people in areas where clean water is scarce, such as parts of Africa.

Monday, September 22, 2008

Power of Reflection in Java

Hack any Java class using Reflection

Ever wondered what evil power can be unleashed when using reflection? Do you think private methods are really only accessible from within the declaring class? Do you think that a private field can only be modified from within the declaring class? No? That's what I thought!! In this blog, I will try to demonstrate that it is always important to correctly set the security properties of your applications. For instance, let's look at the following example where we successfully retrieve a private password from another class:

Code:

class A {
private static String getPassword() {
return "someHighlyPreciousPassword";
}
}

public class Test {
public static void main(String[] args) throws Exception {
Class cl = Class.forName("A");
java.lang.reflect.Method[] m = cl.getDeclaredMethods();
m[0].setAccessible(true);
String password = (String) m[0].invoke(null, null);
System.out.println("I got it:" + password);
} 
}

Output:

I got it: someHighlyPreciousPassword
Ok, the example is not really sexy. Let's mess up a class that implements the Singleton pattern. In the normal case, a singleton object is supposed to be the only instance of a given class. To achieve this, we usually declare the class constructor private, so that no one can invoke it. Well, as demonstrated below, with reflection we can bypass this restriction and create a second "singleton object".

Code:

class A {
public static final A singleton = new A("I'm the only instance of class A");
private String name; 
private A(String name) {
this.name = name;
}
public String toString() {
return this.name;
}
}

public class Test {
public static void main(String[] args) throws Exception {
Class cl = Class.forName("A");
java.lang.reflect.Constructor[] c = cl.getDeclaredConstructors();
c[0].setAccessible(true);
A anotherA = (A) c[0].newInstance(new Object[]{"Not anymore!!"});
System.out.println(A.singleton);
System.out.println(anotherA);
} 
}

Output:

I'm the only instance of class A

 Not anymore!!
Using this technique, you can create an instance of any non-abstract class, even if all its constructors are declared private. For instance, below we create an instance of the Math class even though it is useless since the Math class has no instance method. Still, it is possible to do it.

Code:

public class Test {
public static void main(String[] args) throws Exception {
Class cl = Class.forName("java.lang.Math");
java.lang.reflect.Constructor[] c = cl.getDeclaredConstructors();
c[0].setAccessible(true);
Math mathInstance = (Math) c[0].newInstance(null);
System.out.println(mathInstance);
}
}

Output:
java.lang.Math@1cde100

Finally, let's mess with the Runtime class which has one private static field for storing the current Runtimeinstance. This is another example of a badly implemented singleton class. Let's look at the code below. We first retrieve the current runtime object and display it (3-4). Then, we set the Runtime.currentRuntimestatic field to null, which means that all successive calls to Runtime.getRuntime() will yield null (6-9) sincecurrentRuntime is initialized at class loading time. We then get the currentRuntime field again and display its value (11-12). And finally, we try to use the current runtime to execute a command for displaying the content of the current directory (14). The output talks for itself.



Code:

public class Test {
public static void main(String[] args) throws Exception {
Runtime r = Runtime.getRuntime();
System.out.println("Before: Runtime.getRuntime() yields " + r);
Class cl = Class.forName("java.lang.Runtime");
java.lang.reflect.Field f = cl.getDeclaredField("currentRuntime");
f.setAccessible(true);
f.set(null, null);
r = Runtime.getRuntime();
System.out.println("After: Runtime.getRuntime() yields " + r);
r.exec("dir"); //raises NullPointerException!!
}
}

All this could have been avoided if the currentRuntime field had been declared final. Nothing preventssetAccessible(true) to be called on the field (8) but when the set(null, null) method is called,IllegalAccessException is thrown with the message "Field is final".

I'm pretty sure that there is a huge amount of code out there that could be broken this way. Watch out!!
Bottom line: singleton fields should always be declared private static final!!! Moreover, make sure younever grant ReflectPermission and RuntimePermission.accessDeclaredMembers in the java.policy file of your production code.

Friday, September 19, 2008

Forum Nokia Calling All Innovators Competition

Welcome to the Calling All Innovators Contest.

The Forum Nokia Calling All Innovators Competition is open to all mobile application developers, and features three distinct categories for submissions.

What we need from you

  • General information (Name, Address, E-mail)
  • Your application, uploaded in .JAD, .JAR, .WGZ, or .SIS format.
  • A brief description of the problem that your application solves.
  • Any supporting documentation on how your application works, uploaded in .doc, .pdf. .xls, .ppt, or .rtf format. (Optional)
  • A video demo of your application (Optional, 2 Minutes Maximium)

What we are looking for

We are calling for phone applications that solve real problems that face real people. Please submit an application that solves a problem in one of the following areas.

  • Eco-Challenge - "Make a Difference": Here is your chance to join an important world-wide movement! Assist Nokia in creating mobile devices, software and services that reduce our impact on the environment.  Make a difference by submitting the application that will minimize mobility’s global environmental impact and help people make sustainable choices.  Developers who submit for this category will be building tools to help people take care of the environment - from charger reminders to mobile learning applications, from navigation info to recycling tips.
  • Emerging Markets - "IMAGINE the Possibilities": Get involved in defining and creating services for the Next Billion mobile users. The mission of the Emerging Markets Challenge is to open up new opportunities for developers to pioneer & monetize services impacting the daily lives of millions in developing nations.  Examples of Emerging Market solutions include applications providing health information and data access, apps offering low-cost infotainment, SMS-driven apps that inform rural agricultural workers of the best time and place to bring products to market, as well as literacy and general education solutions.
  • Technology Showcase - "Developer Showdown": This category offers the opportunity to show off your technical kung fu and introduce the world to your true killer app! Open to all technologies, if it runs on S60 or Series 40, then we want to see it! Regardless if it has just been created or you have been selling it for a while, casual or commercial, we want to showcase the best of the best. Be it on Flash Lite, Java, Python, or open source. If it’s a game, enterprise solution, Web-based widget, or just a cool application that will enhance the mobile user experience, then this is the category to enter.
  •  More Information Click here