原创 (轉載)Java 註解 (Annotation)

  轉載自:https://blog.csdn.net/briblue/article/details/73824058   註解語法 因爲平常開發少見,相信有不少的人員會認爲註解的地位不高。其實同 classs 和 interface

原创 log4j的8個日誌級別

log4j定義了8個級別的log(除去OFF和ALL,可以說分爲6個級別),優先級從高到低依次爲:OFF、FATAL、ERROR、WARN、INFO、DEBUG、TRACE、 ALL。 ALL 最低等級的,用於打開所有日誌記錄。 TRAC

原创 234. Palindrome Linked List(C語言版本)

Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1) space?

原创 自動讀取log4j.xml或者log4j.properties的問題

%t 輸出產生該日誌事件的線程名 %d 輸出日誌時間點的日期或時間,默認格式爲ISO8601,也可以在其後指定格式,比如:%d{yyy-MM-dd HH:mm:ss },輸出類似:2002-10-18- 22:10:28 %p 輸出優先級

原创 linux 新增用戶組,用戶

新增用戶組 groupadd 選項 用戶組 -g GID 指定新用戶組的組標識號(GID)。 -o 一般與-g選項同時使用,表示新用戶組的GID可以與系統已有用戶組的GID相同。 新增用戶 useradd 選項 用戶名 選項

原创 237. Delete Node in a Linked List(C語言版本)

Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed

原创 496. Next Greater Element I(C語言版本)

You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all th

原创 正常的C語言代碼用gcc編譯失敗的原因

最近在在用codeblock 用C語言完成數據結構的上機習題,發現有一些常見的代碼在無法用gcc編譯成功,但是在vc6.0 卻可以編譯通過,原因是使用了不同的編譯器的緣故。   例如使用了引用類型的函數參數,以及2重指針,用gcc均無法編

原创 160. Intersection of Two Linked Lists(C語言版本)

Write a program to find the node at which the intersection of two singly linked lists begins. For example, the follow

原创 排序C語言代碼

// 歸併排序 // void MergeSort(int sourceArr[],int tempArr[],int startIndex,int

原创 232. Implement Queue using Stacks(C語言版本)(Time Limit Exceeded)

Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue.pop() -- Re

原创 Conway's law

Conway's law的核心如下: Any organization that designs a system (defined broadly) will produce a design whose structure is a

原创 jvm之java類加載機制和類加載器(ClassLoader)

     當程序主動使用某個類時,如果該類還未被加載到內存中,則JVM會通過加載、連接、初始化3個步驟來對該類進行初始化。如果沒有意外,JVM將會連續完成3個步驟,所以有時也把這個3個步驟統稱爲類加載或類初始化。             

原创 linux系統安裝時間的設置

sudo cp  /usr/share/zoneinfo/Asia/Shanghai   /etc/localtime   覆蓋localtime 文件即可 date 命令即可顯示正常命令

原创 141. Linked List Cycle(C語言版本)

Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? /**