$_$PROCESS_ID$$read a file line by
line#!/usr/bin/perluse strict;use warnings;my $dir ="./tmp";open (FH, ") {print
"$_";}
分类:
其他好文 时间:
2014-07-22 23:09:35
阅读次数:
293
1.在浏览器输入网址http://www.baidu.com2.解析域名为主机ip地址和端口号(web应用默认端口号80)3.通过浏览器类似Socket的机制与主机建立连接4.客户端与服务器端建立连接5.客户端与服务器端按照HTTP协议传送文本数据6.服务端解析请求数据,处理后反馈结果(html,超...
分类:
其他好文 时间:
2014-07-22 23:08:35
阅读次数:
358
java.sql.SQLException: Io 异常: Socket closed at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at
oracle.jdbc.driver.Databa...
分类:
其他好文 时间:
2014-05-01 15:32:15
阅读次数:
257
Windows没有message
queue累世的IPC内核对象,使得在在处理IPC时少了一种传递消息的手段。利用Windows的Naming
Object可以实现一套简单的Inter-Thread消息队列。这里并不使用socket,因为一旦使用socket,就得负责port管理,很麻烦,另外在对外...
分类:
编程语言 时间:
2014-05-01 02:30:44
阅读次数:
555
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
void func()
{
string url;
cout << "输...
分类:
Web程序 时间:
2014-04-29 13:21:20
阅读次数:
506
进程(process)和线程(thread)是操作系统的基本概念,但是它们比较抽象,不容易掌握。
最近,我读到一篇材料,发现有一个很好的类比,可以把它们解释地清晰易懂。
1.
计算机的核心是CPU,它承担了所有的计算任务。它就像一座工厂,时刻在运行。
2.
假定工厂的电力有限,一次只能供给一个车间使用。也就是说,一个车间开工的时候,其他车间都必须停工。...
分类:
编程语言 时间:
2014-04-29 13:17:20
阅读次数:
276
最近亲眼看到快播被大批警察包围,感觉到快播注定要关闭很多东西,很多宅男宅女们又要寂寞了,于是乎,疯狂的研究DHT网络技术
看到网上也有开源的代码,这不,我拿来进行了二次重写,呵呵,上代码:
#encoding: utf-8
import socket
from hashlib import sha1
from random import randint
from struct import u...
分类:
其他好文 时间:
2014-04-29 13:13:20
阅读次数:
420
Problem Description
Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N!
Input
One N in one line, process to the end of file.
Output
For each N, output N! i...
分类:
其他好文 时间:
2014-04-28 10:36:41
阅读次数:
341
Usage: docker [OPTIONS] COMMAND [arg...]
-H=[unix:///var/run/docker.sock]: tcp://host:port to bind/connect to or unix://path/to/socket to use
A self-sufficient runtime for linux containers.
Co...
分类:
其他好文 时间:
2014-04-28 10:17:41
阅读次数:
359
Cobar启动完成,监听特定端口。整个认证的流程图:NIOAcceptor类继承自Thread类,该类的对象会以线程的方式运行,进行连接的监听。NIOAcceptor启动的初始化过程如下:1 、打开一个selector,获取一个ServerSocketChannel对象,对该对象的socket绑定特定的监听端口,并设置该channel为非阻塞模式,然后想selector注册该channel,绑定感...
分类:
数据库 时间:
2014-04-27 21:47:07
阅读次数:
462