knuckle down
原文解釋: to get buy doing something, or to suddenly start working or studying hard
中文解釋: 認真工作(認真做某件事)
已下為三個例句:
Will 發表在 痞客邦 留言(0) 人氣(278)
call it a day
原文解釋: to decide to stop working. especially because you have done enough or you are tired
中文解釋: 今天就到此為止, 或結束一天的工作
已下為三個例句:
Will 發表在 痞客邦 留言(0) 人氣(106)
bottom line
原文解釋: 1. used to tell some one what the most important part of a situatiob ( main point)
2. the profit or the amount of money that a business makes or loses
3. the least amount of money that you are willing to accept in a bussiness deal
Will 發表在 痞客邦 留言(0) 人氣(273)
此範例為點擊按鈕觸發點擊按扭播放音效效果,
順帶一提此程式需要在實機上執行才有效過, 模擬器則無法測試
Step1. 創建一個新專案, 加入一顆按鈕, 點擊可產生震動效果, 並建立Button與程式之關聯性
Step2. 加入AudioToolbox.framework, 並#import <AudioToolBox/AudioToolbox.h>
Will 發表在 痞客邦 留言(0) 人氣(516)
此範例為點擊按鈕觸發震動效果,
順帶一提此程式需要在實機上執行才有效過, 模擬器則無法測試
Step1. 創建一個新專案, 加入一顆按鈕, 點擊可產生震動效果, 並建立Button與程式之關聯性
Step2. 加入AudioToolbox.framework, 並#import <AudioToolBox/AudioToolbox.h>
Will 發表在 痞客邦 留言(0) 人氣(1,061)
pwd為print name of current/working directory的縮寫
顧名思義pwd用於顯示目前所在目錄的指令,
想要知道目前所在的目錄,可以輸入pwd即可:
1. 列出目前的工作目錄:
Will 發表在 痞客邦 留言(0) 人氣(2,378)
ls為list directory contents的縮寫
顧名思義ls用於顯示檔案名稱與檔案內容的指令,
在使用Linux時是一個相當常用的指令之一
1. 以彩色顯示檔案資料:
Will 發表在 痞客邦 留言(0) 人氣(457)
快速排序(quickSort), 每次排序時設定一個基準點,
小於基準點的數字全放到基準點的左邊,
大於基準點的數字全放到基準點的右邊,
最差情況為O(N2), 平均時間複雜度為 O(NlogN)
Will 發表在 痞客邦 留言(0) 人氣(156)
此範例為點擊按鈕觸發亂數設定顏色屬性, 最後將隨機產生的RGB
屬定為畫面最下方之之空LinearLayout之背景顏色
MainActivity.java
package com.example.randomcolor;
import java.util.Random;
import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class MainActivity extends Activity {
Button randomColorBtn;
TextView txvR, txvG, txvB;
View colorBlock;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
randomColorBtn = (Button)findViewById(R.id.randomColorBtn);
txvR = (TextView)findViewById(R.id.txvR);
txvG = (TextView)findViewById(R.id.txvG);
txvB = (TextView)findViewById(R.id.txvB);
colorBlock = findViewById(R.id.colorBlock);
}
public void changeColor(View v)
{
Random x = new Random();
int red = x.nextInt(256); //取得0~255之間亂數
txvR.setText("RED:"+red); // 顯示亂數值
txvR.setTextColor(Color.rgb(red, 0, 0)); //將顏色設定為亂數紅色值
int green = x.nextInt(256);
txvG.setText("GREEN:"+green);
txvG.setTextColor(Color.rgb(0, green, 0)); //將顏色設定為亂數綠色值
int blue = x.nextInt(256);
txvB.setText("BLUE:"+blue);
txvB.setTextColor(Color.rgb(0, 0, blue)); //將顏色設定為亂數藍色值
colorBlock.setBackgroundColor(Color.rgb(red, green, blue)); //設定最下方空白之linearLayout之背景顏色
}
}
Will 發表在 痞客邦 留言(0) 人氣(808)
bent out of shapre
原文解釋: very angry or upset, or intoxicated by alcohol or drugs, or in a bad condiation
中文解釋: 非常生氣, 身體狀況不好
已下為三個例句:
Will 發表在 痞客邦 留言(0) 人氣(727)