由於使用cyberlink action director縫合完的影片上傳到youtube都無法以360影片顯示(使用手機gear 360 app上傳則可以),花了時間看了一下,似乎是不能只縫合,還必須從action director匯出才會新增metadata到檔案。youtube建議的spatial metadata injector則是會有error Parse error on XML,紀錄一下供參考。
更新:
可使用facebook 360視線引導工具選擇影片後直接下載即可得到可上傳youtube的360影片,可以跟不可以的影片居然只差了1KB...
參考資料
https://github.com/google/spatial-media/issues/172
2019年1月26日 星期六
2015年10月5日 星期一
XFCE自動完成失效問題
在XFCE下ubuntu的tab自動完成失效,解決方法是修改xml file
.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
把下面改掉
<property name=”<Super>Tab” type=”string” value=”switch_window_key”/>
.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
把下面改掉
<property name=”<Super>Tab” type=”string” value=”switch_window_key”/>
改成這個
<property name=”<Super>Tab” type=”empty”/>
參考資料
https://241931348f64b1d1.wordpress.com/2012/05/04/shell-autocomplete-not-working-on-xrdp-xubuntu-12-04-xfce/
rebot
robotframework 可以使用 rebot <file1>.xml <file2>.xml來合併xml,並且合併之後log.html與report.html也會跟著update
可使用參數--name <name>來變更suite name
如用Windows寫sh script時要注意檔案格式需為UNIX,否則可能有執行上問題,錯誤訊息
' failed: Data source does not exist.Appengine/X3000001.robot
Try --help for usage information.
: not found3: script.sh:
參考資料
https://twiki.cern.ch/twiki/bin/view/EMI/RobotFrameworkAdvancedGuide#Using_the_rebot_Tool
http://stackoverflow.com/questions/25988071/combining-robot-framework-test-reports
可使用參數--name <name>來變更suite name
如用Windows寫sh script時要注意檔案格式需為UNIX,否則可能有執行上問題,錯誤訊息
' failed: Data source does not exist.Appengine/X3000001.robot
Try --help for usage information.
: not found3: script.sh:
參考資料
https://twiki.cern.ch/twiki/bin/view/EMI/RobotFrameworkAdvancedGuide#Using_the_rebot_Tool
http://stackoverflow.com/questions/25988071/combining-robot-framework-test-reports
2014年1月13日 星期一
Xpath, xml 轉成http並且擷取需要的nodes, unicode編碼問題,vba轉vbs, bat讀入變數,篩選及比對
使用Xpath抓取xml內的資料
Set objXMLHTTP = CreateObject("Microsoft.XMLHTTP")
http://www.blueshop.com.tw/board/FUM200410061525290EW/BRD2011041810155910R.html
http://bytes.com/topic/xml/answers/895475-how-do-i-get-value
http://bbs.csdn.net/topics/360192227
http://www.w3school.com.cn/xml/xml_to_html.asp
http://michaelbaidotnet.blogspot.tw/2012/05/xpathxml-xmldocument-xmlnode-xml.html
http://stackoverflow.com/questions/247135/using-xpath-to-search-text-containing
http://stackoverflow.com/questions/3655549/xpath-containstext-some-string-doesnt-work-when-used-with-node-with-more
http://www.pin5i.com/showtopic-23231.html
http://zhidao.baidu.com/question/494955221.html
http://web2.tcssh.tc.edu.tw/teacher/cjwu/vb/newvb6/new0g05.html
http://msdn.microsoft.com/zh-tw/library/1k5e45de(v=vs.90).aspx
http://stackoverflow.com/questions/7986679/classic-asp-not-recognizing-xpath-contains-function
http://stackoverflow.com/questions/17049535/vbscript-taking-xml-node-values-and-assigning-to-variables
http://stackoverflow.com/questions/14469414/xpath-selecting-same-level-node-with-different-name
http://stackoverflow.com/questions/3139402/how-to-select-following-sibling-xml-tag-using-xpath
unicode編碼問題
http://www.blueshop.com.tw/board/show.asp?subcde=BRD20110626172457CS9&fumcde=FUM200501271723350KG&odr=cdt&odrtyp=0
http://www.dotblogs.com.tw/rainmaker/archive/2011/05/17/25261.aspx
http://stackoverflow.com/questions/2524703/save-text-file-utf-8-encoded-with-vba
http://tw.knowledge.yahoo.com/question/question?qid=1607092206104
vba轉vbs
http://www.asjh.tn.edu.tw/xupload/learning/vbscript/vbs16.htm
http://www.visualbasicscript.com/Vbscript-to-read-txt-file-for-input-m31649.aspx
http://www.itworld.com/nl/win_this_wk/04282003
http://www.visualbasicscript.com/m57228-print.aspx
http://mikenation.net/files/backupprintservers.txt
bat讀入變數
http://www.dotblogs.com.tw/chhuang/archive/2012/06/09/72702.aspx
rss feed在chrome顯示亂碼
http://blog.hsdn.net/1388.html
讀入字串亂碼使用ADODB.Stream解決
http://baike.baidu.com/view/1806836.htm
http://www.lotusfans.com/forum/archive/index.php/t-43645.html
http://stackoverflow.com/questions/15151128/read-large-file-line-by-line-with-ado-stream
http://stackoverflow.com/questions/13851473/read-utf-8-text-file-in-vbscript
objXMLHTTP.Open "Get", "xml網址", False
testXML = objXMLHTTP.responseText
Set objXMLHTTP = Nothing
接著要注意的是XPath 2.0要加上第二行否則有些語法不能使用
Set xmldoc = CreateObject("MSXML2.DOMDocument")
xmldoc.setProperty "SelectionLanguage", "XPath"
xmldoc.LoadXML (testXML)
Count node數量
Set Root = xmldoc.DocumentElement.SelectSingleNode("篩選條件")
xmlcount = xmldoc.DocumentElement.SelectNodes("篩選條件").Length
接著篩選的方法
格式是路徑//channel/item/title[(contains(.,'條件')],左式是指篩選符合條件的title層級,須注意路徑要依照xml內的格式填寫,並且可以使用and和or
如果需要新增或開啟檔案需要呼叫檔案系統物件
Set objfso = CreateObject("Scripting.FileSystemObject")
我在寫的時候遇到亂碼的問題,因此調用ADODB.Stream
Set objtextfile = CreateObject("ADODB.Stream")
objtextfile.Charset = "utf-8"
objtextfile.Open
objtextfile.LoadFromFile ("檔案路徑")
寫入檔案時使用
objtextfile.writetext xmldoc.DocumentElement.SelectNodes("篩選條件").Item(i).text + Chr(13) + Chr(10)
+ Chr(13) + Chr(10)是換行的意思
另外如果要比對字串
Set d = CreateObject("Scripting.Dictionary")
Do Until objtextfile.EOS
arr = objtextfile.ReadText(-2)
d.Add arr, arr
Loop
EOS是讀到檔案結尾,然後將objtextfile的內容寫入Dictionary d內
最後如果比對Dictionary跟檔案有不同的時候寫入檔案
If Not d.Exists(Cel) Then
fs.writetext
end if
bat讀入每行變數,使用%%a
for /f %%a in (檔案.txt) do (動作,將輸入變數用%%a替代)
參考資料
Xpath, xml 轉成http並且擷取需要的nodeshttp://www.blueshop.com.tw/board/FUM200410061525290EW/BRD2011041810155910R.html
http://bytes.com/topic/xml/answers/895475-how-do-i-get-value
http://bbs.csdn.net/topics/360192227
http://www.w3school.com.cn/xml/xml_to_html.asp
http://michaelbaidotnet.blogspot.tw/2012/05/xpathxml-xmldocument-xmlnode-xml.html
http://stackoverflow.com/questions/247135/using-xpath-to-search-text-containing
http://stackoverflow.com/questions/3655549/xpath-containstext-some-string-doesnt-work-when-used-with-node-with-more
http://www.pin5i.com/showtopic-23231.html
http://zhidao.baidu.com/question/494955221.html
http://web2.tcssh.tc.edu.tw/teacher/cjwu/vb/newvb6/new0g05.html
http://msdn.microsoft.com/zh-tw/library/1k5e45de(v=vs.90).aspx
http://stackoverflow.com/questions/7986679/classic-asp-not-recognizing-xpath-contains-function
http://stackoverflow.com/questions/17049535/vbscript-taking-xml-node-values-and-assigning-to-variables
http://stackoverflow.com/questions/14469414/xpath-selecting-same-level-node-with-different-name
http://stackoverflow.com/questions/3139402/how-to-select-following-sibling-xml-tag-using-xpath
unicode編碼問題
http://www.blueshop.com.tw/board/show.asp?subcde=BRD20110626172457CS9&fumcde=FUM200501271723350KG&odr=cdt&odrtyp=0
http://www.dotblogs.com.tw/rainmaker/archive/2011/05/17/25261.aspx
http://stackoverflow.com/questions/2524703/save-text-file-utf-8-encoded-with-vba
http://tw.knowledge.yahoo.com/question/question?qid=1607092206104
vba轉vbs
http://www.asjh.tn.edu.tw/xupload/learning/vbscript/vbs16.htm
http://www.visualbasicscript.com/Vbscript-to-read-txt-file-for-input-m31649.aspx
http://www.itworld.com/nl/win_this_wk/04282003
http://www.visualbasicscript.com/m57228-print.aspx
http://mikenation.net/files/backupprintservers.txt
bat讀入變數
http://www.dotblogs.com.tw/chhuang/archive/2012/06/09/72702.aspx
rss feed在chrome顯示亂碼
http://blog.hsdn.net/1388.html
讀入字串亂碼使用ADODB.Stream解決
http://baike.baidu.com/view/1806836.htm
http://www.lotusfans.com/forum/archive/index.php/t-43645.html
http://stackoverflow.com/questions/15151128/read-large-file-line-by-line-with-ado-stream
http://stackoverflow.com/questions/13851473/read-utf-8-text-file-in-vbscript
訂閱:
文章 (Atom)