Use SQLite in Qt

Project file (.pro) Add the following line to your .pro file Header Source Execute a query

Continue Reading

How to Setup and Use Github in Ubuntu

If you are or want to be open source developer,you must try GitHub. It is a new hosted Git repository service that's being called a "social network" for programmers. It is basically a distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Setup SSH key Generate SSH Key If you have created your account at github and now you want to work with it from your terminal. Before you start installing Github, you should set up ssh keys: If your key does not have the default filename, you'll have to pass the path to ssh-add. And you will get following output: Add your SSH Key to GitHub Look up your SSH key in…

Continue Reading

Running Hadoop 1.1.2 on Ubuntu Linux (Single-Node Cluster)

In this tutorial I will describe the required steps for setting up a pseudo-distributed, single-node Hadoop cluster backed by the Hadoop Distributed File System, running on Ubuntu Linux. This tutorial has been tested with the following software versions: Ubuntu 13.04 Apache Hadoop 1.1.2 (Released on February 15th, 2013) Prerequisites Oracle Java 7 Hadoop requires a working Java 1.5+ (aka Java 5) installation. In this tutorial, I will describe the installation of Java 1.7.0 Update 21. You can get an Java Development Kit(JDK) on the oracle. Then decompress it to /usr/lib/jvm/jdk1.7.0_21 (You can decompress it to any other place) After installation, you should set environment variables as following: 1. Open ~/.bashrc 2. Add following statements: You can make a quick check whether Oracle’s JDK is…

Continue Reading

Install Google Pinyin in Ubuntu

I have been using Sun Pinyin for quite a long time, but once I used Google Pinyin, I found it great. So, let me tell you how to install Google Pinyin in ubuntu. First, you should add an source: Then, you should install Fcitx、Fcitx-googlepinyin: If you want to use "Cloud", you should install fcitx-module-cloudpinyin: Enjoy it!

Continue Reading

How to Configure Unity Workspace Layout in Ubuntu

Why would I need to change the layout? Every time I upgrade the desktop for a new Ubuntu version it defaults it to a 2×2 layout. I don’t have a monitor on top of another so why would I use vertical workspaces? It maybe has advantages for some else workflow. Not mine. I’m used to horizontal multiple screens. How can I define a new workspace layout? You can change several parameters with the Compiz Config Settings Manager. I found that some friends didn’t have it installed. So, just install it first. Call it pressing your keyboard Super key and typing compiz. When it appears click on it. CompizConfig Settings Manager window shows up. Now just select General / General Options /…

Continue Reading

Convert Excel Date into Timestamp

Excel stores dates internally as number of days since January 1, 1900. For example: "June 9th, 2011 10:30 AM" would be stored as "40703.4375". 40703 is the number of full days since 01/01/1900 and 0.4375 represents the time (10.5/24 = 0.4375). When you process dates read from an Excel spreadsheet (e.g. using PHPExcel) you often want to convert them into a UNIX timestamp i.e. a number of seconds elapsed since midnight of January 1, 1970 UTC. Here is a PHP code to do that: Although the code above is written in PHP the function should be very similar in any other language e.g. C# or java. If the provided date is earlier than 1/1/1970 then the minimal timestamp value will be returned. Alternative…

Continue Reading
Contact Us
  • SenseTime Research, Shenzhen Bay Eco-Technology Park
  • cshzxie [at] gmail [dot] com