原创 leetCode 203. Remove Linked List Elements 鏈表

203. Remove Linked List ElementsRemove all elements from a linked list of integers that have value val.ExampleGiven: 1 -

原创 net-snmp 發送告警流程圖

net-snmp 發送告警流程圖

原创 leetCode 283. Move Zeroes 數組

283. Move ZeroesGiven an array nums, write a function to move all 0's to the end of it while maintaining the relative or

原创 leetCode 234. Palindrome Linked List 鏈表

234. Palindrome Linked ListGiven a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n)

原创 centos7 搭建 samba,win10訪問centos7共享的文件路徑

centos7 搭建 samba,win10訪問centos7共享的文件路徑 首先安裝samba相關的服務 yum install -y samba* 配置samba的配置文件 cp /etc/samba/smb.conf /etc/sa

原创 linux C 獲取當前時間

linux C 獲取當前時間 經常會遇到打印時間的問題,記錄一下,方便自己和他人查閱。 struct tm nowtime; struct timeval tv; unsigned char time_now[128]; gettimeof

原创 leetCode 219. Contains Duplicate II 數組

219. Contains Duplicate IIGiven an array of integers and an integer k, find out whether there are two distinct indices i

原创 leetCode 26. Remove Duplicates from Sorted Array 數組

26. Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appea

原创 修改內核參數 dad_transmits

修改內核參數 dad_transmits 最近在學習ipv6的相關知識。 自己控制ipv6 地址衝突檢測(dad)發出的報文後,地址配置後,發現多一次ns報文。這很奇怪。經過排查,發現是內核自己發了一次ns報文。所以需要把內核發出的ns報文

原创 獲取系統cpu使用率(linux C)

typedef struct cpu_occupy_ //定義一個cpu occupy的結構體 { char name[20]; //定義一個char類型的數組名name有20個

原创 網易筆試題之合唱團---動態規劃

動態規劃學習[編程題]合唱團有 n 個學生站成一排,每個學生有一個能力值,牛牛想從這 n 個學生中按照順序選取 k 名學生,要求相鄰兩個學生的位置編號的差不超過 d,使得這 k 個學生的能力值的乘積最大,你能返回最大的乘積嗎? 輸入描述:每

原创 獲取磁盤使用率(Linux C)

#define SYS_DISK_BUFF_LEN 256 #define SYS_DISK_NAME_LEN 80 #define SYS_100_PERSENT 100 int get_sysDiskUsage() { FILE

原创 TCP數據報首部的學習

TCP首部的學習TCP首部結構如下:源端口(Source Port),目標端口(Destination Port) 各2字節源端口號,標識主機上發起傳送的應用程序;目的端口標識主機上傳送要到達的應用程序。源端和目的端的端口號,用於尋找發端和

原创 gdb斷點加條件

gdb斷點加條件 gdb打斷點是日常追蹤的必備技能。b 函數名稱其中一高級用法是條件斷點b 函數名稱 if a==5//整數類型b 函數名稱 if 0==strcmp(a,"abcdefg") //字符串類型比較

原创 leetCode 70. Climbing Stairs | 動態規劃

70. Climbing StairsYou are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1