原创 LeetCode-8 字符串轉整數

C++ class Solution { private: string subEmpty(string& s){ int length = s.length(); int begin = 0;

原创 機器學習(一)sklearn數據集

官方文檔 sklearn.datasets: Datasets sklearn中包含了很多可以用於機器學習算法的示例數據集 # sklearn數據集的使用 from sklearn.datasets import load_iris

原创 LeetCode-9 迴文數

C++ class Solution { public: bool isPalindrome(int x) { if(x < 0){ return false; }

原创 Flask(二)導入 Flask 的 Bootstrap 開發包

導入前端開發工具包 Bootstrap pip install flask-bootstrap -i https://pypi.douban.com/simple  導入庫後可以在虛擬環境的目錄下找到基礎模板 venv\Lib\sit

原创 Flask(一)創建環境

打開 Pycharm,選擇 Create New Project 選擇 Flask,點擊 Create 項目如圖所示 運行項目,打開瀏覽器,輸入 localhost:5000,網頁如下所示

原创 LeetCode-5 最長迴文子串

C++  class Solution { public: string longestPalindrome(string s) { int length = s.length(); int lo

原创 Bootstrap(二)表單構造器

Bootstrap表單構造器 拖拽表單控件 設置控件屬性 生成代碼

原创 LeetCode-7 反轉整數

C++ class Solution { private: const static int MAX_INT = 2147483647; public: int reverse(int x) { bool

原创 LeetCode-6 Z字形變換

C++  class Solution { public: string convert(string s, int numRows) { if(numRows==1){return s;} in

原创 LeetCode-4 兩個排序數組的中位數

class Solution { private: int min(int v1, int v2) { if (v1 > v2) { return v2; } return v1; } double getKt

原创 LeetCode-2 兩數相加

/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(

原创 LeetCode-3 無重複字符的最長子串

class Solution { public: int lengthOfLongestSubstring(string s) { int num = s.length(); int result = 0; int beg

原创 Bootstrap(一)環境配置

進入 http://getbootstrap.com/ 選擇 Download 在下載頁面再點擊一次 Download 開始下載   下載完成後解壓,將解壓獲得的文件夾下放在工程根目錄下,在根目錄下的網頁文件<head></head>中

原创 Goland 1.整型數組與字符串的相互轉化

1.1 byte[] 轉 stringfunc bytesToString (bytes []byte) string{ return string(bytes) }func main() { bytes := []byte{97,