摘要: //http.Handlertype Handler interface { ServeHTTP(ResponseWriter, *Request)}type HandlerFunc func(ResponseWriter, *Request)func (HandlerFunc) ServeH... 阅读全文
posted @ 2014-08-12 14:17 梦想's技术人员 阅读(1808) 评论(0) 推荐(0) 编辑
摘要: package mainimport ( "io" "log" "net/http")func main() { http.HandleFunc("/", Cookie) http.HandleFunc("/2", Cookie2) http.ListenAndS... 阅读全文
posted @ 2014-08-11 23:30 梦想's技术人员 阅读(316) 评论(0) 推荐(0) 编辑
摘要: FileServer文档:https://godoc.org/net/http#FileServer今天看到http的 Handle 方法,所以就像试试,就找到FileServerFileServer: 1.www.xx.com/ 根路径 直接使用 http.Handle("/",... 阅读全文
posted @ 2014-08-02 23:02 梦想's技术人员 阅读(5994) 评论(0) 推荐(0) 编辑
摘要: 1.接口实现及类型转换 1 type Sequence []int 2 3 // Methods required by sort.Interface. 4 func (s Sequence) Len() int { 5 return len(s) 6 } 7 func (s Sequen... 阅读全文
posted @ 2014-07-23 16:13 梦想's技术人员 阅读(195) 评论(0) 推荐(0) 编辑
摘要: List1. python -V 查看python当前版本2. list.pop() 删除列表里的最后一个元素,并返回删除元素的值3. list.extend(['a','b','c']) 在原列表的基础上增加该列表的元素4. list.append('a') 在原列表后增加该元素 能巧妙应用 ,如果在原列表的每项后面添加元素,最后一个可以使用5. list.remove('a') 删除元素6. list.insert(0,'a') 在列表某位置增加元素7. 如果列表重复操作太多,不如重新定义8. 阅读全文
posted @ 2013-11-13 18:44 梦想's技术人员 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 本文摘自www.w3school.com.cn1.String-indexof 1 <html> 2 <body> 3 4 <script type="text/javascript"> 5 6 var str="Hello world!" 7 document.write(str.indexOf("Hello") + "<br />") 8 document.write(str.indexOf("World") + "<br /& 阅读全文
posted @ 2011-08-09 21:30 梦想's技术人员 阅读(183) 评论(0) 推荐(0) 编辑
摘要: XP中视频预览功能的主要动态链接文件是“shmedia.dll”,所以这里我们一次运行:开始→运行→regsvr32 /u shmedia.dll→确定,然后会出现“shmedia.dll中的DllUnregisterServer成功”的对话框,这时便成功关闭了xp的视频文件预览功能。恢复的方法也很简单,只要输入“regsvr32 shmedia.dll”即可!转自:http://hi.baidu.com/zhaiweiv/blog/item/dbad8d1edc97390f4134171f.html 阅读全文
posted @ 2011-08-03 16:25 梦想's技术人员 阅读(1188) 评论(0) 推荐(0) 编辑
摘要: 本文适合于初学者,内容摘自www.w3school.com.cn1.当页面载入时,会执行位于 body 部分的 JavaScript。当被调用时,位于 head 部分的 JavaScript 才会被执行。javascript方法声明和调用 1 <html> 2 <head> 3 <script type="text/javascript"> 4 function message() 5 { 6 alert("该提示框是通过 onload 事件调用的。") 7 } 8 </script> 9 </hea 阅读全文
posted @ 2011-07-22 10:22 梦想's技术人员 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 1 <frameset rows="185,*" cols="*" framespacing="0" frameborder="yes" border="0" bordercolor="#666666"> 2 <frame src="top.html" name="topFrame" scrolling="No" noresize="noresize" id="topF 阅读全文
posted @ 2011-07-15 19:28 梦想's技术人员 阅读(273) 评论(0) 推荐(0) 编辑