2 小米的蝉

尚未进行身份认证

Keep It Simple and Stupid

等级
TA的排名 4w+

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

参考这个在使用加环境变量无果环境ubuntu16atom1.4执行以下命令sudomkdir-p/.Trash-1000/{expunged,files,info}sudochown-R$USER/.Trash-1000

2019-10-06 21:58:37

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

problemclassSolution{publicintromanToInt(Strings){intN=s.length();intsum=0;chara=0;intb=0;intc=0;for(inti=0;i<N;i++...

2019-09-23 13:59:22

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

problemselectinn.Score,inn.Rankfrom(selectss.Score,@row:=@row+1asRankfrom(select@row:=0)a,(selectScorefromScoresgroupbyScore)asssorderbyss.Scoredesc)as...

2019-09-23 13:47:07

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

problem#184msselectmin(aa.Salary)from(selectdistinctSalaryfromemployeeorderbySalarydesclimitN)asaawhere(selectcount(distinctSalary)fromemployee)...

2019-09-23 13:43:19

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

problemselectifnull((selectdistinctSalaryfromEmployeeorderbySalarydesclimit1,1),null)asSecondHighestSalary;orotherselectmax(Salary)asSecondHighestSalaryfromemployeewhereSalar...

2019-09-23 13:23:58

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

题目selectFirstName,LastName,City,StatefromPersonleftjoinAddressusing(PersonId);orselectFirstName,LastName,City,StatefromPersonleftjoinAddressonPerson.PersonI...

2019-09-23 11:44:11

leetcode - 12. Integer to Roman with Java

problem方法一,一位一位判断。classSolution{publicStringintToRoman1(intnum){StringBuildersb=newStringBuilder();charooo[]=newchar[]{'I','V','X','L','C','D','M'};int...

2019-09-21 09:58:53

leetcode - 11. Container With Most Water with Java

problemimportjava.lang.reflect.Method;importjava.util.*;classSolution{publicintmaxArea(int[]height){intmax=0;intleft=0;intright=height.length-1;...

2019-09-21 09:55:59

leetcode - 9. Palindrome Number with Java

题目classSolution{publicbooleanisPalindrome(intx){if(x<0){returnfalse;}inta=0;intb=x;while(x>0){a=a*10...

2019-09-21 09:55:18

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

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

2019-09-13 19:31:40

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

题目classSolution{publicintmyAtoi(Stringstr){intN=str.length();intminus=0;longres=0;for(inti=0;i<N;i++){charch=str.charAt(i);...

2019-09-13 14:56:26

leetcode - 7. Reverse Integer with Java

whereisproblem搞笑的空间复杂度使用long,最后进行比较会更小,不知道为什么classSolution{publicintreverse(intx){booleanminus=x<0;x*=minus?-1:1;intres=0;while(x>0){...

2019-09-13 14:54:55

leetcode - 5. Longest Palindromic Substring with Java

题目在我这里方法一,大暴力publicStringlongestPalindrome1(Strings){/*veryforce:O(s.length()^2)空间复杂度O(1)*/inti=0;intj=0;booleanfla...

2019-09-13 14:46:44

leetcode - 4. Median of Two Sorted Arrays with Java

简单做法,左边哪一些,右边拿一下,看谁小拿谁.但是时间复杂度达不到要求,虽然在leetcode上也是很快publicdoublefindMedianSortedArrays1(int[]A,int[]B){/*timecomplexity:O((m+n)/2+1)*/intm=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

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

2019-09-08 00:54:50

leetcode - 2. Add Two Numbers with Java

https://leetcode.com/problems/add-two-numbers/submissions//***Definitionforsingly-linkedlist.*publicclassListNode{*intval;*ListNodenext;*ListNode(intx){val=x;...

2019-09-07 21:39:45

leetcode - 1. Two Sum with Java

https://leetcode.com/problems/two-sum/submissions/importjava.util.*;classMain{publicint[]fun(int[]nums,inttarget){Map<Integer,Integer>map=newHashMap<>();...

2019-09-07 21:23:11

js 生成当前日期时间

精简版vardate=newDate();datetime=date.toLocaleDateString().split('/').slice(2,3).concat(date.toLocaleDateString().split('/').splice(0,2)).join('-')+""+(date.toL...

2019-07-15 19:08:28

查看更多

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