标准浏览器下鼠标左中右键返回值分别是0,1,2,但是IE8及以下版本浏览器返回的却是1,4,2,兼容代码如下document.onmousedown = function(event){ alert(getButton(event));}function getButton(event){ evt ...
分类:
其他好文 时间:
2016-01-16 22:32:23
阅读次数:
219
在一个长度为n的数组中找出出现次数超过(n+1)/2次的数说明请参考编程之美中的2.3class Solution {public: int majorityElement(vector& nums) { int candidate; int ntimes,i...
分类:
其他好文 时间:
2016-01-16 22:33:03
阅读次数:
206
在CreateIndex时,必须慎重考虑属性FillFactor 和 PAD_INDEX的设置,这两个属性只在create index 或 rebuild index时起作用,表示Index page(Leaf-Level或 intermediate-Level)的填充程度。如果设置FillFact...
分类:
其他好文 时间:
2016-01-16 22:34:05
阅读次数:
725
链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4675题目大意:在一个平面上有 n (1#include#include#includ...
分类:
其他好文 时间:
2016-01-16 22:32:58
阅读次数:
354
文章来源:http://www.outflush.com/2015/03/introduction-of-arc-bridge-type-transfer/在对 bridge 相关的修饰符解说前。首先了解下面内容Core Foundation 是一组C语言接口。它与Foundatio...
分类:
其他好文 时间:
2016-01-16 22:32:09
阅读次数:
163
上午睡个懒觉,全家去超市,买了好多零食(其实回家一看也没多少),还是网上方便,买两大箱直接送到家里,去超市还要提回来下午没干啥正事,看看网页,玩了把游戏关注了下台湾选举,12年看的比较激动,因为实力对等有悬念,这次绿营躺着都赢了,最后赢了一倍。。。不知蓝营乃至民国是否就此完蛋了。。。熬了这么多年不容...
分类:
其他好文 时间:
2016-01-16 22:32:32
阅读次数:
171
有人说现在的程序员都被惯坏了,尤其使用一些面向对象的语言开发的时候,只是简单的调用一些系统封装好的接口或者是调用一些“便利的”第三方,对于一个程序的真正实现有了解吗???又有多少了解呢???就单单的拿Objective-c 来说,确实感觉它无所不能,神马都可以做!大到整个工程文件的整合,内存...
分类:
其他好文 时间:
2016-01-16 22:32:14
阅读次数:
200
一、文字常量区域#include int main(){ char *p = "hello"; int i = 0; for(i = 0;ichar a[10] = "hello"; //“hello”字符串存储在全局数组中,在 静态存储区。int main(){ char b[10] = "hel...
分类:
其他好文 时间:
2016-01-16 22:31:45
阅读次数:
202
其中一个项目总是无法访问。参考这两篇文章:1. tomcat中同时部署两个项目的问题2. java.lang.IllegalStateException: Web app root system property already set to different value解决方案:为每个项目的we...
分类:
其他好文 时间:
2016-01-16 22:28:25
阅读次数:
144
settings.py中间件MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', #... 'django.contrib.auth.middleware.Authentication...
分类:
其他好文 时间:
2016-01-16 22:29:05
阅读次数:
400
输入代码:/**Copyright (c)2014烟台大学计算机与控制project学院*All rights reserved.*文件名:sum.cpp*作 者:林海云*完毕日期:2014年11月4日*版 本 号:v1.0**问题描写叙述:*程序输出:输入20个整数。输出它们的和*/#in...
分类:
其他好文 时间:
2016-01-16 22:27:18
阅读次数:
244
当我们提交了多次之后,想要回到之前提交的某个版本的时候,应该怎么做呢?在回退之前,我们需要知道几个命令1.git loggit log命令会显示我们所有的提交历史记录,如果觉得显示的信息太多,可以加上一个参数,使得每一条记录都显示在一行,如下:commit的id不是1,2,3这样递增的数字,而是一个...
分类:
其他好文 时间:
2016-01-16 22:28:06
阅读次数:
202
原文地址:http://seisman.info/how-to-write-makefile.html其它一些问题 不妨看一下:http://blog.csdn.net/huyansoft/article/details/8924624简化版 不妨看一下:http://blog.chinaunix....
分类:
其他好文 时间:
2016-01-16 22:27:16
阅读次数:
376
F Fighting for Triangles DescriptionAndy and Ralph are playing a two-player game on a triangular board that looks like the following:1 234 ...
分类:
其他好文 时间:
2016-01-16 22:26:53
阅读次数:
265
progress_diplay可以在显示台显示程序执行的进度。(1)类摘要#include "stdafx.h"#include#include #include#include #include using namespace std;using namespace boost;class pro...
分类:
其他好文 时间:
2016-01-16 22:26:52
阅读次数:
293
水仙花数是指一个三位数,其各位数的立方和等于该数本身,如153=(1*1*1)+(5*5*5)+(3*3*3)int a,b,c,d;for(d=100,d<1000;d++){ a=d/100; //得到百位上的数 b=d/10%10; //得到十位上的数 ...
分类:
其他好文 时间:
2016-01-16 22:26:06
阅读次数:
195
需要返回的数据写在 在上一个view中最后 return的字典中 dic = {'class_all': class_all, 'userclass_all': userclass_all, "id": id} return render_to_response('buy.html', dic...
分类:
其他好文 时间:
2016-01-16 22:24:24
阅读次数:
178