pyrebot

Better not to ignore the past but learn from it instead. Otherwise, history has a way of repeating itself.

博客园 首页 新随笔 联系 订阅 管理

2014年4月1日 #

摘要: 1 exec sp_addlinkedserver 'DB_RASS','','SQLOLEDB','127.0.0.1'2 exec sp_addlinkedsrvlogin 'DB_RASS','false',null,'sa','123456'3 exec sp_serveroption 'DB_RASS','rpc out','true' --这个允许调用链接服务器上的存储过程 阅读全文
posted @ 2014-04-01 17:20 pyrebot 阅读(292) 评论(0) 推荐(0) 编辑

2014年3月28日 #

摘要: 最近做了一个Silverlight项目,一个类库引用DLL后,找不到命名空间。于是各种google,方法如下:1、类库与DLL的目标框架不一致;2、删除obj下文件和清空bin下文件;3、重装系统;4、删除该类库和生成dll的类库,重新建立;以上方法都无效。最后在csdn上看到,重命名类库项目,于是试了下,将xxx.IBLL改为IBLL,XXX.BLL改为BLL,XXX.Models改为Models,编译通过。汗一个! 阅读全文
posted @ 2014-03-28 11:22 pyrebot 阅读(605) 评论(0) 推荐(0) 编辑

2014年3月19日 #

摘要: 1 #coding:utf-8 2 import urllib2 3 import os,sys 4 from BeautifulSoup import BeautifulSoup # For processing HTML 5 from bs4 import BeautifulSoup 6 class BookSave(): 7 ''' 8 dir:html文件保存目录 url:index.html目录 static_url:js、css所在目录的上级目录 9 distinguish:用来区分相同tag.name dis_k... 阅读全文
posted @ 2014-03-19 17:56 pyrebot 阅读(485) 评论(0) 推荐(0) 编辑

2014年1月8日 #

摘要: easyui combobox 没有onchange事件,只有onSelect事件 1 $(function () { 2 $('#Select6').combobox({ 3 onSelect: function (record) { 4 var jsonMap = { "year": record.pkey }; 5 $.ajax({ 6 url: "getYearHandler.ashx?action=getdata", 7 type: "post", ... 阅读全文
posted @ 2014-01-08 12:03 pyrebot 阅读(11300) 评论(0) 推荐(0) 编辑

摘要: 1 $(function () { 2 $('#Select6').combobox({ 3 onLoadSuccess: function () { 4 var data = $('#Select6').combobox('getData'); 5 if (data.length > 0) { 6 $('#Select6').combobox('select', data[0].pkey); 7 } 8 } 9 });10 }); ... 阅读全文
posted @ 2014-01-08 11:58 pyrebot 阅读(332) 评论(0) 推荐(0) 编辑

2013年11月11日 #

摘要: python排序算法1、冒泡排序: 1 import math 2 def BubbleSort(list): 3 lengthOfList = len(list) 4 for i in range(0,lengthOfList-1): 5 for j in xrange(i+1,lengthOfList): 6 if list[i]>list[j]: 7 temp = list[i] 8 list[i] = list[j] 9 list[j]... 阅读全文
posted @ 2013-11-11 18:03 pyrebot 阅读(155) 评论(0) 推荐(0) 编辑

摘要: #2、已知a1=1,a2=2,an=a(n-1)+a(n-2)(n>=3),求数列{a1,a2,a3....an}的总和 1 import math 2 arr = [0]*100 3 num = 0 4 for i in range(0,100): 5 if i>=3: 6 arr[i]=arr[i-1] + arr[i-2] 7 num += arr[i] 8 else: 9 arr[i] = i + 110 num += arr[i]11 print num 阅读全文
posted @ 2013-11-11 15:05 pyrebot 阅读(212) 评论(0) 推荐(0) 编辑

2013年11月9日 #

摘要: #1、计算1000以内3与5的倍数的总和 1 import math 2 3 nums = 0 4 5 for i in range(0,1000): 6 7 if i%3 == 0 or i%5 == 0 : 8 9 if i != 0:10 11 nums = nums + i12 13 else:14 15 continue16 17 print numsView Code 阅读全文
posted @ 2013-11-09 22:21 pyrebot 阅读(159) 评论(0) 推荐(0) 编辑