如何使用页面元素隐藏或显示。
dom为我们提供了两个变量visibility和display
visibility:隐藏要元素但是元素所暂用的空间不予释放。也就是说元素隐藏了,但是页面上会流出一片空白的地方。
用法:
style="visibility: hidden;"
document.getElementById("typediv1").style.visibility...
分类:
其他好文 时间:
2014-04-29 13:48:20
阅读次数:
318
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3....
分类:
其他好文 时间:
2014-04-29 13:47:20
阅读次数:
251
We sometimes got memory leak problem, and we need to find the leaked memory, Here is a useful tool from MS, UMDH, it is included in WinDBG install package.
Here is a introduction on how to UMDH to identify memory leak problems...
分类:
其他好文 时间:
2014-04-29 13:38:21
阅读次数:
374
主要涉及了(1)对布局中某个控件的监听
(2)在布局文件中设置可显示,删除的参数
visibility的参数的有三个,在这里我只设置了一个,可见的。
android:visibility="visible"
剩下的和他的用法相同。
(3)在代码中监听控件后,对visibility的参数重新设置。
效果图:点击按钮后edittext不见了
(1)点击高级按钮前
(2)点击高级...
分类:
移动开发 时间:
2014-04-29 13:31:21
阅读次数:
390
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
Note: You can only move either down or right at...
分类:
其他好文 时间:
2014-04-28 10:46:41
阅读次数:
311
题目描述
Cainiao is a university student who loves ACM contest very much. It is a festival for him once when he attends ACM Asia Regional Contest because he always can find some famous ACMers there.
C...
分类:
其他好文 时间:
2014-04-28 10:33:40
阅读次数:
340
http://acm.hdu.edu.cn/showproblem.php?pid=1595
大致题意:
给一个图,让输出从中删除任意一条边后所得最短路径中最长的。。
思路:
直接枚举每条边想必是不行的。其实有些边是不需要枚举的,因为删除它们并不影响起点到终点的最短路。起作用的边都是未删边前的最短路径上的边,删除它们最短距离肯定增大,只需在这些最短距离中求最大的即可。
记录最短路...
分类:
Web程序 时间:
2014-04-28 10:24:42
阅读次数:
393
php中奖概率算法,可用于刮刮卡,大转盘等抽奖算法。用法很简单,代码里有详细注释说明,一看就懂
<?php
/*
* 经典的概率算法,
* $proArr是一个预先设置的数组,
* 假设数组为:array(100,200,300,400),
* 开始是从1,1000 这个概率范围内筛选第一个数是否在他的出现概率范围之内,
* 如果不在,则将概率空间,也就是k的值减去刚刚的那个数字的概...
分类:
Web程序 时间:
2014-04-28 10:13:42
阅读次数:
390
" checking for SSL headers... configure: error: Cannot find ssl headers"
原因是缺少openssl-devel,安装这个库就可以解决问题。
yum -y install openssl-devel...
分类:
其他好文 时间:
2014-04-27 21:32:05
阅读次数:
283
最近在研究ViewPager的使用,我将分段将ViewPager的使用方法和技巧介绍给大家。
1.ViewPager是谷歌一个向下兼容包(android-support-v4.jar)里面的类,所以要使用它先引入android-support-v4.jar。该jar包一般存在于android SDK目录sdk\extras\android\support\v4下面。
2.然后是布局文件中添...
分类:
其他好文 时间:
2014-04-27 21:23:04
阅读次数:
341