hello world!!!!!

写下自己的一些心得,写下自己问题的方式,写下程序之路的艰辛,希望能够有朝一日成为大牛。
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 8 9 10 11 12 13 14 下一页

2010年12月15日

摘要: 出于公司的一个需求,我要写一个下载网易微博的一个头像,但是网易微博的的图片是不允许外链的,所以我们只下载它,好了动手了,呵呵 一开始我用这样来读流using (var stream = response.GetResponseStream()) { //byte[] bytes = new byte[stream.Length]; //stream.Read(bytes, 0, bytes.Length); //// 设置当前流的位置为流的开始 //stream.Seek(0, SeekOrigin.Begin); }但是提示说,Strem不支持seek ,一到strem.length就开始. 阅读全文

posted @ 2010-12-15 15:25 陈力 阅读(1113) 评论(0) 推荐(0) 编辑

2010年11月25日

摘要: 代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--classSampleCollection<T>{privateT[]arr=newT[100];publicTthis[inti]{get{returnarr[i];}set{arr[... 阅读全文

posted @ 2010-11-25 16:54 陈力 阅读(226) 评论(0) 推荐(0) 编辑

摘要: 本来c#这种语法会有容易让人歧义,读者问一想到,他有什么作用,我用别的方式完也是可以替代的了的延续前面的文章, //MyDelegate d = new MyDelegate(p.InstanceMethod); //d(); //以委托为中介,进行转换,进而可以以把函数 作为函数的参数传递,有点拗口。但是有另外一种方式来,实现同样的情况,暂时只能给出这样的一个类比,进而说明问题的本身。 函数回调... 阅读全文

posted @ 2010-11-25 10:25 陈力 阅读(775) 评论(0) 推荐(0) 编辑

摘要: 首先自己给委托下人地址 定义为 be defined as他其实是在求函数的入口地址,并且带标记,标记他是一个函数入口地址,举例说明如下,欢迎大家与我讨论。代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--staticpublicvoidMain()... 阅读全文

posted @ 2010-11-25 09:57 陈力 阅读(468) 评论(1) 推荐(0) 编辑

2010年11月19日

摘要: 一: vi hello.c 进入vi二: :whello.c 命名为filename,并且保存三: :wq 退出vi输入代码,如图所示最后通过命令自动帮助你缩进indent -st hello.c效果还不错,下一步我们试着让gcc环境我帮我解释一下,步骤还挺顺利的。出现了异常,请看哇一堆错误,我真够马虎的!!! 简单的代码,上面有严重的错误。#include<stdio.h>#incl... 阅读全文

posted @ 2010-11-19 17:18 陈力 阅读(372) 评论(2) 推荐(0) 编辑

摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->pythonimportMySQLdb>>>conn=MySQLdb.Connection('localhost','root','lee','proftpd')>>>cur=conn.cursor()cur.execute('select*fromstudent')>& 阅读全文

posted @ 2010-11-19 15:25 陈力 阅读(355) 评论(0) 推荐(0) 编辑

2010年11月17日

摘要: one: sudo apt-get install mysql-server mysql-client two: show database; use mysql ; describe db; //注意要用结尾结束语句的查询 以下就是建立数据库,与建立表了。create database leeuse leecreate table student (id int(3) auto _increm... 阅读全文

posted @ 2010-11-17 22:31 陈力 阅读(432) 评论(2) 推荐(1) 编辑

摘要: 首先在myproject --(已经建立好的 pythonDjangoproject )建立一个模块 call : views.py代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--fromdjango.httpimportHttpResponse... 阅读全文

posted @ 2010-11-17 15:20 陈力 阅读(195) 评论(0) 推荐(0) 编辑

摘要: python manage.py shell 进入Django 项目环境。输入以下指令 [代码][代码]执行结果如下 下面以html的方式返回的代码如下:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<htmllang="en">&l... 阅读全文

posted @ 2010-11-17 11:29 陈力 阅读(257) 评论(0) 推荐(0) 编辑

2010年11月15日

摘要: 先要安装python sudo install python (系统封装好了安装包)下载 后解压 tar xzvf Django-1.2.3.tar.gzcd Django-1.2.3sudo python setup.py install 安装框架Django接下来你进入到刚才所解压的django/bin目录下,运行 python django-admin.py startproject myproject -----相当于在vs 2008当中创建 create project一样,只是在这里一个命令行的形式。 他将会在你的bin目录下创建myproject目录 ls -all 以下有四个目 阅读全文

posted @ 2010-11-15 11:24 陈力 阅读(311) 评论(0) 推荐(1) 编辑

上一页 1 ··· 8 9 10 11 12 13 14 下一页