solidworks 2015 安裝好之後,程式可正常開啟,開啟舊檔/新檔都正常。
但是如果在資料夾內對著檔案直接連點兩下開啟時,solidworks有啟動,但會跳出一個swshellfilelauncher 的錯誤視窗,內容是嘗試開啟您的檔案時發生錯誤。
solidworks 2015 安裝好之後,程式可正常開啟,開啟舊檔/新檔都正常。
但是如果在資料夾內對著檔案直接連點兩下開啟時,solidworks有啟動,但會跳出一個swshellfilelauncher 的錯誤視窗,內容是嘗試開啟您的檔案時發生錯誤。
Shioaji的官網上有提到怎麼做觸價停損: https://sinotrade.github.io/zh_TW/tutor/advanced/quote_binding/#_3
但我連callback都不懂的人,裡面寫的我實在無法理解,所以就想了另一個解法。
因為我只當沖小台,所以就一直snapshot小台目前的價格,每0.5秒一次,並不會超過流量限制。
如果價格有到我的停利或停損價,就馬上執行市價平倉單,來達到觸價停損的機制。
因為市價單必須是IOC,所以要馬上檢查庫存還有沒有單,確認是否已平倉,如果沒有,就繼續下市價平倉單,以確保我有把單平掉。
這就是個人一個簡單的觸價停損作法。
另外就是有發現一個問題,如果我平倉是掛當下限價單,用當下snapshot抓到的小台價格,幾乎不會馬上成交,我就要重新抓小台價格,把下單價格在更新重下,大概都要等個30秒才會成交,就會滑價。但改用市價單就直接成交,出場滑價的機會就會比較小,這也是用市價單的好處。
大概三四個月前發現google adsense一直沒收入,雖然收入本來就超少,但完全是零也蠻怪的。
後來在google adsense後台發現有找不到ads.txt的錯誤訊息。
這個也很怪,我直接在網址列去輸入,都能正常顯示ads.txt,但google adsense卻一直說找不到。
後來就是在帳戶設定裡重新驗證商家網域,google adsense就顯示ads.txt正常了。
但沒多久google adsense又說找不到ads.txt了。就一樣的方式重新驗證。
重覆發生了三四次,最後卻說我太久沒有廣告登入,要重新申請審查,所以就又重新申請審查,等了兩三個星期終於通過了。
然後又等了兩三個星期,就在今天看到有廣告了.......想要賺點小錢真的好難。
某台win2012的電腦使用本機登入,要連到一個共用資料夾。
使用 \\電腦名稱\ 連線,會跳出帳號密碼驗證,接著輸入 網域\使用者帳號 做登入,沒問題。
但使用 \\IP\ 連線,會跳出帳號密碼驗證,接著輸入 網域\使用者帳號 做登入,會跳錯誤,代碼是 0x80004005。
查了網路上一些方法,改機碼,改gpedit安全性都沒用。
後來是會跳出帳號密碼驗證時,輸入 使用者帳號@網域,就成功了,很特別的狀況。
A Windows 2012 computer logged in locally attempts to connect to a shared folder.
When connecting to \\HostName\, a username and password prompt appears. Entering Domain\Username works without issue.
However, when connecting to \\IP\, a username and password prompt appears. Entering Domain\Username results in an error code of 0x80004005.
After trying some methods found online, such as changing registry keys and Group Policy security, the issue was not resolved.
Finally, entering Username@Domain at the username and password prompt resolved the issue.
在centos上安裝好不斷電系統的agent後,執行程式時,會出現 cannot execute binary file的錯誤訊息。
但這個agent在其他台linux系統安裝都沒問題。
後來查發現是系統架構不同。
先執行uname -m,查到系統是i686的。
接著執行 file 執行檔名稱,結果該檔案是x86-64,所以不相容,只好放棄。
After installing the uninterruptible power supply (UPS) system agent on CentOS, an error message "cannot execute binary file" is encountered when attempting to run the program.
It was later discovered that the issue arises from a different system architecture. When executing uname -m
, it was found that the system is i686. Subsequently, running the file command
on the executable revealed that the file is x86-64, indicating an incompatibility issue. As a result, the execution had to be abandoned.
When opening an internal web page in IE mode of Edge, the content cannot be displayed normally. The error message "Internet Explorer has modified this page to help prevent cross-site scripting attacks" appears below.
At this time, go to the Internet Options in Control Panel, find the area to which this page belongs in Security, open the Custom Level, find Enable XSS Filter, and disable it.
為了打造自動化交易工具,產生穩定的被動收入,就開始學python,要來打程式交易。
程式做出來了,但交易策略不太行,所以反而變成穩定的被動失血。
策略還是最重要的東西,想不出一個正期望值的策略,有沒有程式交易其實也沒什麼意義。
去年在使用chatgpt時,可登入,但輸入問題後按下enter,都不會有任何回應。
後來把防毒kes關閉後,就正常了,那時因為版本比較舊,升級後就正常了。
但這幾天又發生了,雖然kes有出比較新的版本了,但跟現在的版本差異不太,所以就先問廠商。
廠商判斷應該是被憑證影響了,要把幾個chatgpt相關的網址加到信任網域內,就可以正常chatgpt的回覆就可以正常顯示。
在政策裡面的一般設定-->網路設定-->受信任網域 裡面,把下列幾個網址加進去即可。
chat.openai.com
auth0.openai.com
cdn.openai.com
cdn.auth0.com
tcr9i.chat.openai.com
cdn.oaistatic.com
events.statsigapi.net
Last year, when I used ChatGPT, I was able to log in, but after entering a question and pressing Enter, there was no response.
I later turned off the antivirus software Kes, and it worked normally. At the time, the version was older, so upgrading it fixed the problem.
However, the issue has occurred again in the past few days. Although Kes has a newer version, it is not much different from the current version. So, I contacted the support vendor.
The vendor determined that the issue was caused by a certificate. Adding the following URLs to the trusted domain will allow ChatGPT responses to be displayed normally.
chat.openai.com
auth0.openai.com
cdn.openai.com
cdn.auth0.com
tcr9i.chat.openai.com
cdn.oaistatic.com
events.statsigapi.net
在用powershell把一些安全性log匯出成csv時,國字 都會變成問號,這時只要把最後匯出成csv的指令,後面在加個用utf8編碼的指令就可以正常顯示了。
原指令
Export-Csv d:\eventlog.csv
修正後
Export-Csv d:\eventlog.csv -NoTypeInformation -encoding utf8
在WORD程式內,透過插入物件的功能,要插入一個PDF檔,卻跳出"此物件是使用程式Acrobat建立。您的電腦並未安裝此程式......請安裝Acrobat或確定已關閉Acrobat中任何的對話"
先確認PDF檔都是可直接用Acrobat PDF Reader開啟,WORD試著插入EXCEL物件也正常。
所以就決定先重裝Acrobat PDF Reader,結果就解決問題了。
When trying to insert a PDF file into a Word document using the "Insert Object" function, the following error message appears: "This object was created using the Acrobat program. This program is not installed on your computer. Please install Acrobat or make sure that all Acrobat dialog boxes are closed."
I confirmed that the PDF files could be opened directly using Acrobat Reader. I also tried inserting an Excel object into a Word document, and that worked fine.
Based on these findings, I decided to reinstall Acrobat Reader. After doing so, the problem was resolved.
近期買的筆電在用HDMI連接會議室投影機時,都會顯示沒有連接到設備,接D-SUB卻正常投影。其他舊筆電兩種連接方式都正常。
本來以為是中間有連接一些轉接頭的關係,後來才發現,是因為新筆電解析度很高,但投影機的太低,如果接上投影機時,是在"同步顯示"的狀態下,投影機的畫面就無法投影,要改成"僅第二個螢幕顯示",或是把筆電的解析度降低,就可以正常投影了。
Recently purchased laptops using HDMI to connect to the projector will display "No device connected". D-SUB can be connected normally. Other old laptops can connect normally in both ways.
At first, I thought it was because of the adapters in the middle. Later, I found out that it was because the new laptop has a high resolution, while the projector is old and has a low resolution. If the projector is connected in "Synced display" mode, the projector's image cannot be projected. You need to change to "Only second monitor display" or lower the laptop's resolution to be able to project normally.
有一台linux主機在重開機後要重新mount其他機器的分享資料夾,執行執令後,畫面上沒任何反應。
過了一下子才會出現 mount.nfs input/output error,這是因為 /etc/init.d/portmap 這個服務沒有啟動的關係,
先 執行/etc/init.d/portmap status, 確認該服務是stop。
接著用執行啟用的指令/etc/init.d/portmap start,就可以再執行mount的動作了。
A Linux host fails to mount a shared folder from another machine after a reboot. After executing the mount command, the screen is blank.
After a while, an error message "mount.nfs input/output error" appears. This is because the service "/etc/init.d/portmap" is not running.
First, execute the command "/etc/init.d/portmap status" to confirm that the service is stopped.
Then, execute the command "/etc/init.d/portmap start" to start the service. After that, you can mount the shared folder again.
在新建虛擬機,從esxi要匯入一個 ova檔時,最後一步出現錯誤:硬體系列 vmx-18 不受支援
When creating a new virtual machine, an error occurs in the last step when importing an ova file from ESXi: "Hardware series vmx-18 is not supported."
The reason for this error is that the ova was created with a newer version of ESXi and is now being imported to an older version of ESXi, which does not support the vmx-18 hardware series. The solution is to upgrade ESXi to a version that supports the vmx-18 hardware series.
將KESS升級到最新版後,連同Network Agent也一起更新到14版。
裝好後卻一直無法跟中控台連線,測了一下發現是Network Agent 有啟用,但連不到中控台。
原來是Network Agent 14版不支援比較舊的作業系統了,規格可參考下列的kaspersky官網說明
https://support.kaspersky.com/KSC/14.2/en-US/255797.htm
After upgrading KESS to the latest version, the Network Agent were also updated to version 14.
After installation, the connection to the central console was not possible. Testing revealed that the Network Agent were running, but could not connect to the central console.
It turned out that Network Agent version 14 no longer supports older operating systems. The specifications can be found in the following Kaspersky website documentation:
https://support.kaspersky.com/KSC/14.2/en-US/255797.htm
筆電突然無法收音,但裝置都還在。
重上驅動也沒用。
可以換個帳號登入試試,有時後是profile的問題,如果換個帳號登入,麥克風是正常的,重把有問題的使用者profile重建即可。
The Windows10 laptop microphone suddenly stopped working, but the device is still there.
Reinstalling the driver did not work.
You can try logging in with a different account. Sometimes it is a profile issue. If the microphone works normally when you log in with a different account, you can rebuild the user profile with the problem.
Office突然不能用,無法移除,安裝也跳這個錯誤1402的錯誤。
雙買只有明顯趨勢下才能賺,雙賣是一有趨勢就慘了。
價差單也差不多,看你怎麼組,也是有上面的問題,怎麼做都不順。
追蹤一個長期獲利的雙賣交易者對帳單,是用大口數來產生比較好的收益,如果只看單口的獲利,可能都不到50塊,過程中要一直調整部份,這個實在難做。
趨勢就是這樣,做賣方,他就很愛動,做買方就不太動,總是常在小賠,偶爾小賺一點點,期望值依然是負的,所以還是先暫停吧,專心做買方當沖。
OCS Inventory 是一套免費的資產盤點軟體。
在使用的時後,會發現,同一台電腦會重複多次,這樣就會造成軟體盤點數量不準。
明明只有裝1套,但因為該台電腦重覆了3次,就會以為是裝了3套。
可以在"Manage"-->"Duplicates"功能中,設定要用什麼條件把重覆的電腦合併。
裡面已經有幾個定義好的,想要用哪個,就去點選後面的數字。
進去後可以看到列出的清單,每個都可以點開,看到相關的電腦資訊,看要合併哪一個,就打勾,選好後,最下面有一個merge的按鈕,按下去系統就會把重覆的合併。
原本有透過GPO在使用者的電腦,佈署EDGE政策,讓EDGE在開啟一些特定網頁時,會啟用IE瀏覽模式。
但這兩天開始有電腦的IE瀏覽模式沒被啟用,查看GPO確定是有套用沒錯,所以不是GPO的問題。
開啟EDGE查看設定,發現套用的政策被略過了,但只有少數人有這個狀況。
Originally, we deployed EDGE policies via GPO on users' computers to enable IE browsing mode when opening certain websites.
However, in the past two days, some computers have failed to enable IE browsing mode. After checking the GPO, we confirmed that it is being applied correctly. Therefore, the issue is not with the GPO.
When we opened EDGE and checked the settings, we found that the applied policies were being ignored. However, this was only happening for a small number of users.
After some investigation, we learned that this is because EDGE was recently updated. If a user is logged in to a personal account in EDGE, the policies deployed via GPO will be ignored. Simply logging out of the account will restore normal behavior.
Ultravnc viewer 在連線時,有時後畫面會太大,或速度比較慢。
這是可以去調整設定,讓畫面自動去符合目前的螢幕大小,跟連線速率的狀況。
但每次連線就要調一次太麻煩,要直接去預設值裡面調整,這樣之後就會自動套用。
先隨便找一台電腦連線,連線之前先把"auto scale"打勾,"quick encoder"選擇"LAN",連後就連線,連上後就可以關閉。
這時到 C:\Users\username\AppData\Roaming\UltraVNC\,就會看到剛剛那台電腦的連線設定檔。
接著把這個檔案重新命名為"options",覆蓋原本已存在的檔案,就行了。
這個設定檔可以用記事本開啟,看到裡面的設定,下列兩個設定就是對應到剛剛設定的那兩個值
QuickOption=3 #可將連線速品質預設為MEDIUM,降低連線延遲。
AutoScaling=1 #可自動調整連線視窗大小,符合當前的螢幕尺吋。
最近Google Blogger流量變多了,但Google Adsense這兩三個月的收入卻都是0,感覺怪怪的。
進到Google Adsense後台看了一下,發現在"網站"這裡面的設定,ads.txt狀態是顯示"找不到"。
看了一下說明,發現設定都對,然後連到 https://網站網址/ads.txt ,資料也有正常顯示。
本來在想是不是Blogger裡面的robots.txt設定有問題,所以把robots.txt關閉,但還是沒用。
後來在論壇上看到有人分享,到Google Adsense後面的"設定-->帳戶資料",裡面有一個"賣家資訊顯示設定",要設定成公開,ads.txt馬上就會馬上生效變成"已授權"。
測試了一下,真的馬上就好了,Google的ads設定都沒提到這個,還好有好心人提供這個方法才得以解決。
Recently, my Google Blogger traffic has increased, but my Google Adsense income for the past two to three months has been 0. I felt strange.
I went to the Google Adsense backend and checked. I found that the status of ads.txt in the "Website" settings is "Not Found".
I read the instructions and found that the settings are correct. Then I went to https://website-url/ads.txt, and the data was also displayed normally.
I thought that the robots.txt setting in Blogger might be wrong, so I turned off robots.txt, but it didn't work.
Later, I saw someone share on the forum that I should go to the "Settings"->"Account Information" in Google Adsense, and there is a "Seller Information Display Settings". I should set it to "Public", then ads.txt will be effective immediately and become "Authorized".
I tested it, and it really worked immediately.
Python寫好的執行要直接轉成exe檔在其他沒裝Python直接運行,可是轉出來的exe檔都好大,幾KB的py檔轉成exe變成幾百MB。
原來是因為之前是用Anaconda裝好環 境的,裡面有一大堆套件,在轉換時,也一直被塞進去了。
要解決這個問題,就是建一個新的虛擬環境,裝上所需的套件,再進行轉換,exe檔就變成幾十MB而已。
可以參考下面網站,說的非常清楚。
https://inf.news/zh-hant/technique/0abeedacd79bf29153e82893d9a0e280.html
Converting a Python script into an executable (.exe) file is a convenient way to run the program on systems without Python installed. However, the resulting .exe files tend to be quite large, often several hundred megabytes, even for scripts that are just a few kilobytes in size.
The reason behind this issue is that if you previously developed your code within an Anaconda environment, it likely included a multitude of packages and dependencies. During the conversion process, these dependencies are also bundled into the executable, contributing to its substantial size increase.
To address this problem, a solution involves creating a new virtual environment, installing only the necessary packages, and then proceeding with the conversion process. This approach results in executable files that are only a few tens of megabytes in size.
For a detailed guide on how to accomplish this, you can refer to the following website:
https://inf.news/zh-hant/technique/0abeedacd79bf29153e82893d9a0e280.html
fortigate log 預設保留7天,如果容量夠的話,可以設定保留久一點,若有發生異常,可以查到比較久以前的紀錄。
直接在指令模式下分別輸入下列三個指令就行了,其中第二行就是設定日誌保留的天數,下面的範例是設成30天。
config log disk setting
set maximum-log-age 30
end
FortiGate logs are stored by default for 7 days. If you have enough disk space, you can configure them to be stored for a longer period of time. This will allow you to view older logs in case of an incident.
To configure FortiGate logs, enter the following three commands in command mode. The second command sets the number of days that logs are stored. In the example below, logs are stored for 30 days.
config log disk setting
set maximum-log-age 30
end
如果是windows2012,powershell 4.0裡面有get-dhcp的指令把DHCP目前租用IP的清單做匯出。
但在windows2008,powershell 1.0沒這個指令,不想升級powershell,可以用netsh來完成,指令如下:
@echo off
netsh dhcp server scope 172.16.11.0 show clients > "%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%_dhcp_clients.txt"
exit
指令會把172.16.11.0這個領域的IP租用匯出到txt中,檔名是會以當天的日期呈現。
如果要把每個領域都匯出,就把指令重覆貼上,改掉scope後面的領域IP就行了。
If you are using Windows 2012, PowerShell 4.0 includes the get-dhcp command to export a list of currently leased IP addresses from DHCP.
However, in Windows 2008, PowerShell 1.0 does not have this command. If you do not want to upgrade PowerShell, you can use netsh to complete the task. The command is as follows:
@echo off
netsh dhcp server scope 172.16.11.0 show clients > "%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%_dhcp_clients.txt"
exit
This command will export the IP leases for the 172.16.11.0 scope to a text file. The file name will be in the format of YYYYMMDD_dhcp_clients.txt.
To export leases for all scopes, simply copy and paste the command, and change the scope IP address after scope.
最近在查怎麼讓web伺服器某些https的網站,在連線時,用http連會自動轉跳到https,查到的設定都好復雜,結果發現有一個人分享一個很簡單的方法,主要是利用連上http沒東西時,會自動幫你轉跳到https的頁面就可以了,只需要一行設定,可參考下列說明
ttps://www.orcy.net.cn/927.html
在ESXi 6.5架設了一台windows 2012虛擬機,開啟了遠端桌面連線的功能,都可以使用,接著安裝了vmtool重開機後,使用chrome透過esxi的web console要登入主機時,傳送ctrl alt del沒反應。
使用遠端桌面連線,輸入完帳號密碼後,也都連不上,非常奇怪。
查了一下google,vmware有一篇文章是說要升級esxi,這個就先不考慮。
在經過一些測試後發現,是透過windows update進行更新時,會有一個vmware的套件,安裝了這個後,才會有傳送ctrl alt del沒反應的問題,所以在做windows update時不要裝這個套件就好了。
EXCEL檔案不同的分頁,通常都在左下方可以做點選切換。
但某些檔案明明就有多個分頁,但下方卻都沒東西,無法切換。
這是設定的問題,只要在進階的設定裡,找到 顯示工作表索引標籤,將此功能打勾就會正常顯示其他分頁了。
有一台非常老舊的IBM x345,前面面板出現了硬體故障的橘燈,但這台伺服器的面板沒有其他資訊,就只燈號可以看。
檢查了外觀,硬碟都正常,沒其他亮橘燈的地方,就查不到橘燈是什麼地方異常造成的。
查看原廠文件,有說明主機板上會有其他硬體的燈號,有問題的就會亮橘燈。
所以就關閉系統,但接著電腦線,將上蓋打開,果然看到記憶體插槽上有亮橘燈,終於找到問題。
更妙的時打開上蓋後,發現有一個小面板藏在裡面,上面就有顯示哪個硬體故障,實在想不通為何要把這個面板藏在裡面。
回去查原廠文件,裡面還真的有寫到這個診斷面板是在伺服器裡面。
永豐shioaji可以把1分k做匯出,然後在自行轉成其他分k。
做法通常就是把1分k資料用pandas轉換成datafram,然後在用resample的方式,轉成其他的分k。
不過在轉成其他分k時,會遇到兩個問題。
第一是轉成其他k分時,會有從左邊算起或右邊算一起的問題,這就會影響到資料的正確性,關於這個,可以參考https://ithelp.ithome.com.tw/articles/10280495 這篇文章,用label跟closed兩個參數去調整資料的正確性。
系統預設是左邊,但在轉換shioaji的資料時,要從右邊算,出來的分k開高收低才會對。
第二個問題是在用resample重把切分1分k時,都是以完整一小時去切,譬如說你要換成30分k,系統就會用x點00分跟x點30分去切,但台指開盤是8點45分,應該要切成x點15分跟x點45分。
這時後就要在加一個base的參考,範例可參考 https://towardsdatascience.com/using-the-pandas-resample-function-a231144194c4 這篇最後面‘Base’ Argument的說明。
另外就是1分k只能用日期 去過濾,但裡面會包含到日跟夜盤的資料,如果只要日盤,或是特定時間,就要用between_time這個參考去過濾,範例可去https://geek-docs.com/pandas/pandas-dataframe/python-pandas-dataframe-between_time.html 看看。
在執行top查看系統效能狀況時,發現有一支程序nautilus佔用了很高的cpu效能,但整體的cpu效能使用率還是很低,沒影響到系統整體的運作。
將這些資料夾關一關,登入圖型介面後,這些程序也就不見了。
The Linux program Nautilus is consuming CPU resources.
While checking the system performance using the "top" command, I noticed that the Nautilus program is utilizing a significant amount of CPU power. However, the overall CPU usage remains low, and it does not affect the overall operation of the system.
Nautilus is a graphical interface program, similar to a file manager. By using the "who" command, I confirmed that there is still an active session logged in through the graphical interface. After connecting to it, I discovered that many folder windows were left open, which were not closed after configuring some settings by other personnel.
By closing these folders and logging into the graphical interface again, these programs disappeared.
原本在使用Teams會議時,沒帳號的來賓,也可以透過"聊天"功能用文字聊天。但最近突然不能用。
在測試時,卻發現有時後可以,有時後不行,仔細比對操作方式,發現了為何會有這種狀況。
Teams的會議有分頻道會議跟一般會議,發起會議的地方在不同的頁面上,通常發起會議都是頻道會議,因為登入後的畫面就是會在發起頻道會議的地方。
1.在"團隊"裡建立的會議,不管是排程或立即開會,都是頻道會議。來賓是無法使用文字聊天。
2.在"行事曆"裡建立的會議,不管是排程或立即開會,都是一般會議。來賓是可以使用文字聊天。
其他差異可參考 https://atlas.utdallas.edu/TDClient/30/Portal/KB/ArticleDet?ID=300
Guests in Teams meetings are unable to chat via text.
Originally, during Teams meetings, guests without an account could also engage in text chat using the "Chat" feature. However, recently this capability suddenly became unavailable.
During testing, it was observed that sometimes it worked, while other times it didn't. After carefully comparing the steps taken, the reason for this situation was identified.
Teams meetings can be categorized as channel meetings or regular meetings, and the location for initiating a meeting is different on the interface. Typically, meetings are initiated as channel meetings because upon logging in, the interface is directed to the channel meeting initiation section.
Meetings created within "Teams" are always channel meetings, regardless of whether they are scheduled or started immediately. Guests cannot use text chat in these meetings.
Meetings created within the "Calendar" are always regular meetings, regardless of whether they are scheduled or started immediately. Guests can use text chat in these meetings.
Backup exec 伺服器的C槽空間快不夠了,看了一下裡面的東西,發現 Backup exec 的程式資料夾中,其中一個BEDBG資料夾用了比較多空間,在裡面看到很多cab檔。
上網查了一下,這是 Backup exec 當掉後就會產生的dump檔,如果有需要查原因就可以去讀取這些cab檔。
不需要查的話,這些檔案就可以砍掉清空間。
The available disk space on the C drive of the Backup Exec server is running critically low. Upon investigating the contents, it was observed that the BEDBG folder within the Backup Exec program directory is consuming a considerable amount of space. Upon further inspection, it was discovered that the folder contains multiple CAB files.
After conducting research online, it was determined that these CAB files are generated as dump files by Backup Exec in the event of a system crash. These files can be accessed for troubleshooting purposes to identify the cause of the crash, if necessary.
If there is no need for further investigation, it is recommended to delete these files in order to reclaim disk space.
HTTPS網站的憑證發行者,通常都是顯示該憑證的發行商,
但在某些網站查看憑證資訊時,發行者會變成Kapersky,在功能上沒影響,但不知為何會如此。
查了一下才發現,如果防毒軟體有啟用HTTPS的掃描檢查,防毒軟體就會安裝自己的憑證,以便檢查HTTPS傳輸。
如果把這個HTTPS加密傳輸的檢查關了,就不會有憑證發行者被換掉的狀況了。
卡巴斯基企業版的端點防護(KES)HTTPS加密傳輸掃描設定,是在一般設定中的網路設定裡,可以做啟用或關閉。
現在選擇權代號通常會有當週,下週,跟月選3個合約,如果現在是第一週,就是有TX1,TX2,TXO,三個。只有第三週是2個(TXO跟TX4)。
目前的python語法裡TX是寫死的,每周要自己手動改,有點煩,所以就想了一個動判斷的語法,來抓今天是該是TX幾。
主要就是判斷連續兩週的合約有沒有值,如果都有的話,那TX就是比較小的那個。
像是TX1跟TX2都有值,那今天就會是TX1。
第三週因為是抓TXO跟TX4,但第四週也會有TXO跟TX4,所以這一個判斷要放在最後面才行,不然第四週會被先判斷成是TXO。
#抓當週的週選的TX代號
if api.Contracts.Options['TX1'] != None and api.Contracts.Options['TX2'] != None:
TX = 'TX1'
print(api.Contracts.Options[TX])
elif api.Contracts.Options['TX2'] != None and api.Contracts.Options['TXO'] != None:
TX = 'TX2'
print(api.Contracts.Options[TX])
elif api.Contracts.Options['TX4'] != None and api.Contracts.Options['TX1'] != None:
TX = 'TX4'
print(api.Contracts.Options[TX])
elif api.Contracts.Options['TX4'] != None and api.Contracts.Options['TX5'] != None:
TX = 'TX4'
print(api.Contracts.Options[TX])
elif api.Contracts.Options['TX5'] != None and api.Contracts.Options['TX1'] != None:
TX = 'TX5'
print(api.Contracts.Options[TX])
elif api.Contracts.Options['TXO'] != None and api.Contracts.Options['TX4'] != None:
TX = 'TXO'
print(api.Contracts.Options[TX])
在win2019透過freefilesync要把遠端win2003的檔案同步過來本機的時後,有些資料夾都會出現錯誤,內容都是在本機端的資料夾中 sync.ffs_lock有錯誤, code error 5: Access refuse [create file]。
照字面上的意思應該就是同步的過程程式要產生一個sync檔,但無法建立。
可是我在本機端自己建立檔案時,都沒什麼異狀,就覺得很怪。
後來就手動用複製貼上檔案的方式,發現有時後會跳出錯誤訊息,大概就是說沒有權限,要用系統管理者執行之類的,可是我就是用本機管理者帳號在執行啊。
這時突然想到,那執行freefilesync時,要用系統管理者身份去執行,有三四個在同步會跳錯誤的資料夾,就通通都沒問題了。
When using FreeFileSync on Windows Server 2019 to sync files from a remote Windows Server 2003 to the local machine, some folders encounter errors. The error message states that there is an issue with the "sync.ffs_lock" file in the local folder, with error code 5: Access refused [create file].
According to the literal meaning of the error, it seems that the sync process is unable to create the "sync" file.
However, I noticed that there were no issues when manually creating files on the local machine, which struck me as odd.
Later, while manually copying and pasting files, I encountered occasional error messages indicating a lack of permission and suggesting the need for administrator privileges. However, I was already using the local administrator account to perform the operation.
At this point, it occurred to me that when running FreeFileSync, it should be executed with administrator privileges. When I ran the program as an administrator, the folders that were previously causing errors during synchronization, about three or four of them, synced without any problems.
在用pyinstaller把一個py檔要轉成exe執行檔時,出現下列錯誤
The 'pathlib' package is an obsolete backport of a standard library package and is incompatible with PyInstaller. Please remove this package (located in C:\Users\helloeveryone\Anaconda3\lib\site-packages) using conda remove then try again.
這時就執行 pip uninstall pathlib ,把pathlib移除就好,移除後不需要再重裝一次。
之後執行pyinstaller,就可以成功把py轉成exe了。
When using PyInstaller to convert a .py file into an executable (.exe) file, the following error occurs:
"The 'pathlib' package is an obsolete backport of a standard library package and is incompatible with PyInstaller. Please remove this package (located in C:\Users\helloeveryone\Anaconda3\lib\site-packages) using conda remove then try again."
To resolve this, execute "pip uninstall pathlib" to remove the pathlib package. After removing it, there is no need to reinstall it.
Afterward, running PyInstaller should successfully convert the .py file into an .exe file.
Shioaji 在撈Kbar資料時,可以指定開始跟結束的"日期",然後就產出這段時間的一分k資料 。
假如是撈期貨的資料,就會把日盤跟夜盤的kbar全部列出來。
本來都有設定autoit做收盤前的自動平倉單功能。
昨天並沒開倉下單,所以就算執行了自動平倉也不會生效。
但晚上就發現居然有庫存,autoit的自動平倉居然變成開倉雙買了。
然後還賺了一點錢,好佳在,如果是雙賣就虧慘了。
然後仔細檢查了一下autoit裡面的程式,發現下單的下拉選單(開倉,停損,停利,自動)這個鈕的按鈕參數,在完全沒下過單跟有先下過單(任個一種單因)的狀況下,是不相同的。TR<>裡面那串數字會變動。
ControlCommand("e-Leader - [[6508]多次IOC :(0) TR<540001>]","","ComboBox8","SelectString",'平倉停損')
實在太奇怪了,所以如果沒下單,要把視窗關了,不然到時就會變自動開倉下單了。
選擇權下單跟股票或期貨不一樣,沒有當沖這個功能可以選,讓單子可以在收盤自動平倉。
如果想要實現在這功能,就需要搭配autoit這個軟體來實現。
現在就是使用永豐的e-leader裡的組合單操作
1. 假設已手動下好多次IOC的組合單,而且成交了,這時後畫面就會停在原本下單的條件。
如果想查詢近期DHCP server 的IP發送給哪一台主機,可以用下列方式查詢。
先開啟DHCP的管理工具,在server名稱按下滑鼠右鍵,選擇內容。
透過chrome登入某些網站後,都會產生cookie,下次在登入時,就可以不用輸入帳密就登入了,像是spotify,teams等等的網站。
但有時後卻希望網頁關閉,這些cookie就清除掉,避免下一次登入又自動使用上一次的帳密登入。
chrome的設定裡有一個清除cookie的功能,但這會清除所有的cookie,沒辦法只清除特定網站的cookie,也不太方便。