Change
File "/content/naifu/hydra_node/models.py", line 215, in __init__
from ckpt=torch.load(self.config.vae_path, map_location="cpu")
to ckpt=torch.load(self.config.vae_path, map_location="cpu" , weights_only=False)
Change
File "/content/naifu/hydra_node/models.py", line 215, in __init__
from ckpt=torch.load(self.config.vae_path, map_location="cpu")
to ckpt=torch.load(self.config.vae_path, map_location="cpu" , weights_only=False)
I need to configure Salesforce JWT (JSON Web Token) user verification recently.
And there is a file JWK (JSON Web Key) required .The sample document from Salesforce shown as below :
Salesforce Reference
{
"kid":"123456",
"alg":"RS256",
"use":"sig",
"kty":"RSA",
"x5c":["<Your public certificate>"],
"y":"y",
"n":"<Base64-encoded modulus>",
"e":"<Base64-encoded public exponent>",
"crv":"crv",
"d":"d",
"k":"k"
}In order to know more about the values , I do another search online do know more about each parameters.
Detail RFC specification
And to know more about the Salesforce sample document, I get a search about the Salesforce specific file format as well.
Medium Reference
The public exponent now become a fix value "AQAB".
{
"kid": "{A unique value that identifies the end user}",
"alg": "RS256",
"use": "sig",
"kty": "RSA",
"x5c": [
"{Paste the public certificate value here}"
],
"y": "y",
"n": "{modulus of the public key in Base64 format}",
"e": "AQAB",
"crv": "crv",
"d": "d",
"k": "k"
}Isn't it a variable, why it can be fixed ?
The answer is related to the kty (Key Type) parameter.
When "RSA" is used as key type, then the public exponent of it is 65537.
Convert 65537 to hexadecimal , we got 0x01000. Then we encode the 0x01000 to Base64 , we got "AQAB".
In short, the base64 format public exponent of RSA is "AQAB".
And this value is came from conversion of public exponent of RSA key type.
Quoted from Wiki
"65537 is commonly used as a public exponent in the RSA cryptosystem".
A tool tip of a field can be difficult to read when there is no line break.
In formula , we can use "BR()" , but in tool tip, there is no formal method
The idea is still in Idea Exchange .
And a user posted a workaround here , using the "Japanese full width space" (\u3000).
Copy this : [ ]
And put above bracket into the Help text where you need the line break.
For example:
My line 1 [ ] My line 2
Magic is done.
In order to setup a HTTP-based API successfully, it is necessary to check request and response.
Postman is a great tool to check the response, how about the request ?
It can be trouble that if we cannot access a 3rd party system's request log while we have to send request to them . How can we verify the request we made is valid ? If the request will be altered by some middleware we may not able to touch ?
Here is one of the solution , make a mock server to capture the final request to the endpoint.
In past , it may takes time to setup a mock server , now , it becomes super easy.
The great tool here is beeceptor !!! No registration needed , no installation needed.
Just need one browser tab ~
Steps as simple as below :

When deploy a new flow, it is default to be inactive.
But there is a setting to make it active in PROD org called "Process Automation Settings".
We need to ensure coverage of the automation . It can be check by SOQL to FlowTestCoverage:
To calculate your flow test coverage, determine the number of all active flow versions with or without test coverage.
Single SOQL with + symbol.
SELECT count_distinct(Id) FROM Flow WHERE Status = 'Active' AND Id NOT IN ( SELECT FlowVersionId FROM FlowTestCoverage ) + SELECT count_distinct(FlowVersionId) FROM FlowTestCoverage
Ref :https://help.salesforce.com/articleView?id=sf.flow_distribute_deploy_active.htm&type=5
Met an error in renpy when writing the action function of an image button like below :
action Function( '\u2192', pygame.K_RIGHT)
Error shown as below :
File "renpy/common/00action_other.rpy", line 583, in __call__
rv = self.callable(*self.args, **self.kwargs)
TypeError: 'str' object is not callable
Forgot to add the function name
Corrected the syntax to below (also added the parameter name to before value):
action Function(simulate_keypress, unicode_key='\u2192', pygame_key=pygame.K_RIGHT)
1: cd "therootpath"
2: dir "filename.extension" /s
For example search tje entire C drive :
C:\>dir "myFile.jar" /s
Save me a day when searching for a jar file ...
Due to the limitation of renpy in rendering dynamic screen , due the the black border it gives in different UI scale resolution , finally ...