Python: Puppy eyes of the "beauty snake"

  Python: Puppy eyes of the "beauty snake" 

  Two weeks ago, when the forum-goers javaeye inadvertently saw Robin's a message (I eyes of the python), kept the python on this thing called a good thing, then take the mentality of curiosity find relevant information on the next , Bukanbuzhidao, see Hayidiao: Dynamic explain operation, simple syntax, pretty indented scheduled…… java, cumbersome in many things in the python has to achieve a more concise!    If applied to the real work, certainly can greatly increase the efficiency of development!    "Xiangjianhenwan", the term used is not too much:) Now that you insist on in the country不流行, not concerned about things outside of the living environment, I have no idea, since I just like to replace the windows computing Cue-nor, quite convenient, do not believe you try, huh…… 

  Since there is interest, then of hymns!    Starting today, I will record my python whole trip pythoner hope will be able to carry out more exchanges.    MyQ: 99352246 email: chen.ruijie # gmail.com (# -> @) 

  Posted on 2005-10-05 13:23 Benben dog reading (353) Comments (0) edit their collections quoted Category: python beauty snake 

Java1.5 API documentation Chinese version released

  Java1.5 API documentation Chinese version released 

  Good News ah, although only part of looking forward to full version! 
  See: 
  Http://gceclub.sun.com.cn/chinese_java_docs.html 
  Forum: 
  Http://gceclub.sun.com.cn/NASApp/sme/jive/forum.jsp?forum=35 

  Posted on 2005-11-04 17:44 Benben dog reading (813) Comments (0) edit their collections quoted Category: java coffee bar 

