Every thing that I need to share with you, you can find it here. It can be gossips, news, technical details, anything. Lets share things...
Tuesday, September 22, 2015
Wednesday, September 16, 2015
My first day to work at XYZ
Vidula Hasaranga
http://vidula-sinhala.blogspot.com
http://vidulahasaranga.blogspot.com
Monday, September 07, 2015
Resolving ORA-01882: timezone region not found
Recently I have changed my oracle jar version in Tomcat lib to ojdbc6-11.2.0.4.jar and started to see following error while starting tomcat.
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:382)
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:675)
at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:448)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:383)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:776)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:432)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
Monday, June 11, 2012
How to reverse a String using Stack / Queue
How to reverse using a Stack.
This is straight forward if you know how a stack is working. Stack is working as a First In Last Out (FILO) data structure. So what you have to do is put letters from beginning to end in to the stack and pop one by one and write in popping order. Lets see an example for word HELP.
Pushing to the stack:
HELP
+---+---+---+---+---+
| | | | | |
+---+---+---+---+---+
ELP
+---+---+---+---+---+
| H | | | | |
+---+---+---+---+---+
LP
+---+---+---+---+---+
| E | H | | | |
+---+---+---+---+---+
P
+---+---+---+---+---+
| L | E | H | | |
+---+---+---+---+---+
+---+---+---+---+---+
| P | L | E | H | |
+---+---+---+---+---+
Popping from stack:
P
+---+---+---+---+---+
| L | E | H | | |
+---+---+---+---+---+
PL
+---+---+---+---+---+
| E | H | | | |
+---+---+---+---+---+
PLE
+---+---+---+---+---+
| H | | | | |
+---+---+---+---+---+
PLEH
+---+---+---+---+---+
| | | | | |
+---+---+---+---+---+
Here we go: HELP --> PLEH
How to reverse using a Queue.
This is not that straight forward as we did using a Stack. But if you know how to do it using a stack, and how to implement a stack using queues you are done with this.
Implementation of a stack can be done using 2 queues. Lets see the above example using 2 queues.
HELP
+---+---+---+---+---+
| | | | | |
+---+---+---+---+---+
+---+---+---+---+---+ +---+---+---+---+---+
| | | | | | | | | | | |
+---+---+---+---+---+ +---+---+---+---+---+
ELP
+---+---+---+---+---+
| H | | | | |
+---+---+---+---+---+
Put H to first queue.
+---+---+---+---+---+ +---+---+---+---+---+
| H | | | | | | | | | | |
+---+---+---+---+---+ +---+---+---+---+---+
LP
+---+---+---+---+---+
| E | H | | | |
+---+---+---+---+---+
Dequeue values from first queue and put them to second queue. Put E to the same.
+---+---+---+---+---+ +---+---+---+---+---+
| | | | | | | E | H | | | |
+---+---+---+---+---+ +---+---+---+---+---+
P
+---+---+---+---+---+
| L | E | H | | |
+---+---+---+---+---+
Dequeue values from second queue and put them to first. Put L to the same.
+---+---+---+---+---+ +---+---+---+---+---+
| L | E | H | | | | | | | | |
+---+---+---+---+---+ +---+---+---+---+---+
+---+---+---+---+---+
| P | L | E | H | |
+---+---+---+---+---+
+---+---+---+---+---+ +---+---+---+---+---+
| | | | | | | P | L | E | H | |
+---+---+---+---+---+ +---+---+---+---+---+
Same way you can dequeue by swapping the queues to implement pop method of the stack.
Vidula Hasaranga
http://vidula-sinhala.blogspot.com
http://vidulahasaranga.blogspot.com
Sunday, January 01, 2012
Happy New Year.....
/ /
/_/""/_/appy
/""\ /""/
/ /\ \/ /
/_/ \_/ew
\""\/""/
\ /
/ /
/_/ear
/"""""\
| |""| |
/ /
/ /
/ /
| """|012
""""""
Vidula Hasaranga
http://vidula-sinhala.blogspot.com
http://vidulahasaranga.blogspot.com
Tuesday, December 13, 2011
HOW LONG DOES IT TAKE TO DECOMPOSE
So think before you throw things away.....
Vidula Hasaranga
http://vidula-sinhala.blogspot.com
http://vidulahasaranga.blogspot.com
Monday, October 31, 2011
Monday, July 18, 2011
Accommodation at Trincomalee / Nilaveli
I was at Trincomalee last long weekend with my family members. Before that I done some R & D on places to stay at Trinco and here are the places I found with contact details and prices for some cases.
Welcombe Hotel - 026-2222373
FB - 11000
HB - 9200
Lotus Park Hotel - 026-2225327/8
FB - 11375
HB - 9975
Nilaveli garden Inn - 026-2232228
Green Park Beach Hotel - 026-2222369
FB - 7850
HB - 6600
RO - 4375
Medway Hotel - 0262227655
Sea View Hotel - Nilaveli - 026-4920016 / 026-4915224
RO - 3300 (Double room)
Family Room available for 8800 that can accommodate 8.
Hotel New Sea Lord - 026-2222396
FB - 4400
HB - 2200
New Silver Star Hotel - 026-2222348
Harbour View Guest House - 026-2222284
RO - 4500
Villa Guest house - 026-2222284
Palm Beach resort - 026-2221250
RO - 2500
Sarvodaya - 011-2647159
I stayed at Sea View Hotel in Nilaveli. Small place in front of the Nilaveli main beach. Bit expensive when compare with the facilities, but very good place to see the sun raise.
Normally rooms at Nilaveli are expensive than in Trincomalee. Its due to name and also as they close to the sea. You can get good A/C room for 2500 from Trico as I heard.
Vidula Hasaranga - à·€ිදුà¶½ හසරංà¶œ
http://vidula-sinhala.blogspot.com
http://vidulahasaranga.blogspot.com
Wednesday, February 02, 2011
Friday, December 31, 2010
Sunset at Hikkaduwa
Wednesday, December 29, 2010
Morning at Pasikuda
One of the best scenes you can see at Pasikuda in the early morning is returning fishermen after their night work. With the colorful background of raising sun, this become a scene from heaven.
Pasikuda is one of the best beaches Sri Lanka have in eastern coast. One of the places you have to visit at Sri Lanka if you are a sea lover. In this calm beach you can stay whole day with blessing sun shine and low sea waves.
Vidula Hasaranga
http://vidula-sinhala.blogspot.com
http://vidulahasaranga.blogspot.com
Wednesday, December 22, 2010
Bubbles
We always love to play with bubbles when we were small.
This picture was taken at Pasikuda, Sri Lanka while I am travelling in a motor boat. Motor of the boat produce huge force to pull the water backward and it make lot of water bubbles to remind me my child age. Not easy to capture this image as the boat is travelling very fast and shacking with the sea tides.
http://vidula-sinhala.blogspot.com
http://vidulahasaranga.blogspot.com
Saturday, December 11, 2010
Dawning at Pasikuda
Pasikuda is developing now after the 30 years of war. It is one of the best beaches you can find in eastern coast of Sri Lanka. It is a place you can see the dawning of the Sun in very beautiful manner. This photo was taken few months back when I was at Pasikuda with few of my office mates. This is really beautiful scene and we were blessed to be there at early morning.
If you can leave Colombo at around 10 pm you can be at Pasikuda at early morning to see this beautiful scene. Else you have to stay one of few guest houses at Pasikuda.
Vidula Hasaranga
http://vidula-sinhala.blogspot.com
http://vidulahasaranga.blogspot.com
Tuesday, December 07, 2010
How this can happen...???
Set of images I received recently and thought to share it with you all..... Most of the situations are unbelievable. This reminds me the story of goat who put his head in to a pot (Its Sinhala - Sri Lankan folk story).
Vidula Hasaranga
http://vidula-sinhala.blogspot.com
http://vidulahasaranga.blogspot.com

















































