2023/09/11

Office2010安裝 錯誤1402

 Office突然不能用,無法移除,安裝也跳這個錯誤1402的錯誤。


執行 secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose 
就可重新安裝。




Office suddenly stopped working, could not be removed, and the installation failed with error code 1402.

Executing the following command will allow you to reinstall Office

secedit /configure /cfg %windir%\inf\defltbase.inf /db defltbase.sdb /verbose


2023/09/08

選擇權操作-停止所有組合單策略

雙買只有明顯趨勢下才能賺,雙賣是一有趨勢就慘了。

價差單也差不多,看你怎麼組,也是有上面的問題,怎麼做都不順。

追蹤一個長期獲利的雙賣交易者對帳單,是用大口數來產生比較好的收益,如果只看單口的獲利,可能都不到50塊,過程中要一直調整部份,這個實在難做。

趨勢就是這樣,做賣方,他就很愛動,做買方就不太動,總是常在小賠,偶爾小賺一點點,期望值依然是負的,所以還是先暫停吧,專心做買方當沖。


2023/08/29

OCS Inventory 多筆重複電腦

 OCS Inventory 是一套免費的資產盤點軟體。

在使用的時後,會發現,同一台電腦會重複多次,這樣就會造成軟體盤點數量不準。

明明只有裝1套,但因為該台電腦重覆了3次,就會以為是裝了3套。

可以在"Manage"-->"Duplicates"功能中,設定要用什麼條件把重覆的電腦合併。

裡面已經有幾個定義好的,想要用哪個,就去點選後面的數字。

進去後可以看到列出的清單,每個都可以點開,看到相關的電腦資訊,看要合併哪一個,就打勾,選好後,最下面有一個merge的按鈕,按下去系統就會把重覆的合併。



OCS Inventory is a free asset inventory software.

When using it, you may notice that the same computer is listed multiple times. This can lead to inaccurate software inventory quantities.

For example, if you only have one copy of a software installed on a computer, but that computer is listed three times in the inventory, the software will think you have three copies installed.

To fix this, you can use the "Manage"-->"Duplicates" function to merge duplicate computers.

This function lets you choose the criteria you want to use to merge computers. There are a few pre-defined criteria, or you can create your own.

Once you've selected the criteria, you'll see a list of all the duplicate computers. You can click on each one to see more information.

To merge a duplicate computer, check the box next to it. Once you've selected all the computers you want to merge, click the "Merge" button.

The system will then merge the duplicate computers into a single entry.









安裝Kaspersky 的KESS,出現電腦上遺失SHA-256(SHA-2)數位簽章支援的錯誤訊息。

 



安裝Kaspersky 的KESS防毒軟體時,出現電腦上遺失SHA-256(SHA-2)數位簽章支援的錯誤訊息。
可參 考錯誤訊息下方的說明網站。
主要的解法就是去安裝kb4474419的更新即可。

When installing Kaspersky's KESS antivirus software, an error message may appear indicating that the computer is missing SHA-256 (SHA-2) digital signature support. This is because Kaspersky uses SHA-2 to verify the authenticity of its software and files.

To fix this error, you need to install the kb4474419 update. This update is available from Microsoft's website.
Once you have installed the update, you should be able to install Kaspersky's KESS software without any problems.

2023/08/24

GPO佈署EDGE IE瀏覽模式突然失效 被略過

原本有透過GPO在使用者的電腦,佈署EDGE政策,讓EDGE在開啟一些特定網頁時,會啟用IE瀏覽模式。

但這兩天開始有電腦的IE瀏覽模式沒被啟用,查看GPO確定是有套用沒錯,所以不是GPO的問題。

開啟EDGE查看設定,發現套用的政策被略過了,但只有少數人有這個狀況。


查了一下才知道是因為EDGE最近升級後,有一些改變。
如果使用者在EDGE裡登入了私人帳號,GPO佈署的政策就會被略過,只要登出帳號,就會恢愎正常了。



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.


2023/08/18

Python Excel書推薦

 Python操作Excel:最強入門邁向辦公室自動化之路 王者歸來

這本書裡面範例多,而且都很簡短,好上手,想要Python來處理Excel資料的很適合。




2023/08/14

Ultravnc viewer 連線設定

 Ultravnc viewer 在連線時,有時後畫面會太大,或速度比較慢。

這是可以去調整設定,讓畫面自動去符合目前的螢幕大小,跟連線速率的狀況。

但每次連線就要調一次太麻煩,要直接去預設值裡面調整,這樣之後就會自動套用。

先隨便找一台電腦連線,連線之前先把"auto scale"打勾,"quick encoder"選擇"LAN",連後就連線,連上後就可以關閉。

這時到 C:\Users\username\AppData\Roaming\UltraVNC\,就會看到剛剛那台電腦的連線設定檔。

接著把這個檔案重新命名為"options",覆蓋原本已存在的檔案,就行了。

這個設定檔可以用記事本開啟,看到裡面的設定,下列兩個設定就是對應到剛剛設定的那兩個值

QuickOption=3 #可將連線速品質預設為MEDIUM,降低連線延遲。

AutoScaling=1 #可自動調整連線視窗大小,符合當前的螢幕尺吋。



UltraVNC viewer may sometimes display too large a screen or be slow when connected.

You can adjust the settings to make the screen automatically fit the current screen size and connection speed.

However, it is too troublesome to adjust it every time you connect. You can directly adjust it in the default values, so it will be automatically applied afterwards.

First, connect to any computer at random. Before connecting, check the "auto scale" and select "LAN" for the "quick encoder". Then connect and close it after connecting.

At this time, go to C:\Users\username\AppData\Roaming\UltraVNC, and you will see the connection settings file for the computer just now.

Then rename this file to "options" and overwrite the existing file.

This settings file can be opened with Notepad to see the settings. The following two settings correspond to the two values ​​that were just set:

QuickOption=3 #Can set the connection speed quality to MEDIUM by default, reducing connection latency.

AutoScaling=1 #Can automatically adjust the size of the connection window to fit the current screen size.

2023/08/11

搭配Google Blogger 的Google Adsense ads.txt一直顯示找不到

 最近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 py轉exe的執行檔太大

 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

2023/08/08

fortigate log 保留天數調整

 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