In C + + Database Programming the ODBC API

  In the C + + programming a database ODBC API, dynamic load data source 
  1, by modifying the registry loading data sources: 
  User Data Source: HKEY_CURRENT_USER \ SOFTWARE \ ODBC \ ODBC.INI 
  Data source: HKEY_LOCAL_MACHINE \ SOFTWARE \ ODBC \ ODBC.INI 
  The different types of data sources, the registry changes are also different, but basically to be amended in two places, one of the keys ODBC.INI the establishment of a data source and a description of the same name-button, and the establishment of the sub-keys and the allocation of the relevant data sources; another in the \ ODBC.INI \ ODBC Data Sources of the establishment of a new button to tell the driver manager ODBC data source types. 
  2, loading through ODBC API: Windows System subdirectory under the dynamic link library Odbcinst.dll provides a dynamically increase, modify, and delete data sources SQLConfigDataSource function, as the VC the default document does not contain this function, and hence the use of Odbcinst.h documents will be required before the project included in the first document, in the frame work of setting attributes page Object Link / library module Odbc32.lib increase in the edit box, while ensuring that the system directory under the system32 document Odbccp32.dll. 
  3, document data source connectivity: In addition to ODBC manager, SQLDriverConnect can also add files to the data source. 
  Second, the ODBC API programming if a successful implementation of ODBC API function, or return SQL_SUCCESS SQL_SUCCESS_WITH_INFO, SQL_SUCCESS instructions can be obtained through the records of the operation of the detailed information, application instructions SQL_SUCCESS_WITH_INFO results of the implementation of a warning message, through access to detailed records of information.    If the function call fail, the return code is SQL_ERROR. 
  General, the preparation procedures ODBC mainly to a number of steps: 
  1, handles distribution environment: the variables SQLHENV a statement, calling function SQLAllocHandle. 
  Set environmental attributes: After completion of the distribution environment by setting up the environment SQLSetEnvAttr function attributes, a registered version of ODBC. 
  Handle the release of the environment: data access tasks completed, should call ahead SQLFreeHandle release distribution environment. 
  2, the allocation connection handle: a statement SQLHDBC types of variables, function calls SQLAllocHandle handle distribution. 
  Connection Properties settings: all connected SQLSetConnectAttr attributes can be set up through the function, function call can be accessed SQLGetConnectAttr connect these attributes of the current settings. 
  3, linking data sources: the different procedures and user interface can be used to connect different function 
  SQLConnect: the data source as long as the function name, user ID and password, can be connected to the. 
  SQLDriverConnect: The function used to establish a connection string to connect the source of data, it allows users to input the necessary information linking, the use of the system before the definition of data sources. 
  SQLBrowseConnect: The function to support an iterative manner to connect to data sources, the establishment of the final link, it is based on client / server architecture, local database does not support this function. 
  4, and preparations for the implementation of SQL statements 
  A distribution statement handle: Statements by calling SQLAllocHandle handle distribution function. 
  SQLSetStmrrAttr SQLGetStmrrAttr and function used to access and the provision of a statement handle the option, the use of End, calling SQLFreeHandle the release of the handle. 
  B, the implementation of SQL statements 
  SQLExecDirect: The function of the implementation of direct SQL statements, only the implementation of a SQL statement, the implementation of this function is the fastest way. 
  SQLPrepare and SQLExecute: the need for implementation of the SQL statement many times, could be ready to call SQLPrepare the implementation of SQL statements, with the implementation of SQLExecute prepared statement. 
  C, the use of parameters: parameters can be used to implement a SQL statement many times, different results. 
  SQLBindParameter responsible for function parameters defined variables, a section of the SQL statement in a parameter identifier ("?") bundled together and realize value of the transmission parameters. 
  5, Get Set Records 
  A, bundled out: First, we must focus on the distribution and record variables corresponding to the field, and then through the function SQLBindCol record field will be bundled together with the process variables, the long record fields, you can call functions directly receive data SQLGetData . 
  Binding fields according to their own needs can be all bonding, which can be bundled in a few fields. 
  SQLBindCol by calling function variables will address given to NULL value can be the end of a record field of bonding, SQLFreeStmt by calling function, which will be set SQL_UNBIND option, or directly handle the release will put an end to all tied record field set. 
  B, SQLFetch: This function is used to set the record to become the next trip, and all of the data fields have tied up the data copied to the corresponding buffer. 
  C, the cursor: application access to data through the cursor (Cursor) to achieve, in the ODBC, there are three main types of cursor: one-way cursor to scroll the cursor and block cursor. 
  Some applications do not support rolling the cursor and can block cursor, ODBC SDK provides a cursor library (ODBCCR32.DLL), the application can be set up through the link attributes (SQL_STTR_ODBC_CURSOR) activate the cursor. 
  6, records add, delete, and update: data source data can be updated in three different ways: through the use of SQLExecDirect function of the corresponding SQL statements; SQLSetPos function calls to achieve record set definition updates; call SQLBulkOperations function data updates. 
  The first approach applies to any ODBC data source, the latter two methods do not support the data source can be identified called SQLGetInfo data sources. 
  SQLBulkOperations: The function based on the current operating Collection, call before it can call SQLFetch or SQLFetchScroll access. 
  Function calls, the location of the cursor block into undefined status, therefore, should first call functions SQLFetchScroll set the cursor position. 
  7, error handling: Each ODBC API function can produce a series of operational information reflected in the diagnosis records can be used to access SQLGetDiagField function in the diagnosis of specific domain records, and can be used SQLGetDiagRec access to records of some of the common domain. 
  8, transaction processing: Panel submitted in two ways: the automatic and manual mode to mode.    Application procedures can be set by calling the function SQLSetConnectAttr attribute SQL_ATTR_AUTOCOMMIT connect automatically to the connection mode is the default attribute settings, for all the ODBC driver can adapt to this model, all statements are as a separate deal with the affairs of the . 
  Manual mode submitted to a group of SQL statements into a affairs, procedures must be explicitly call functions SQLEenTran termination of a transaction.    If the use of multiple-activated services, we must create multiple connections, each one contains a link affairs. 
  9, disconnect the data link and the release handle the environment: complete database operations, the function can be called SQLDisconnect closed with database connectivity.    Posted on 2005-04-04 09:55 HuYi's Blog reading (263) Comments (0) edit their collections quoted Category: C / C + + / VC 

