2 小米的蝉

尚未进行身份认证

Keep It Simple and Stupid

等级
TA的排名 4w+

Jetty 报错 Tomcat不报错 maven jetty插件不报错, 可能是jetty版本不统一造成

要在服务器上部署, jetty报错找不见hibernate某个函数, 然而此函数存在.开发环境为 Intellijjetty插件版本: 9.2.6.v20141205外置jetty版本: 9.4.21.v20190926如果你也有类似问题, 不妨试试将jetty版本统一我将外置jetty降版本后成功...

2019-10-20 16:41:25

atom删除文件: The following file couldn't be moved to trash (is gvfs-trash installed?)

参考这个在使用加环境变量无果环境ubuntu 16atom 1.4执行以下命令sudo mkdir -p /.Trash-1000/{expunged,files,info}sudo chown -R $USER /.Trash-1000

2019-10-06 21:58:37

[leetcode][Algorithm] -13. Roman to Integer with [Java]

problemclass Solution { public int romanToInt(String s) { int N = s.length(); int sum = 0; char a = 0; int b = 0; int c = 0; for(int i=0;i<N;i++...

2019-09-23 13:59:22

[leetcode][DataBase] - 178. Rank Scores with [MySQL]

problemselect inn.Score,inn.Rank from ( select ss.Score,@row:=@row+1 as Rank from (select @row:=0) a, (select Score from Scores group by Score) as ss order by ss.Score desc) as ...

2019-09-23 13:47:07

[leetcode][DataBase] - 177. Nth Highest Salary with [MySQL]

problem # 184ms select min(aa.Salary) from (select distinct Salary from employee order by Salary desc limit N) as aa where (select count(distinct Salary) from employee) ...

2019-09-23 13:43:19

[leetcode][DataBase] - 176. Second Highest Salary with [MySQL]

problemselect ifnull((select distinct Salary from Employee order by Salary desc limit 1,1), null) as SecondHighestSalary;or otherselect max(Salary) as SecondHighestSalary from employee where Salar...

2019-09-23 13:23:58

[leetcode][DataBase] - 175. Combine Two Tables with MySQL

题目select FirstName, LastName, City, State from Person left join Address using (PersonId);orselect FirstName, LastName, City, State from Person left join Address on Person.PersonI...

2019-09-23 11:44:11

leetcode - 12. Integer to Roman with Java

problem方法一,一位一位判断。class Solution { public String intToRoman1(int num) { StringBuilder sb = new StringBuilder(); char ooo[] = new char[]{'I','V','X','L','C','D','M'}; int ...

2019-09-21 09:58:53

leetcode - 11. Container With Most Water with Java

problemimport java.lang.reflect.Method;import java.util.*;class Solution { public int maxArea(int[] height) { int max = 0; int left = 0; int right = height.length-1; ...

2019-09-21 09:55:59

leetcode - 9. Palindrome Number with Java

题目class Solution { public boolean isPalindrome(int x) { if(x<0){ return false; } int a = 0; int b = x; while(x>0){ a = a * 10...

2019-09-21 09:55:18

APG -- Algorithm PlayGround 基于Phaser 的算法游戏(类rpg)框架

APG——Algorithm PlayGround一个有趣,智能和简单的HTML5游戏框架简单的开发方式,将你的算法变成游戏对PhaserCE库的封装开发70+个函数接口可供使用,通过配置文件智能优化游戏提供可视化的地图编辑方案 您的浏览器不支持 HTML5 video 标签。视频制作by@llwwdbd现在就开始制作吧API开发者文档官网官网(备用)Demo ...

2019-09-13 19:31:40

leetcode - 8. String to Integer (atoi) with Java

题目class Solution { public int myAtoi(String str) { int N = str.length(); int minus = 0; long res = 0; for(int i=0;i<N;i++){ char ch = str.charAt(i);...

2019-09-13 14:56:26

leetcode - 7. Reverse Integer with Java

where is problem 搞笑的空间复杂度使用long,最后进行比较会更小,不知道为什么class Solution { public int reverse(int x) { boolean minus = x<0; x *= minus?-1:1; int res = 0; while(x>0){...

2019-09-13 14:54:55

leetcode - 5. Longest Palindromic Substring with Java

题目在我这里方法一,大暴力 public String longestPalindrome1(String s) { /* very force: O(s.length()^2) 空间复杂度 O(1) */ int i=0; int j=0; boolean fla...

2019-09-13 14:46:44

leetcode - 4. Median of Two Sorted Arrays with Java

简单做法, 左边哪一些, 右边拿一下, 看谁小拿谁.但是时间复杂度达不到要求, 虽然在leetcode上也是很快public double findMedianSortedArrays1(int[] A,int[] B){ /* time complexity: O((m+n)/2+1) */ int m = A.leng...

2019-09-11 22:51:34

leetcode - 6. ZigZag Conversion with Java

题目地址这道题涉及到String, StringBuffer, StringBuilder的知识点String在拼接时需要new新的String对象, 而它除了hash之外都是final属性, 分配空间会造成时间损耗.所以String不适合大量拼接. 使用String可是耗时18ms呢StringBuffer解决了这个问题, 它提升了速度, 是线程安全.而StringBuilder 和...

2019-09-11 22:39:23

virtualbox 发送 ctrl alt fn组合键的方法:使用热键(默认右ctrl)+fn即可

一般是用来在虚拟机中切换文字模式和图像化窗口模式的。如果直接使用ctrl+alt+fn可能会触发主机的组合键。所以使用热键+fn

2019-09-08 18:48:55

leetcode - 3. Longest Substring Without Repeating Characters with Java

题目链接import java.lang.reflect.Method;class Solution { /*两个方法都是:end无所谓的在一个一个移动,begin则是追寻之前的循环体留下的信标 关键在于信标是怎么设置下的,第一种方法是每一次都从序列中寻找信标。 第二种直接记录了下来。 一个用时间换空间,一个用空间换时间。 */ pu...

2019-09-08 00:54:50

leetcode - 2. Add Two Numbers with Java

https://leetcode.com/problems/add-two-numbers/submissions//** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { val = x; ...

2019-09-07 21:39:45

leetcode - 1. Two Sum with Java

https://leetcode.com/problems/two-sum/submissions/import java.util.*;class Main { public int[] fun(int []nums,int target) { Map<Integer,Integer> map = new HashMap<>(); ...

2019-09-07 21:23:11

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 勤写标兵Lv2
    勤写标兵Lv2
    授予每个自然周发布4篇到6篇原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。