原创 pycharm設置代碼模板

文件 -- 設置 -- 編輯器 -- 文件和代碼模板 -- Python Script # -*-coding:utf-8 -*- # @Time: ${DATE} ${TIME} # @Author: cuishuohao # @File

原创 可測空間

原创 Leetcode的簡單算法題:53. 最大子數組和

鏈接:https://leetcode.cn/problems/maximum-subarray/ 之前題解的博客:https://tsuish.gitee.io/p/7a78 注:之後把這篇博客整理到hexo 我的代碼 int max(i

原创 Leetcode的中等算法題:198. 打家劫舍

鏈接:https://leetcode.cn/problems/house-robber/ 方法1 學會了動態規劃思路後,我獨立想出來的一個方法,缺點是代碼不夠優雅(dp和nums的序號有錯位)。 我的代碼 int max(int a,in

原创 Leetcode的SQL題:181. 超過經理收入的員工

鏈接:https://leetcode.cn/problems/employees-earning-more-than-their-managers/ 我的代碼: select a.name Employee from employee a

原创 Leetcode的SQL題:1527. 患某種疾病的患者

鏈接:https://leetcode.cn/problems/patients-with-a-condition/ 我的代碼 select * from Patients where conditions like 'DIAB1%' or

原创 Leetcode的SQL題:1484. 按日期分組銷售產品(知識點:分組)

鏈接:https://leetcode.cn/problems/group-sold-products-by-the-date 我的代碼 select sell_date, count(distinct(product)) num_sold

原创 Leetcode的SQL題:182. 查找重複的電子郵箱

鏈接:https://leetcode.cn/problems/duplicate-emails/ 我的代碼 select distinct a.email from person a inner join person b on a.i

原创 Leetcode的SQL題:1965. 丟失信息的僱員

鏈接:https://leetcode.cn/problems/employees-with-missing-information/ 我的代碼 方法一 select employee_id from Employees where emp

原创 Leetcode的簡單算法題:69. x 的平方根

鏈接:https://leetcode.cn/problems/sqrtx/ 我的代碼 int mySqrt(int x){ long res=0,i; for(i=1;i<=x;i++){ if(i*i>x

原创 Leetcode的簡單算法題:26. 刪除有序數組中的重複項

鏈接:https://leetcode.cn/problems/remove-duplicates-from-sorted-array/ 我的代碼 int removeDuplicates(int* nums, int numsSize){

原创 Leetcode的SQL題:1667. 修復表中的名字(知識點:MySQL函數)

鏈接:https://leetcode.cn/problems/fix-names-in-a-table 我的代碼 select user_id, concat(ucase(left(name,1)),lcase(substr(name,2

原创 Python爬蟲:Scrapy常用命令

驗證scrapy是否安裝:scrapy -h