
Step 2. 用「加入其他帳號 ...」來新增帳號

Step 3. 選擇 CardDAV 帳號

Step 4. 這邊的伺服器路徑設成: /principals/users/galsync/

Step 5. 前項步驟完成後,回到「聯絡人資訊」,再從「偏好設定」進入。

Step 6. 這邊的伺服器路徑改成「/dav/galsync」

根據 RFC2047 上講的
private string folding(string input)
{
string tempInput = input;
string result = "";
const int f = 37; // 一個字一律算兩個 bytes 最長只能 75 所以 75/2 https://www.ietf.org/rfc/rfc2047.txt
for (int i = 0, len = tempInput.Length; i <= len; i += f)
{
string x = tempInput.Substring(i, (i + f >= len ? len - i : f));
result += string.Format(@"=?UTF-8?B?{0}?=", Convert.ToBase64String(Encoding.UTF8.GetBytes(x)));
}
if (result.Split("?".ToCharArray()).Length == 5) result = result + "=?UTF-8?B??="; // 只切到一次還會會被解回去,所以補一個空的
return result;
}

執行完成後會出現以下的畫面:vsixinstaller /uninstall:NuPackToolsVsix.Microsoft.67e54e40-0ae3-42c5-a949-fddf5739e7a5
vsixinstaller NuGet.Tools.vsix
| Method | Description |
| PUBLISH | Used to publish a calendar entry to one or more Calendar Users. There is no interactivity between the publisher and any other calendar user. An example might include a baseball team publishing its schedule to the public. |
| REQUEST | Used to schedule a calendar entry with other Calendar Users. Requests are interactive in that they require the receiver to respond using the Reply methods. Meeting Requests, Busy Time requests and the assignment of VTODOs to other Calendar Users are all examples. Requests are also used by the "Organizer" to update the status of a calendar entry. |
| REPLY | A Reply is used in response to a Request to convey "Attendee" status to the "Organizer". Replies are commonly used to respond to meeting and task requests. |
| ADD | Add one or more instances to an existing VEVENT, VTODO, or VJOURNAL. |
| CANCEL | Cancel one or more instances of an existing VEVENT, VTODO, or VJOURNAL. |
| REFRESH | The Refresh method is used by an "Attendee" to request the latest version of a calendar entry. |
| COUNTER | The Counter method is used by an "Attendee" to negotiate a change in the calendar entry. Examples include the request to change a proposed Event time or change the due date for a VTODO. |
| DECLINECOUNTER | Used by the "Organizer" to decline the proposed counter-proprosal. |
(圖一)
(圖二)
<Label text="備註" posY="0" posX="69" gridWidth="8" sizePolicy="dynamic"/>
<FormField name="pmk_file.pmkud01" colName="pmkud01" sqlType="VARCHAR(255)" fieldId="999" sqlTabName="pmk_file"
tabIndex="999">
<ButtonEdit width="10" action="controlp" image="zoom" posY="0" posX="81" gridWidth="12" scroll="1"
sample="MMMMMM000000" comment="備註[pmkud01]"/>
</FormField>
<tr>
<td width="90" id="pmkud01_1" nowrap="true" align="right" class="normalFormCaption">備註</td><td nowrap="true" width="100">
<table style="margin:0px;padding:0px;" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span id="pmkud01_2" class="normalSpan"></span></td>
</tr>
</table>
</td>
</tr>
#region 重新取得selectcategory2下拉選項
[AjaxPro.AjaxMethod(AjaxPro.HttpSessionStateRequirement.ReadWrite)]
public string ajaxGetselectcategory2Item(string pselectcategory1Val)
{
string strReturn = ""; string tSQL = @"select distinct * from LMIT where FormCode='表單名稱'
and ItemNo='1' and Category=N'" + pselectcategory1Val + "' order by 00";
strReturn = createEasyFlowDataTable(tSQL, "Details", "Details");
return strReturn;
}
#endregion 重新取得selectcategory2下拉選項
#region 簽核流程結束時要處理的事情
protected override void AfterApprove()
{
if (this.BlnCaseClosed && this.AryFlowProperty.SerialSignResult == "2")
{
//先判斷流程中是否有財會部的人
string sql_EFdept = @"select * from resdd as D
where resdd001='表單TABLE' and resdd002='"+this.StrSheetNo+"'
and exists (
select '"+"x"+"' from resak X where X.resak001 =
D.resdd008 and (X.resak015 = 'FN3000')
)";
DataSet set_EFdept = this.m_objDB.CreateRecordset(" use EFNETDB;" +
sql_EFdept, this.Session["strProcID"].ToString());
DataTable temp_EFdept = set_EFdept.Tables[0];
if (temp_EFdept.Rows.Count == 0)
{
//把ERROR存成TXT檔
}
else
{
StringBuilder builder = new StringBuilder();
builder.Append(" use EFNETDB;");
builder.Append(" select saleno ");
builder.Append(" FROM 表單TABLEb ");
//表單代號,表單編號
builder.AppendFormat(" WHERE 表單TABLEb001='{0}' ", this.formID);
builder.AppendFormat(" AND 表單TABLEb002='{0}' ", this.StrSheetNo);
DataSet set_saleno=this.m_objDB.CreateRecordset(builder.ToString(),this.Session["strProcID"].ToString());
DataTable temp_saleno = set_saleno.Tables[0];
foreach (DataRow saleno_read in temp_saleno.Rows)
{
string sql_OGAFILE = @"UPDATE OPENQUERY(ORACLE,'
select oga903 from TT.oga_file where oga01=''" + saleno_read["saleno"] + "''') SET OGA903='Y'";
this.m_objDB.ExecuteSQL(sql_OGAFILE.ToString(),this.Session["strProcID"].ToString());
}
}
}
#region 按下檢查時要做的事情
protected void butcheck_Click(object sender, EventArgs e)
{
//先清空textbox
base.BtnCreateToolSendForm.Attributes.Add("style", "display:none");//隱藏送出的按鈕
int rows_count = MasterObj.DetailObjs[0].NewRows.Count;//取得grid有幾列資料
System.Text.StringBuilder sb = new System.Text.StringBuilder();
string customer_1 = "";//客戶名稱
string customer_no = "";//客戶編號
string terms_payment = "";//付款條件
int customer_i = 1;
string currency_1 = "";//幣別
double local_currency = 0.0;//本幣未稅金額NTD
double org_currency = 0.0;//原幣未稅金額
double credit = 0.0; //授信額度
double rate = 0.0; //匯率
string txt_saleno = "";//銷貨單號
bool bPass = true;
if (rows_count == 0)
{
MessageBox.Show("請先輸入訂單編號");
}
else
{
foreach (DscRow dscRow in MasterObj.DetailObjs[0].NewRows)
{
string sqlstring_TT = @"Select * From OPENQUERY(ORACLE, '
select oga01 as 銷貨單號,oga03 as 客戶編號,oga032 as 客戶名稱,oga903 as 是否放行,oga55 as 狀況碼,
ogaconf as 核准碼,oga09 as 單據別,oag02 as 付款條件,oga24 as 匯率,
oga50 as 出貨金額,OCCG03 as 授信額度,oga23 as 幣別,oga50 as 原幣未稅金額,(
select sum(omb16) from TT.omb_file
where TT.oga_file.oga01=omb31
) as 本幣未稅金額
from TT.oga_file join TT.oag_file on oga32=oag01
join TT.occg_file on OCCG01=oga03
where oga01=''" + dscRow["saleno"].Value.ToString() + "''')";
DataSet set_TT = this.m_objDB.CreateRecordset(" use EFNETDB;" +sqlstring_TT,this.Session["strProcID"].ToString());
DataTable dtTemp_TT = set_TT.Tables[0];
if (dtTemp_TT.Rows.Count == 0)
{
sb.Append("查無'" + dscRow["saleno"].Value.ToString() + "'的訂單資料,請檢查訂單號碼是否錯誤\r\n");
bPass = false;
}
else
{
foreach (DataRow s_read in dtTemp_TT.Rows)
{
if (s_read["單據別"].ToString().Trim() == "1")
{
sb.Append("單號:" + s_read["銷貨單號"] + "是出貨通知單喔~請再確認\r\n");
bPass = false;
}
else if (s_read["核准碼"].ToString().Trim()=="X")
{
sb.Append("單號:" + s_read["銷貨單號"] + "核准碼是作廢'X',請再確認");
bPass = false;
}
else if (s_read["是否放行"].ToString().Trim()!= "N")
{
sb.Append("單號:" + s_read["銷貨單號"] + "已放行,請再確認.\r\n");
bPass = false;
}
else
{
if (customer_i == 1)
{
customer_1 = s_read["客戶名稱"].ToString();
currency_1 = s_read["幣別"].ToString();
double x = 0.0;
bool flag_1 = double.TryParse(s_read["匯率"].ToString(), out x);
bool flag_2 = double.TryParse(s_read["原幣未稅金額"].ToString(), out x);
bool flag_3 = double.TryParse(s_read["授信額度"].ToString(), out x);
if (flag_1 && flag_2 && flag_3)
{
rate = double.Parse(s_read["匯率"].ToString());
org_currency = double.Parse(s_read["原幣未稅金額"].ToString());
credit = double.Parse(s_read["授信額度"].ToString());
}
customer_no = s_read["客戶編號"].ToString();
terms_payment = s_read["付款條件"].ToString();
local_currency = rate * org_currency;
txt_saleno = s_read["銷貨單號"].ToString();
}
else
{
if (customer_1 != s_read["客戶名稱"].ToString()) {
sb.Append("單號:" + s_read["銷貨單號"] + "公司名稱與其他不同");
bPass = false;
}
if (currency_1 != s_read["幣別"].ToString())
{
sb.Append("單號:" + s_read["銷貨單號"] + "幣別與其他不同.\r\n");
bPass = false;
}
if (txt_saleno == s_read["銷貨單號"].ToString())
{
sb.Append("單號:" + s_read["銷貨單號"] + "重複.\r\n");
bPass = false;
}
org_currency = org_currency + (double.Parse(s_read["原幣未稅金額"].ToString()));
local_currency = local_currency + (rate * (double.Parse(s_read["原幣未稅金額"].ToString())));
}
}
}
}
customer_i++;
}
}
string ErrorMsg = sb.ToString();
if (bPass && butcheck.ToolTip != "0")
{
//Lucas 觸發 refresh 重新解悉流程
string str_java = "document.getElementById('" +base.BtnCreateToolRefresh.ClientID + "').click();";
Page.ClientScript.RegisterStartupScript(typeof(string), "jva", str_java, true);
base.BtnCreateToolSendForm.Attributes.Add("style", "display");
butcheck.ToolTip = "0";
butcheck.Text = "已檢查";
currencymoney.Text = org_currency.ToString();//原幣未稅金額
orgmoney.Text = local_currency.ToString();
customerno.Text = customer_no;
overdue3.Text = terms_payment;
credit3.Text = credit.ToString();
}
else
{
base.BtnCreateToolSendForm.Attributes.Add("style", "display:none");
butcheck.ToolTip = "";
MessageBox.Show("錯誤訊息如下:\r\n" + ErrorMsg);
}
}
#endregion
}
public static string FilePath2Url(string fname)
{
return string.Format("file:///{0}", fname.Replace("\\", "/"));
}
internal static XComponent openCalcSheet(string fname)
{
string url = FilePath2Url(fname);
XComponentContext oStrap = uno.util.Bootstrap.bootstrap();
XMultiServiceFactory oServMan = (XMultiServiceFactory)oStrap.getServiceManager();
XComponentLoader desktop = (XComponentLoader)oServMan.createInstance("com.sun.star.frame.Desktop");
PropertyValue[] loadProps = new PropertyValue[1];
loadProps[0] = new PropertyValue();
loadProps[0].Name = "Hidden";
loadProps[0].Value = new uno.Any(true);
XComponent document = desktop.loadComponentFromURL(url, "_blank", 0, loadProps);
return document;
}
public static XSpreadsheetDocument Open(string fname)
{
return (XSpreadsheetDocument)openCalcSheet(fname);
}
public static void Save(XSpreadsheetDocument xDoc, string fname)
{
string url = FilePath2Url(fname);
PropertyValue[] propVals = new PropertyValue[2];
/* 另存成 MS Excel 97 的格式,
格式可以參考:http://www.oooforum.org/forum/viewtopic.phtml?t=3549 (找不到官方的清單 Orz,看官知道在哪的,請通知一聲,感恩ㄚ)
原理可以參考:http://wiki.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Integrating_Import_and_Export_Filters
*/
propVals[0] = new PropertyValue { Name = "FilterName", Value = new uno.Any("MS Excel 97") };
propVals[1] = new PropertyValue { Name = "Overwrite", Value = new uno.Any(true) };
((XStorable)xDoc).storeToURL(url, propVals);
}
public static void Convert2Xls(string fname, string new_fname)
{
Save(Open(fname), new_fname);
}
於是只要呼叫 Convert2Xls(ods檔案位置, xls輸出檔案位置) 就可以將 ods 轉成 xls 囉。
/*
不曉得有沒有人想過像 Konami 那種,按 "上上下下左右左右BA" 後,
會觸發某些事件的功能,如何撰寫,以下是我的實作,除了特定的 Konami 按鍵外,
也允許自訂自己的按鍵事件序列的測試方法,
整個程式的概念,是註冊 document 的 keyup 事件,並紀錄下最近 10 次的按鍵內容,
並提供一個 RegisterTest 方法,由註冊者自行決定目前按下的按鍵是否符合觸發的條件,
若符合要觸發什麼事件; RegisterTest 會先把這兩個 function 紀錄下來,
等到畫面上的 kepup 事件產生時,逐一呼叫 testFun , testFun 回傳 true ,
就呼叫 triggerFun 執行當初註冊的觸發事件。
這個程式需要 jQuery ,
另外這個陽春的版本不提供組合鍵的處理,當然稍微修改一下也可以支援組合鍵。
*/
var HotKeyControler = {
MAX_QUEUE: 10, /* 保留最後 10 個鍵盤事件 */
testFuns: new Object(),
triggerFuns: new Object(),
KeyQueue: new Array,
Keyup: function(event) {
HotKeyControler.KeyQueue.push(event.keyCode);
if (HotKeyControler.KeyQueue.length > HotKeyControler.MAX_QUEUE) {
HotKeyControler.KeyQueue.shift();
}
for (var key in HotKeyControler.testFuns) {
if (HotKeyControler.testFuns[key](event, HotKeyControler.KeyQueue)) {
HotKeyControler.triggerFuns[key]();
}
}
},
/* 函數名稱:註冊熱鍵
* 參數說明:(唯一鍵值, 測試function, 觸發function)
* 說 明:提供註冊熱鍵的方法,提供目前畫面被按下的按鍵佇列,供AP自行判斷是否觸發執行事件
*/
RegisterTest: function(key, testFun, triggerFun) {
if (typeof(testFun)=='function' && typeof(triggerFun)=='function') {
HotKeyControler.testFuns[key] = testFun;
HotKeyControler.triggerFuns[key] = triggerFun;
}
}
}
$(document).ready(function(){
$(document).unbind("keyup",HotKeyControler.Keyup);
$(document).bind("keyup",HotKeyControler.Keyup);
});
/* DEMO 註冊當按下 Konami(上上下下左右左右BA)時要觸發的事件 */
HotKeyControler.RegisterTest("Konami"
,function(event,code) { /* 上上下下左右左右BA */
if (code.length!=10) return false;
if (code[0]==38 && code[1]==38 && code[2]==40 && code[3]==40 &&
code[4]==37 && code[5]==39 && code[6]==37 && code[7]==39 &&
code[8]==66 && code[9]==65) {
return true;
}
return false;
}
,function() {
alert('上上下下左右左右BA!!!');
}
);
element.style.getAttribute(styleProperty);糟糕的是,其它的 browser 不甩這種寫法,而是要這麼寫
element.style.setAttribute(styleProperty, value);
element.style.getPropertyValue(style-property)更慘的是,新舊參雜的風格時,有大量的程式需要調整、測試,在不動舊程式的情況下,
element.style.setProperty(style-property, value)
if (typeof (CSSStyleDeclaration.prototype.getAttribute) == "undefined") {
CSSStyleDeclaration.prototype.getAttribute = function (propName) {
return this.getPropertyValue(Me._changePropName(propName));
}
}
if (typeof (CSSStyleDeclaration.prototype.setAttribute) == "undefined") {
CSSStyleDeclaration.prototype.setAttribute = function (propName, value) {
this.setProperty(Me._changePropName(propName), value);
}
}
但這卻遇到一個問題,當用 get/set Property 時, propertyName 格式是和 CSS 一樣, function changePropName(propName) {
var pattern = /[A-Z]/;
var c = ("-" + (propName.match(pattern))).toLowerCase();
var s = propName.split(pattern);
var result = s[0];
if (s.length > 1) {
result += c + s[1];
}
return result;
}
function ValidatorOnLoad() {
if (typeof(Page_Validators) == "undefined")
return;
var i, val;
for (i = 0; i < Page_Validators.length; i++) {
val = Page_Validators[i];
if (typeof(val.evaluationfunction) == "string") {
eval("val.evaluationfunction = " + val.evaluationfunction + ";");
} // 略 .....
.Net 1.0 and 2.0 hybrid validator not work終於勉強找到了
Why might ASP.NET be putting JavaScript in HTML Comment blocks, not CDATA?裡面提到了關鍵字 <xhtmlConformance mode="Transitional" />
http://en.wikipedia.org/wiki/Hard_link
http://linux.vbird.org/linux_basic/0230filesystem/0230filesystem.php
http://en.wikipedia.org/wiki/NTFS_symbolic_link
http://webcache.googleusercontent.com/search?q=cache:2FHejrp9CZAJ:blog.miniasp.com/post/2011/09/17/How-to-create-NTFS-Reparse-Points-Symbolic-and-Hard-Links.aspx+&cd=2&hl=zh-TW&ct=clnk&lr=lang_zh-TW
http://jdev.tw/blog/729/vista-soft-and-hard-link
在 finder 下按 Command + k ,然後輸入 smb://yourWinServer/sharedFolderName但如果是在文件中看到的是長這樣的路徑
\\yourWinServer/sharedFolderName那就要很辛苦的把 "\" 換成 "/" 如果很多層的話那心情就會很糟。