码迷,mamicode.com
首页 > 其他好文
iframe子页面,父页面相互调用(同域)
先上代码: 父页面.html 子页面.html 一、父页面调用子页面 1、先得到子页面的document document.getElementById('FrameId').contentWindow.document 2、得到子页面的window document.getElementById( ...
分类:其他好文   时间:2016-09-23 06:32:49    阅读次数:180
找出唯一出现一次的数
1.问题描述:找出数列中唯一一个出现一次的数,其余得数都出现两次。 分析: 1)最笨的方法当然是穷举了: 2)异或操作 (^): 性质: 0 ^ 0 = 0, 1 ^ 1 = 0, 0 ^ 1 = 1, 0 ^ A = A; 总结起来就是按位异或 相同为0,不同为1。 这样一来明显得出,相同的俩个数 ...
分类:其他好文   时间:2016-09-23 06:34:07    阅读次数:205
Chrome插件开发笔记
使用 XMLHttpRequest来抓取盗版小说网站里面的内容,但是注意需要在manifest.json文件中设置permission var xhr = new XMLHttpRequest();xhr.open("GET", "http://www.biqukan.com/1_1207/", t ...
分类:其他好文   时间:2016-09-23 06:31:02    阅读次数:173
130. Surrounded Regions
Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in ...
分类:其他好文   时间:2016-09-23 06:33:07    阅读次数:141
[Angular 2] ElementRef, @ViewChild & Renderer
ElementRef: In Angular2 Doc, it suggest to "avoid" using ElementRef. It access DOM directly, can easily be attacked. If we log out the ElementRef, we ...
分类:其他好文   时间:2016-09-23 06:32:50    阅读次数:150
easyUI layout
layout是一个容器,它有5个区域:north(北丐),south(南帝),east(东邪),west(西毒),center(中神通),像不像金庸的天龙八部,中间区域的panel是必须的, 周边区域panel是可选项,所有周边区域的panel可以改变大小通过拖动边框,他们也可以折叠(collaps ...
分类:其他好文   时间:2016-09-23 06:31:50    阅读次数:185
PowerDesigner Name、Code 映射设置
1. 设置 Code 大写 2. Code 单词间添加下划线 3. 设置 Name、Code 映射 4. 设置 Glossary 5. Excel 导入 Glossary 6. 共享 Glossary ...
分类:其他好文   时间:2016-09-23 06:30:01    阅读次数:189
Django performance
Reference: https://impythonist.wordpress.com/2016/02/21/building-high-performance-django-systems/ The main motto of Django web framework is: The web f ...
分类:其他好文   时间:2016-09-23 01:28:20    阅读次数:340
C中的system函数
windows操作系统下system () 函数详解(主要是在C语言中的应用) 函数名: system 功 能: 发出一个DOS命令 用 法: int system(char *command); system函数已经被收录在标准c库中,可以直接调用 程序例: #include <stdlib.h> ...
分类:其他好文   时间:2016-09-23 01:29:24    阅读次数:167
JQ选择器
1.#id 查找ID 为myDIV的元素 2.element 用于搜索的元素 指向DOM节点的标签名 3. .class 获取类 4. * 找到每一个元素 5.select1,select2,selectN 将每一个选择器匹配到的元素合并后一起返回。 可以指定任意多个选择器,并将匹配到的元素合并到一 ...
分类:其他好文   时间:2016-09-23 01:27:42    阅读次数:180
leetcode371
我这道题目真的是划水的,因为弄了很长时间发现,我可能对于位操作不是特别喜欢吧。 确实为了最求速度,位操作确实快一些。 单独从题目意思来说,用别的方式实现加法,我觉得吧,真的有点醉了。。。就这样。 下面给出大神的位操作总结报告,积累一下经验吧。 https://discuss.leetcode.com ...
分类:其他好文   时间:2016-09-23 01:29:15    阅读次数:124
Saddest's polar bear Pizza offered new YorkShire home
Saddest:adj,可悲的,悲哀的,polar,两级的,极地额,YorkShire,约克郡 A UK wildlife park has confirmed that it is offering a new home to a lonely polar bear named Pizza who ...
分类:其他好文   时间:2016-09-23 01:28:39    阅读次数:154
Chapter 1 First Sight——23
I stared because their faces, so different, so similar, were all devastatingly, inhumanly beautiful. 因为他们的脸我看着他们,如此的不同,又如此的相同,都是很有讽刺性的,超越人类的漂亮。 They w ...
分类:其他好文   时间:2016-09-23 01:25:57    阅读次数:156
UVa 1611 Crane (构造+贪心)
题意:给定一个序列,让你经过不超过9的6次方次操作,变成一个有序的,操作只有在一个连续区间,交换前一半和后一半。 析:这是一个构造题,我们可以对第 i 个位置找 i 在哪,假设 i 在pos 位置,那么如果 (pos-i)*2+i-1 <= n,那么可以操作一次换过来, 如果不行再换一种,如果他们之 ...
分类:其他好文   时间:2016-09-23 01:27:22    阅读次数:135
POJ1837 Balance[分组背包]
Balance Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 13717 Accepted: 8616 Description Gigel has a strange "balance" and he wants to pois ...
分类:其他好文   时间:2016-09-23 01:27:48    阅读次数:144
普通函数和构造函数
arr=[1,3,5]arr.toString-->"1,3,5"var a={name:"abc"};a.toString-->[object,object]; 构造函数和普通函数构造函数:function Student(){}引用var p=new Student(); 执行步骤1.先创建一个 ...
分类:其他好文   时间:2016-09-23 01:25:20    阅读次数:136
常量池浅谈
java常量池技术 郑重声明:本文为转载的 java中常量池技术说的通俗点就是java级别的缓存技术,方便快捷的创建一个对象。当需要一个对象时,从池中去获取(如果池中没有,就创建一个并放入池中),当下次需要相同变量的时候,不用重新创建,从而节省空间。 java八种基本类型的包装类和对象池 java中 ...
分类:其他好文   时间:2016-09-23 01:24:21    阅读次数:121
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!