Android的编辑框控件EditText在平常编程时会经常用到,有时候会对编辑框增加某些限制,如限制只能输入数字,最大输入的文字个数,不能输入 一些非法字符等,这些需求有些可以使用android控件属性直接写在布局xml文件里,比如android:numeric="integer"(只允 许输入....
分类:
移动开发 时间:
2014-07-30 20:26:54
阅读次数:
259
Problem Description
Given a positive integer n, your task is to find a positive integer m, which is a multiple of n, and that m contains the least number of different digits when represented in decim...
分类:
其他好文 时间:
2014-07-30 14:46:03
阅读次数:
230
Time Limit: 5000MS
Memory Limit: 65536K
Total Submissions: 3516
Accepted: 1651
Description
Given a prime P, 2 31, an integer B, 2
BL == N (mod P)
Input
Read severa...
分类:
其他好文 时间:
2014-07-30 12:27:53
阅读次数:
331
C. Marlon's StringTime Limit: 2000msMemory Limit: 65536KB64-bit integer IO format:%lld Java class name:MainLong long ago, there was a coder named Marl...
分类:
其他好文 时间:
2014-07-30 12:08:23
阅读次数:
206
解法:考虑多种情况 1 #include 2 3 class Solution { 4 public: 5 int atoi(const char *str) { 6 int signal = 0; /*标记正负,还未出现判定正负的标志时,记为0*/ 7 ...
分类:
其他好文 时间:
2014-07-30 11:57:03
阅读次数:
182
定义一个队栈,每次出现一个数放进栈中,若出现运算符的话,就将栈顶的两个元素出栈进行运算后在放入栈考虑特殊情况1.只有一个数字的时候2.出现负数的情况class Solution{public: int evalRPN(vector &tokens) { // if(token...
分类:
其他好文 时间:
2014-07-30 07:40:03
阅读次数:
169
考虑几个特殊的情况1.若字符窜s=" "2.字符窜s=“a b d e”3.字符窜s=“ a”然后在s后面+上一个‘ ’,每次遇到s[i]为空格,s[i-1]不为空格的时候为一个单词class Solution{public: void reverseWords(string &s) ...
分类:
其他好文 时间:
2014-07-30 07:38:43
阅读次数:
171
create table tbl_table ( id integer not null auto_increment, fname varchar(255), lname varchar(255), CONSTRAINT tbl_table PRIMARY KEY (id), un...
分类:
数据库 时间:
2014-07-30 03:17:52
阅读次数:
356
Reverse Integer
java,python,C++三种代码练习
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
click to show s...
分类:
其他好文 时间:
2014-07-29 22:02:52
阅读次数:
333
For a positive integer N , the digit-sum of N is defined as the sum of N itself and its digits.
When M is the digitsum of N , we call N a generator of M .
For example, the digit-sum of 245 is 256 (...
分类:
其他好文 时间:
2014-07-29 21:53:12
阅读次数:
284