原创 leetcode之 Longest Consecutive Sequence

題目:Longest Consecutive Sequence Given an unsorted array of integers, find the length of the longest consecutive ele

原创 報錯:curl: (7) Failed connect to raw.githubusercontent.com:443

參考:https://www.cnblogs.com/Dylansuns/p/12309847.html 執行 curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33

原创 c++ 學習curses庫,2048簡單小遊戲

2048 簡單小遊戲 遊戲規則: 用W,S,A,D控制上下左右操作 Q退出,R重新開始 當某個位置得到2048時獲勝 不能再有新的操作時失敗 移動: 每次移動時,有兩個相同的撞在一起會疊加,每個數字一次移動只能疊加一次,從邊上開

原创 c++ 類的一些基礎

類 類的基本思想時數據抽象 和封裝。數據抽象依賴於接口 和實現 分離的編程技術 1. 定義抽象數據類型 1.1 定義改進類 定義和聲明成員函數的方式和普通函數的方式差不多 class data { public:

原创 leetcode 564 尋找最近的迴文數

Find the Closest Palindrome Given an integer n, find the closest integer (not including itself), which is a palindr

原创 c++ 基礎語句 簡述

c++ 基礎語句 簡述 1. 簡單語句 大多數語句都以分號結束,i+5;就是表達式語句: 作用就是執行並丟棄求值結果 只有一個空格的是空語句包含一個分號 ival = v1 + v2;; //第二個分號表示一條多餘的

原创 Mysql 的正則表達式簡介

Mysql 的正則表達式 匹配文本,將一個模式與文本進行比較 例如: select name_s from pros where name_s regexp '1000' //表示包含1000的所有行 s1000也是 ord

原创 mysql 基礎函數

常見函數 概念: 類似與c++的函數,將一組邏輯語句封裝在函數體中,對外暴露函數名 好處: 隱藏了實現細節 提高代碼的重用性 調用: select 函數名(實參列表) 【from 表】; 特點: 叫啥 幹啥

原创 字符串、向量和數組

字符串、向量和數組 1. 命名空間的using 聲明 簡單的聲明方式: using namespace::name; //如using std::cin; 可放多行 頭文件中含有using後每個都會聲明瞭 1

原创 Find the Closest Palindrome(模擬暴力太久沒做題了失敗的回顧)

Find the Closest Palindrome Given an integer n, find the closest integer (not including itself), which is a palindr

原创 HDFS 操作(Centos7環境下)

HDFS 操作(Centos7環境下) 命令行方式 文件操作 添加新節點 API方式 1 命令行  1.1 文件操作 注意:Hadoop沒有當前目錄的概念,也沒有cd命令 命令模式:hdfs dfs -命令 例如: hd

原创 mysql 修改密碼和授權

修改密碼 格式: mysql> set password for 用戶名@HOST = password('新密碼') 例子: mysql> set password for root@localhost = password('

原创 html等網站常用語言註釋語句

HTML註釋: <!--這是單行註釋--> <!--     這是多行註釋     這是多行註釋     這是多行註釋 --> JS/jQuery註釋: //這是單行註釋 /*     這是多行註釋     這是多行註釋     這是多行

原创 CF 977F - Consecutive Subsequence map

題目鏈接 題意:找最長遞增連續子序列, d, d+1. 輸出長度和路徑。 ac代碼: #include <cstdio> #include <string> #include <iostream> #include <map> #

原创 華爲雲購買 與基礎linux 命令

突然的偶遇,學生9元一年什麼??? 這麼香的東西怎麼能不去瞅瞅。 具體操作步驟:https://www.nowcoder.com/discuss/344341?type=post&order=time&pos=&page=4 目前