Monday, October 23, 2017

Can't lauch google-chorme-stable. Getting Out of date NSS (Libnss3)

For older version:


 Solution is to build an older version of Chrome, which you can do like this:

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
echo "export PATH=$PATH:$HOME/depot_tools" >> ~/.bash_profile
source ~/.bash_profile
mkdir Chromium && cd Chromium
fetch chromium
cd src
git checkout 60.0.3112.96
gclient sync --with_branch_heads --jobs 16

For updated version:


i) If you use ubuntu lower grade version like 15.04 or less, then upgrade to the latest Ubuntu (LTS recommended) version like 16.04LTS or 17.04.

ii) @akbarbin has got a solution like below

I have done to fix this in Ubuntu 16.04 by reinstalling libnss3.

sudo apt-get install --reinstall libnss3

It is found in this link

Resource Link: NSS_VersionCheck("3.26") failed #53

Wednesday, October 18, 2017

Data Structure and algorithm links


  1. https://www.youtube.com/watch?v=Pn874kEc3IA
  2. http://cs.fit.edu/~ryan/java/programs/graph/Prim-java.html
  3. http://theoryofprogramming.com/2015/03/27/prims-algorithm/
  4. https://stackoverflow.com/questions/18009158/i-want-to-write-a-prims-algorithm-in-java
  5. https://github.com/phishman3579/java-algorithms-implementation/blob/master/src/com/jwetherell/algorithms/graph/Prim.java
  6. http://sourcecodesforfree.blogspot.in/2013/05/10-prims-algorithm.html
  7. http://www.geeksforgeeks.org/greedy-algorithms-set-5-prims-minimum-spanning-tree-mst-2/
  8. http://www.geeksforgeeks.org/?p=26604
  9. http://www.geeksforgeeks.org/?p=11110
  10. http://www.cs.princeton.edu/courses/archive/spr07/cos226/lectures/mst.pdf
  11. http://www.ics.uci.edu/~eppstein/161/960206.html
  12. http://www.mathcs.emory.edu/~cheung/Courses/171/Syllabus/11-Graph/prim2.html
  13. http://faculty.simpson.edu/lydia.sinapova/www/cmsc250/LN250_Levitin/Contents.htm
  14. http://ind.ntou.edu.tw/~litsnow/al98/pdf/Algorithm-Ch6-Heapsort.pdf
  15. http://ind.ntou.edu.tw/~litsnow/al98/
  16. http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/lecture-videos/lecture-1-algorithmic-thinking-peak-finding/
  17. http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures/
  18. http://theoryapp.com/selection-insertion-and-bubble-sort/
  19. http://farenda.com/algorithms-and-data-structures/

Best tutorial (for C programmer):

Install JDK9 in Ubuntu

Installation and Configuration of JDK9 is step by step given below:

Install JDK9 in Ubuntu:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java9-installer

Make it as default:

sudo apt-get install oracle-java9-set-default
Changed in .bashrc, /etc/environment and also set default using
3 sections to change java configuration.

.bashrc:

export JAVA_HOME=/usr/lib/jvm/java-9-oracle
export PATH=$JAVA_HOME/bin:$PATH

/ect/environment:

JAVA_HOME="/usr/lib/jvm/java-9-oracle"
PATH=$PATH:$JAVA_HOME/bin
Then run the following command and set
sudo update-alternatives --config java

sudo update-alternatives --config javac
Then run the command
source /etc/environment

Check in terminal:

java -version
echo $JAVA_HOME
which java
which javac

Issue#1:

Execute "source /etc/environment" in every shell where you want the variables to be updated:
$ source /etc/environment

Issue#2:

Just write JAVA_HOME="/usr/lib/jvm/java-9-oracle" on your /etc/environment, without the "export"
/etc/environment is supposed to contain a set of environment variables given as key=value pairs. It is not a shell script, so you can't use shell commands such as export in it.

Resource Link:

Issue#3:

To check if java is properly installed:
$ which java

$ which javac
You should get similar output:
/usr/bin/java

Issue#4:

To remove Oracle JDK completely, run the commands below:

Completely remove criteria:

sudo apt-get remove oracle-java9-installer
sudo apt-get remove --auto-remove oracle-java9-installer
sudo apt-get purge oracle-java9-installer
sudo apt-get purge --auto-remove oracle-java9-installer

Resource Link:

Monday, October 16, 2017

Easy Problem Short List UVA

UVa(University of Valladolid) has one of the best online judges to start online problem solving. Here is a list of some easy problems from UVa for newbies.



100119133136146272401409412440444446458468476488489490492494498499541575579583729900913100351003810055100711008210110102221023510327103461037010424104691059110696106991078910812109221092410929109311097011152111721118511192112191123311462115301172711764117991180411805118271185411875119001191711934119361194211984119881199111995120151214912149121491214912149121491237212372123721237212372

