標籤:查看電腦連接埠的開放情況命令:cmd——netstat -a -n-a:顯示所有串連和監聽連接埠;-n:以數字形式顯示地址和連接埠號碼“本地地址”指本地IP地址及其正在使用的連接埠號碼,“外部地址”指串連某連接埠的遠程主機的IP地址和連接埠號碼狀態:LISTENING時表示處於偵聽狀態,就是說該連接埠是開放的,等待串連,但還沒有被串連。 ESTABLISHED狀態表示已經建立串連,表面兩台機器正在通訊。
標籤:問題源於我在安裝maven以後沒有做過任何的設定,使用命令mvn install的時候得到了error: generics are not supported in -source 1.3和error: for-each loops are not supported in -source 1.3, 第一感覺就是JDK出現了問題(錯誤原因顯然應該是用JDK1.3編譯了),但是項目的JDK設定的就是1.7,語言也是7.0。 這裡有兩個辦法(全域設定和單工程設定)可以解決問題。 1.
標籤:Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in linear time and in O(1) space.方法很笨,其即時間複雜度差不多是O(n²)。package leetcode;import java.util.ArrayList;
標籤:計算階乘的和 1 //階乘的和,5!+4!+3!+2! 2 3 int a = 5; 4 for(int b = 4; b > 0; b--) 5 { 6 a = a * b; 7 } //先定義好最大數的階乘是多少 8 int c = a; 9 for(int n = 5; n > 1; n--) //當n等於2的時候,這是算的就是1的階乘,所以後面取n>110 {11
標籤:離2.6.31核心開始。linux核心配備了效能分析工具perf,它可以是功能級和指令級熱外表。 perf Performance analysis tools for Linux.Performance counters for Linux are a new kernel-based subsystem that provide a framework for all thingsperformance analysis. It covers hardware
標籤:題目:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.Here are few examples.[1,3,5,6], 5 → 2[1,3,