码迷,mamicode.com
首页 >  
搜索关键字:close    ( 9262个结果
Django下载文件
服务器端:f = open(filename)data = f.read()f.close()response = HttpResponse(data,mimetype='application/octet-stream') response['Content-Disposition'] = 'at...
分类:其他好文   时间:2014-07-10 00:40:41    阅读次数:204
JavaScript 基础知识
浏览器的对象树:1:window对象常用方法:alert(‘信息’) : 消息框prompt(‘提示信息’,默认值): 标准输入框confirm( ) : 确认框open( ) : 打开一个新窗口close( ) : 关闭窗口2:Form表单对象访问表单的方式: * document.for...
分类:编程语言   时间:2014-07-03 11:28:59    阅读次数:385
一个ball例程带你进入 Halcon 世界
* 此例程来自halcon自带例程,请打开 halcon-》ctrl+E 打开例程-》搜索框中输入ball added by xiejl* ball.hdev: Inspection of Ball Bonding* dev_update_window ('off')dev_close_window...
分类:其他好文   时间:2014-07-01 18:17:39    阅读次数:1620
python基础教程_学习笔记18:标准库:一些最爱——shelve
标准库:一些最爱 shelve Shelve唯一有趣的函数是open。在调用它的时候(使用文件名作为参数),它会返回一个Shelf对象,可以用它来存储内容。只需要把它当作普通的字典(但是键一定要作为字符串)来操作即可,在完成工作之后,调用它的close方法。   意识到shelve.open函数返回的对象并不是普通的映射是很重要的。 >>> import shelve >>> s=sh...
分类:编程语言   时间:2014-07-01 07:23:57    阅读次数:197
Lucene中TokenStream,Tokenizer,TokenFilter,TokenStreamComponents与Analyzer
TokenStream extends AttributeSource implements Closeable: incrementToken,end,reset,close Tokenizer直接继承至TokenStream,其输入input是一个reader TokenFilter也直接继承TokenStream,但input是一个TokenStream。 TokenStreamCo...
分类:其他好文   时间:2014-06-26 13:19:13    阅读次数:177
Leetcode Valid Parentheses
Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ...
分类:其他好文   时间:2014-06-25 12:44:56    阅读次数:188
windows下Perl如何读取大文件的最后一行(总结)
Perl中读取文件最后一行的方法很多,比如(1)将文件读入数组,取最后一个元素open (FILE,"file.txt") or die "$!";my @arr=;;close FILE;my $last=$arr[$#arr];#$last里就是最后一行的内容了。(2)一行一行读入,到最后一行时...
分类:Windows程序   时间:2014-06-25 11:29:08    阅读次数:326
【Matlab编程】马氏链随机模拟
本文是利用蒙特卡罗算法对马氏链过程的模拟。假设有10个状态,从每个状态到与之相邻状态的概率是相同的,仿真次数为1000,及进行了1000次状态转移。我们以动画的形式再现了状态转移的过程,并记录了到达每个状态的次数,具体实现如下: close all;clc;clear; figure; s=1; n=1000; r=1; % 圆圈的半径 title('等概率情况的计算机模拟') set(gc...
分类:其他好文   时间:2014-06-24 17:35:28    阅读次数:186
【ubuntu firefox】 Firefox is already running, but is not responding
在ubuntu下启动firefox报错 Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system. 解决: 终端输入 killall firefox...
分类:其他好文   时间:2014-06-24 17:08:34    阅读次数:203
使用PF_PACKET和SOCK_RAW发送自定义type以太网数据包
本文介绍使用PF_PACKET和SOCK_RAW发送自定义type以太网数据包,使用wireshare抓包可以获取到数据包,为Linux内核增加网络协议做铺垫。 先上码: #include #include #include           // close() #include           // strcpy, memset(), and memcpy() #in...
分类:其他好文   时间:2014-06-24 15:51:07    阅读次数:556
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!