Sunday, September 11, 2022

LONG LIVE

  But life of course consists of final partings as well as first meetings

Goodbye our Queen.



Tuesday, August 9, 2022

隨意歌詞翻譯 Chinese Lyrics translation - 說說話 Say Something 王靖雯

 說說話


作詞:王靖雯
作曲:王靖雯


你在哪啊
Where are you
還是老樣子嗎
Are you still look the same 
脾氣還是那麼差
Bad temper as always 
上班會遲到嗎
Late for work
飯有按時吃嗎
Have you ate on time
是不是還那麼晚回家
Back home late as always

你在幹嘛
What are you doing now
會偶爾想想我嗎
Will you think of me
我只是想和你說說話
I just want to say something with you


我最近過得還好啊
I live as good and
我這裡飄起了雪花
There is snowing 
可我找不到你 我好想你
And I can't reach you , I am thinking of you
我沒有辦法
I can do nothing however

我們 也曾是對方唯一的希望
We are the only hope of each other in past
現在 誰又代替我出場
I was replaced by someone now 
我總讓你失望
I always let you down
夜還如此漫長
This night is long still
我不奢望 只想看看你模樣
I just want to see you again and not looking for anything

你在幹嘛
What are you doing now
會偶爾想想我嗎
Will you think of me
我只是想和你說說話
I just want to say something with you
我最近過得還好啊
I live as good and
我這裡飄起了雪花
There is snowing 
可我找不到你 我好想你
And I can't reach you , I am thinking of you
我沒有辦法
I can do nothing however

我們 也曾是對方唯一的希望
We are the only hope of each other in past
現在 誰又代替我出場
I was replaced by someone now 
我總讓你失望
I always let you down
夜還如此漫長
This night is long still
我不奢望 只想看看你模樣
I just want to see you again and not looking for anything

我不再是你生命的一束光
I am not the light of you anymore
你會 靠在 另一個肩膀
You will lean on the shoulder of other
就這樣散了場
Everything dismissed 
就算夜再漫長
Night is long and dark
別回頭望 請忘了我模樣
Do not look back for me however 

就這樣散了場
It just ended like that
就算人來人往
People come and go
可那幾年 只有你為我鼓掌
in past you are the only one who appreciate me 
你在哪啊
Where are you now however

Wednesday, June 22, 2022

The NVL Maker (KiriKiri 吉里吉里2) : Particle.dll 粒子特效插件使用 為遊戲加入各種火光動畫效果

在日文網站發現一個在吉里吉里2做動畫特效的插件( Particle.dll ),可製作各種火光雷電特炫目效果。特意嘗試能否使用在The Nvl Maker繁體版中,實測完全可行。

只需要解決兩件事。

—下載那個插件(廢話。。。)

—解決範例文本字元編碼問題 (可使用免費的Notepad++)


詳細步驟如下 : 

1。下載並解壓 particle.zip

2。把scenario Folder內的文檔轉成UTF-16 LE BOM 編碼。(用Notepad++即可)

3。把image , others 內的檔案複製一份到NVL maker 專案(project)內Data Folder的
同名Folder 中。

4。把particle.dll 複製到NVL maker 專案(project)內plugin Folder中。

5。修改NVL maker 專案(Project)內Data Folder的startup.tjs,加上以下這句,去連結插件。

Plugins.link("plugin/particle.dll"); 
6。將步驟2改好編碼的first.ks改名為prelogue.ks,與particle.ks一同放到NVL maker 專案(project)內Data的scenario Folder 中。
(取代原有prelogue.ks前,請先備份原來的prelogue.ks)

7。啟動krkr.exe,在標題畫面按Start (或開始遊戲),直接看效果。

8。看完後可將prelogue.ks還原成原本檔案。 


日文網上還有其他附件圖片和定義asd可使用,都是很PRO的效果,可慢慢發掘。

作者也創作了個工具去寫效果定義檔,可課5000支持一下。



Wednesday, June 15, 2022

PowerShell Script : Convert UTF-8 text file into UTF-16 Unicode encoding file , salesforce dataloader export csv to UTF-16 Unicode SFDC 原生編碼字元轉換補遺

The native dataloader from Salesforce only export .csv file in UTF-8 encoding . And it is asked to exchange information with Therefore™ information management application which uses UTF-16 encoding data .

The pros and cons of UTF-8 and UTF-16 (Unicode) encoding can be found in here.
Storage and indexing speed etc. matters. 

The most easy way to do this is using powershell script to encode the .csv from Salesforce dataloader export to Unicode in mainly one line .PS script. Schedule this script into window task scheduler , done.

  

Get-content -encoding UTF8 $filename | Set-Content -encoding Unicode "$new_filename"

Script below shows how to convert multiple UTF-8 files in folder into UTF-16 files with error log tracking. 

