原创 雙向循環鏈表
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct Link { int data; struct Link *llink; stru
原创 質數因子
功能:輸入一個正整數,按照從小到大的順序輸出它的所有質數的因子(如180的質數因子爲2 2 3 3 5 ) 詳細描述: 函數接口說明: public String getResult(long ulDataInput) 輸
原创 哈希表
#include <stdio.h> #include <stdlib.h> typedef struct //哈希 { int key; //哈希地址關鍵字 int hi; //哈希衝突次數 }DataTyp
原创 進制轉換
寫出一個程序,接受一個十六進制的數值字符串,輸出該數值的十進制字符串。(多組同時輸入 ) 輸入描述: 輸入一個十六進制的數值字符串。 輸出描述: 輸出該數值的十進制字符串。 #include <iostream> using n
原创 棧
#include <stdio.h>#include <stdlib.h>#include <string.h>typedef struct node{ int number; struct node *next;}Node,*pNode;
原创 隊列
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct node { int number; struct node *next; }Nod
原创 linux日誌
/var/log/messages — 包括整體系統信息,其中也包含系統啓動期間的日誌。此外,mail,cron,daemon,kern和auth等內容也記錄在var/log/messages日誌中。/var/log/dmesg — 包含內
原创 遞歸調用例題
class program { static void Main(string[] args) { int i; i = x(x(8)); } static int x(int
原创 哈希表
#include <stdio.h> #include <stdlib.h> typedef struct //哈希 { int key; //哈希地址關鍵字 int hi; //哈希衝突次數 }DataTyp
原创 linux 別名
vi ~/.bashrc#Productivityalias ls="ls --color=auto"alias ll="ls --color -al"alias grep='grep --color=auto'mcd() { mkdir
原创 shell包含所有解壓縮的函數
#!/bin/sh() { if [ -f $1 ];then case $1 in *.tar.bz2) tar xjf $1
原创 linux 硬盤報警聲
一:消除shell中鈴聲有三種風格:none, visible,(1)消除shell的報警聲,就是按tab鍵不對的響聲:在/etc/inputrc中加入一行:(我在RedHat9.0中嘗試了)set bell-style none保存並重啓
原创 隊列
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct node { int number; struct node *next; }Nod
原创 linux 6種隨機數產生
1 echo $RANDOM echo $RANDOM | md5sum | cut -c 1-9 (截取8位)2 openssl rand -base64 8 openssl rand -base64 8 | m
原创 雙向循環鏈表
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct Link { int data; struct Link *llink; stru