Skip to main content

Posts

Showing posts from January, 2014

Android Best Practices for User input, Background jobs, Performance, Security and privacy - Android

T here are some practices that you can follow while developing android application. These are suggested by the android itself and they keep on improving with respect to time. These best practices include interaction design features , performance , security and privacy , compatibility , testing , distributing and monetizing tips. They are narrowed down and are listed as below. Best Practices - User input Every text field is intented for a differnet job. For example, some textfields are for text and some are for numbers. If it is for numbers then it is better to dispaly the numeric keypad when that textfield is focused. Its syntax is. <EditText            android:id="@+id/phone"            android:layout_width="fill_parent"            android:layout_height="wrap_content"            android:inputType="phone" /> Other then that if your field is for password , then it must show a password hint , so that the user can easily remembe

Java knowledge for android

The Java programming language is one of the glorious tools that make programming Android a breeze compared with programming for other mobile platforms. Whereas other languages insist that you manage memory, deallocate and allocate bytes, and then shift bits around like a game of dominoes, Java has a little buddy called the Java Virtual Machine (JVM) that helps take care of that for you. The JVM allows you to focus on writing code to solve a business problem by using a clean, understandable programming language (or to build that next really cool first-person shooter game you’ve been dreaming of) instead of focusing on the plumbing just to get the screens to show up. You’re expected to understand the basics of the Java programming language before you write your first Android application . If you’re feeling a bit rusty and need a refresher course on Java, you can visit the Java tutorials site at http://java.sun.com/docs/books/tutorial . or you can find some tutorial here - JAVA

HSC Exam Time Table 2014 Arts, Commerce, Science

Day & Date Time Subject Thursday 20th February 2014 11.00 a.m. to 2.00 p.  Marathi (02)       Gujarati (03)         Kannada (06)      Sindhi (07)            Malayalam (08)    Tamil (09)            Telugu (10)          Punjabi (11)        Bengali (12) Thursday 20th February 2014 3.00 p.m. to 6.00 p.m.  Urdu (05)             French (13)           Pali (35)       Friday, 21nd February 2014 11.00 a.m. to 2.00 p.m  English (01)   Saturday 22nd February 2014 11.00 a.m. to 2.00 p.m.  Hindi (04) Saturday 22nd February 2014 3.00 p.m. to 6.00 p.m.  German (14)                  Ardhamagadhi (16)         Persian (37)                    Avesta - Pahalavi (87)    Monday 24th February 2014 11.00 a.m. to 2.00 p.m.  Textiles (A/S) (44) Monday 24th February 2014 3.00 p.m. to 6.00 p.m.  Marathi Liet

Cafe Babe? Or, what's in a name?

    The name Java is not an acronym. In particular, it does not stand for Just Another Vague Acronym . The language was originally called Oak, but the language lawyers worried about the name Oak Technology (at the time a maker of video cards). So a meeting was held (varying accounts of that meeting were gathered up by JavaWorld) , and the name Java made the short list. The language lawyers approved, and the rest is history. Most kinds of executable file formats have some kind of "magic number" that identifies them. For example, old PDP-11 executables for the UNIX system used the "magic number" 0407 (the real magic there, and the putative origin of the term, is that 0407 was a machine instruction for a jump forward of 7 words, i.e., past the 8-word-long executable header, to the first executable statement in the program). Some versions of the Berkeley UNIX memory allocator use the hexadecimal string 0xDEADBEEF, which is considered unlikely to occur in normal o

Top Ten Things Every Java Programmer Should Know

These are in no particular order, but these are things that all Java programmers should probably know. Who Invented Java, and when? James Gosling, at Sun Labs, around 1992; the group was building a set-top box and started by "cleaning up" C++ and wound up with a new language and runtime. What does Java stand for? Java is not an acronym (not even Just Another Vague Acronym :-)). The language was first named Oak, after the tree outside James' window. The lawyers found another language called Oak so, legend has it, the gang went out to the local cafe to discuss names and wound up naming it after the beverage Java (which is in turn named after the island of Java). Possible confirmation of this theory . What is the JLS? JLS is The Java Language Specification. Every developer should buy or download (free) this specification and read it, a bit at a time. How do changes get into Java? JCP (Java Community Process) . Why is there no printf-like f

