原创 Ubuntu下deb包的安裝方法

 轉自:http://blog.csdn.net/kevinhg/article/details/5934462 deb是debian linus的安裝格式,跟red hat的rpm非常相似,最基本的安裝命令是:dpkg -i fil

原创 VS2015 導入文件夾

 1、在解決方案下面的方案名上右擊,選擇“在文件資源管理器中打開文件夾(X)”,進入項目文件夾 2、將需要打開的文件夾複製到項目文件夾中 3、點擊解決方案上方的“顯示所有文件”即可

原创 BoolmFilter

布隆過濾器是一個判斷集合中是否包含特定元素的算法。比如,判斷一個英文單詞是否在字典中(單詞拼寫檢查);黑名單檢查等。也常用在搜索引擎中。布隆過濾器由一個很長的二進制向量和一系列隨機映射函數組成。提供插入但不提供刪除,但有用計數器代替bit

原创 GTK+構件

1 構件的實現、映射    從GtkWidget中繼承的類稱爲構件,構件分爲“有窗口構件”和“無窗口構件”兩種。有窗口構件有一個與之相關聯的GdkWindow,而無窗口構件沒有,它們將被繪製在有窗口構件的窗口上。在構件中,只有窗口構件才

原创 12. Integer to Roman

 Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999.(給出一個整數,

原创 Ubuntu 安裝 chrome 32/64 方法

每次都要找資源,真的很麻煩,其實很簡單。而且32位的包官網已經不維護了。下面是安裝方法:下載安裝包(在我的博客資源中有32位和64位的deb包,可以直接下載)。在對應目錄下執行$sudo gdebi go

原创 leetcode 10: Regular Expression Matching 分析及解答

 Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches

原创 Xubuntu 搜狗輸入法安裝

卸載fcitx sudo apt-get removefcitx*下載搜狗拼音輸入法http://pinyin.sogou.com/linux/?r=pinyin用gdebi安裝 sudo gdebi sogou_pinyin_linux

原创 LeetCode 132. Palindrome Partitioning II (C++)

題目描述 Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cu

原创 libvirt編譯安裝(git版)

libvirt可下載.tar安裝包進行編譯安裝,也可以通過克隆git庫進行安裝,本文介紹的是克隆git庫並編譯的方法。下載安裝後的位置如下:         libvirt庫的位置  :/home/hs/workspace/libvir

原创 LeetCode 55. Jump Game

題目描述 Given an array of non-negative integers, you are initially positioned at the first index of the array. Each elem

原创 export 原理解析 (Shell Script)

export 的基本作用就是將父shell中的局部變量設置爲環境變量,使得該變量可以在子shell中使用。下面設置兩種情景對export進行原理解析。 情景 1. 有一個名爲myexport.sh的腳本,內容如下: #!/bin/sh

原创 LeedCode 87. Scramble String

分析 dp[i][j][k]表示s1從i開始,s2從j開始,長度爲k的兩個substring是否爲scramble string,需要考慮三種情況: 如果兩個子串相等,則爲true; 如果兩個子串中間某一個點,左邊的子串爲scram

原创 Ubuntu 13.04下編譯GCC-4.8.2源碼並安裝成功

 The same as GCC5.2.0# 在Ubuntu-i386 下編譯GCC 4.8.2 # 安裝必要的軟件包 sudo apt-get update sudo apt-get install gcc sudo apt-get