Kunming weather turns cold

  Kunming weather turns cold 

  Haoling the past few days, especially today, and heavy rain Yunsi.    Kunming found that the traffic is bad, it rained on a traffic jam this morning on the late…… disgusting! 
  If not overtime weekend, with MM to buy cotton, it has too cold. 

  Posted on 2005-10-24 15:28 Benben dog reading (500) Comments (2) edit their collections quoted Categories: Five bottles 

Job is reposted: make your website greatly enhance the speed

  Job is reposted: make your website greatly enhance the speed 

  Many of my friends have to do with Virtual Console website page document will be stored in the virtual space, but the contents of more than one page, open the site was particularly slow speed, if you encounter such a situation, instead of looking for better space, By optimizing code page as to achieve a satisfactory pace.    The author summarizes some practical means to produce Home, the following method can make your website speed has been greatly increased. 

  First, remember that help slimming pages 

  Our website is actually virtual console web content downloaded to the local hard disk, and then the browser explained Show.    Download page shows that the speed of the speed of a large proportion, therefore, the website itself of the smaller space, it will be here faster speed.    This requires a website to do all the time to follow simple principles, such as: Do not use too much Flash animation, photographs, the product of eight test delete arc â’“ Dou Biao administer and take advantage of cheap capsule  vessels Sunburn Ji Hui's visit is the mother of all types of batteries? BR> 
  Second, if there was no need to make use of static HTML pages 

  As we all know, ASP, PHP, JSP, and other procedures to achieve a dynamic interactive information website, up and running is really very convenient, as their interactive data, and makes it easy to access, changes in the database content, the website's "Dynamic", such as: Forum, message boards and so on.    However, such procedures must first be dealt with the implementation of the server, generating HTML pages, and then "send" to the client browser, which had to spend a certain server resources.    If the virtual console on the excessive use of such procedures, the website shows that the speed will definitely slow, there is no need to make full use of static HTML pages. 

  Third, the whole page content will not pitch in a Table 

  This is a web design problem, many head alignment in the pursuit of reunification pages, the whole page content into a Table (Forms), and then from cell to divide all td "block" the layout This site shows that speed is definitely slower.    Table to wait inside because all the contents are displayed after the completion of loading, and if certain elements can not be accessed, it will delay the entire page speed access.    The correct way is: will be divided into several content with the same pattern in the Table to, and not all of a pitch in the Table. 

  4, ASP, ASPX, PHP and other documents to visit.    Js cited 

  This ASP, ASPX, PHP, and other procedures should pay attention to the design, if you do static HTML pages into dynamic data, and these data are from dynamic ASP, PHP, and other procedures to provide it, will use the following statements cited: <script src = "http://image.ccidnet.com/ad_files/network_index.asp?orders=1"> </ script> 

  So, every time a person visits your site, server, and must deal with the implementation of a network_index.asp documents from the corresponding data from the database and then output to the website, if there are tens of thousands of individuals at the same time visit to the implementation of tens of thousands of times, One can imagine the consequences.    These procedures will be proposed in the dynamically generated data to a document network_index.js to, and then through the Home 
  <Script src = "    Http://www.179job.com/ad_files/home_daohang/network_index.js "> </ script> 

  Such code to invoke the network_index.js document.    Thus, the task of data to the client browser do not waste server resources that natural speed quickly; the time spent by the former the latter is the almost several times! 
  5, use nested another page iframe 

  If you want to insert some on the web site advertising code, not want these advertisements affect the speed of Web site, then the most appropriate use of the iframe.    Method: these advertisements code will be put to a separate page, then Home with the following code can be embedded in the page, so it would not because of the delay in advertising pages and drag the entire home page, code as follows: 

  <Iframe frameborder = 0 
  Leftmargin = 0 
  Marginheight = 0 
  Marginwidth = 0 
  Scrolling = no src = "http://www.179job.com/pub/123.html" 
  Topmargin = 0 width = 700 height = 440> 
  </ Iframe> 

  Http://www.179job.com/pub/123.html which is cited documents path. 

  Posted on 2005-03-29 10:07 HuYi's Blog reading (153) Comments (0) edit their collections quoted Category: Web 

