Java simple thread example

The standard way to launch a thread is through extending java.lang.Thread class. In this example we use java.lang.Thread to wrap member function of the main class.

First lets define a simple class:

Visual Studio Version

There are three numbers may cause confusion: Product name, Version name, Compiler version. Here is a handy table

 
 
Product Name                                 Version              Ship Date           Compiler
----------------------------------------------------------------------------------------------
Visual Studio .NET                            7.0.??               02/2002            
Visual Studio .NET 2002 Service Pack 1        7.0.??
Visual Studio 2003                            7.1.??               04/2003
Visual Studio 2003 Service Pack 1             7.1.6030             09/13/2006
Visual Studio 2005                            8.0.5072.42                             14.00.50727.42
Visual Studio 2005 Service Pack 1                                  12/14/2006
Visual Studio 2008                            9.0.21022.8          11/19/2007 
Visual Studio 2008 SP1                        9.0.30729.1
Visual Studio 2010                            10.0.30319.1         04/12/2010         16.0.30319.01
Visual Studio 2010 SP1                        10.0.40219.1         03/03/2011
 
 

Python from import syntax

A Python module , is just a python file. Thus, actually every py file you create with your code editor is a module. The only difference is that there maybe no one import your file.

Some special modules don't have their py file, like sys which is built in the Python core. Others implemented in other language like C for performance's sake.

Some special modules don't have their py file, like sys which is built in the Python core. Others implemented in other language like C for performance's .

Windows winsxs myth

Start from Windows Vista, the WinSXS folder becomes the core component store position. Before that, the familiar System32 paly an important role in Windows OS, for example, Windows XP.

In later version of Windows, all core components are stored in WinSXS, and the old file becomes hard link point to WinSXS.

Python load the C runtime library incorrectly

I encounter this problem when import simplejson. After a little search, I found that the problem is in the speedup extension, which its a binary module and has a manifest file but the version can not match the version under winsxs directory.

The python 2.7 need Visual Studio 9.0 to compile the simplejson speedup extension, if you don't have VC9.0, better just use the pure python version even you can compile it with another version of Visual C++.

The python 2.7 need Visual Studio 9.0 to compile the simplejson speedup extension, if you don't .

Python and Memcache Example

When I try to write some code in Python to access memcache service, I create a text file 'memcache.py'. This causes problems.

Only occurred in python script files, no problem with python shell. One of the reason may be the script file name is 'memcache.py'. Python will first try to load the module in the current directory,with that name, its importing itself. So the python script file name should be different from any module that imported in the script file.

Only occurred in python script files, no problem with python shell. One of the reason may be the script file name is 'memcache.py'. Python will first try to load the module in the current directory,with .

Java String Pool

Hi, Please confirm.. I face this question a lot in my interviews.

How many object of string objects are created.

Crawl Google search results and open link in Chrome window with Python script

This script will record the search keywords and visited url into MySQL database .These data may be useful, its of interest to look back what you have been searched in Google.

The script also demonstrate how to access MySQL Server and crawl web pages with python.

PHP shell script example: How to open file effectively

How people usually open a file? First they have to locate it then double click it to launch the associated program or type file name in the terminal as parameter to the command.

What if the file you are handling reside in a very deep and complex directory tree.The file name can be very long. For example, the source code tree of large project. Below is part of jdk source code tree:

What if the file you are handling reside in a very deep and complex directory tree.The file name can be very long. For example, the source .

Python encode decode guide

For many Python beginners , the encode decode and unicode stuff is always very annoying. This guide aims to make things clear.

If you know a little about Java, you should know that internally JVM represent all strings as unicode, any raw data like text file on disk or data comes from network called byte stream. Python is similar. The difference is bytestring and unicode both are string in Python and in Java only unicode can be String.

If you know a little about Java, you should know that internally JVM represent all strings as unicode, any raw data like text file on disk or data comes from network called byte stream. Python is similar. The difference .

Previous Page 1 ... 62 63 64 ... 66 Next Page