This file contains 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
class Stack | |
{ | |
static int TotalCount; | |
static Element Minimum; | |
static Element Top; | |
public void Push(int Value) | |
{ | |
Element Item; |
This file contains 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 DISTINCT | |
STUFF((SELECT DISTINCT ',' + CP.Phone_Nbr | |
FROM Customer_Phone CP | |
WHERE CM.Cust_Nbr = CP.Cust_Nbr | |
FOR XML PATH(''), TYPE) | |
.value('.', 'NVARCHAR(MAX)'), 1, 2, '') Phones | |
FROM Customer_Phone CM where CM.Cust_Nbr = 321 |
This file contains 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 l.Loc_Name, 6371.0E * ( 2.0E * asin( | |
case when 1.0E < (sqrt(square(sin(((RADIANS(CAST(36.5696 AS FLOAT)))-(RADIANS(CAST(l.Loc_Latitude AS FLOAT))))/2.0E)) | |
+ (cos(RADIANS(CAST(l.Loc_Latitude AS FLOAT))) | |
* cos(RADIANS(CAST(36.5696 AS FLOAT))) | |
* square(sin(((RADIANS(CAST(87.1003 AS FLOAT))) | |
-(RADIANS(CAST(l.Loc_Longitude AS FLOAT))))/2.0E))))) | |
then 1.0E | |
else (sqrt(square(sin(((RADIANS(CAST(36.5696 AS FLOAT))) | |
-(RADIANS(CAST(l.Loc_Latitude AS FLOAT))))/2.0E)) | |
+ (cos(RADIANS(CAST(l.Loc_Latitude AS FLOAT))) |
This file contains 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
static class SyncSafe | |
{ | |
public int Encode(int normalInteger) | |
{ | |
return EncodeOrDecode(normalInteger, Convertion.Encode); | |
} | |
public int Decode(int syncSafeInteger) | |
{ | |
return EncodeOrDecode(syncSafeInteger, Convertion.Decode); |
This file contains 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
-- Delete All Functions | |
------------------------------------------------------------------------------------------------------ | |
DECLARE @FUNCNAME VARCHAR(2500) | |
DECLARE FUNCCURSOR CURSOR FOR SELECT [NAME] FROM SYS.OBJECTS WHERE TYPE = 'FN' | |
OPEN FUNCCURSOR | |
FETCH NEXT FROM FUNCCURSOR INTO @FUNCNAME | |
WHILE @@FETCH_STATUS = 0 | |
BEGIN | |
EXEC('DROP FUNCTION ' + @FUNCNAME) | |
FETCH NEXT FROM FUNCCURSOR INTO @FUNCNAME |
This file contains 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
/// <binding ProjectOpened="default" /> | |
// #region Dependencies | |
var gulp = require("gulp"), | |
sass = require("gulp-sass"), | |
coffee = require("gulp-coffee"), | |
prefix = require("gulp-autoprefixer"), | |
nano = require("gulp-cssnano"), | |
uglify = require("gulp-uglify"), |
This file contains 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
mkdir [RepoName] | |
git init | |
cd [RepoName] | |
git remote add -f origin [RepoURL] | |
git config core.sparseCheckout true | |
echo "some/dir/*" >> .git/info/sparse-checkout | |
echo "another/sub/tree/*" >> .git/info/sparse-checkout | |
git checkout master | |
or |
This file contains 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
pushd ${env:ProgramFiles}\nodejs\node_modules\npm\ | |
cp npmrc $env:userprofile\desktop | |
cd ../.. | |
npm install npm@latest | |
mv $env:userprofile\desktop\npmrc npmrc -Force | |
popd |
This file contains 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
USE master | |
ALTER DATABASE [DatabaseName] SET SINGLE_USER WITH ROLLBACK IMMEDIATE | |
ALTER DATABASE [DatabaseName] MODIFY NAME = [NewDatabaseName] | |
ALTER DATABASE [NewDatabaseName] SET MULTI_USER |
This file contains 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
gci -Filter *.theme | % { ren $_.name ($_.name -replace ".theme", ".zip") } |
OlderNewer