這麼強大的功能,確實讓人很心動!!
錄製一段影片~ 有關~ Sublime Text 2.02 版本 如何安裝 Package Control 的碎碎念影片
希望可以分享給有需要的人.... (搞不好只有我不懂 XD )
PS. Git 網站 :http://git-scm.com/
同場加映 Sublime Text 2 安裝 Package Control 的 影片~
// 要複製的二維陣列 String ret[][]={ {"A1","B1","C1"}, {"A2","B2","C2"} }; String ret01[][]=new String[ret.length+1][3]; for (int i = 0; i < ret.length; i++) { // 複製陣列 System.arraycopy(ret[i], 0, ret01[i], 0, ret[i].length); } // 新的資料陣列 在最後一行 ret01[ret01.length-1]=new String[]{"t01","t02","t03"}; // finish 沒錯~ 你得到 ret01 這個長高的二維陣列!
package doW;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class JNotePad {
JButton clickMe;
JButton nothingToDo;
JPanel jpanel01;
private void show() {
jpanel01=new JPanel();
jpanel01.setBackground(Color.GRAY);
jpanel01.setLayout(new BoxLayout(jpanel01,BoxLayout.Y_AXIS));
clickMe=new JButton("點我呀~ 笨蛋");
clickMe.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
whatUserDo();
}
});
clickMe.setFont(new Font("serif",Font.BOLD,20));
nothingToDo=new JButton("noting to do");
jpanel01.add(clickMe);
jpanel01.add(nothingToDo);
JFrame jf=new JFrame("note pad title");
jf.setVisible(true);
jf.setSize(400, 300);
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jf.getContentPane().add(BorderLayout.EAST,jpanel01);
}
private void whatUserDo() {
clickMe.setText("user click me!");
}
public static void main(String[] args) {
new JNotePad().show();
}
}
<link href="prettify.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="prettify.js"></script>
onload="prettyPrint()" to your document's body tag.package doW;
import java.util.Arrays;
/**
* Array 用法
* @author Administrator
*
*/
public class S01 {
public static void main(String[] args) {
/*
遊 戲 威力彩
期 別 第 102000013 期
開獎日期 民國 102 年 2 月 14 日
兌獎期限 至 102 年 5 月 14 日 (註2)
本期中獎號碼
第1區 依大小順序排列:
13 14 16 22 31 32
第2區:
03
第1區 依開出順序排列:
16 22 31 13 32 14
*/
int[] arrOne = new int[] {16, 22 ,31, 13, 32, 14};
int[] arrThree = Arrays.copyOf(arrOne, arrOne.length); //複製一維陣列
System.out.println("第1區 依開出順序排列:");
for(int i:arrThree){
System.out.print(i+",");
}
System.out.println();
System.out.println("第1區 依大小順序排列:");
Arrays.sort(arrThree); // 快速排序法排序
for(int i:arrThree){
System.out.print(i+",");
}
}
}
第1區 依開出順序排列:
16,22,31,13,32,14,