This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT SCHEMA_NAME(SCHEMA_ID) AS [Schema], | |
| SO.name AS [ObjectName], | |
| P.parameter_id AS [ParameterID], | |
| P.name AS [ParameterName], | |
| TYPE_NAME(P.user_type_id) AS [ParameterDataType], | |
| P.max_length AS [ParameterMaxBytes], | |
| P.is_output AS [IsOutPutParameter] | |
| FROM sys.objects AS SO | |
| INNER JOIN sys.parameters AS P | |
| ON SO.OBJECT_ID = P.OBJECT_ID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dism /online /set-edition:ServerStandard /productkey:WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY /accepteula | |
| --------------------------------------------------------------------------------------------------- | |
| The product key that is used here is the KMS key for Windows Server 2016 Standard Edition. | |
| Reboot the server (it will reboot twice!). | |
| Checking winver.exe: | |
| 03-windows-server-2016-eval-to-licensed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // Taken from https://cborrow.wordpress.com/2009/11/13/c-remove-flicker-in-mdi-applications/ | |
| // | |
| const int WM_NCPAINT = 0x85; | |
| const int WM_SIZE = 0x05; | |
| //Add this to MDI CHILD FORM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void InvokeIfRequired(this ISynchronizeInvoke obj, MethodInvoker action) | |
| { | |
| if (obj.InvokeRequired) | |
| { | |
| var args = new object[0]; | |
| obj.Invoke(action, args); | |
| } | |
| else | |
| { | |
| action(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- 1) Create AUDIT Table. | |
| IF NOT EXISTS | |
| (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[dbo].[Audit]') | |
| AND OBJECTPROPERTY(id, N'IsUserTable') = 1) | |
| CREATE TABLE Audit | |
| (Type CHAR(1), | |
| TableName VARCHAR(128), | |
| PK VARCHAR(1000), | |
| FieldName VARCHAR(128), | |
| OldValue VARCHAR(1000), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| MODIFIED CODE FROM | |
| __________________________________________________________________ | |
| Name: CS SPROC Builder | |
| Version: 1 | |
| Date: 10/09/2004 | |
| Author: Paul McKenzie | |
| */ | |
| SET NOCOUNT ON; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Registrar : IDisposable | |
| { | |
| private IntPtr hLib; | |
| [DllImport("kernel32.dll", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)] | |
| internal static extern IntPtr GetProcAddress(IntPtr hModule, string procName); | |
| [DllImport("kernel32.dll", SetLastError = true)] | |
| internal static extern IntPtr LoadLibrary(string lpFileName); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8" ?> | |
| <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
| <CodeSnippet Format="1.0.0"> | |
| <Header> | |
| <Title>CrudSave</Title> | |
| <Shortcut>crudsave</Shortcut> | |
| <Description>Code snippet for Basic Saving</Description> | |
| <Author>AiTech Solutions</Author> | |
| <SnippetTypes> | |
| <SnippetType>Expansion</SnippetType> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public string ImageToBase64(Image image, | |
| System.Drawing.Imaging.ImageFormat format) | |
| { | |
| using (MemoryStream ms = new MemoryStream()) | |
| { | |
| // Convert Image to byte[] | |
| image.Save(ms, format); | |
| byte[] imageBytes = ms.ToArray(); | |
| // Convert byte[] to Base64 String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Fix the issue of MS-SQL Character Encoding to Laravel | |
| # /etc/freetds.conf | |
| [global] | |
| tds version = 8.0 | |
| client charset = UTF-8 |