#!/bin/bashBLK=‘\E[1;30m‘RED=‘\E[1;31m‘GRN=‘\E[1;32m‘YEL=‘\E[1;33m‘BLU=‘\E[1;34m‘MAG=‘\E[1;35m‘CYN=‘\E[1;36m‘WHI=‘\E[1;37m‘DRED=‘\E[0;31m‘DGRN=‘\E[0;32m‘DYEL=‘\E[0;33m‘DBLU=‘\E[0;34m‘DMAG=‘\E[0;35m‘DCYN=‘\E[0;36m‘DWHI=‘\E[0;37m‘RES=‘\E[0m‘echo-e"01-${BLK}BL..
分类:
系统相关 时间:
2014-12-16 19:28:49
阅读次数:
179
程序主要由OneBox、BoxGroup和MyView三个类构成,分别实现了小正方形,方块图形和游戏场景。classOneBox:publicQGraphicsObject{public:OneBox(constQColor&color=Qt::red);QRectFboundingRect()const;voidpaint(QPainter*painter,constQStyleOptionGraphicsItem*option,QW..
分类:
其他好文 时间:
2014-12-16 19:24:38
阅读次数:
166
一、查看内核版本命令:
(1)[root@localhost ~]#cat/proc/version
Linux version 2.6.18-238.el5 (mockbuild@x86-012.build.bos.redhat.com)(gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Sun Dec 19 14:22:44 EST...
分类:
系统相关 时间:
2014-12-16 17:13:41
阅读次数:
301
function FireTruck() {
Car.call(this, "red");
}
定义一个对象的最简单的方法
var car = {
color:"red",
drive:function() {
alert(this.color + " car moved");
}
}这个方法不是在非常有用,因为它创建了一个单独的对象,而这个对象和任何常见的数据结构没有...
分类:
编程语言 时间:
2014-12-16 15:12:44
阅读次数:
239
获取AVCaptureSession samplebuffer 一像素的 rgb值typedef unsigned char byte;typedef struct RGBPixel{ byte red, green, blue;} RGBPixel;- (void)captureOutput...
分类:
其他好文 时间:
2014-12-15 21:42:34
阅读次数:
249
Array类toString()方法和valueOf()方法,返回特殊的字符串。该字符串是通过对每项调用toString()方法,然后用逗号把它们连接在一起构成的。例如,对具有项"red"、"green"和"blue"的数组调用toString()方法或valueOf()方法,返回的是字符串"red...
分类:
编程语言 时间:
2014-12-15 18:52:33
阅读次数:
200
各位朋友:以下内容是RedHatEnterpriseVirtualization3培训大纲,有需求的朋友可以通过QQ(285855604)联系本人。(注:小班授课,每个学员均有实验环境。)RedHatEnterpriseVirtualization3ReferenceGuide一、虚拟化概述...4二、红帽虚拟化特点...42.1RHEV平台架构...52.2支持的虚拟..
分类:
其他好文 时间:
2014-12-15 13:52:58
阅读次数:
343
class LogSubscriber < Subscriber
# Embed in a String to clear all previous ANSI sequences.
CLEAR = "\e[0m"
BOLD = "\e[1m"
# Colors
BLACK = "\e[30m"
RED = "\e[31m"...
分类:
其他好文 时间:
2014-12-14 15:51:02
阅读次数:
380
Problem Description
The students of the HEU are maneuvering for their military training.
The red army and the blue army are at war today. The blue army finds that Little A is the spy of the red ar...
分类:
其他好文 时间:
2014-12-13 15:13:24
阅读次数:
138
UVA10277 - Boastin' Red Socks(枚举+二分)
题目链接
题目大意:现在有m只红袜子,n只黑袜子,这样总袜子total = n + m;现在给你p, q,确定n和m,使得从这些袜子中取两只都是红袜子的概率等于p/q;如果没有这样的n和m满足要求输出impossible;
解题思路:m *(m
- 1) / (total *
(total - 1)...
分类:
其他好文 时间:
2014-12-13 10:53:51
阅读次数:
170