使用缩写可以帮助减少你CSS文件的大小,更加容易阅读。css缩写的主要规则如下:颜色16进制的色彩值,如果每两位的值相同,可以缩写一半,例如:#000000可以缩写为#000;#336699可以缩写为#369;盒尺寸通常有下面四种书写方法:property:value1; 表示所有边都是一个值val...
分类:
Web程序 时间:
2014-10-20 16:56:49
阅读次数:
233
这个是常见的对二叉树的操作。总结一下:设节点的数据结构,如下:1 class TreeNode {2 char val;3 TreeNode left = null;4 TreeNode right = null;5 6 TreeNode(char _val) {7 ...
分类:
编程语言 时间:
2014-10-20 14:50:57
阅读次数:
181
#include
#include
using namespace std;
#define E 10000
#define V 100
struct Edge{
int to_node;
int edge_val;
int next_edge;
Edge(){}
Edge( int to, int val, int next ){...
分类:
其他好文 时间:
2014-10-20 11:46:20
阅读次数:
226
Python基础笔记1、print格式化输出 print(format(val,format_modifier)),比如: print(format(12,345678,"6.3f")); --输出数据占6位(位数不足时,左补空格),小数位为3位 print(format(12,34567...
分类:
编程语言 时间:
2014-10-20 00:42:47
阅读次数:
176
Linked List CycleGiven a linked list, determine if it has a cycle in it.c++/** * Definition for singly-linked list. * struct ListNode { * int val;...
分类:
其他好文 时间:
2014-10-19 23:04:39
阅读次数:
206
// 类接口,但是可以实现方法// 作用 多重继承trait traitA{ val tnum: Int def log(msg: String): Unit ={ println("log : " + msg) }}trait traitB extends traitA{ def t...
分类:
其他好文 时间:
2014-10-19 22:45:29
阅读次数:
233
1 /** 2 * Definition for binary tree 3 * public class TreeNode { 4 * int val; 5 * TreeNode left; 6 * TreeNode right; 7 * TreeNo...
分类:
其他好文 时间:
2014-10-19 21:11:49
阅读次数:
189
1、类中递归调用函数需要加self# Definition for a binary tree node# class TreeNode:# def __init__(self, x):# self.val = x# self.left = None# ...
分类:
编程语言 时间:
2014-10-19 10:11:52
阅读次数:
200
在学习Css3.0选择符的时候,参考了《CSS3.0参考手册》。有个地方没有说明,于是被坑了半个小时呀!在这里和大家分享一下,在选择符分类那里,有一类是属性选择符是通过字串来匹配的!形式有以下几种:属性名选择符E[att]--匹配文档中具有att属性的E元素属性值选择符E[att=val]-..
分类:
Web程序 时间:
2014-10-19 01:32:52
阅读次数:
260
函数名: cabs
功 能: 计算复数的绝对值
用 法: double cabs(struct complex z);
程序例:
#include
#include
int main(void)
{
struct complex z;
double val;
z.x = 2.0;
z.y = 1.0;
val = cabs(z);...
分类:
编程语言 时间:
2014-10-18 11:12:02
阅读次数:
244