原创 LeetCode算法題之Letter Combinations of a Phone Number

問題描述: 手機鍵盤上的數字對應着若干個字母,輸入一組由數字組成的字符串,對應輸出相應的字母的所有可能組合,順序不限 解題思路: 暴力破解可以得到結果相當於遍歷一棵樹,可以使用樹的遍歷算法DFS 25 / 25 test case

原创 LeetCode算法題之Permutations

問題描述: Given a collection of numbers, return all possible permutations. For example, [1,2,3] have the following p

原创 自學數據挖掘十大算法之PageRank

PageRank是Google用來衡量一個網站好壞的唯一標準,Google將其分爲0—10級,一般PR值達到4,該網站已經很不錯了,Google將自己的網站等級定爲10。對於某個互聯網網頁A來說,該網頁的PageRank值的計算基於兩個

原创 LeetCode算法題之ZigZag Conversion

問題描述: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to

原创 LeetCode算法題之Implement strStr()

問題描述: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not pa

原创 LeetCode算法題之Next Permutation

問題描述 Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of num

原创 gitlab中fork項目向源項目merge過程中的conflict問題

前段時間使用gitlab管理項目,遇到這樣的問題,我fork了項目組長建立的項目,其中: 組長項目地址:http://192.168.1.1:8000/LOL/demaxiya.git 或者 [email protected]:LOL/de

原创 爬蟲爬取頁面過程中HttpClient導致的進程阻塞問題

爬蟲爬取頁面過程中HttpClient導致進程阻塞問題 目前在做爬蟲項目,爬取多個書籍網站的書籍詳情頁面,遇到一個很噁心的問題,別的網站都能在短時間內完成爬取,唯獨網站A的線程卡死,永遠隨機的阻塞在某個頁面。定位到錯誤點在下載函數,這是初

原创 自動刪除指定時間內的日誌和文件shell腳本

直接上代碼,注意shell格式很重要: #!/bin/bash #刪除5天以前的日誌數據 日誌位於./logs 文件夾下 find ./logs/ -mtime +5 -name "*.log*" -exec rm -rf {} \;

原创 LeetCode算法題之String to Integer (atoi)

問題描述: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you wan

原创 解決postgresql選擇表名增加字段錯誤問題

解決postgresql選擇表名增加字段錯誤問題 表名:BOOKOMIT_OUTPUT_W Schemas:public 要向該表增加自增字段id,使用 alter table public.BOOKOMIT_OUTPUT_W AD

原创 趣味編程題之Blocked Billboard

During long milking sessions, Bessie the cow likes to stare out the window of her barn at two huge rectangular billboar

原创 python通過FTP方式從虛擬機服務器上下載文件

因業務需求,需要將幾臺虛擬機服務器上的特定文件夾下的日誌集中到一臺服務器上,參考前人工作直接寫python腳本,先上代碼: #!/usr/bin/python # -*- coding:utf-8 -*- ''' Created on 2

原创 趣味編程題之Milk Measurement

Farmer John purchases three cows: Bessie, Elsie, and Mildred, each of whom initially produces 7 gallons of milk per day

原创 Web Scraping with Python 學習筆記8

Chapter 8:Reading and Writing Natural Languages Summarizing Data         自然語言處理這塊有一項重要的內容就是文本摘要,本節涉及的只是去停用詞,類似中文的“地,的,得