ÍøÂç³ô³æÒ༴ÍøÂçÐű꣬ÊÇͨ¹ýijÖÖÊÖ¶ÎÒþʽ»ñÈ¡ÐÅÏ¢µÄµÄ·½·¨¡£
ÔÚbottle frameworkÖпÉÓÃÏÂÃæµÄ·½·¨ÊµÏÖ£º
Ê×ÏÈÔÚÄãÒªÓû§ä¯ÀÀÆ÷ÏÔʾµÄÒ³ÃætplÉÏǶÈëÒ»¸ö1*1ÏñËصÄͼƬ£¬»ò¸üС¡£
Õâ¸öͼƬµØÖ·Ö¸ÏòÄã·þÎñÆ÷ÉÏij¸öÌض¨Î»Öã¬Èçstatic/webtrack.png¡£
Óû§´ò¿ªÍøÒ³£¬¾Í»á·ÃÎÊÕâ¸öͼƬ£¨Í¨¹ýä¯ÀÀÆ÷Èçhttp://abc.abc.com/static/webtrack.png·½Ê½Ìá½»£©¡£ÔòÔڰ󶨺¯ÊýÀ
¿ÉÒÔͨ¹ýrequest.environ['REMOTE_ADDR']ºÍrequest.environ['REMOTE_HOST']À´
»ñµÃä¯ÀÀÓû§µÄIPµØÖ·ºÍÖ÷»úÃû¡££¨ÎÒÃÇ¿ÉÒÔͨ¹ýÕâ¸ö²»ÓÃÌá½»ÓлØÖ´µÄÓʼþÀ´²âÊÔÓʼþµØ
Ö·ÓзñÓÐЧ£¬Óû§´ò¿ªÓʼþ£©¡£ºôºô¡£ ......
OS¿âÌṩÁËʹÓø÷ÖÖ²Ù×÷ϵͳ¹¦ÄܵĽӿڡ£
os.name ·µ»Øµ±Ç°²Ù×÷ϵͳÃû£¬¶¨ÒåÁË'posix'£¬'nt'£¬'mac'£¬'os2'£¬'ce'£¬'java'£¨ÎÒʹÓÃwin7/python3.1,Êä³öµÄÊÇnt¡£posix²»ÖªµÀÊÇʲôϵͳ£¬macÓ¦¸ÃÊÇApple»ú°É£¬os2Ò²²»ÖªµÀÊÇʲô¶«¶«£¬ceÓ¦¸ÃÊÇwinCE°É£¬ÕâÑùµÄ»°£¬pythonÓ¦¸ÃÖ§³ÖÏòCEÒÆÖ²°¡£¬Å¼×Ô¼ºÊÔ¹ý£¬Ã»±àÒë³É¹¦£¬java¹À¼ÆÊÇSun¿ª·¢µÄÄǸösolari*ϵͳ£©
os.environ ·µ»ØÒ»¸ömapping object°üÀ¨µ±Ç°ÏµÍ³¼°Óû§µÄ»·¾³±äÁ¿£¬¸ñʽΪenviron({±äÁ¿Ãû: ±äÁ¿Öµ, ±äÁ¿Ãû: ±äÁ¿Öµ……})¡£Ê¹ÓÃos.environ[±äÁ¿Ãû]¿ÉÒÔÖ±½ÓµÃµ½ÏàÓ¦±äÁ¿Öµ£»Ò²¿ÉÒÔʹÓÃos.getenv(±äÁ¿Ãû)À´»ñµÃ±äÁ¿Öµ¡£ËµÃ÷£ºµ±import osºó£¬»·¾³±äÁ¿¼´±»Ó³É䣬Èç¹ûÔÚ´ËÆڼ䣬ÓÃÆäËü·½ÃæÐ޸Ļ·¾³£¨ÏµÍ³¼°Óû§£©£¬os.environÖµ²»»á¸Ä±ä£¬³ý·ÇÖ±½ÓÐÞ¸Äos.environµÄÖµ¡£»¹ÓÐÒ»¸öº¯Êýputenv(key, value).
os.getcwd() ·µ»Øµ±Ç°¹¤×÷Ŀ¼¡£ÀàËÆÓÚlinuxÖеÄpwdÃüÁî
os.chdir( path ) ¸Ä±äµ±Ç°¹¤×÷Ŀ¼ÖÁpath
os.fchdir( fd ) ²»ÖªµÀÓÃ;Ó÷¨¡££¨ÎÒµÄϵͳÖÐûÓÐÕâ¸öº¯Êý£©
os.ctermid() Return the filename corresponding to the controlling terminal of the process.
os.getegid() ·µ»Øµ±Ç°½ø³Ì(process)ËùÊ ......
1. ½øÖƵĿì½Ýת»»
"100".to_i(2) , ½«100×÷Ϊ¶þ½øÖÆÊä³öÊ®½øÖÆÊý£¬
½á¹û £º 4
"100".to_i(9), ¾Å½øÖÆ£¬
½á¹û£º 81
"100".to_i(16), Ê®Áù»úÖÆ£¬
½á¹û£º 256
±È½Ï˧£¬×Ö·û´®×ª»»ÔÚvc±à³ÌÀïÃæ±È½ÏÍ·ÌÛ¡£ ......
Access ¹æ¸ñ
Microsoft Access Êý¾Ý¿â¹æ¸ñ
Access Êý¾Ý¿â
ÊôÐÔ×î´óÖµ
Microsoft Access Êý¾Ý¿â (.mdb) Îļþ´óС
2G ×Ö½Ú¼õȥϵͳ¶ÔÏóËùÐèµÄ¿Õ¼ä¡£
Êý¾Ý¿âÖеĶÔÏó¸öÊý
32,768
Ä£¿é£¨°üÀ¨“ÄÚº¬Ä£¿é”ÊôÐÔΪ“ÊÇ”µÄ´°ÌåºÍ±¨±í£©
1,000
¶ÔÏóÃû³ÆÖеÄ×Ö·ûÊý
64
ÃÜÂëµÄ×Ö·û¸öÊý
14
Óû§Ãû»ò×éÃûµÄ×Ö·û¸öÊý
20
²¢·¢Óû§µÄ¸öÊý
255
±í
ÊôÐÔ×î´óÖµ
±íÃûµÄ×Ö·û¸öÊý
64
×Ö¶ÎÃûµÄ×Ö·û¸öÊý
64
±íÖÐ×ֶεĸöÊý
255
´ò¿ª±íµÄ¸öÊý
2048£»Êµ¼Ê¿É´ò¿ªµÄ±íµÄÊýÄ¿¿ÉÄÜ»áÉÙһЩ£¬ÒòΪ Microsoft Access »¹Òª´ò¿ªÒ»Ð©ÄÚ²¿µÄ±í¡£
±íµÄ´óС
2G ×Ö½Ú¼õȥϵͳ¶ÔÏóËùÐèµÄ¿Õ¼ä
“Îı¾”×ֶεÄ×Ö·û¸öÊý
255
“±¸×¢”×ֶεÄ×Ö·û¸öÊý
ͨ¹ýÓû§½çÃæÊäÈëΪ 65,535£»ÒÔ±à³Ì·½Ê½ÊäÈëʱΪ 1G ×Ö½ÚµÄ×Ö·û´æ´¢¡£
“OLE ¶ÔÏó”×ֶεĴóС
1G ×Ö½Ú
±íÖеÄË÷Òý¸öÊý
32
Ë÷ÒýÖеÄ×ֶθöÊý
10
ÓÐЧÐÔÏûÏ¢µÄ×Ö·û¸öÊý
255
ÓÐЧÐÔ¹æÔòµÄ×Ö·û¸öÊý
2,048
±í»ò×Ö¶Î˵Ã÷µÄ×Ö·û¸öÊý
255
¼Ç¼µÄ×Ö·û¸öÊý£¨³ý“±¸×¢”×ֶκ͓OLE ¶ÔÏó”×Ö¶ÎÍ⣩
2,000
×Ö¶ÎÊôÐÔÉèÖõÄ×Ö·û¸öÊý
255
²éѯ
ÊôÐÔ×î´óÖµ
......
ÓÃÁËADO.NET 2.0 SQLite Data Provider ÕâÑù¿ÉÒÔÖ±½ÓÀûÓÃËüÀ´´´½¨Ò»¸ö¼ÓÃܵÄsqliteÊý¾Ý¿â¡£
ÓйØc#´úÂëÈçÏ£º
1¡¢´´½¨¿ÕµÄsqliteÊý¾Ý¿â¡£
//Êý¾Ý¿âÃûµÄºó׺Äã¿ÉÒÔÖ±½ÓÖ¸¶¨£¬ÉõÖÁûÓкó׺¶¼¿ÉÒÔ
//·½·¨Ò»£º´´½¨Ò»¸ö¿ÕsqliteÊý¾Ý¿â£¬ÓÃIOµÄ·½Ê½
FileStream fs = File.Create(“c:\\test.db“);
//·½·¨¶þ£ºÓÃSQLiteConnection
SQLiteConnection.CreateFile(“c:\\test.db“);
´´½¨µÄÊý¾Ý¿âÊǸö0×Ö½ÚµÄÎļþ¡£
2¡¢´´½¨¼ÓÃܵĿÕsqliteÊý¾Ý¿â
//´´½¨Ò»¸öÃÜÂëΪpasswordµÄ¿ÕµÄsqliteÊý¾Ý¿â
SQLiteConnection.CreateFile£¨“c:\\test2.db“);
SQLiteConnection cnn = new SQLiteConnection(“Data Source=c:\\test2.db“);
SQLiteConnection cnn = new SQLiteConnection(“Data Source=D:\\test2.db“);
cnn.Open();
cnn.ChangePassword(“password“);
3¡¢¸øδ¼ÓÃܵÄÊý¾Ý¿â¼ÓÃÜ
SQLiteConnection cnn = new SQLiteConnection(“Data Source=c:\\test.db“);
cnn.Open();
cnn.ChangePa ......
ÓÃÁËADO.NET 2.0 SQLite Data Provider ÕâÑù¿ÉÒÔÖ±½ÓÀûÓÃËüÀ´´´½¨Ò»¸ö¼ÓÃܵÄsqliteÊý¾Ý¿â¡£
ÓйØc#´úÂëÈçÏ£º
1¡¢´´½¨¿ÕµÄsqliteÊý¾Ý¿â¡£
//Êý¾Ý¿âÃûµÄºó׺Äã¿ÉÒÔÖ±½ÓÖ¸¶¨£¬ÉõÖÁûÓкó׺¶¼¿ÉÒÔ
//·½·¨Ò»£º´´½¨Ò»¸ö¿ÕsqliteÊý¾Ý¿â£¬ÓÃIOµÄ·½Ê½
FileStream fs = File.Create(“c:\\test.db“);
//·½·¨¶þ£ºÓÃSQLiteConnection
SQLiteConnection.CreateFile(“c:\\test.db“);
´´½¨µÄÊý¾Ý¿âÊǸö0×Ö½ÚµÄÎļþ¡£
2¡¢´´½¨¼ÓÃܵĿÕsqliteÊý¾Ý¿â
//´´½¨Ò»¸öÃÜÂëΪpasswordµÄ¿ÕµÄsqliteÊý¾Ý¿â
SQLiteConnection.CreateFile£¨“c:\\test2.db“);
SQLiteConnection cnn = new SQLiteConnection(“Data Source=c:\\test2.db“);
SQLiteConnection cnn = new SQLiteConnection(“Data Source=D:\\test2.db“);
cnn.Open();
cnn.ChangePassword(“password“);
3¡¢¸øδ¼ÓÃܵÄÊý¾Ý¿â¼ÓÃÜ
SQLiteConnection cnn = new SQLiteConnection(“Data Source=c:\\test.db“);
cnn.Open();
cnn.ChangePa ......
ÔÚ AndroidÖУ¬¶ÔÓÚÊý¾ÝµÄ´æÖü£¬Óм¸ÖÖ·½Ê½£¬ÓÐÎļþ·½Ê½£¬ÓÐÎļþʽÊý¾Ý¿â·½Ê½,Android×Ô´øÁËÒ»¸öSQLiteÊý¾Ý¿â£¬×öǶÈ뿪·¢µÄÈ˶ÔÕâ¸ö¿çƽ̨µÄ±¾µØÎļþÊý¾Ý¿âÒ»¶¨²»»áÄ°Éú£¬ÔÚAndroid¶ÔÓÚÊý¾ÝµÄ·ÃÎÊ£¬Ìá³öÁËеķ½Ê½£¬ContentProvider·½Ê½£¬ÀàËÆÓÚMSµÄ ContentProvider·½Ê½µÄ£¬OLEDB£¬¼°ODBCͳһµÄÊý¾Ý·½Ê½¡£
ÎÒÃÇÊ×ÏÈÀ´¿´¿´SQLiteÔÚ AndroidÖеÄʹÓã¬ÔÚAndroidÖÐÓÐ×î¼òµ¥µÄʹÓ÷½Ê½£¬¾ÍÊÇÀûContext¶ÔÏóµÄopenorCreateDatabase
ÎÒÃÇÀ´¿´¿´Ò»¶Î´úÂ룺
package test.DB;
import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;
public class DBActivity extends Activity {
private SQLiteDatabase mdb = null;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
s ......