虽然是水题一枚,但是在我的不懈努下,交了80几发,在突然有一天重写的情况下,竟然1a了。#include#include#include#include#include#includeusing namespace std;const int maxn = 33333;struct Node{ .....
分类:
其他好文 时间:
2014-11-07 16:46:23
阅读次数:
262
先声明,本人node.js菜鸟一枚,只是根据《node.js开发指南》实验有过不去的地方,介绍一下疏通方法,如有错误,大神勿喷。。。1.express框架最初开始介绍的时候,用express实现http协议的例子。源码如下:var express = require('express');var a...
分类:
Web程序 时间:
2014-11-07 16:26:40
阅读次数:
266
现象:通常出现在用户挂载了多个img到guest上,会发现无法再创建guest或者无法启动guest的现象。/var/log/xen/xen-hot-plug.log中错误如下:xenstore - read: couldn't read path backend/vbd/12/2050/node原...
分类:
其他好文 时间:
2014-11-07 16:23:11
阅读次数:
190
问题:同一节点上有两个实例,如果想在其中一个实例下访问另一个实例中的数据库,有两种方法:
1. 使用catalog local node的方式,在其中一个实例中将另外一个实例直接编目,这种方试中,它们之间采用的通信方式是IPC(进程间通信),这种方式只能在同一物理机上进行。
2. 使用catalog TCPIP node的方式,将其中一个作为客户端,另一个作为服务端, 这种方式中,它们之间采用...
分类:
数据库 时间:
2014-11-07 11:18:32
阅读次数:
244
Remove Nth Node From End of ListGiven a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2.....
分类:
其他好文 时间:
2014-11-06 21:49:31
阅读次数:
217
现在web开发的趋势是前后端分离。前端采用某些js框架,后端采用某些语言提供restful API,两者以json格式进行数据交互。如果后端采用node.js,则前后端可以使用同一种语言,共享某些可重用的Js代码,并共享构建工具。但很多时候我们可能采用别的语言,如ruby/java/scala等,此...
分类:
Web程序 时间:
2014-11-06 19:22:02
阅读次数:
337
Serverconfig:yum-yinstallgcc-c++wgethttp://nodejs.org/dist/v0.8.14/node-v0.8.14.tar.gztar-zxvfnode-v0.8.14.tar.gz-C/usr/src/cd/usr/src/node-v0.8.14/./configure&&make&&makeinstall&&echoOK#wgethttps://npmjs.org/install.sh&&shin..
分类:
其他好文 时间:
2014-11-06 17:49:44
阅读次数:
150
/*
裸的最大权闭合图
解:参见胡波涛的《最小割模型在信息学竞赛中的应用》
*/
#include
#include
#include
#include
using namespace std;
#define N 55100//刚开始开的是5100一直越界应该是n+m
#define NN 510000
#define inf 0x3fffffff
struct node {
int u,v...
分类:
其他好文 时间:
2014-11-06 17:30:12
阅读次数:
192
由于最近要实现一个爬取H5游戏的代理服务器,隧看到这么一篇不错的文章(http://blog.miguelgrinberg.com/post/easy-web-scraping-with-nodejs),加之最近在学习Node.js,所以就准备翻译出来加深一下印象。 转载请注明来源:(www.cnb...
分类:
Web程序 时间:
2014-11-06 17:20:06
阅读次数:
419
Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After re...
分类:
其他好文 时间:
2014-11-06 16:45:28
阅读次数:
111