- 博客(103)
- 问答 (1)
- 收藏
- 关注
转载 Java时间格式对照表
在项目中用了Java8中全新的时间日期API, 感觉确实比之前的好用, 但是不知道格式化时间字符串中时区对应的字母, 记录一下参考:Java时间格式对照表JAVA 8:健壮、易用的时间/日期APIJAVA处理日期(Date)时间(Time)以及相关类的介绍字母日期或时间元素表示示例GEra 标志符T
2017-04-16 18:29:12
1195
转载 Mysql解压版安装注意事项
转载自:http://www.cnblogs.com/ranc/p/5623367.htmlMySQL 5.7以上版本的配置和以前有所不同,在这里与大家分享一下经验。MySQL 5.7及以上版本压缩包windows 7及更高版本方法/步骤解压缩 将下载到的文件解压缩到自己喜欢的位置,例如我自己的
2017-04-03 14:37:29
524
转载 加快从大容量的数据库中提取数据(查询)
找不到原文链接....都是转的随着“金盾工程”建设的逐步深入和公安信息化的高速发展,公安计算机应用系统被广泛应用在各警种、各部门。与此同时,应用系统体系的核心、系统数据的存放地――数据库也随着实际应用而急剧膨胀,一些大规模的系统,如人口系统的数据甚至超过了1000万条,可谓海量。那么,如何实现快速地从这些超大容量的数据库中提取数据(查询)、分析、统计以及提取数据后进行数据分页已成为各地系统管理
2017-01-05 12:55:47
3534
原创 C# 学习(1) 可空类型
从java转c#C#提供了一个特殊的数据类型,可空类型,可以在其中指定正常范围值,以及空 (null) 值.声明可空类型Nullable本身是一个泛型类型,表示是类型T的可空版本.类型参数T存在两个泛型约束,struct和new().这意味着你只能把原来是值类型的类型“打包”成可空类型.Nullable有两个属性,HasValue与Value.前者为bool值,表示是否
2016-12-08 10:25:02
435
原创 leetcode 58. Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is
2016-08-31 20:54:29
293
原创 MySQL修改字段默认值
alter table 表名 alter column 字段名 drop default;alter table 表名 alter column字段名 set default 默认值;
2016-08-10 12:43:10
3308
原创 leetcode 48. Rotate Image
You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?给你一个n*n的二位矩阵,顺时针旋转90°,不申请额外的空间.先关于主对角线对称,再左右对称.
2016-07-27 17:43:30
245
原创 leetcode 46. Permutations
Given a collection of distinct numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1
2016-07-25 19:50:17
300
原创 leetcode 43. Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string.Note:The numbers can be arbitrarily large and are non-negative.Converting the input string to integ
2016-07-25 15:56:01
279
原创 leetcode 33. Search in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If found in the array retur
2016-06-25 18:33:30
314
原创 leetcode 5. Longest Palindromic Substring
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.找到一个字符串中的最长连续回文串.以
2016-06-25 17:30:09
226
原创 leetcode 38. Count and Say
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11 is read off as "two 1s" or 21.21 is read off as
2016-06-24 16:09:03
352
原创 leetcode 35. Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.
2016-06-21 00:54:01
250
原创 leetcode 34. Search for a Range
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the order of O(log n).If the target is not found
2016-06-20 20:48:48
272
原创 leetcode 31. Next Permutation
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest possible
2016-06-19 00:21:09
278
原创 leetcode 29. Divide Two Integers
Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.计算两个整数相除,不使用乘号,除号和取余号.除法应该就是用减法实现的,若只是相减,会超时,考虑位运算减少时间.public class A29Div
2016-06-15 23:18:39
260
原创 leetcode 28. Implement strStr()
Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.实现字符串搜索算法.这里是String类的indexOf(String str)方法.也可以用KMP算法.public
2016-06-13 21:07:35
387
原创 leetcode 27. Remove Element
Given an array and a value, remove all instances of that value in place and return the new length.Do not allocate extra space for another array, you must do this in place with constant memory.
2016-06-13 09:44:57
251
原创 leetcode 26. Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with
2016-06-12 23:43:44
260
原创 leetcode 25. Reverse Nodes in k-Group
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is
2016-06-12 23:14:58
347
原创 leetcode 24. Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. Y
2016-06-12 17:14:46
245
原创 leetcode 23. Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.合并k个有序的链表成一个有序的链表.用java中优先队列做,java中的优先队列是基于优先级堆的public class A23MergekSortedLists { //
2016-06-11 23:11:50
317
原创 leetcode 22. Generate Parentheses
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ "((()))", "(()())", "(())()", "()(())
2016-06-11 19:52:30
208
原创 leetcode 21. Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.合并两个有序的链表成一个有序的量表.public class A21MergeTwoSortedLis
2016-06-11 12:40:12
206
原创 leetcode 20. Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are all va
2016-06-11 11:53:46
222
原创 leetcode 19. Remove Nth Node From End of List
Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the
2016-06-10 22:41:13
245
原创 leetcode 18. 4Sum
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note: The solution
2016-06-09 23:55:13
304
原创 leetcode 17. Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input:Digit st
2016-06-09 22:38:58
270
原创 leetcode 16. 3Sum Closest
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exact
2016-06-09 20:58:41
257
原创 leetcode 15. 3Sum
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: The solution set must not contain
2016-06-06 23:12:39
216
原创 leetcode 14. Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.在一个字符串数组中找出最长公共前缀遍历判断第一个字符串的每个字符与其他字符串的相应位置的字符public class A14LongestCommonPrefix { public String longestCo
2016-06-05 17:15:11
353
原创 leetcode 13. Roman to Integer
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.与leetcode 12题相反,将罗马数字转换成阿拉伯数字(小于3999)从前向后遍历如果前面的比后面的小,则加上后面减去前面的值,指针向后移动一位,反之,加上前面
2016-06-05 16:22:01
319
原创 leetcode 178. Rank Scores
Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ranking. Note that after a tie, the next ranking number should be the next consecutive integer value.
2016-06-05 15:35:43
1898
原创 leetcode 177. Nth Highest Salary
Write a SQL query to get the nth highest salary from the Employee table.+----+--------+| Id | Salary |+----+--------+| 1 | 100 || 2 | 200 || 3 | 300 |+----+--------+For exampl
2016-06-05 15:27:07
985
原创 leetcode 176. Second Highest Salary
Write a SQL query to get the second highest salary from the Employee table.+----+--------+| Id | Salary |+----+--------+| 1 | 100 || 2 | 200 || 3 | 300 |+----+--------+For exa
2016-06-05 15:22:28
1436
原创 leetcode 12. Integer to Roman
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.将阿拉伯数字转换成罗马数字(小于3999)看了一下罗马数字的写法(维基百科),按个十百千位处理public class A12IntegertoRoman
2016-06-05 15:11:42
316
原创 leetcode 11. Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fin
2016-06-02 23:17:58
250
原创 leetcode 9. Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to string, no
2016-05-31 22:04:52
251
原创 leetcode 8. String to Integer (atoi)
Implement atoi to convert a string to an integer.The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting from t
2016-05-30 22:58:49
230
原创 leetcode 6. ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I
2016-05-30 21:12:53
276
空空如也
SQL server查询处理问题
2017-01-10
TA创建的收藏夹 TA关注的收藏夹
TA关注的人