原创 lintcode:快樂數
class Solution: """ @param: n: An integer @return: true if this is a happy number or false """
原创 lintcode:哈希函數
class Solution: """ @param key: A String you should hash @param HASH_SIZE: An integer @return an i
原创 lintcode:二分查找
class Solution: # @param nums: The integer array # @param target: Target number to find # @return the
原创 lintcode:最長單詞
引用塊內容 最長單詞 給一個詞典,找出其中所有最長的單詞。 在詞典 { “dog”, “google”, “facebook”, “internationalization
原创 shell中產生隨機數的方法
shell中產生隨機數的方法 1⃣️ echo $RANDOM RANDOM是shell內置的隨機數 2⃣️ for i in seq 1000;do echo $RANDOM >> 1.txt;done 產生1000個隨機數 3
原创 lintcode : 加一
class Solution: """ @param: digits: a number represented as an array of digits @return: the result
原创 lintcode:兩個數組的交
class Solution: # @param {int[]} nums1 an integer array # @param {int[]} nums2 an integer array # @ret
原创 MacOS error
lldb: error: SDK "macosx" cannot be located lldb: error: SDK "macosx" cannot be located lldb: error: unable to look
原创 lintcode:最後一個單詞的長度
、 class Solution: """ @param: s: A string @return: the length of last word """ def lengthOfLast
原创 lintcode:最長上升連續子序列
class Solution: """ @param: A: An array of Integer @return: an integer """ def longestIncreasi
原创 git clone本地庫出現 ssh: connect to host localhost port 22: Connection refused
原文鏈接:https://blog.csdn.net/bluecom24/article/details/39593793 ###起因: 今天git clone 本地倉庫時報ssh: c
原创 ubuntu swap區太小
詳細教程百度都有,僅記錄指令,以方便我自己以後查看。 =================改變swap大小=================== free -h # 查看內存配置,數值帶單位 swapon -s # 原先
原创 vim使用記錄
僅記錄我目前常用的幾個vim命令,以後如有需要會再增加 1.撤銷 :u #撤銷一次 ctr+R #撤銷剛纔的撤銷動作 :e! #將文件恢復初始,並重新載入 :q! #放棄更改並退出vim 環境的設定 :set all 可
原创 linux rhel libflashplayer.so安裝位置
linux rhel libflashplayer.so安裝位置: 自動下載flash壓縮包後解壓,將其中的libflashplayer.so文件複製到如下路徑: /usr/lib/mozilla/plugins
原创 firefox applications下放在favorities的配置
firefox 快捷方式配置說明 [root@localhost applications]# cat firefox.desktop [Desktop Entry] Version=1.0 Name=Firefox Web Br