原创 劍指Offer——1.二維數組中的查找

在一個二維數組中(每個一維數組的長度相同),每一行都按照從左到右遞增的順序排序,每一列都按照從上到下遞增的順序排序。請完成一個函數,輸入這樣的一個二維數組和一個整數,判斷數組中是否含有該整數。(JAVA) public class So

原创 python改錯——1.AttributeError: module 'gym' has no attribute 'make'

我自己在寫強化學習代碼,起的名字是gym.py,所以在import時就會出現AttributeError: module 'gym' has no attribute 'make'這個錯誤。

原创 python改錯——_isdir: embedded null character in path

突然停電,開機後打開spyder,命令窗口報錯:_isdir: embedded null character in path。 可以嘗試:1.重啓Spyder                     2.運行這個命令: spyder -

原创 python改錯——ConvergenceWarning: The max_iter was reached which means the coef_ did not converge "

使用LogisticRegression類對數據進行邏輯迴歸擬合,運行程序後,得到警告: ConvergenceWarning: The max_iter was reached which means the coef_ did not

原创 劍指offer——旋轉數組的最小數字

把一個數組最開始的若干個元素搬到數組的末尾,我們稱之爲數組的旋轉。 輸入一個非減排序的數組的一個旋轉,輸出旋轉數組的最小元素。 例如數組{3,4,5,1,2}爲{1,2,3,4,5}的一個旋轉,該數組的最小值爲1。 NOTE:給出的所有元

原创 劍指offer——2.替換空格

請實現一個函數,將一個字符串中的每個空格替換成“%20”。例如,當字符串爲We Are Happy.則經過替換之後的字符串爲We%20Are%20Happy。(JAVA) public class Solution { publ

原创 2019年最新win10教育版產品密鑰

win10教育版: Windows 10 Education - NW6C2-QMPVW-D7KKK-3GKT6-VCFB2  

原创 安卓開發——積累6

在進行socket連接時報錯,failed to connect to /某個IP (port 8080)。 大部分情況下是由於本機的防火牆問題,將其關閉即可解決問題。

原创 安卓開發——積累5

android修改checkbox樣式邊框顏色 直接掛代碼: 1.首先在style.xml中加入自己想要的顏色 <style name="MyCheckBox" parent="Theme.AppCompat.Light">

原创 安卓開發——積累4

在進行頁面設計時,會遇到一些刁鑽的顏色 使用RGB顏色值與十六進制顏色碼進行轉換 這個工具挺好用的 https://www.sioe.cn/yingyong/yanse-rgb-16/

原创 pytorch教程推薦

莫煩python  講的簡潔明瞭也很形象 代碼與理論結合非常適合想快速上手的人 https://www.bilibili.com/video/av15997678?zw

原创 python改錯——AttributeError: module 'gym' has no attribute 'make'

我自己在寫強化學習代碼,起的名字是gym.py,所以在import時就會出現AttributeError: module 'gym' has no attribute 'make'這個錯誤。

原创 python練手——2.實時監聽文件(watchdog)

首先,安卓watchdog模塊。 pip install watchdog 其次,開始敲代碼。     event_handler = MyHandler()     observer = Observer()     observer.

原创 安卓開發——積累3

之前使用cursor來獲取文件名稱(String pid = cursor.getString(cursor.getColumnIndex("filename"));) 後來發現返回的事文件的相對地址,先是使用了java的split()

原创 python練手——1.自動生成有序的文件夾

import os base = r'F:\FFOutput\test\noc' #新建文件夾的路徑 i = 1 while i < 80: #新建1-80: 79個文件夾     file_name = base+str(i) #以no