现在位置: 首页 > koro发表的所有文章
  • 09月
  • 28日
综合 ⁄ 共 17642字 评论关闭
按照《Unix网络编程》的划分,IO模型可以分为:阻塞IO、非阻塞IO、IO复用、信号驱动IO和异步IO,按照POSIX标准来划分只分为两类:同步IO和异步IO。如何区分呢?首先一个IO操作其实分成了两个步骤:发起IO请求和实际的IO操作,同步IO和异步IO的区别就在于第二个步骤是否阻塞,如果实际的IO读写阻塞请求进程,那么就是同步IO,因此阻塞IO、非阻塞IO、IO服用、信号驱动IO都是同步IO,如果不阻塞,而是操作系统帮你做完IO操作再将结果返回给你,那么就是异步IO。阻塞IO和非阻塞IO的区别在于第一步,发起IO请求是否会被阻塞,如果阻塞直......
阅读全文
  • 09月
  • 18日
编程语言 ⁄ 共 1199字 评论关闭
JS 获取网页源代码 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>远程网页源代码读取</title> <style type="text/css"> /* 页面字体样式 */ body, td, input, textarea { font-family:Arial; font-size:12px; } </style> <script type="text/javascript"> //用于创建XMLHttpRequest对象 function createXmlHttp() { //根据window.XMLHttpR......
阅读全文
  • 12月
  • 18日
综合 ⁄ 共 1670字 评论关闭
Alice and Bob Problem Description Alice and Bob's game never ends. Today, they introduce a new game. In this game, both of them have N different rectangular cards respectively. Alice wants to use his cards to cover Bob's. The card A can cover the card B if the height of A is not smaller than B and the width of A is not smaller than B. As the best programmer, you are asked to compute the maximal number of Bob's cards that Alice can cover. Please pay attention that each card can be used......
阅读全文
  • 10月
  • 21日
综合 ⁄ 共 2004字 评论关闭
from:《金融计量学-基于SAS的金融实证研究》chapter4 *异方差; proc reg data=capm.rip1 outest=capm.beta; model meanrif=meanrmf; output out=capm.r r=e;/*把回归残差值赋给变量e*/ by p; run; data capm.r; set capm.r; r2=e*e; where p=0; run; proc gplot data=capm.r; plot r2*meanrmf='*';/*r2为垂直坐标,meanrmf为横坐标,用*标记点*/ run; proc reg data=capm.rip1 outest=capm.beta; model meanrif=meanrmf/spec;/*spec对模型进行White检验*/ by p; run; *autoreg语句; proc autoreg data=ca......
阅读全文
  • 10月
  • 08日
综合 ⁄ 共 1552字 评论关闭
#include <windows.h> #include <iostream> #include <vector> #include <algorithm> using namespace std; #define VEC_COUNT 3 void main(int argc,TCHAR*argv[]) { //1.构造函数 vector<int>vec1,vec2; //vector<int> vec(VEC_COUNT); //有VEC_COUNT个元素,值都为0 //vector<int> vec(VEC_COUNT,2); //有VEC_COUNT个元素,值都为2 //2.添加元素 vec1.push_back(0); vec1.push_back(4); vec2.push_back(0); vec2.push_back(3); vec2.push_bac......
阅读全文
  • 06月
  • 07日
综合 ⁄ 共 684字 评论关闭
Name Cost Tags Construct 2 varies game-maker, free, 2d, 3d, webgl, sounds, collisions, physics, pixi.js free (MIT) 2d, webgl, free, Phaser free (MIT) flash-like, 2d, sounds, collisions, physics, typescript, webgl, free, Three.js free (MIT) 3d, webgl, free, PlayCanvas free 3d, cloud-based, free, webgl, sounds, Turbulenz free (MIT) 2d, 3d, webgl, sounds, collisions, physics, debug, networking, CAAT free (MIT) 2d, free, webgl,......
阅读全文
  • 05月
  • 22日
综合 ⁄ 共 208字 评论关闭
这里的open应是不及物动词 我不可能听到门被开了 而是门开了 再加上听到了全过程 所以用hear sb/sth do sth 如果是正持续动词正在发生 则用ing 如 I heard them reading loudly when I passed their classroom(我经过时他们正在读 ) I saw two beautiful girls dancing in the park when I walked through the park(同样 我走过时女孩正在跳)
阅读全文
转自: http://blog.csdn.net/robert_mm/article/details/8195647  前几天搭建工程的时候,每次启动总会报这个异常: [java] view plaincopy SLF4J: slf4j-api 1.6.x (or later) is incompatible with this binding.   SLF4J: Your binding is version 1.5.5 or earlier.   SLF4J: Upgrade your binding to version 1.6.x. or 2.0.x   然后紧跟着: [java] view plaincopy 10:02:47.127:WARN::Nested in java.lang.ExceptionInInitializerError:   java.lang.IllegalStateException: org.slf4j.Logg......
阅读全文
  • 05月
  • 03日
综合 ⁄ 共 1116字 评论关闭
前面在看Jquery方面的书籍时,看到了一章名叫如何利用jquery创建自己的插件,本人是jquery的初学者,所以就用它来写了一个点击文字可以获取标题弹框的例子。 第一步:肯定是要引用jquery的js脚本和我们自己定义的插件的js脚本; 第二步:插件写法: (1)定义插件名称;(2)设置默认值;(3)settings配置;(4)循环遍历添加事件。 第三步:html页面调用: js代码如下: /** * showPlugin - xiaobang * * Copyright (c) 2014-2015 www.szkingdom.com. All rights reserved. * */ (function($){ //插件运行 $.fn.show......
阅读全文
  • 04月
  • 25日
综合 ⁄ 共 2298字 评论关闭
【#138 div 1 A. Bracket Sequence】 【原题】 A. Bracket Sequence time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A bracket sequence is a string, containing only characters "(", ")", "[" and "]". A correct bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" between the original characters of the sequence. For example, bracket seq......
阅读全文
  • 03月
  • 20日
综合 ⁄ 共 222字 评论关闭
fflush是libc.a中提供的方法, fsync是系统提供的系统调用。 2.原形 fflush接受一个参数FILE *. fflush(FILE *); fsync接受的时一个Int型的文件描述符。 fsync(int fd); 3.功能 fflush:是把C库中的缓冲调用write函数写到磁盘[其实是写到内核的缓冲区]。 fsync:是把内核缓冲刷到磁盘上。 c库缓冲-----fflush---------〉内核缓冲--------fsync-----〉磁盘  
阅读全文
  • 02月
  • 20日
综合 ⁄ 共 46字 评论关闭
Building probabilistic graphical models with Python
阅读全文