最近因为工作需要写了个登录校验函数,话不多说,贴代码,因为只是一个简单的介绍用法,所以核心判断我就全部去掉了。//最先要求是只返回一个用户id,于是简单的returns integer就可以完成。CREATE OR REPLACE FUNCTION validate_user()RETURNS in...
分类:
数据库 时间:
2015-06-09 19:16:49
阅读次数:
1088
swift reversed = sorted(names, { (s1: String, s2: String) -> Bool in return s1 > s2 }) java8 list.sort((a, b) -> { Integer.compare(a.length(),b.length() }); C++ sort(x,x + N,[](float a, float b) { ...
分类:
编程语言 时间:
2015-06-09 17:54:47
阅读次数:
138
L51: N-Queens
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that
no two queens attack each other.
Given an integer n, return all distinct solutions to the n-qu...
分类:
其他好文 时间:
2015-06-09 17:32:04
阅读次数:
140
Given an integer n, return the number of trailing zeroes in n!.
Note: Your solution should be in logarithmic time complexity.
方法:找1...n中每个数因式分解中,5的个数(5的个数一般大于2的个数),即为10的个数
注意:题目要求时间复杂度:...
分类:
其他好文 时间:
2015-06-09 17:23:55
阅读次数:
110
Given an array of integers and an integer k, find out whether there there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and j is at most k.分析:用m...
分类:
其他好文 时间:
2015-06-09 17:23:48
阅读次数:
124
You are given a non-negative integer n, its decimal representation consists of at most 100 digits
and doesn't contain leading zeroes.
Your task is to determine if it is possible in this case to r...
分类:
其他好文 时间:
2015-06-09 17:21:09
阅读次数:
133
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:
You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional...
分类:
其他好文 时间:
2015-06-09 13:47:46
阅读次数:
114
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.

Given an integer n, return...
分类:
其他好文 时间:
2015-06-09 11:54:45
阅读次数:
125
在AndroidManifest.xml中会看到的身影,完整的uses-sdk是这个样子:其中integer是Android API level。uses-sdk是为了程序兼容而存在的,它是如何做兼容的呢?也许从三个子项的名字上就可以猜测出来。minSdkVersion:若手机或平板的API lev...
分类:
移动开发 时间:
2015-06-09 06:09:59
阅读次数:
135
DLL的调用1、VBPublic Declare Function FindPath Lib "zd/LY_Cstar_VB.dll" (ByVal StarX As Integer, ByVal StarY As Integer, ByVal StopX As Integer, ByVal Sto...
分类:
编程语言 时间:
2015-06-09 06:09:20
阅读次数:
116