Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.
Here, we will use the integers ...
分类:
编程语言 时间:
2014-09-11 19:26:52
阅读次数:
196
Email的历史比Web还要久远,直到现在,Email也是互联网上应用非常广泛的服务。
几乎所有的编程语言都支持发送和接收电子邮件,但是,先等等,在我们开始编写代码之前,有必要搞清楚电子邮件是如何在互联网上运作的。...
分类:
编程语言 时间:
2014-09-11 19:22:52
阅读次数:
217
import threading, os, subprocess, timeexec_path = "/home/xhz/gems/ruby/amd...../bin/tester.exec"out_data_path = "/home/xhz/...generated/"max_process =...
分类:
编程语言 时间:
2014-09-11 18:54:22
阅读次数:
249
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
You may assume no duplicates in the array。...
分类:
其他好文 时间:
2014-09-11 17:28:02
阅读次数:
207
Python提供了强大的对象类型作为语言的组成部分,除非有内置类型无法处理得特殊对象,用户最好总是使用内置对象。Python内置对象类型强大而高效,是一个python程序的核心部分,让编程变得简单。本文概述python中的对象类型。...
分类:
编程语言 时间:
2014-09-11 17:14:42
阅读次数:
286
安装mysql-python报错:UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 65: ordinal not in range(128)需要先安装(yum):mysql-develpython-devel
分类:
数据库 时间:
2014-09-11 17:11:12
阅读次数:
225
这两天实验室网络不给力,后来发现是有人占用了实验室太多的带宽,而登陆到实验室老的h3c s5500交换机上看端口流量情况很不方便,于是萌生写个小工具来统计端口流量情况,已求找到谁占用了大量带宽。于是查了下,发现python 有个telnetlib的库,登陆交换机以及进行简单的操作相当简单,于是就写了...
分类:
Web程序 时间:
2014-09-11 17:05:02
阅读次数:
811
zabbix是个非常强大的监控工具,可以监控linux和windows的服务器数据,也可以通过自定义key来扩展默认的监控项,但是自带的邮件报警提供的信息却不太友善。本文想通过自定脚本的方式,实现在报警邮件的同时发送对应的图像和url连接。步骤如下:创建一个脚本媒体报警:修改zabbix..
分类:
编程语言 时间:
2014-09-11 15:32:38
阅读次数:
414
在windows7系统使用sublime text 2编写python上传到centos,执行./xx.py报错 /usr/bin/python^M: bad interpreter: No such file or directory 解决方法 命令下: sed -i ‘s/^M//g‘??filename (注意^M 在linux...
分类:
编程语言 时间:
2014-09-11 13:59:22
阅读次数:
208
Python解释器的几种实现版本
我们都知道python的解释器有很多种实现方式,有C的,java的,还有python的等等,对应的也就是Cpython,Jython,一直比较火的PyPy ,今天就来盘点下这些版本(不一定非常全)
CPython
CPython 是默认的python实现,环境或者是解释器(你喜欢哪个就那么叫)。脚本大多数情况下都运行在这个解释器中。...
分类:
编程语言 时间:
2014-09-11 13:57:52
阅读次数:
290