转自:http://phinecos.cnblogs.com/ 1
#!/usr/bin/python 2 #coding=utf-8 3 4 #@author:dengyike 5 #@date:2010-09-28 6
#@version:1.0 7 #@description:...
分类:
编程语言 时间:
2014-05-17 15:06:38
阅读次数:
405
#!/usr/bin/envpython
#-*-coding:UTF-8-*-
"""
@Item:IOCtl
@Author:VilliamSheng
@Group:PythonDEVGroup
@Date:2013-05-29
@Funtion:
CPUcontrol:
TocontrolforCPU
"""
importos,sys,time,libvirt,traceback,commands
‘‘‘
Func:Recorderrormessage
path:Messagesavepath
form..
分类:
其他好文 时间:
2014-05-16 02:46:57
阅读次数:
504
一、脚本的书写规范在前文中写过一个脚本first.sh,用来创建一个用户,这里新创建一个脚本useradd.sh,用来创建多个用户,用户名和密码相同:#nanouseradd.sh#!/bin/bash
#Author:Mickey//指定作者
#Date:2014-5-14//指定日期
#Version:0.0.1//指定版本
#Description:AddUse..
分类:
其他好文 时间:
2014-05-16 02:25:54
阅读次数:
334
//创建当前日期 NSDate *date = [NSDate date]; //创建日期格式类
NSDateFormatter *dateFormat = [[NSDateFormatter alloc]init]; //设置日期格式
[dateFormat ...
分类:
其他好文 时间:
2014-05-16 01:13:12
阅读次数:
325
第一步先安装LaTex,这里我装的是texlive,在ubuntu下可以使用以下命令来安装
sudo apt-get install texlive
然后安装一个编辑器,ubuntu下有很多LaTex编辑器,比如texmaker、texstudio等,我先安装了texmaker,但因为快捷键冲突问题导致texmaker基本无法使用,百度知道提问无果,索性换了texstudio,对比发现其实...
分类:
其他好文 时间:
2014-05-15 23:14:15
阅读次数:
555
/*-------------------------------------------------------------------------
* Project: Union.cpp
* Name: zwp
* Date: 2014/5
*-------------------------------------------------------------------...
分类:
其他好文 时间:
2014-05-15 23:13:00
阅读次数:
463
Requirements:
1,需要一个linux系统。
2, X-Server。(在命令行下实现对X-server的模拟,渲染图形进行缓存)-在没有安装X-Server的环境下提供图像渲染)
Agenda:
以ubuntu系统为例:
1, 打开命令行。
2,安装svn,g++,如果以前装过,执行这段命令也没关系,不会报错。sudo apt-get ...
分类:
Web程序 时间:
2014-05-15 19:29:59
阅读次数:
542
1、PIL包推荐Pillow。2、源码:#encoding=utf-8
#author:walker
#date:2014-05-15
#function:更改图片尺寸大小
importos
importos.path
fromPILimportImage
‘‘‘
filein:输入图片
fileout:输出图片
width:输出图片宽度
height:输出图片高度
type:输出图片类型(png,gif,jpeg.....
分类:
编程语言 时间:
2014-05-15 19:07:57
阅读次数:
266
#!/bin/bash
#function:cutnginxlogfilesshell
#cp/usr/local/nginx/logs/access.log/usr/local/nginx/logs/access.log.bak
log_cut_path="/var/log/nginx"
log_files_path="/usr/local/nginx/logs/"
log_files_dir=${log_cut_path}$(date-d"yesterday"+"%Y")/$(date-d"yesterd..
分类:
其他好文 时间:
2014-05-15 18:49:50
阅读次数:
244
1、gem安装出现下面错误
root@ubuntu:/home/git/gitlab# sudo gem install bundler --no-ri --no-rdoc
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https...
分类:
其他好文 时间:
2014-05-15 18:19:48
阅读次数:
304