A Telephone Line Company (TLC) is establishing a new telephone cable network. They are connecting several places numbered by integers from 1 to N. No two places have the same number. The lines are bid...
分类:
Web程序 时间:
2015-01-26 19:20:13
阅读次数:
165
昨天主要了解了下生成器,用文档测下lines:
def lines(file):
for line in file: yield line
yield '\n'
for i in lines(sys.stdin):
if i:
print i
print '---'
测试文档test_input.txt:
hello
how are you
how do you...
分类:
编程语言 时间:
2015-01-25 15:19:43
阅读次数:
206
Linux awk UsageLinux awk UsageTable of Contents1. Sum a specific column:2. Sum the columns of the lines with additional conditions(starting with 7):3....
分类:
系统相关 时间:
2015-01-23 22:46:35
阅读次数:
156
物理页面 /* * Try to keep the most commonly accessed fields in single cache lines * here (16 bytes or greater). This ordering should be particularly * b.....
分类:
系统相关 时间:
2015-01-22 23:06:34
阅读次数:
208
1:xcopy命令进行文件拷贝
2:脚本内容:
@echo off
color 0D
MODE con: COLS=71 LINES=25
title bright资源文件自动备份脚本(任务计划)--脚本作者:刘彦亮
set sou_dir="F:\apache-tomcat-7.0.53\webapps\bright_resource"
se...
分类:
其他好文 时间:
2015-01-22 18:05:46
阅读次数:
168
博客主页:http://blog.csdn.net/minna_d
脚本实现:
1.根据key选择机房
2.根据key选择机房所对应的机器名
#!/bin/bash
declare -a machine
declare -i lines
declare -a cns
files=`ls /root/.ssh/ | grep "^cn"`
lines=1
for one...
分类:
其他好文 时间:
2015-01-22 09:31:56
阅读次数:
172
#include #include #define MAXLINE 1000int getline(char *line, int max);/* find: print lines that match pattern from 1st arg */main(int argc, char *arg...
分类:
其他好文 时间:
2015-01-22 01:35:56
阅读次数:
140
【题目】
Given n non-negative integers a1, a2,
..., an, where each represents a point at coordinate (i, ai). n vertical
lines are drawn such that the two endpoints of line i is at (i, ai) and (i,...
分类:
其他好文 时间:
2015-01-21 16:37:56
阅读次数:
159
Given n non-negative integers a1, a2,
..., an, where each represents a point at coordinate (i, ai). n vertical
lines are drawn such that the two endpoints of line i is at (i, ai) and (i,
0). Fin...
分类:
其他好文 时间:
2015-01-17 23:33:30
阅读次数:
190
Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ...
分类:
其他好文 时间:
2015-01-15 18:07:39
阅读次数:
131