码迷,mamicode.com
首页 >  
搜索关键字:code    ( 108667个结果
在java中使用正则表达式注意的地方
1、 对^与$的理解通常我们会通过类似Matcher matcher = Pattern.compile(regex).matcher(string);的代码去拿到一个Matcher对象。这种情况下regex中的^与$匹配的是整个待匹配串string的开头与结尾。而要使^与$去匹配每一行的开始与结尾...
分类:编程语言   时间:2014-05-07 09:03:01    阅读次数:343
LeetCode OJ - Validate Binary Search Tree
验证二叉树是否是查找树,可以通过查看它的中序遍历是否是升序的。下面是AC代码: 1 /** 2 * Given a binary tree, determine if it is a valid binary search tree (BST). 3 * solution : 4...
分类:其他好文   时间:2014-05-07 09:01:45    阅读次数:250
Android之TextView部分颜色变动
public class StringHandleExampleActivity extends Activity { /** Called when the activity is first created. */ private TextView textView; ...
分类:移动开发   时间:2014-05-06 14:39:57    阅读次数:350
打印二叉树中和为某一值的路径
输入一个二叉树,查找该树的所有路径(从根结点到叶结点的通路),并返回和(路径上所有结点值的和)为某一指定值的路径。
分类:其他好文   时间:2014-05-06 14:37:15    阅读次数:343
ProjectEuler_P11
Problem:In the 2020 grid below, four numbers along a diagonal line have been marked in red.08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08...
分类:其他好文   时间:2014-05-06 14:35:55    阅读次数:460
排序-归并排序
该算法基于一个简单的操作: 将两个有序的队列合成一个更大的有序队列。归并排序保证NlogN。原地归并的抽象算法(Abstract in-place merge):using System;namespace MergeSort{ class Program { static...
分类:其他好文   时间:2014-05-06 14:34:28    阅读次数:325
ubuntu14.04编译openjdk-7u40
1.ubuntu14.04安装依赖sudo apt-get install build-essential gawk m4 libasound2-dev libcups2-dev libxrender-dev xorg-dev xutils-dev x11proto-print-dev binuti...
分类:其他好文   时间:2014-05-06 14:19:33    阅读次数:343
方格拼图游戏2(javascript以类的形式实现)+增加批量移动
今天又在原来的基础上,增加了新的功能:当空白方格A 与 鼠标点击的方格 B在同一行,或者同一列,而且当他们不是紧挨着的情况,自动将B到A间的方格们,顺次移动填补空白方格。var game ={ wid_num:3, cotainerid:"game_cotainer", init:...
分类:移动开发   时间:2014-05-06 14:18:17    阅读次数:541
【原】接口
//接口是一个特殊的抽象类;//接口不能实例化;//接口中的成员默认就是抽象的;//只能定义属性 方法 索引器 事件;//抽象成员不能有访问修饰符 默认就是Public;//实现接口的类必须要实现接口中的所有的成员;//实现类在实现接口的成员的时候不要写override;//实现成员的时候,必须要保...
分类:其他好文   时间:2014-05-06 14:16:57    阅读次数:256
LeetCode::Trapping Rain Water
1、到今天完成39题,还需要不停的加油。今天再分析下装雨水这道题Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water i...
分类:移动开发   时间:2014-05-06 14:08:48    阅读次数:490
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!