在WCF 4.0中,为我们创建Restful API有了更好的支持。通过定义UriTemplate,WebInvoke就可以快速开发API接口。这里我记录一下HTTP POST数据时要如何接收POST过来的数据。1,方法一:Stream inputStream输入流方法(注意看方法例如我的代码[Op...
分类:
Web程序 时间:
2015-08-10 17:29:39
阅读次数:
126
之前说了如何操作文本文件,如果是图片文件或者其他的二进制文件则需要操作文件的Stream或者Buffer数据。就需要用到DataReader和DataWriter这两个类了,这个的好好的练一下,以后的Socket编程等也是用到这个。做过Socket实际编程工作的都知道,得对消息进行简单的封装,比如现...
Stream新增Demo - Dropzonejs样式:http://p.twinkling.cn/dropzone.html 拖拽上传 图片回显 自动优化显示图片和普通文件
分类:
Web程序 时间:
2015-08-09 12:46:37
阅读次数:
163
STM32F4: Generating parallel signals with the FSMCThe goal:The memory controller can be used to generate a "generic" 16-bit parallel data stream with ...
分类:
其他好文 时间:
2015-08-08 14:53:56
阅读次数:
356
我的想法是首先把base64存入MemoryStream中然后用 FileStream保存,但是当代码写好运行到byte[] b = stream.GetBuffer();这句的时候报错:无法访问 MemoryStream 的内部缓冲区。然后我就给改成了byte[] b = stream.ToArr...
分类:
其他好文 时间:
2015-08-08 13:25:14
阅读次数:
125
一般如果碰到巨大文件,超过2GB,如果想小文件一样读入数组,肯定会碰到超过2GB上限的问题,64位操作系统一样有这个问题。
怎么办用Stream来解决,无论是读还是写都用Stream,一次读个几十K,写个几十K,在循环里反复读写,...
分类:
Web程序 时间:
2015-08-08 06:46:34
阅读次数:
107
最近出现过一个问题,值得记录类似于这样的报错的问题:Warning: require_once(/www/app/somecomponent.php): failed to open stream: Cannot allocate memory in /www/app/loader.php on l...
分类:
Web程序 时间:
2015-08-07 19:28:31
阅读次数:
150
class MK { Stream connection; TcpClient con; public MK(string ip) { con = new TcpClient(); co...
UVAlive 3135 ArgusArgusTime Limit: 3000MSMemory Limit: Unknown64bit IO Format: %lld & %llu Submit Status DescriptionA data stream is a real-time, cont...
分类:
其他好文 时间:
2015-08-07 12:51:43
阅读次数:
82
public static string UploadFile(string url, HttpPostedFileBase file,string FieldName) { Stream fs = file.InputStream; if ...