dsfds
1. 11172:Relational Operator

2. 10071 - Back To High School Physics 

3. 10055 - Hashmat the Brave Warrior 


4. 11727 - Cost Cutting

5. 10079 - Pizza Cutting 

6. 10783 - Odd Sum 

7. 11219 - How old are you? 

8. 11332 - Summing Digits 

9. 11150 - Cola 

10. 11185 - Ternary 

11. 10327 - Flip Sort 

12. 100 - The 3n + 1 problem 

13. 10696 - f91 

14. 10300 - Ecological Premium 

15. 10302 - Summation of Polynomials 

16. 299 - Train Swapping 

17. 10286 - Trouble with a Pentagon 

18. 11636 - Hello World! 

19. 113 - Power of Cryptography 

20. 11854 - Egypt

21. 11805 - Bafana Bafana 

22. 10242 - Fourth Point !! 

23. 11547 - Automatic Answer

24. 11417 - GCD 

25. 11461 - Square Numbers

26. 591 - Box of Bricks 

28. 10035 - Primary Arithmetic 

29. 10018 - Reverse and Add

30. 10346 - Peter's Smokes 

31. 579 - ClockHands 

32. 10970 - Big Chocolate 

33. 488 - Triangle Wave 

34. 10812 - Beat the Spread! 

35. 11764 - Jumping Mario 

36. 10070 - Leap Year or Not Leap Year and... 

37. 11530 - SMS Typing 

38. 10082 - WERTYU

39.  1225 -  digit counting

40. 12578 -10:6:2 

41. 12531 - Hours & minutes 

42. 11936 -Lazy Lumberzack 

43. 11057- Exact sum 

44. 12136-Shedule of marrg  

45. 12468- Zapping  

46. 12543 - Longest Word  

47. 12577 - Hajj-e-Akbar
fdgdfg

Prob No   Problem Name   Diff   Algorithm
272   TEX Quotes   0.5   Ad Hoc
458   The Decoder   0.5   Ad Hoc
10071   Back to High School Physics   0.5   Math (Physics)
10300   Ecological Premium   0.5   Ad Hoc
10302   Summation of Polynomials   0.5   Math
2362   Financial Management   0.5   Ad Hoc
3077   No Brainer   0.5   Ad Hoc, bonus question
299   Train Swapping   1   Sorting
10023   Square root   1   Ad Hoc
10696   f91   1   Ad Hoc
10783   Odd Sum   1   Math
3055   Speed Limit   1   Ad Hoc
11547   Automatic Answer   1   Ad Hoc, Math
11577   Letter Frequency   1   Ad Hoc
11172   Relational Operator   1   Ad Hoc
11044   Searching for Nessy   1   Math
146   ID Codes   1.5   Ad Hoc
499   What's The Frequency, Kenneth?   1.5   Ad Hoc
541   Error Correction   1.5   Ad Hoc
591   Box of Bricks   1.5   Ad Hoc
10286   Trouble with a Pentagon   1.5   Math (Trigonometry)
10327   Flip Sort   1.5   Sorting (Bubble Sort)
10370   Above Average   1.5   Math
10656   Maximum Sum (II)   1.5   Ad Hoc
11496   Musical Loop   1.5   Ad Hoc, Array Processing
11498   Division of Nlogonia   1.5   Ad Hoc
11192   Group Reverse   1.5   String Processing
113   Power of Cryptography   2   Math
445   Marvelous Mazes   2   Ad Hoc
484   The Department of Redundancy Department   2   Ad Hoc, use BST
488   Triangle Wave   2   Ad Hoc
494   Kindergarten Counting Game   2   Ad Hoc
10008   What's Cryptanalysis?    2   Ad Hoc
10469   To Carry or not to Carry   2   Math
10784   Diagonal   2   Math
10916   Factstone Benchmark   2   Ad Hoc, Mathematics
2052   Number Steps   2   Ad Hoc
2731   Wacmian Numbers   2   Math (Base Number)
3003   Jelly   2   Ad Hoc
3055   Symmetric Order   2   Ad Hoc
11541   Decoding   2   String Processing
11461   Square Numbers   2   Ad Hoc, Math
11185   Ternary   2   Math
100   The 3n + 1 Problem   2.5   Ad Hoc
102   Ecological Bin Packing   2.5   Ad Hoc, Complete Search
256   Quirksome Squares   2.5   Math
382   Perfection   2.5   Math
10018   Reverse and Add   2.5   Math
10035   Primary Arithmetic   2.5   Math
10038   Jolly Jumpers   2.5   Ad Hoc
10062   Tell me the frequencies!   2.5   Ad Hoc
10077   The Stern-Brocot Number System   2.5   Binary Search
10223   How many nodes ?   2.5   Math
10297   Beavergnaw   2.5   Math
10346   Peter's Smoke   2.5   Math
10361   Automatic Poetry   2.5   String Processing
10420   List of Conquests   2.5   Ad Hoc
10420   List of Conquests   2.5   Ad Hoc
10432   Polygon Inside A Circle   2.5   Math (Geometry)
10499   The Land of Justice   2.5   Math
10703   Free spots   2.5   Ad Hoc
10812   Beat the Spread!   2.5   Math
10924   Prime Words   2.5   Math, Prime Numbers
2247   Prime Digital Root   2.5   Ad Hoc
3056   Flow Layout   2.5   Ad Hoc
11530   SMS Typing   2.5   String Processing
10055   Hashmat the Brave Warrior   3   Math


