Time of Update: 2018-12-04
大神的原帖http://blog.chinaunix.net/uid-14070437-id-3291537.html問題原因:昨天筆記本升級到centos6.3, bcm4313無線網卡的驅動編譯出現狀況,無法通過編譯, broadcom官方沒有提供更新,又沒搜到好的解決方案,那就自己動手嘍。問題分析:讀驅動代碼,看上去是redhat升級了高版本的核心代碼,版本號碼卻沒升;然後驅動中對linux核心版本的各種條件編譯導致資料結構和函式宣告不一致,編譯失敗。解決辦法:驅動代碼去掉了部分條件編譯,
Time of Update: 2018-12-04
幾個C++的輸入函數,總是分不清,總結一下! 1、cin 1、cin.get() 2、cin.getline() 3、getline() 4、gets() 5、getchar() 1、cin>> 用法1:最基本,也是最常用的用法,輸入一個數字: #include using namespace std; main () { int a,b; cin>>a>>b; cout<< using
Time of Update: 2018-12-04
#include<stdio.h> int findCoin(int coin[],int front,int back){ int i,sumf=0,sumb=0,sum=0; if(front+1==back) { if(coin[front]<coin[back]) return front+1; else return back+1; }
Time of Update: 2018-12-04
轉】如何給一個二維數組動態分配記憶體今天最演算法project時遇到需要使用一個動態數組,並且這個數組在編譯時間還是不知道大小的,到底能不能給二維數組動態分配空間,我還真沒試過。是不是跟一維數組一樣?用int *ar = new int[n][m],試了一下不行。後來試了很多方法參考了網上的資料終於理解了,其實方法還是跟一維數組一樣,至少說二維數組可以看成是地址的地址。具體方法如下:void test_two_array(){int r ,c ;//r 表示行,c表示列cin >>
Time of Update: 2018-12-04
我將從remove的複習開始這個條款,因為remove是STL中最糊塗的演算法。誤解remove很容易,驅散所有關於remove行為的疑慮——為什麼它這麼做,它是怎麼做的——是很重要的。這是remove的聲明:template<class ForwardIterator, class T>ForwardIterator remove(ForwardIterator first, ForwardIterator last, const T& value);就像所有演算法,
Time of Update: 2018-12-04
原文連結 http://blog.csdn.net/gexueyuan/article/details/6452459 用apt-get安裝emacs的話,版本是23.1.1,版本太低,所以在GNU的網站下了一個GNU emacs來安裝。 將在GNU的ftp下載的檔案包解壓到一目錄,cd進入該目錄,然後 ./configure進行配置產生make檔案,但是運行完一陣子後報錯如下 [c-sharp] view
Time of Update: 2018-12-04
1‘首先換個源,然後 sudo rm /var/lib/apt/lists/* -vf sudo apt-get update2今天划了70GB,在自己的筆記本上再裝個ubuntu 11.04 .剛裝完後,我就換成國內的源sjtu , bjtu , 163 這幾個源都試了,但總是出現下面的錯誤:擷取:2 http://extras.ubuntu.com oneiric/main i386 Packages [1,226 kB]命中 http://extras.ubuntu.com
Time of Update: 2018-12-04
#include<stdio.h>#include<stdlib.h>typedef int datatype;typedef struct node{datatype data;struct node *next;}linkstack;linkstack *top;void initiate(linkstack *top)//鏈棧的初始化{top=NULL;return ;} linkstack * pushls(linkstack *top,datatype x)//
Time of Update: 2018-12-04
#include<iostream>#include<string>#include<cstring>#include<cstdlib>#include<cstdio>#include"mysql/mysql.h"using namespace std;int main(){ MYSQL my_connection; MYSQL_RES * res_ptr; MYSQL_ROW sqlrow;
Time of Update: 2018-12-04
到Ubuntu 12.10後發現直接安裝ATI顯卡驅動失敗,會提示類似這樣的資訊:Check if system has the tools required for installation.fglrx installation requires that the system have kernel headers. /lib/modules/2.6.32-5-686-bigmem/build/include/linux/version.h cannot be found on this
Time of Update: 2018-12-04
#include<ostream>#include<iostream>#include<cstdlib> using namespace std; template<class T>class Node{public: T data; Node<T> *next; Node(T d = T(),Node<T> *n=NULL): data(d), next(n) {} }; template <class
Time of Update: 2018-12-04
1、首先到oracle下載上下載jdk-7u4-linux-i586.tar.gz 2、將jdk-7u4-linux-i586.tar.gz拷貝到/usr/lib/jvm/目錄下面,這裡如果沒有jvm檔案夾,則建立該檔案夾,命令: sudo mkdir jvm //建立檔案夾jvm sudo cp -r ~/download/jdk-7u4-linux-i586.tar.gz /usr/lib/jvm sudo tar -zxvg jdk-7u4-linux-i586.tar.gz 3、
Time of Update: 2018-12-04
3-4.5/6*7#include<iostream>#include<string>#include<cctype>#include<vector>#include<iterator>#include<sstream>using namespace std;int main(){string input;cout<<"input the string
Time of Update: 2018-12-04
將string轉化為int#include <iostream>#include<sstream>#include<string>using namespace std;int main(){ string str="110"; istringstream istr(str); int i=0; istr>>i; cout<<i<<endl; cout << "Hello world!"
Time of Update: 2018-12-04
OpenGL 是一套由SGI公司發展出來的繪圖函式庫,它是一組 C 語言的函式,用於 2D 與 3D 圖形應用程式的開發上。OpenGL 讓程式開發人員不需要考慮到各種顯示卡底層運作是否相同的問題,硬體由 OpenGL 核心去溝通,因此只要顯示卡支援
Time of Update: 2018-12-04
#include <iostream>#include <cstdlib>#include <vector> using namespace std; class CDemo { public: CDemo():str(Null){}; ~CDemo() { if(str) delete[] str; }; char* str; }; int
Time of Update: 2018-12-04
參考了個大神的http://blog.chinaunix.net/uid-14070437-id-3291537.html昨天筆記本升級到centos6.3, bcm4313無線網卡的驅動編譯出現狀況,無法通過編譯,
Time of Update: 2018-12-04
#include<iostream>#include<sstream>#include<string>#include<ctime>#include<cstdlib>#include<cstdio>#include<sstream>using namespace std;int main(){ string time="2013/4/8"; string
Time of Update: 2018-12-04
How to Install VLC in Fedora 18 / 17 / 16 / 15Updated by Manivannan on May 17, 2013 in How To Install | 54 commentsVLC is a free and open source cross-platform multimedia player, which plays most of the multimedia files (MKV, AVI, MP4, etc.,). No
Time of Update: 2018-12-04
一條命令徹底解決Xterm的中文顯示問題2013-03-26 來源:互連網 作者:自學網 點擊: 190一條命令徹底解決Xterm的中文顯示問題 使用 LInux 系統,終端總是少不了的。一般的終端都會比較大,速度慢。 Xterm 非常好,但它的中文字型預設情況下顯示有問題,找了很久,都是改這個配置,改那個檔案的最後總算被我徹底解決了。 啟動 Xterm 的時候使用下邊命令,簡單實用!把裡邊的 Monospace 換成你需要的字型吧。 xterm -fa