今早直接按F5進入DeBug時就遇到了這個問題
解決方式專案上面按右鍵 > 屬性 > Web > 使用Visual Studio程式開發伺服器
%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
editText1.setWidth(100);
ok你成功的話就可以不用看下面的了
editText1.getLayoutParams().width = 100;
搭配上一篇取得寬後在翻轉時設定
// 建立一個DisplayMetrics物件
DisplayMetrics dm = new DisplayMetrics();
// 取得裝置的資訊
this.getWindowManager().getDefaultDisplay().getMetrics(dm);
// 寬
int Width = dm.widthPixels;
// 高
int Height = dm.heightPixels;
getFilesDir()
不用每次都寫"data/data/pakage/files/file"
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//全螢幕要放在setContentView前
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);
}
String[] list = getApplicationContext().getResources().getAssets().list("");
public boolean onKeyDown(int key, KeyEvent event) {
switch (key) {
case KeyEvent.KEYCODE_SEARCH:
break;
case KeyEvent.KEYCODE_BACK:
Intent intent = new Intent();
setResult(RESULT_OK, intent);
finish();
break;
case KeyEvent.KEYCODE_DPAD_CENTER:
break;
default:
return false;
}
return false;
}
另一頁如果有回傳值
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (resultCode) {
case RESULT_OK:
// 回上一頁囉
break;
default:
break;
}
}
ArrayList<String>list = new ArrayList <String>();
list.toArray(new String[list.size()])
list.toArray(new String[list.size()])[i]
protected void Button1_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "訊息", "parent.jQuery.fancybox.close();", true);
}
Log.d("", "訊息");
protected void Button1_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "訊息", "javascript:location.href='b.aspx'", true);
}
DUMP TRANSACTION DBNAME WITH NO_LOG
USE [資料庫名稱]
GO
ALTER DATABASE [資料庫名稱] SET RECOVERY SIMPLE WITH NO_WAIT
DBCC SHRINKFILE(記錄檔邏輯名稱, 1)
ALTER DATABASE [資料庫名稱] SET RECOVERY FULL WITH NO_WAIT
GO
2000& 2005
USE [資料庫名稱]
GO
DBCC SHRINKFILE(記錄檔邏輯名稱, 1)
BACKUP LOG [資料庫名稱] WITH TRUNCATE_ONLY
DBCC SHRINKFILE(記錄檔邏輯名稱, 1)
GO
m:(以下看個人放在那裡)
cd android-sdk-windows
cd platform-tools
adb.exe shell
cd sdcard
sqlite3 sql.db(自己命名db的名字)(如果已經有這個檔後就會開啟)
create table table1(name,tel);(建立Table)
.table(看建了那些Table)