Problems are found: http://uva.onlinejudge.org/
Problem Number greater than 10000:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=2
Problem Number less than 10000:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=1

Sl.   Prob ID   Title   Diff
1   100   The 3n + 1 problem   1
2   236   VTAS - Vessel Traffic Advisory Service   1
3   863   Process Scheduling   1
4   896   Board Game   1
5   10781   Global Positioning System   1
6   10845   The crusades   1
7   11263   Nested Rectangles   1
8   961   Ambiguous or Incomp Inductive Def   2
9   10059   The Hazard of CSE Department!   2
10   10757   Interpreting SQL   2
11   10966   3KP-BASH Project   2
12   10071   Back to High School Physics   3
13   10055   Hashmat the Brave Warrior   3
14   272   TEX Quotes   3
15   10971   Building Construction   3
16   11213   Flipull   3
17   11248   Frequency Hopping   3
18   458   The Decoder   4
19   136   Ugly Numbers   4
20   10038   Jolly Jumpers   4
21   10035   Primary Arithmetic   4
22   10018   Reverse and Add   4
23   108   Maximum Sum   4
24   693   Digital Racing Circuit   4
25   977   Old West Rumours   4
26   10657   Prince Frog II   4
27   10974   The Ridiculous Game   4
28   11211   Digital Logic   4
29   113   Power of Cryptography   5
30   494   Kindergarten Counting Game   5
31   299   Train Swapping   5
32   10082   WERTYU   5
33   101   The Blocks Problem   5
34   591   Box of Bricks   5
35   10008   What's Cryptanalysis?   5
36   10300   Ecological Premium   5
37   219   Department of Redundancy Department   5
38   951   The Pieces of the Puzzle   5
39   10630   Millennium Ceremony   5
40   11143   Subtitles   5
41   575   Skew Binary   6
42   369   Combinations   6
43   151   Power Crisis   6
44   382   Perfection   6
45   10370   Above Average   6
46   160   Factors and Factorials   6
47   10189   Minesweeper   6
48   579   ClockHands   6
49   264   Count on Cantor   6
50   424   Integer Inquiry   6
51   499   What's The Frequency, Kenneth?   6
52   10110   Light, More Light   6
53   541   Error Correction   6
54   10840   Multi-stage Compressor   6
55   11145   AvreniM   6
56   11154   An Octal World   6
57   11199   Equations in Disguise   6
58   543   Goldbach's Conjecture   7
59   10004   Bicoloring   7
60   10107   What is the Median?   7
61   374   Big Mod   7
62   686   Goldbach's Conjecture (II)   7
63   105   The Skyline Problem   7
64   495   Fibonacci Freeze   7
65   483   Word Scramble   7
66   10041   Vito's Family   7
67   10019   Funny Encryption Method   7
68   256   Quirksome Squares   7
69   138   Street Numbers   7
70   10079   Pizza Cutting   7
71   530   Binomial Showdown   7
72   10696   f91   7
73   111   History Grading   7
74   894   Juggling Trams   7
75   964   Custom Language   7
76   973   The Guessing Game   7
77   10778   Mathemagicland   7
78   10340   All in All   8
79   10783   Odd Sum   8
80   476   Points in Figures: Rectangles   8
81   344   Roman Digititis   8
82   673   Parentheses Balance   8
83   10346   Peter's Smoke   8
84   120   Stacks of Flapjacks   8
85   10469   To Carry or not to Carry   8
86   10127   Ones   8
87   492   Pig-Latin   8
88   438   The Circumference of the Circle   8
89   10327   Flip Sort   8
90   401   Palindromes   8
91   10050   Hartals   8
92   103   Stacking Boxes   8
93   324   Factorial Frequencies   8
94   146   ID Codes   8
95   463   Polynomial Factorization   8
96   917   Euro 2004   8
97   919   Cutting Polyominoes   8
98   958   A Homer's Holiday   8
99   984   Finding Haplotypes   8
100   10383   Queen vs Rook   8
101   10955   Playfair Cipher   8
fdgdf