Some AJAX, entry

  Some AJAX, entry 

  See: 
  Http://www.cn-java.com/target/news.php?news_id=3317 
  Http://www.cn-java.com/target/news.php?news_id=3313 
  Http://www.cn-java.com/target/news.php?news_id=3326 

  Posted on 2005-10-28 10:10 Benben dog reading (377) Comments (0) edit their collections quoted Categories: AJAX new era 

Started learning version control

  Started learning version control 

  Version Control found this thing really quite important that these past few days by the project source code synchronization is the first major disruption in the…… 

  Posted on 2005-10-12 15:05 Benben dog reading (238) Comments (0) edit their collections quoted Category: I work Thin 

Job is reposted: pay level survey of the cities (Beijing 5000 / month as a reference)

  Job is reposted: pay level survey of the cities (Beijing 5000 / month as a reference) 

  Nowadays, many people are looking for a city can be as a reference to measure a person's monthly salary in the cities where the standard of living! 

  For example, in Beijing with a monthly salary of 5000.00 yuan (net of tax) of the RMB, the standard of living can be achieved as a reference point, then reach the same standard of living in other cities need to maintain the number of monthly salary is below point out (which including price levels, cost of living, transportation costs, urban modernization, and other factors): 

  Shanghai: 5350.00 yuan Guangzhou: 4750.00 yuan Shenzhen: 5280.00 yuan 

  Hangzhou: 4980.00 yuan Nanjing: 3780.00 yuan Wuxi: 3200.00 yuan 

  Suzhou: 4300.00 yuan Jinan: 3120.00 yuan Taiyuan: 1980.00 yuan 

  Yinchuan: 1100.00 yuan Kunming: 2800.00 yuan Guizhou: 1600.00 yuan 

  Nanchang: 1200.00 yuan Fuzhou: 3380.00 yuan Xiamen: 4100.00 yuan 

  Qingdao: 4000.00 yuan Tianjin: 3150.00 yuan Chengdu: 1900.00 yuan 

  Chongqing: 2250.00 yuan Changsha: 2480.00 yuan Wuhan: 2680.00 yuan 

  Maryland: 1500.00 yuan Zhengzhou: 2880.00 yuan Xining: 1000.00 yuan 

  Qinhuangdao: 2550.00 yuan Shijiazhuang: 2300.00 yuan Harbin: 1700.00 yuan 

  Changchun: 1500.00 yuan Shenyang: 2100.00 yuan Hefei: 1680.00 yuan 

  Changzhou: 3380.00 yuan Wenzhou: 5020.00 yuan Dalian: 3000.00 yuan 

  Hohhot: 1700.00 yuan Urumqi: 2100.00 yuan Lhasa: 900.00 yuan 

  Xi'an: 2080.00 yuan Nanning: 1300.00 yuan Haikou: 2600.00 yuan 

  Sanya: 2360.00 yuan Macao: 8900.00 yuan Hong Kong: 18500.00 yuan 

  Taipei: 11500.00 yuan 

  — Excerpt from "World manager" 

  Posted on 2006-03-02 12:00 Benben dog reading (1144) Comments (0) edit their collections quoted Categories: Five bottles 

Moving

  Moving 

  Google like a one-stop service, which is not registered and its bloger services, on the other side after the write log bar, new home: 
  Http://scriptfans.blogspot.com/ 

  Posted on 2006-12-28 13:22 Benben dog reading (56) Comments (1) edit their collections quoted Categories: Five bottles 

View from the directory specified in the designated file suffix string

  View from the directory specified in the designated file suffix string find dirname-type f-exec egrep "from [] (0,) portfolio .*?" () \; Posted on 2005-04-14 17:51 HuYi's Blog reading (102) Comments (0) edit their collections quoted Category: Linux & UNIX 

keep looking »