上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 35 下一页
学习linux不要死记硬背,更不要全部学会,够用就行,下面直接看例子,学习的最好方法就是看例子学习:$find ~ -name "*.txt" -print #在$HOME中查.txt文件并显示$find . -name "*.txt" -print$find . -name "[A-Z]*" -print #查以大写字母开头的文件$find /etc -name "host*" -print #查以host开头的文件$find . -name "[a-z][a-z][0–9][0–9].txt" Read More
posted @ 2012-11-27 16:00 godjob Views(186) Comments(0) Diggs(0)
import sqlite3#10003[:1]{:2}{2}db = sqlite3.connect(r'c:\imageDB.db')cur=db.cursor();db.commit();try:cur.execute('insert into cet_t values(?,?)',('title2.jpg',sqlite3.Binary('123'),))except sqlite3.IntegrityError:import sysprint sys.exc_info()[0],sys.exc_info()[1]prin Read More
posted @ 2012-11-25 23:38 godjob Views(445) Comments(0) Diggs(0)
# -*- coding: utf-8 -*-"""Created on Sun Nov 25 15:56:01 2012@author: l"""import sqlite3db = sqlite3.connect(r'c:\imageDB.db')#fp=open(r'c:\title.jpg','rb')#data=fp.read();#fp.close()cur=db.cursor()#cur.execute('insert into cet_t values(" Read More
posted @ 2012-11-25 22:30 godjob Views(807) Comments(0) Diggs(0)
import sqlite3def sqlite_basic(): # Connect to db conn = sqlite3.connect('test.db') # create cursor c = conn.cursor() # Create table c.execute(''' create table if not exists stocks (date text, trans text, symbol text, qty real, price real) ... Read More
posted @ 2012-11-25 22:15 godjob Views(1999) Comments(0) Diggs(0)
遍历存元组的列表进行操作一堆xy坐标,找出x,y的左上角与右下角[python] view plaincopyprint?max_t=reduce(lambdax,y:(max(x[0],y[0]),max(x[1],y[1])),l)p;min_t=reduce(lambdax,y:(min(x[0],y[0]),min(x[1],y[1])),l)用zipfile写压缩包[python] view plaincopyprint?f=zipfile.ZipFile("testzip.zip","w",zipfile.ZIP_DEFLATED)f.wri Read More
posted @ 2012-11-25 21:50 godjob Views(296) Comments(0) Diggs(0)
#include <stdio.h>#include <sqlite3.h>#include <stdlib.h>static sqlite3 *db=NULL;static sqlite3_stmt *stmt=NULL;FILE *fp;long filesize=0;char *fflie;int main(int argc, char *argv[]){ int rc,i,j; rc = sqlite3_open("dishes.db", &db); rc = sqlite3_prepare(db, "updat Read More
posted @ 2012-11-25 20:58 godjob Views(1303) Comments(0) Diggs(0)
python中对文件、文件夹的操作需要涉及到os模块和shutil模块。创建文件:1) os.mknod("test.txt") 创建空文件2)open("test.txt",w)直接打开一个文件,如果文件不存在则创建文件创建目录:os.mkdir("file")创建目录复制文件:shutil.copyfile("oldfile","newfile")oldfile和newfile都只能是文件shutil.copy("oldfile","newfile") Read More
posted @ 2012-11-25 00:16 godjob Views(340) Comments(0) Diggs(0)
掌握文本文件读写的方法了解二进制文件的读写方法C++文件流:fstream // 文件流ifstream // 输入文件流ofstream // 输出文件流//创建一个文本文件并写入信息//同向屏幕上输出信息一样将信息输出至文件#include<iomanip.h>#include<fstream.h>void main(){ ofstream f1("d:\\me.txt"); //打开文件用于写,若文件不存在就创建它 if(!f1)return; //打开文件失败则结束运行 f1<<setw(20)<<"姓名:& Read More
posted @ 2012-11-23 22:57 godjob Views(330) Comments(0) Diggs(0)
火狐firefox,包含了火狐浏览器的源代码,开发文档,火狐源代码使用等等https://developer.mozilla.org/en-US/linux/unix/freeBSD/openBSD 文档manpagehttp://nixdoc.net/ohloh code 找代码Welcome to Ohloh Code, the world’s largest, most comprehensive free code search engine! Koders has now merged with Ohloh to become your one-stop resou... Read More
posted @ 2012-11-06 16:57 godjob Views(582) Comments(0) Diggs(0)
FTP命令是Internet用户使用最频繁的命令之一,不论是在DOS还是UNIX操作系统下使用FTP,都会遇到大量的FTP内部命令。熟悉并灵活应用FTP的内部命令,可以大大方便使用者,并收到事半功倍之效。 FTP的命令行格式为:ftp-v-d-i-n-g[主机名],其中-v显示远程服务器的所有响应信息;-n限制ftp的自动登录,即不使用;.netrc文件;-d使用调试方式;-g取消全局文件名。ftp使用的内部命令如下(中括号表示可选项):1.![cmd[args]]:在本地机中执行交互shell,exit回到ftp环境,如:!ls*.zip.2.$macro-ame[args]:执行宏定义ma Read More
posted @ 2012-10-29 22:23 godjob Views(272) Comments(0) Diggs(0)
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 35 下一页