那可以服用這段程式碼幫你快速刪除
foreach (Process p in Process.GetProcessesByName("process_Name")) //不需要.exe
{
p.Kill();
}
真是輕鬆又快樂
foreach (Process p in Process.GetProcessesByName("process_Name")) //不需要.exe
{
p.Kill();
}
真是輕鬆又快樂
window.addEventListener("keydown", checkKeyPressed, false);
function checkKeyPressed(e) {
alert(e.keyCode);
if (e.keyCode == "65") {
alert("The 'a' key is pressed.");
}
}
var workbook = new HSSFWorkbook();
var sheetReportResult = workbook.CreateSheet("結果");
sheetReportResult.CreateRow(0).CreateCell(0).SetCellValue("開始時間");
//之後的用GetRow 取得在CreateCell
sheetReportResult.GetRow(0).CreateCell(1).SetCellValue("結束時間");
sheetReportResult.GetRow(0).CreateCell(2).SetCellValue("資料大小(KB)");
sheetReportResult.GetRow(0).CreateCell(3).SetCellValue("花費時間(s)");
sheetReportResult.GetRow(0).CreateCell(4).SetCellValue("速度(KB/s)");
int i = 1;
foreach (string str in sb.ToString().Split('|'))
{
if (str != "")
{
sheetReportResult.CreateRow(i).CreateCell(0).SetCellValue(str.Split(',')[0].Replace("Start Time: ", ""));
sheetReportResult.GetRow(i).CreateCell(1).SetCellValue(str.Split(',')[1].Replace(" End Time :", ""));
sheetReportResult.GetRow(i).CreateCell(2).SetCellValue(str.Split(',')[2].Replace(" Size:", ""));
sheetReportResult.GetRow(i).CreateCell(3).SetCellValue(str.Split(',')[3].Replace(" Total:", ""));
sheetReportResult.GetRow(i).CreateCell(4).SetCellValue(str.Split(',')[4].Replace(" Speed:", ""));
i++;
}
}
sheetReportResult.SetColumnWidth(0, 20 * 256);
sheetReportResult.SetColumnWidth(1, 40 * 256);
sheetReportResult.SetColumnWidth(2, 40 * 256);
var file = new FileStream("C:/ample.xls", FileMode.Create);
workbook.Write(file);
file.Close();
$('#dvdeatil div').each(function () {
var data = $("#" + this.getAttribute('id')).attr("title");
var county = data ? data.split(",")[0] : ""
switch ($("#<%=ddlcounty.ClientID %>").find(":selected").text()) {
case "全部":
$("#tr_" + this.getAttribute('id')).show();
break;
default:
$("#tr_" + this.getAttribute('id')).show();
if (county != $("#<%=ddlcounty.ClientID %>").find(":selected").text()) {
$("#tr_" + this.getAttribute('id')).hide();
}
break;
}
});