Wednesday, December 19, 2012

How to check whether the TV remote control's battery drained or not ?
       If the battery power is good,It will emits Infra Red rays. We can't see infrared rays normally.There is a way to see
this infrared rays. How???
Place the remote control's Infra red LED facing to the mobile camera, run the mobile camera in preview mode and press the keys in remote.
See the mobile camera's preview. If the battery charge is good, Infra red LED will emits light 

Wednesday, December 12, 2012



Competition Sites:
1) ACM ICPC
2) codeforces
3) topcoder
4) codechef
5) google code jam
6) Saratov university [espl for tricky testcases]


To do:
===========
0) Study and practice
1)Always read a chapter from algorithm and do problems in book
2)Solve the related problems in contest sites
3)Solve the related problems available in all text books
4)Always choose hard problems and try to solve it...
5)Solve interview problems related with it
6) Read topcoder articles and solve problems related with it...



1) Trees
http://codeforces.com/problemset/tags/trees
2) Graphs
http://codeforces.com/problemset/tags/graphs

3) Datastructures
heaps,segment trees,BST, HashTable
http://codeforces.com/problemset/tags/data%20structures

4)Expression Parsing
http://codeforces.com/problemset/tags/expression%20parsing

5) Hashing
http://codeforces.com/problemset/tags/hashing

6) strings
http://codeforces.com/problemset/tags/strings

7) string suffix:
http://codeforces.com/problemset/tags/string%20suffix%20structeres


8) greedy
http://codeforces.com/problemset/tags/greedy
9) dynamic programming problems list:
http://codeforces.com/blog/entry/325
http://codeforces.com/problemset/tags/dp
10)Divide and conquer
http://codeforces.com/problemset/tags/divide%20and%20conquer


11) Mathematics
http://codeforces.com/problemset/tags/math
12)geometry
http://codeforces.com/problemset/tags/geometry
13) probablilities
http://codeforces.com/problemset/tags/probabilities

14) combinatorics
http://codeforces.com/problemset/tags/combinatorics

Above are from codeforces...
Below are from topcoder
15.Recursion
16.sorting
17.String manipulation/string parsing
18.Encryption and compression
19.advanced math
20. sortings..
21.maze
22.BackTracking
23.Maximum flow problem

Best resources for competition programming preparation:
http://problemclassifier.appspot.com/
http://emiraga.wikispaces.com/Problems+by+topics
https://github.com/BrockCSC/acm-icpc/wiki/Online-Resources
http://www.stanford.edu/class/cs97si/
http://webcourse.cs.technion.ac.il/234900/Spring2012/en/ho.html


Monday, December 10, 2012

What I have done and what I have learnt from comptetition problems:

From Codeforces,I solved the following problems:

1) Files list
    Previously in OS or c program, we can have 8 characters filename and 3 characters for extension.
I felt that design in this problem
   http://codeforces.com/problemset/problem/174/B

2)cd and pwd commands
http://codeforces.com/problemset/problem/158/C
 From this problem, I learnt that how we can implement cd and pwd commands in shell.
How it will remembers the user's present working directory especially the user is doing cd ..

3)BHTML & BCSS
http://codeforces.com/problemset/problem/172/E

  From this problem, I learnt that How css is applied with HTML tags. How we can highlight the tags with user's choices.

4)Simple XML
http://codeforces.com/problemset/problem/125/B

  From this problem I learnt that How XML tags can be aligned or C/C++ source code is aligned based on {} brackets in editor

5)try... catch problem
http://codeforces.com/problemset/problem/195/C

From this problem, I learnt how compilers will execute exceptions with try ... catch blocks
It is one of awesome reallife problem.

How to change android system volume Up/Down ???

    Through AudioManager, we can set the volume up/down.


Today I faced this issue while working with media-volume-control
1)http://stackoverflow.com/questions/8446337/how-to-solve-error-this-attribute-must-be-localized-at-text-with-value-top
2) R.java:10: duplicate class error
  I just removed the R.java and compilation is going smooth

3) How to copy the eclipse project into android source code and compile it ???
 copy the application project into android source code's packages/apps/ folder
within the application project,Add Android.mk with below contents:

 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 LOCAL_MODULE_TAGS := optional
 LOCAL_SRC_FILES := $(call all-subdir-java-files)
 LOCAL_PACKAGE_NAME := VolumeControl_S #Target package name
 include $(BUILD_PACKAGE)

 From android folder give source build/envsetup.sh,lunch and then
 cd to packages/apps/yourApplication/ and give mm command. This will build the application code & create the APK file.

Tuesday, December 04, 2012

Problems faced while compiling android application with old version to ICS/JB:

1)http://stackoverflow.com/questions/8446337/how-to-solve-error-this-attribute-must-be-localized-at-text-with-value-top

2) I got Android APK compilation Error: R.java:10: duplicate class

Solution:  I just removed the R.java file and compilation is going smooth
How to copy the eclipse Android Application project into android source code and compile it ???

 copy the application project into android source code's packages/apps/ folder
within the application project,Add Android.mk with below contents:

 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 LOCAL_MODULE_TAGS := optional
 LOCAL_SRC_FILES := $(call all-subdir-java-files)
 LOCAL_PACKAGE_NAME := VolumeControl_S #Target package name
 include $(BUILD_PACKAGE)

 From android folder give source build/envsetup.sh,lunch and then
 cd to packages/apps/yourApplication/ and give mm command. This will build the application code & create the APK file.

ICS features:

From ICS onwards, Android by default handles Keyboard/mouse input events... No need to do anything extra to make it work...



To know more about how to handle keyboard events/Simulate keyboard events:
 http://thecodeartist.blogspot.in/2011/03/simulating-keyevents-on-android-device.html