星期二, 4月 06, 2021
讓網頁生動起來的動畫套件大蒐集,讓你的案子可以多收一點錢錢 (誤)
星期五, 12月 18, 2020
[CSS] backdrop-filter 濾鏡背景效果-
只不過濾鏡效果僅應用於背景,
而不應用於元素的內容。
*不支援IE
https://css-tricks.com/almanac/properties/b/backdrop-filter/
[AngularJS] 1.x 表單驗證記錄
久久要加新的表單都會忘了(可能也沒有人用這麼舊的ng版本Orz),多開一個筆記記錄一下:
表單model
在控制器觸發每一個欄位做驗證
客戶希望都能按按鈕觸發未填寫的欄位驗證,原本都是沒填完整就是無法按按鈕(可能有些用戶無法明確發現哪些欄位沒填)
https://steelkiwi.com/blog/validation-error-handling-angularjs-applicatios/
星期三, 12月 16, 2020
[ga] cookie隱私權關掉GA的方法
如果要為了一些cookie歐洲的隱私權政策,可以透過以下方法停用GA
analytics.js 库包含一个 window 属性,您只要将其设为 true,就可以禁止 analytics.js 向 Google Analytics(分析)发送数据。当 Google Analytics(分析)要设置 Cookie 或将数据发回到 Google Analytics(分析)服务器时,会首先检查此属性是否已设置为 true。如果已设置为 true,则不采取任何操作。
要停用衡量功能,请将以下 window 属性设置为 true:
https://developers.google.com/analytics/devguides/collection/analyticsjs/user-opt-out
星期二, 12月 15, 2020
[cloudflare] Service Worker
參考
https://blog.cloudflare.com/cloudflare-workers-unleashed/
https://github.com/cloudflare/worker-examples
https://github.com/cloudflare/worker-examples/tree/master/examples/edge-cache-html
https://levelup.gitconnected.com/use-cloudflare-javascript-workers-to-deploy-you-static-generated-site-ssg-1c518e078646
星期六, 12月 12, 2020
[mysql] /var/log/mysql/error.log 權限錯誤無法寫入 could not open file
因為vm容量不足清了log,直接把/var/log/下面的東西砍光。
結果vm就炸開了(Apache2/Mysql都壞掉)。
在啟動mysql時會有噴錯誤訊息,如下
依次把權限照以下的指令打一打就正常了
# chown mysql:adm /var/log/mysql/error.log
# chown mysql:adm /var/log/mysql
# chown root:syslog /var/log
# chown root:root /var
# chmod 0640 /var/log/mysql/error.log
# chmod 0750 /var/log/mysql
# chmod 0775 /var/log
# chmod 0755 /var
星期二, 11月 03, 2020
eggplant BDD相關
BDD
https://ithelp.ithome.com.tw/articles/10226615
https://cucumber.io/docs/gherkin/reference/
https://tw.alphacamp.co/blog/bdd-tdd-cucumber-behaviour-driven-development
http://docs.eggplantsoftware.com/ePF/using/epf-running-gherkin-tests.htm
https://github.com/perkss/eggplant
TDD
https://medium.com/@onejar99/tdd%E4%BA%94%E6%AD%A5%E9%A9%9F-%E6%89%8B%E6%8A%8A%E6%89%8B%E5%B8%B6%E4%BD%A0%E5%AF%A6%E6%88%B0-test-driven-development-%E7%AF%84%E4%BE%8B-42e6ef63a718
星期日, 10月 25, 2020
bootstrap3 網站RWD斷點規畫
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
/* Extra Small Devices, Phones */
@media only screen and (min-width : 480px) {
}
/* Small Devices, Tablets */
@media only screen and (min-width : 768px) {
}
/* Medium Devices, Desktops */
@media only screen and (min-width : 992px) {
}
/* Large Devices, Wide Screens */
@media only screen and (min-width : 1200px) {
}
/*========== Non-Mobile First Method ==========*/
/* Large Devices, Wide Screens */
@media only screen and (max-width : 1200px) {
}
/* Medium Devices, Desktops */
@media only screen and (max-width : 992px) {
}
/* Small Devices, Tablets */
@media only screen and (max-width : 768px) {
}
/* Extra Small Devices, Phones */
@media only screen and (max-width : 480px) {
}
/* Custom, iPhone Retina */
@media only screen and (max-width : 320px) {
}
Ref:https://stackoverflow.com/questions/19592968/bootstrap-3-breakpoints-and-media-queries
星期二, 9月 29, 2020
[jQuery外掛] owlcarousel2支援垂直的應用
利用Owlcarousel2做出垂直的效果,
可以透過css動畫改變滑動的方向
https://owlcarousel2.github.io/OwlCarousel2/demos/animate.html
https://codepen.io/thirdender/pen/aOYyGb
另外有一個貼近客戶需求的外掛RoyalSlider
https://lowercolumbia.edu/_resources/plugins/royal-slider/templates/video-gallery/
星期三, 6月 24, 2020
[eggplant] 客戶問題: 無法透過RDP連線處理
方法一
To enable RDP connection debug logs:
1. Create an environment variable in Windows on the EPF machine - WLOG_LEVEL and give it a value DEBUG.
2. Create a script in EPF that connects to a SUT using its name in the Connection List:
Connect “WIN-DS-EGGPLANT-SC”
Log ConnectionInfo()
Log “Waiting for 30 seconds…”
Wait 30
Disconnect
3. Run the script in cmd using runscript:
runscript.bat --commandlineoutput yes C:\CodeRepository\Suite-1.suite\Scripts\ConnectSmartCardTest.script
4. Copy the cmd output to a text file.
方法二
The RDP DLLs that come with the newer versions of Eggplant Functional are different from the ones that come with version 18. There are some security restrictions on the SUT machines that do not allow the connection from EPF.
To try to overcome this, please try the following:
Try entering the hostname of the SUT instead of its IP address and see if it makes a difference. If not, try the following:
1. Quit Eggplant Functional.
2. Open a cmd prompt and go to the EPF installation directory.
3. Enter the following command:
defaults write Eggplant -rdpNlaSecurity NO
4. Open EPF again and try to connect.
5. If that doesn't help, quit EPF again and try the following command:
defaults write Eggplant rdpRdpSecurity NO
星期二, 6月 16, 2020
星期五, 5月 22, 2020
[Flickr] 圖片網址無法讀取410錯誤
今天發現Flickr的圖片連結在Blog的圖片顯示異常,
相片來源 URL
https://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}.jpg
or
https://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}_[mstzb].jpg
or
https://farm{farm-id}.staticflickr.com/{server-id}/{id}_{o-secret}_o.(jpg|gif|png)
後綴分類
| s | 小正方形 75x75 |
| q | large square 150x150 |
| t | 縮圖,最長邊為 100 |
| m | 小,最長邊為 240 |
| n | small, 320 on longest side |
| - | 中等,最長邊為 500 |
| z | 中等尺寸 640,最長邊為 640 |
| c | 中等尺寸 800,最長邊為 800† |
| b | 大尺寸,最長邊為 1024* |
| h | 大型 1600,長邊 1600† |
| k | 大型 2048,長邊 2048† |
| o | 原始圖片, 根據來源格式可以是 jpg、gif 或 png |
originalsecret)和變數副檔名(在回覆中稱為 originalformat)。僅當呼叫程式具有檢視原始尺寸的權限(取決於使用者偏好和其他各種標準)時,透過 API 傳回這些值。這些值由 flickr.photos.getInfo 方法和諸如 flickr.photos.search 等可傳回相片清單並允許 extras 參數(具有值 original_format)的所有方法來傳回。flickr.photos.getSizes 方法總是會傳回允許權限的完整的原始 URL。範例
https://farm1.staticflickr.com/2/1418878_1e92283336_m.jpg farm-id: 1 server-id: 2 photo-id: 1418878 secret: 1e92283336 size: m
星期一, 5月 18, 2020
[eggplant] IE webdrive無法連線
星期三, 4月 29, 2020
星期四, 4月 23, 2020
[Eggplant] 透過命令行的runscript指令來執行suite的測試
只要透過runscript指令即可呼叫。
首先先安裝runscript指令(這樣就免除需要執行完整的路徑)

[Eggplant] 使用shell指令執行Java Jar
MacBook-Pro-8:eggplant_cmd bigd$ java -cp JarDemo.jar com.test.jardemo.TestJar "Hello World" "Ken"
輸入參數0:Hello World
輸入參數1:Ken
星期六, 2月 15, 2020
星期三, 1月 08, 2020
[Eggplant] shell cmd 執行window batch
http://docs.testplant.com/ePF/SenseTalk/stk-system-interaction.htm






