分析:特殊情况处理
代码:package arrays20;public class Demo01 { public static void ClockwisePrintMatrix(int[][] arrays,int columns,int rows){
if(arrays==null || columns<=0 || rows<=0){
retu...
分类:
其他好文 时间:
2015-06-23 11:57:31
阅读次数:
118
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.
For example, given the array [?2,1,?3,4,?1,2,1,?5,4],
the contiguous subarray [4,?1,2,1] ha...
分类:
其他好文 时间:
2015-06-23 11:55:55
阅读次数:
176
企业级应用中,服务器端的验证必不可少,任何一个业务逻辑在被调用前都需要进行验证,判断用户提交的请求是否合理,Struts2提供了验证框架,功能强大,可以大部分服务器端验证的需求。...
分类:
其他好文 时间:
2015-06-23 11:57:12
阅读次数:
149
#14 Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.
这个题求多个字符串的公共前缀,除了要考虑串空外,如果存在公共前缀,那么必定也是第一个串的前缀。
所以可以以第一个串为基准,比较其他串的前缀是否与第一个串相同。
c...
分类:
其他好文 时间:
2015-06-23 11:55:01
阅读次数:
129
1404. Easy to Hack!
Time limit: 1.0 second
Memory limit: 64 MB
When Vito Maretti writes an important letter he encrypts it. His method is not very reliable but it’s enough to make any detecti...
分类:
其他好文 时间:
2015-06-23 11:55:40
阅读次数:
119
效果是在某个Item上右滑可以删除某个条目--效果虽然很简单,但是思路很重要
MainActivity
package com.yangfuhai.animation1;
import java.util.ArrayList;
import android.app.ListActivity;
import android.os.Bundle;
import android.view.Mot...
分类:
其他好文 时间:
2015-06-23 11:56:19
阅读次数:
143
在 FreeBSD Jail 中安装 Gitlab,执行 bundle install 时,有个类库文件找不到,最后修改 config 文件顺利通过。
出现的错误:
Building nokogiri using packaged libraries.
-----
libiconv is missing. please visit http://nokogiri.org/tutor...
分类:
其他好文 时间:
2015-06-23 11:55:08
阅读次数:
163
Fortran函数的调用标准在编译时使用iface声明,如iface:default,表示采用的是default标准。
fortran的调用标准有
[1] default: Tells the compiler to use the default calling conventions.
[2] cref: Tells the compiler to use cal...
分类:
其他好文 时间:
2015-06-23 11:54:58
阅读次数:
155
IsPostBack是Page类的一个属性,返回值为一个布尔值。一般放在Page_Load事件中。当页面是第一次打开时其值为False,若当前页面为一个提交后的页面其值为True.
分类:
其他好文 时间:
2015-06-23 11:52:11
阅读次数:
128
parser模块是easyloader第一个加载的模块,它的主要作用,就是扫描页面上easyui开头的class标签,然后初始化成easyui控件。/** * parser模块主要是解析页面中easyui的控件 */ $.parser = { // 是否自动解析 ...
分类:
其他好文 时间:
2015-06-23 11:51:46
阅读次数:
94
Fort.js 是一款用于时尚、现代的表单填写进度提示效果的JavaScript 库,你需要做的就是添加表单,剩下的任务就交给 Fort.js算法了,使用非常简单。提供了Default、Gradient、Sections 以及 Flash 四种效果,满足开发的各种场合需要。源码下载 在线演示
分类:
其他好文 时间:
2015-06-23 11:52:53
阅读次数:
114
大道至简(软件工程实践者的思想)——阅读笔记二全书共分为八章,分别为“编程的精义”、“是懒人造就了方法”、“团队缺乏的不只是管理”、“流于形式的沟通”、“失败的过程也是过程”、“从编程到工程”、“现实中的软件工程”和“是思考还是思想”。第一章编程的精义列举了“愚公移山”的例子,用诙谐幽默地表述了什么...
分类:
其他好文 时间:
2015-06-23 11:52:25
阅读次数:
150
show,hide——>是通过改变height,width,opacity来实现动画的显示与隐藏的fadeIn、fadeOut——>只通过opacity来实现动画的显示与隐藏的它们两个在动画显示与隐藏完后都会设置disply:none或displya:block。
分类:
其他好文 时间:
2015-06-23 11:51:26
阅读次数:
189
一、EasyUI组件的简单介绍 easyUI提供了很多组件让我们使用,如下图所示: 使用这些组件可以帮助我们快速地进行项目开发,下面以一个用户登录程序为例讲解EasyUI组件的使用二、EasyUI组件的使用2.1、创建测试的JavaWeb项目 2.2、编写测试代码 编写一个用户登录页面L...
分类:
其他好文 时间:
2015-06-23 11:51:49
阅读次数:
111
Description:Given an integern, return the number of trailing zeroes (尾数0) inn!.Note:Your solution should be in logarithmic time complexity.分析:一个数 n 的阶...
分类:
其他好文 时间:
2015-06-23 11:49:43
阅读次数:
99
原文:费用分摊问题 在现实生活中,我们可能会遇到这样的问题:三个人合伙买一件商品,假如这件商品的价格为1。三个人平摊的费用为1/3,可以用分数表示,但是计算机处理最后的结果是小数0.33(保留两位小数),这样0.33*3=0.99x,2--->y,3--->Z等,同一组的总费用是相同的。 因为每组的...
分类:
其他好文 时间:
2015-06-23 11:50:00
阅读次数:
104
核心类:ZorkaAsyncThread.javaprotected BlockingQueue submitQueue; /*** Processes single item from submit queue (if any).*/public void runCycle() {try {T o...
分类:
其他好文 时间:
2015-06-23 11:50:03
阅读次数:
184