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
<# | |
.SYNOPSIS | |
Automation of the steps described on https://dev.mysql.com/doc/mysql-windows-excerpt/5.7/en/resetting-permissions-windows.html | |
to reset the Root Password of MySql server on a Windows system. | |
.PARAMETER MysqlServiceName | |
The MySql service's name (e.g. MySQL56). | |
.PARAMETER RootPassword | |
The password for the root user | |
#> | |
Param( |
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
using System; | |
using System.Collections.Generic; | |
using System.IO;; | |
using System.Net; | |
using System.Xml.Serialization; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ |
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
IF OBJECT_ID('[dbo].[Country]', 'U') IS NOT NULL | |
DROP TABLE [dbo].[Country] | |
CREATE TABLE [dbo].[Country] | |
( | |
Id int NOT NULL IDENTITY(1,1), | |
Name varchar(80) NOT NULL, | |
DisplayName varchar(80) NOT NULL, | |
Iso char(2) NOT NULL, | |
Iso3 char(3) NULL, |
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
/* | |
This will format a string mimicking the .Net string format. | |
ie: format('test {0} - {1}', 'value 1', 'value 2'); | |
*/ | |
function format(value) { | |
var args = Array.prototype.slice.call(arguments, 1); | |
return value.replace(/{(\d+)}/g, function (match, number) { | |
return typeof args[number] != 'undefined' | |
? args[number] | |
: match |
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
CREATE FUNCTION [dbo].[ufnAddBusinessDays] | |
( | |
@Date DATE, | |
@n int -- Number of days to add or substract | |
) | |
RETURNS DATE | |
AS | |
BEGIN | |
DECLARE @d INT,@f INT,@DW INT; | |
Set @f = CAST(abs(1^SIGN(DATEPART(DW, @Date)-(7-@@DATEFIRST))) as bit) |
NewerOlder