Both UTF-8 and UTF-16 files will be available in the folder after conversion.
UTF-8 abc.csv will be cloned , and a UTF-16 abc_utf16.csv will be created in the same folder.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#Continue conversion even if one file failed , just log down the error.
$ErrorActionPreference="SilentlyContinue"
Stop-Transcript | out-null
$ErrorActionPreference = "Continue"
#-path of the log file
Start-Transcript -path "C:\ABCProject\log\utfLog.txt" -append
try {
#double bracket for path with space
#get all csv files inside that folder
get-childitem "C:\ABCProject\write\*.csv" | 

  foreach-object { 
    $name = $_.FullName;
    write-host "The file name" $name;
    $fname = $name.replace(".csv","_utf16.csv");
    write-host "The new file" $fname;
    get-content -encoding UTF8 $name  | Set-Content  -encoding Unicode  "$fname" 
}
 Stop-Transcript
 exit
}
catch {
  #log -message "Get-WmiObject cmdlet failed" -type "Error"
  write-host "Error found " $_.Exception.Message.ToString() -type "Error"

}

Tuesday, June 14, 2022

Salesforce Administration : 2022 Spring email about "Salesforce email verification" from support@salesforce.com SFDC Salesforce 電郵認證郵件是釣魚嗎?

Recently some of the users receiving email from support@salesforce.com with subject "Salesforce email verification". A link is inside that email , users worry it may be phishing email ,so they come to check .

Luckily, it is not a phishing email . From official announcementprior to the Summer '22 release , users may be asked to verify their email .


To get the list of user who may get the mentioned verification email ,s
ystem administrators may use SOQL below :

SELECT Name from User where id IN (SELECT UserId FROM TwoFactorMethodsInfo where HasUserVerifiedEmailAddress = false)


Error message
"sObject is not supported" may be shown if your account do NOT have Manage Multi-Factor Authentication in API permission.

To enable this permission

1.    Go to Setup -> Manage Users -> Permission Sets , click New to create a new permission set.

2.    Select "System Permissions" . 


3.    Click "Edit" , scroll down to items below ,and checked the box. Then save.

        -    Manage Multi-Factor Authentication in API
       -    Manage Multi-Factor Authentication in User Interface




4.    Add the permission set to a user account you use to run the SOQL by using "Assign" button.

5.    Click "Done" to save the setting.

6.    Run the SOQL again.





Tuesday, May 24, 2022

Salesforce Apex Code : Add or Remove ALL (multiple) field permissions of User Profile 快速完成加入或移除個別用戶配置的編輯權限

 Sometimes we may need to update ALL field permission of a user profile due to different purpose, like audit requirement or ISO requirement. 

It can be very time-consuming to do it in UI level . For example, auditor asked to block ALL field "edit" permission of all "Clerk" profile user. You have to go to every object, and untick each field's security checkbox . There is a better way to handle this batch permission update , using "Apex program"


Code below demonstrate how to remove Clerk user's field edit permission right of multiple objects .

   

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
// Multiple object names into the list
List<String> validTypeList = new List<String>{'Account','Case','Contact','CustomObj__c'}; 
//ClerkUser can be replaced by any profile name
//Use PermissionsRead if "Read" permission is needed
List<FieldPermissions> fpList = [SELECT SobjectType, Field, PermissionsEdit, Parent.ProfileId 
FROM FieldPermissions 
WHERE SobjectType IN :validTypeList AND PermissionsEdit=TRUE
AND ParentId IN (SELECT Id FROM PermissionSet WHERE PermissionSet.Profile.Name = 'ClerkUser')];
if(!fpList.isEmpty()){
    List<FieldPermissions> updatefpList = new List<FieldPermissions>();
    for(FieldPermissions fp:fpList){
        fp.PermissionsEdit = false;
        updatefpList.add(fp);
    }
    update updatefpList;

   //Print Total field edit permissions REMOVED
    system.debug('UpdatefpList Edit Permission - ' + updatefpList.size()); 
}

Wednesday, February 16, 2022

Window command : MS-DOS Doskey native window utility check command prompt history . Make record of cmd command easily

 It can be trouble when we runs a lots of command in command prompt . It made so many changes in short time ,which may need to be recovered later.

But it is not easy to remember every command you types , with native utility , we may retrieve command history with line line below :

Just open your command prompt and type 

doskey /history

#For keeping record in text log file
doskey /history > myCmd20220216.log 

Press "Enter"  , Finished ! 

Finally, very important thing is that the history is session history .
It only keeps command history BEFORE you CLOSE the command prompt. 

Migrating from Renpy to Godot

 Due to the limitation of renpy in rendering dynamic screen ,  due the the black border it gives in different UI scale resolution , finally ...