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
def main(): | |
#Declare | |
price = 99 | |
quantity = float(input("How many packages have you purchased?")) | |
if quantity >= 10: | |
print ("Your discount is 20%.") |
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
set nobackup | |
set nocp | |
set tabstop=4 | |
set shiftwidth=4 | |
set et | |
set ignorecase | |
set hlsearch | |
set ai | |
set ruler |
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
private static string s_root = @"e:\dd\ros\Closed"; | |
private static Encoding s_encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false); | |
static void Main(string[] args) | |
{ | |
FixPackagesConfig(); | |
FixProjects(); | |
} | |
static void FixPackagesConfig() |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Diagnostics.Contracts; | |
using System.IO; | |
using System.Linq; | |
namespace RoslynCCPhantoms | |
{ | |
static class Contract |
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
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.33440 | |
// Copyright (c) Microsoft Corporation. All rights reserved. | |
// Metadata version: v4.0.30319 | |
.assembly extern mscorlib | |
{ | |
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
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
using Microsoft.CodeAnalysis.CSharp; | |
using Microsoft.CodeAnalysis.Text; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.IO; | |
using Microsoft.CodeAnalysis.CSharp.Syntax; | |
using Microsoft.CodeAnalysis; |
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
using Microsoft.CodeAnalysis.CSharp; | |
using Microsoft.CodeAnalysis.Text; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.IO; | |
using Microsoft.CodeAnalysis.CSharp.Syntax; | |
using Microsoft.CodeAnalysis; |
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
function Set-DevEnvironment() { | |
param ( [string]$version = $(throw "Need a VS version")) | |
$vsPath = "Microsoft Visual Studio $version.0\VC\vcvarsall.bat" | |
$target = join-path (Get-ProgramFiles32) $vsPath | |
. Import-Environment $target | |
} | |
# This method will execute a batch file and then put the resulting | |
# environment into the current context |
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
> $a = new-object System.Collections.Queue | |
> $a.enqueue($null) | |
> $a.enqueue($null) | |
> $a.enqueue($null) | |
> $a.enqueue($null) | |
> $a.enqueue($null) | |
> $a | |
> $a.Count | |
5 | |
> $b = @($null) |
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
SourceText text; | |
using (var stream = File.OpenRead(filePath)) | |
{ | |
text = SourceText.From(stream); | |
} | |
var syntaxTree = CSharpSyntaxTree.ParseText(text); | |
var node = syntaxTree.GetRoot(); | |
var newNode = /* maybe mutate the tree */ | |
if (node != newNode) |