Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz"" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". Print a new line after each string or number.
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.DirectoryServices; | |
namespace ActiveDirectory.Model | |
{ | |
[DirectorySchema("group")] | |
public class ADGroup : DirectoryEntity , IDirectoryEntity | |
{ | |
[DirectoryAttribute("name")] | |
public string name |
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 DllInjection.Services; | |
using EasyHook; | |
using System; | |
using System.CodeDom.Compiler; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Runtime.Remoting; | |
namespace DllInfector | |
{ |
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
public class GoogleMapsAPIProjection | |
{ | |
private readonly double PixelTileSize = 256d; | |
private readonly double DegreesToRadiansRatio = 180d / Math.PI; | |
private readonly double RadiansToDegreesRatio = Math.PI / 180d; | |
private readonly PointF PixelGlobeCenter; | |
private readonly double XPixelsToDegreesRatio; | |
private readonly double YPixelsToRadiansRatio; | |
public GoogleMapsAPIProjection(double zoomLevel) |
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
<UserSettings><ApplicationIdentity version="12.0"/><ToolsOptions><ToolsOptionsCategory name="Environment" RegisteredName="Environment"/></ToolsOptions><Category name="Environment_Group" RegisteredName="Environment_Group"><Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package"><PropertyValue name="Version">2</PropertyValue><FontsAndColors Version="2.0"><Theme Id="{DE3DBBCD-F642-433C-8353-8F1DF4370ABA}"/><Categories><Category GUID="{58E96763-1D3B-4E05-B6BA-FF7115FD0B7B}" FontIsDefault="Yes"><Items><Item Name="Plain Text" Foreground="0x00FFFFFF" Background="0x002D3239" BoldFont="No"/><Item Name="Selected Text" Foreground="0x02000000" Background="0x008FA2AF" BoldFont="No"/><Item Name="Inactive Selected Text" Foreground="0x02000000" Background="0x00DBCDBF" BoldFont="No"/><Item Name="Indicator Margin" Foreground="0x02000000" Background="0x |
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
public static bool CanDoRansom(this List<string> ransomNote, List<string> newspaper) | |
{ | |
// N | |
// M | |
O(M + N) | |
foreach(var paper in newspaper){ |
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
public static class NotifyHelper | |
{ | |
public static bool SetField<T,F>(this T target,ref F field, F value, Action<T> callback) | |
{ | |
if (EqualityComparer<F>.Default.Equals(field, value)) return false; | |
field = value; | |
callback?.Invoke(target); | |
return true; | |
} | |
} |
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; | |
namespace UglyWTF | |
{ | |
public static class Printer | |
{ | |
public static void Print(string message) | |
{ | |
Console.WriteLine(message); | |
} |
Tell IIS Express itself to bind to all ip addresses and hostnames. In your .config file. Typically: VS 2015: $(solutionDir).vs\config\applicationhost.config < VS 2015: %userprofile%\My Documents\IISExpress\config\applicationhost.config Find your site's binding element, and add
<binding protocol="http" bindingInformation="*:8080:*" />
Setup the bit of Windows called 'http.sys'. As an administrator, run the command: netsh http add urlacl url=http://*:8080/ user=everyone Where everyone is a windows group. Use double quotes for groups with spaces like "Tout le monde".
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
<%@ WebHandler Language="C#" Class="TestResponse" %> | |
using System; | |
using System.Web; | |
public class TestResponse : IHttpHandler | |
{ | |
public void ProcessRequest(HttpContext context) | |
{ | |
var r = context.Response; |
OlderNewer