Monthly Archives: October 2015

Reading Geometry (spatial data) from MySql

first add this dependency (in addition to mysql-connector-java) <dependency> <groupId>com.vividsolutions</groupId> <artifactId>jts</artifactId> <version>1.13</version> </dependency> and then use following code from http://www.dev-garden.org/2011/11/27/loading-mysql-spatial-data-with-jdbc-and-jts-wkbreader/: //MySQL geometries are returned in JDBC as binary streams. The //stream will be null if the record has no geometry. try(InputStream … Continue reading

Posted in Software | Leave a comment

Reading MySql db from Java

first add this dependency to pom.xml <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.6</version> </dependency> and then use JDBC like below: import java.sql.*; public class JdbcReader implements Closeable{ Connection conn; public JdbcReader() throws ClassNotFoundException, SQLException, IllegalAccessException, InstantiationException { // The newInstance() call is a … Continue reading

Posted in Software | Leave a comment

Buying Vanguard funds in Fidelity

https://assetbuilder.com/knowledge-center/articles/three-ways-to-have-vanguard-at-fidelity https://www.bogleheads.org/wiki/Fidelity Q. Does Fidelity have a fund that compares to the Vanguard Balanced Index (ticker: VBINX)? I like the performance and the low expense fees the Vanguard fund has. I also like the ratio of 60 percent stocks, 40 … Continue reading

Posted in Money | Leave a comment

MySql Setup

1) Download: http://dev.mysql.com/downloads/file/?id=459872 2) If you install with default location, this would get installed in: /usr/local/mysql After install, you will get a password, note that. 3) sudo touch /usr/local/mysql/data/[hostname].local.pid (type hostname on bash to get your hostname) 4) Start MySql: sudo … Continue reading

Posted in Software | Leave a comment

Vanguard: an overrated company

I have been a Vanguard customer for almost 10 years. I opened an account with them after getting glowing recommendations from a trusted friend many years ago. In the past 10 years there have been several instances when I needed … Continue reading

Posted in Money | Leave a comment

Bash Tips

Normally by itself the terminal app displays bash in the tab title and its not very useful if you have a large number of tabs open and want to know e.g., what is the pwd in each of the tabs. … Continue reading

Posted in Software | Leave a comment