Archive for the 'Tech Tips' Category

Problem with Google Search – redirect problem

This solution maybe not the most correct way, but it worked out for me. So you can stop here and solve your problem.

While I was searching a software today, I got a virus from a malicious site by downloading a software and installing it. I realized I got a virus instead of the software I wanted, when I was always redirected to some other pages after clicking searching result-list from Google. I used firefox and then tried IE. It had the same problem.

Continue »

Restore MySQL database after accident uninstallation of MySQL

I guess I really made a huge mistake today to uninstall wamp. This not only uninstalled PHP and Apache, but also uninstalled MySQL Database. All data are suddenly gone. Only several directories left. One of them is “data”. This dir consists of some files with extensions of .frm, MYD, MYI.

Continue »

Some tips to detect errors in your project

If you are not very familiar with the business logic of the project, you will have a not of trouble to figure out the problems.

Here are some tips:

1. Try to understand how to use the system. For a system with many different work flows, this work probably takes much time.

Continue »

How to write a crawler program?

Actually writing a crawler program is not that bad, you can use the existing tools, but write your own one probably enable you do every function you want. While I can not provide the code, I searched and find an algorithm for this. It’s an interesting program.

You’ll be reinventing the wheel, to be sure. But here’s the basics:

* A list of unvisited URLs – seed this with one or more starting pages
* A list of visited URLs – so you don’t go around in circles
* A set of rules for URLs you’re not interesting – so you don’t index the whole Internet

Put these stored in a database, so you can stop and start the crawler without losing state.

Algorithm is

Continue »

Get all web pages from a website

I need a program to get all the web pages under a website. The website is Chinese, I want to get all those English words out. Then I can extract all the information I need.

Under a linux system here is a solution:

Use eg wget -r http://site.to.copy.com to recursively retrieve all the web pages to your local machine (hope it’s not too big…), then you can search or do whatever with the files afterward.

Continue »

Create a folder using a name that begins with a dot in Windows

While I was trying to install Globus in my Windows machine, I was required to create a folder with the name “.globus”. When using the Windows Explorer in Windows XP, I get an error message saying “You have to enter a filename”. The only solution I have come up with, is to open a command prompt (Start, Run, “CMD”, OK) and enter “mkdir .globus”.

Continue »

How to open task manager when Ctrl Alt Del doesn’t work?

This is useful, when you operate on anther computer using remote desktop. Use Ctrl+Alt+Del you always open task manager of your local box. At this time, you need to run a command.

Go to Start -> Run, type taskmgr, press OK

How to enable remote access to MySQL server on Windows

On Linux, we can easily enable remote access to MySQL server, but on Windows, the approach is different.
Here’s the steps to do that:

Continue »