Skip to main content

Posts

CLONE a table in Snowflake

  Clone a Table in Snowflake  So simple,  CREATE TABLE TableName_Clone CLONE OriginalTableName To restore a table at a specific timestamp  CREATE TABLE  TableName_Clone   CLONE  OriginalTableName AT  (TIMESTAMP => TO_TIMESTAMP_TZ('11/04/2024 00:00:00', 'dd/mm/yyyy hh24:mi:ss'));
Recent posts

IEC 60320 Power Cords

  Mains Interconnect Diagram Pin spacing, centres (mm) Earth contact Appliance class Rewirable connector allowed? Max. current (A) Max. pin temp. (°C) Polarized Remarks and example uses Connector (Female) Appliance inlet (Male) Plug connector (Male) Appliance outlet (Female) C1 C2 - - 6.6 No II No 0.2 70 No C3 C4 - - 10 No II 2.5 70 Yes C5 C6 A B 10 (H) 4.5 (V) Yes I No 2.5 70 Yes Commonly referred to as a "clover-leaf" or "Mickey Mouse" connector  C7 C8 C D 8.6 No II No 2.5 70 No There is a similar polarized connector,  but this is not part of the standard. C9 C10 - - 10 No II No 6 70 No This kind of coupler is used by  Roland Corporation  and  Revox   for synthesizer and drum-computer models and  hi-fi equipment.  Was also by  Marantz C11 C12 - - 10 No II 10 70 Yes Similar to C9 with a slot in the connector, withdrawn from standard. C13 C14 E F 14 (H) 4 (V) Yes I Yes 10 70 Yes C15 C16 M N 14 (H) 4 (V) Yes I Yes 10 120 Yes For use in high-temperature settings (for

Convert Time Between Time Zones in SQL Server

Step 1  Get a list of Time Zones SELECT * FROM sys.time_zone_info  Step 2 Run a Conversion  SELECT GETDATE() AT TIME ZONE 'UTC' AT TIME ZONE 'AUS Eastern Standard Time'; The above script essentially tells SQL Server that the datetime is UTC and you want it as Australian time.  This approach is needed when the date time includes no time zone info The text you enter for the time zone name needs to match the entry in the sys.time_zone_info table.  Information from  AT TIME ZONE (Transact-SQL) - SQL Server | Microsoft Learn

How to Sign a C# .Net WPF Application

  To sign a C# WPF .NET 6 application, you can follow these steps: Generate a strong name key pair: Open the Developer Command Prompt for Visual Studio (search for it in the Start menu). Navigate to the project directory using the cd command. Run the following command to generate a strong name key pair: Copy code sn -k keypair.snk Configure your project to use the strong name key pair: In Visual Studio (prior to 2022), open your WPF project. Right-click on the project in the Solution Explorer and select "Properties." In the project properties, go to the "Signing" tab. Check the "Sign the assembly" checkbox. Click the "..." button next to the "Choose a strong name key file" field and browse to select the keypair.snk file you generated in the previous step. Click "OK" to save the changes. Configure the project for ClickOnce deployment (optional but recommended for distributing your application): In the project properties, go t

Syncfusion Grid, Custom Add Dialog - Two methods

 Method 1 - Using the default Options - ToolbarClickHandler In the Razor Page @{ var Toolbar = new List < string > () { "Add" , "Search" }; } < SfGrid DataSource =" @ Organisations " TValue =" OrganisationList " Toolbar =" @ Toolbar " AllowSelection ="true" AllowPaging ="true" AllowSorting ="true" > < GridEditSettings AllowAdding ="true" Mode =" EditMode . Dialog " > <Template > @{ var org = ( context as OrganisationList ); } Your own code here for the dialog </ GridEditSettings > < GridPageSettings PageSize ="20" ></ GridPageSettings > < GridEvents OnToolbarClick =" ToolbarClickHandler " TValue =" OrganisationList " > </ GridEvents > Inside the Grid In the code: public async Task ToolbarClickHandler (