Archive for February, 2009
Find Free mp3 on Google
This article teaches you how to search and find free mp3 on Google. Kind people leave music files in unprotected directories all of the time. Here’s how to get to them. Come get your free mp3s.
We all need music, free music. If you properly query Google, you can find open indexes of music files easily and instantly. Here are some hints to get you started. For instance, you want to get Franz Ferdinand’s new album Tonight in mp3 format, here is the way to ask Google:
Go to Google.com and search for: -inurl:htm -inurl:html intitle:”index of” mp3 “franz ferdinand tonight”
You will get a list of websites to download the album mp3s.
Hope this helps! :)
Download Any Song on MySpace No Hack Needed
There is a way to directly download any song on MySpace with no hack needed. The easiest way to download MySpace song is to go to http://www.downloadmyspacemusic.cn/, it lets you download any song from any MySpace page. With a click of a button you are able to download music straight onto your desktop, and guess what? It’s totally free!
Install Eclipse on Ubuntu
This article teaches you how to install Eclipse, the multi-language software development platform comprising an IDE and a plug-in system on Ubuntu.
1. If you haven’t installed Sun Java, install it by executing the command below in terminal:
sudo apt-get install sun-java6-jdk
2. To install Eclipse, use the command below in Ubutnu
sudo apt-get install eclipse
3. To make Sun’s Java the default Java
sudo update-java-alternatives -s java-6-sun
4. Edit the JVM configuration file
sudo -b gedit /etc/jvm
5. The command above will open up a file, add the line below to the top of the file opened, and then save and close the file
add the following to the top of the file
/usr/lib/jvm/java-6-sun
6. Eclipse by default won’t pick up JVM from java-common, so to solve the problem, we need to edit the java_home file in Eclipse,
sudo -b gedit /etc/eclipse/java_home
7. This will open up another file, insert the following line in as the first line:
/usr/lib/jvm/java-6-sun
Now it’s done!
C++ Parse Split Delimited String
Posted by admin in C Plus Plus on February 18, 2009
This article teaches you how to parse split delimited string in C++. This is one of the most handful function you can use for delimited string like CSV – comma separated value.
#include <string>
#include <vector>
#include <functional>
#include <iostream>
using namespace std;
void split(const string& s, char c,
vector<string>& v) {
string::size_type i = 0;
string::size_type j = s.find(c);
while (j != string::npos) {
v.push_back(s.substr(i, j-i));
i = ++j;
j = s.find(c, j);
if (j == string::npos)
v.push_back(s.substr(i, s.length( )));
}
}
int main( ) {
vector<string> v;
string s = "Account Name|Address 1|Address 2|City";
split(s, '|', v);
for (int i = 0; i < v.size( ); ++i) {
cout << v[i] << '\n';
}
}
Install C++ Boost on Ubuntu
Posted by admin in C Plus Plus, Linux on February 16, 2009
Boost is probably the most popular C++ library, to install C++ Boost on Ubuntu is easy.
Open your terminal and type the following command to install the packages:
sudo apt-get install libboost-date-time-dev libboost-date-time1.34.1 libboost-dev libboost-doc libboost-filesystem-dev libboost-filesystem1.34.1 libboost-graph-dev libboost-graph1.34.1 libboost-iostreams-dev libboost-iostreams1.34.1 libboost-program-options-dev libboost-program-options1.34.1 libboost-python-dev libboost-python1.34.1 libboost-regex-dev libboost-regex1.34.1 libboost-signals-dev libboost-signals1.34.1 libboost-test-dev libboost-test1.34.1 libboost-thread-dev libboost-thread1.34.1
Hope this helps!
Install Subversion on Ubuntu
This article teaches you how to install Subversion on Ubuntu.
Fire up your Ubuntu terminal, and execute the following command:
sudo apt-get install subversion
Hope this helps. ;)
Ubuntu svn checkout
This article teaches you how to do svn checkout on Ubuntu. First, make sure you have subversion installed on your machine, if not, read this article first. If you already have subversion installed, continue reading.
To make svn checkout on Ubuntu is same as any other Unix or Linux system. For instance, if I want to checkout Flash 3D library papervision3d hosted with Google Code at http://papervision3d.googlecode.com/svn/trunk/as2/, open your terminal, and type
svn checkout http://papervision3d.googlecode.com/svn/trunk/as2/
And you go to Places -> Home Folder, you should be able to see a as2 folder that contains the checkout files.
Ubuntu Mount External Hard Disk
This article teaches you how to mount external hard disk manually if auto detect failed on Ubuntu. Recently I have problem mounting external hard disk on Ubuntu. It used to be OK, but after a regular system update, my HDD can’t be automatically detected.
I open terminal and execute the following command:
sudo lsusb
The Hard Disk is detected and a window’s opened that showed the files, and I can again see the folder icon on my desktop.
Flash Dynamic textfield Height
Posted by admin in ActionScript on February 13, 2009
This article teaches you how to make dynamic textfield height auto resize, ajust the height to the length of the content.
If you want to make the textfield height exntend dynamically, you must set the autoSize property of the textfield instance to “left”, for example, if you have a dynamic textfield on stage called my_txt, the following line will make its height auto resize:
my_txt.autoSize = "left";
Hope this helps! :)
Flash onrollover onmouseover Change Cursor
Posted by admin in ActionScript on February 13, 2009
This article teaches you how to change or not to change to hand cursor when rollover or mouseover in Flash.
By default, it will change to hand automatically.
If you want to keep the arrow, you must set useHandCursor to false. For example, if you have a movieclip instance called my_mc on stage, use the following code in your actionscript layer:
my_mc.onRollOver = function() {
this.useHandCursor = false;
};
Hope this helps! :)










