Amazon - Some interview quesions

Interview Questions : 1. Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can?t pass the value k to any function also. 2. What are the 4 basics of OOP? 3. Define Data Abstraction. What is its importance? 4. Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 2 numbers. Find the missing numbers. 5. Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present. 6. Given a string,find the first un-repeated character in it? Give some test cases 7. You are given a dictionary of all valid words. You have the following 3 operations permitted on a word: delete a character, insert a character, replace a character. Now given two words - word1 and word2 - find the minimum number of steps required to convert word1 to word2. (one operation counts as 1 step.) 8. Given a cube of size n*n*n (i.e ma

3i InfoTech written test paper question and answers - (46 to 90)

<< Previous (46-90) (46) A can have a piece of work done in 8 days, B can work three times faster than the A, C can work five times faster than A. How many days will they take to do the work together ? (a) 3 days                 (b) 8/9 days                 (c) 4 days                 (d) can t say  (Ans. (b) (47) A car travels a certain distance taking 7 hrs in forward journey, during the return journey increased speed 12km/hr takes the times 5 hrs.What is the distancetravelled (a) 210 kms                 (b) 30 kms                 (c) 20 kms                 (d) none of these  (Ans. (b) (48) Instead of multiplying a number by 7, the number is divided by 7. What is the percentage of error obtained ? (49) Find (7x + 4y ) / (x-2y) if x/2y = 3/2 ? (a) 6                 (b) 8                 (c) 7                 (d) data insufficient (Ans. (c) (50) A man buys 12 lts of liquid which contains 20% of the liquid and the rest is water. He then mixes

3i InfoTech written test paper question and answers - (1 to 45)

    Next (46-90) >> (1) In a class composed of x girls and y boys what part of the class is composed of girls A. y/(x + y)                B. x/xy                 C. x/(x + y)                D. y/xy  (Ans. C) (2) What is the maximum number of half-pint bottles of cream that can be filled with a 4-gallon can of cream(2 pt.=1 qt. and 4 qt.=1 gal) A.16                 B.24                C.30                 D.64  (Ans. D) (3) If the operation,^ is defined by the equation x ^ y = 2x + y, what is the value of a in 2 ^ a = a ^ 3 A.0                 B.1                 C.-1                 D.4  (Ans. B) (4) A coffee shop blends 2 kinds of coffee, putting in 2 parts of a 33p. a gm. grade to 1 part of a 24p. a gm. If the mixture is changed to 1 part of the 33p. a gm. to 2 parts of the less expensive grade, how much will the shop save in blending 100 gms. A.Rs.90                 B.Rs.1.00                 C.Rs.3.00                 D.Rs.8.00  (Ans. C)

TCS Apptitude test questions and solutions

1. If log 0.317=0.3332 and log 0.318=0.3364 then find log 0.319 ?  Solution: log 0.317=0.3332 and log 0.318=0.3364, then log 0.319=log0.318+(log0.318-log0.317) = 0.3396 2. A box of 150 packets consists of 1kg packets and 2kg packets. Total weight of box is 264kg. How many 2kg packets are there ? Solution: x= 2 kg Packs y= 1 kg packs x + y = 150     .......... Eqn 1 2x + y = 264   .......... Eqn 2 Solve the Simultaneous equation; x = 114 so, y = 36 ANS :  Number of 2 kg Packs = 114. 3. My flight takes of at 2am from a place at 18N 10E and landed 10 Hrs later at a place with coordinates 36N70W. What is the local time when my plane landed? Options:   a) 6:00 am b) 6:40am c) 7:40 am d) 7:00 am e) 8:00 am Solution: The destination place is 80 degree west to the starting place. Hence the time difference between these two places is 5 hour 20 min. (=24hr*80/360). When the flight landed, the time at the starting place is 12 noon (2 AM + 10 hours). Hence, the time at