昨天做练习的时候遇到了margin外边距的问题,给body的子元素div设置了margin-top:50px;为什么div元素没有把body撑开(即div顶部距body拉开50px)???而是div连同body整个被拉下来了,body距离为50px???代码结构如下:html{width: 100%...
分类:
其他好文 时间:
2015-08-02 14:57:17
阅读次数:
191
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 三个数中找最大{ class Program { static void Main(str...
分类:
其他好文 时间:
2015-08-02 14:58:56
阅读次数:
156
题意:给l和r,问l和r里有多少个数的每位数字都不同。解法:打个表用r的减l-1的即可。代码:#include#include#include#include#include#include#include#include#include#include#include#include#includ...
分类:
其他好文 时间:
2015-08-02 14:56:34
阅读次数:
107
在Uploadify插件自带的文件包中有一个css文件uploadidfy.css,在这个文件里定义了uploadify按钮的样式,这就是按钮的默认样式。那么怎么使用自定义的样式呢?分三步。一,在初始化uploadify的js代码中指定使用按钮的背景图片//上传文章所带图片 $('#upBtn...
分类:
其他好文 时间:
2015-08-02 14:56:41
阅读次数:
204
总结一下凸包维护规律: 斜率为负,从小到大,维护U左半部分凸包,求最小y截距 斜率为负,从大到小,维护倒U右半部分凸包,求最大y截距 斜率为正,从小到大,维护U右半部分凸包,求最小y截距 斜率为正,从大到小,维护倒U左半部分凸包,求最大y截距
分类:
其他好文 时间:
2015-08-02 14:58:59
阅读次数:
110
1.使用StringBuilder拼接字符串实例: string[] lines = File.ReadAllLines("sdjk.txt", Encoding.Default); //创建监视对象 Stopwatch watch = new Stopwatch(); Strin...
分类:
其他好文 时间:
2015-08-02 14:57:59
阅读次数:
104
题意:如果可以交换行列,问主对角线能不能全为1分析:要想主对角线全为1很明显要有N个行列不想同的点就行了,可以用二分图匹配计算出来多能有几个。如果小与N就不能。输出要是对的就行,不必和答案一样******************************************************...
分类:
其他好文 时间:
2015-08-02 14:57:31
阅读次数:
85
Reverse a singly linked list.Hint:A linked list can be reversed either iteratively or recursively. Could you implement both?Solution 1:iteration 1 /**...
分类:
其他好文 时间:
2015-08-02 14:57:55
阅读次数:
117
1. 图片缩放:代码- (UIImage*)resizeImage:(UIImage*)image toWidth:(NSInteger)width height:(NSInteger)height{ // Create a graphics context with the target siz....
分类:
其他好文 时间:
2015-08-02 14:58:06
阅读次数:
108
Given two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "anagram",t= "nagaram", return true.s= "rat",t= "car", retur...
分类:
其他好文 时间:
2015-08-02 14:57:34
阅读次数:
76
转自大牛的解析(非常具体详细)http://www.cnblogs.com/skynet/archive/2010/07/10/1774964.html我做个简单的标注方便以后自己查看:在用C++的项目源码中,经常会不可避免的会看到下面的代码:#ifdef __cplusplus //采用c++,....
分类:
其他好文 时间:
2015-08-02 14:57:12
阅读次数:
107
July 6, 2015Problem statement:Word SearchGiven a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of ...
分类:
其他好文 时间:
2015-08-02 14:55:34
阅读次数:
103
题目传送门 1 /* 2 BFS:这题很有意思,像是地下城,图是立体的,可以从上张图到下一张图的对应位置,那么也就是三维搜索,多了z坐标轴 3 */ 4 #include 5 #include 6 #include 7 #include 8 using namespace std; ...
分类:
其他好文 时间:
2015-08-02 14:54:12
阅读次数:
96
Power NetworkTime Limit: 2000MSMemory Limit: 32768KTotal Submissions: 24930Accepted: 12986DescriptionA power network consists of nodes (power stations...
分类:
其他好文 时间:
2015-08-02 14:57:02
阅读次数:
119
1 /*======================================================== 2 题目描述 3 给定一个最大载重量为M的卡车和N种食品,有食盐,白糖,大米等。 4 已知第i种食品的最多拥有Wi公斤,其商品价值为Vi元/公斤, 5 编程确定一个装货方案,.....
分类:
其他好文 时间:
2015-08-02 14:56:41
阅读次数:
128
strip()函数介绍:# -*- coding: cp936 -*-#strip()去掉转义字符>>>word = "\thello world\n">>>print "直接输出:",word>>>print "strip()后输出:",word.strip() --strip去掉所有的转义字符....
分类:
其他好文 时间:
2015-08-02 14:54:02
阅读次数:
85
收起 $(function() { $('.toggle').click(function() { $('.headerwrap').slideToggle(function() { var res = $(this).is(':visible'); if (res) { ...
分类:
其他好文 时间:
2015-08-02 14:55:37
阅读次数:
102