因為在做開發,以防之後會用到。(ex:網頁相容性)
-------
Windows 10 附帶的 Edge,好久沒使用它;經歷了好幾個Win10更新,要使用它時,執行一段時間便自動關閉。

文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

1. 首先:要將「System.Management」加入參考。

2. 程式碼:

ManagementClass mClass = new ManagementClass( "Win32_Share" );
ManagementBaseObject mBaseObj_in = mClass.GetMethodParameters( "Create" );

mBaseObj_in["Path"] = installDirInfo.FullName ;  // 資料夾位置.
mBaseObj_in["Type"] = 0x0;  // 共用類型.

ManagementBaseObject mBaseOjb_out = mClass.InvokeMethod( "Create", mBaseObj_in, null );
if ( (uint)(mBaseOjb_out.Properties["ReturnValue"].Value) != 0)
{
    Console.WriteLine( "無法共享資料夾: " + mBaseOjb_out.Properties["ReturnValue"].Value );
}

/// ReturnValue:
///   0 – Success
///   2 – Access denied
///   8 – Unknown failure
///   9 – Invalid name
///  10 – Invalid level
///  21 – Invalid parameter
///  22 – Duplicate share
///  23 – Redirected path
///  24 – Unknown device or directory
///  25 – Net name not found

 

文章標籤

Robert 發表在 痞客邦 留言(1) 人氣()

不論是個人、企業、開發人員,尋求的管道 都不太一樣..;
而微軟的連結,真是錯綜複雜..;
也常常遇到頁面已不存在..。

文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

今年初 爆發大規模的 勒索病毒 Wanna Cry,據災情統計 台灣排行第二;
許多文章列了許多的安全性更新項目。
小弟曾聯絡微軟技術支援,

文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

簡單記錄:

private static final String FILENAME = "E:\\test\\filename.txt";

File file = new File(FILENAME);

// if file doesnt exists, then create it
if (!file.exists()) {
  file.createNewFile();
}

// true = append file
FileWriter fw = new FileWriter(file.getAbsoluteFile(), true);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(data);

bw.close();
fw.close();

來源:Java – How to append content to file


文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

(1) W3C 建議放在 <head></head> 中。

(2) 不論擺在哪裡,都是從頭讀到尾的執行順序。(call function除外)

(3) jquery可以放在head中;jquery會綁定一個監聽,當全部的html文檔解析完之後,再執行內部代碼。

文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

(1) 如何找出 指定的tag 有用該屬性 的文字檔?
例題:「<rich:panel type="a" label="b">」。
答案:「(rich:panel[^>]*)\blabel(\s*=)」。  // 這是 tag 與 attribute 之間,有white-space也可以找出來的答案。

文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

如何設定 Eclipse 在編輯文字視窗中,中文字太小的問題:

選單上->"Window"->"Preferences"->"General"->"Appearance"->"Colors and Fonts"
->"Basic"->"Text Font"->"Edit"。

文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

Eclipse 執行時如何讓Console顯示中文、建置全UTF-8的環境、針對個別檔案類型設定預設編碼

Eclipse 執行時如何讓Console顯示中文
Eclipse主功能表-->Run-->Run Configuration-->Common 頁籤-->

文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()

// 在這裡做個筆記暫存

一個命令輕鬆切換Java版本

Window內開啟指定JDK環境懶人法

文章標籤

Robert 發表在 痞客邦 留言(0) 人氣()