Monday, February 20, 2012
Monday, January 30, 2012
Java Web App in Tomcat Dropping Sessions
Want to integrate charts into your webapp? Check out XChart.
Here's another nano-blog that will hopefully help someone solve an problem that I was dealing with today:
Problem
I upgraded Tomcat from 7.0.22 to 7.0.25 and my web application starting closing or dropping the session that was being created during a user login operation. I also noticed in my log files, which tracks sessions being created and closed that tons of sessions were being created at once.
Solution
I'm not sure why this helps or why the problem suddenly appeared in a new release of Tomcat, but what I ended up doing to solve the problem was to add <%@ page session="false" %> to all my JSP files. Apparently for each JSP file, a session is otherwise created. In my web app I have several JSPs nested inside of other JSPs, which was probably causing all the sessions to be created. Why that was never an issue before, I'm not quite sure.
I hope that helps someone! Read more...
Labels:
Java
Tuesday, January 24, 2012
Sunday, January 22, 2012
My First Experience Buying Something with Bitcoin
I thought I would share a positive experience I recently had buying something with Bitcoin on Bitmit.net as a success story not only for Bitcoin but also as a test of the trustwothiness of Bitmit and their Escrow service. I'm not affiliated with them at all...
First the Bad News
I was the highest bidder on this Macbook @ EUR 500.05. Then some strange stuff happened as copied directly from my email to bitmit:Today, after I placed my bid in EUR, I was shown that my winning bid was 500.05 BTC or 2665.67 EUR (Picture 1)! Yikes! But then I saw my bid in the bidding history below to be 500.05 EUR, which is makes sense.
Then, I refreshed the page, and saw that my bid was gone from the bidding history, that berlina won the auction at 481.05 EUR, and that I was out bid, which makes no sense (Picture 6).
Then maybe a half hour later, I was again the high bidder, but at a price of 552.27 EUR. The page also still said I was outbid.
I'm concerned about all the strange things I've seen: the 500.05/2665.67 BTC/EUR winning bid, then berlina having the winning bid after the fact, and then finally having the winning bid at 552.27 EUR (Picture 12).
Now the Good News
The response I received was professional and fair. They said they noticed the problems as well and were making some manual adjustments to get everything in order. They affirmed I was indeed the highest bidder and they manually set the BTC price as EUR 500.05 divided by the average price of the previous 24 hours on mtgox, which came out to BTC 92.09. They also said I could abort the whole thing if I wanted given the situation. I believe they fixed the bugs.Jumping forward, I ended up going for it and am now typing this on my new MacBook! Although the website was very buggy, the entire system worked, and I was happy with the escrow service they provide which you can watch for updates in your account:
✓ Delivery details submitted
✓ Payment received (92.09 Bitcoin received)
✓ Item shipped (2012-01-18, 07:01)
✓ Item received (2012-01-18, 14:10)
✓ Money released
I posted this in hopes that other people will be more confident in buying and selling goods with Bitcoin and to record my experience with Bitmit for the benefit of others.
Now I'm looking for a MagSafe power supply and a micro-DVI to DVI adapter for my MacBook. Anyone have one they want to sell to me for Bitcoin?
Here is another Bitcoin auction site that I have no experience with yet at bitbid.net.
Read more...
Labels:
Bitcoin
Tuesday, January 10, 2012
Wednesday, January 4, 2012
Check MD5 Hash on Mac OS X
The following command can be used to calculate the md5sum of a file on a Mac running OSX, functioning the same as the md5sum command in Linux...
$ md5 -r /path/to/file/filename.ext
Read more...
Labels:
Mac
Sunday, December 25, 2011
Serialize an Object to a JSON String in Java Using Gson
To serialize a specified object or bean into its equivalent Json representation in Java we can use Google's GSON library. First create a serializable object and set its fields to some values. Next new up a com.google.gson.Gson object. Finally call the Gson objects's toJson() method passing it your serializable object.
import com.google.gson.Gson;
// The following example code demonstrates how to serialize a Bean
// object to a JSON String using the GSON library from Google.
public class Bean2JsonUsingGson {
public static void main(String[] args) {
SampleBean sampleBean = new SampleBean(3.14, "xyz", 42);
Gson gson = new Gson();
String json = gson.toJson(sampleBean);
System.out.println(json);
}
static class SampleBean {
private double value1;
private String value2;
private int value3;
// Constructor
SampleBean(double value1, String value2, int value3) {
this.value1 = value1;
this.value2 = value2;
this.value3 = value3;
}
}
}
Here is the output of the example program:{"value1":3.14,"value2":"xyz","value3":42}
Piece of cake!!!
Read more...
Labels:
Java
Monday, December 12, 2011
ATP Synthase is a Rotating Motor That Creates ATP in our Cells

Photo Credit and a great description of how ATP Synthase works: https://plus.google.com/u/0/114601143134471609087/posts Read more...
Labels:
random
Sunday, December 11, 2011
Thursday, December 8, 2011
Subscribe to:
Posts (Atom)








