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
from functools import reduce | |
import os, sys, time, string | |
from turtle import down | |
import urllib.request | |
import urllib | |
class WordleSolver: | |
""" | |
Solves Wordle Puzzles with feedback from the user | |
https://www.powerlanguage.co.uk/wordle/ |
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 void moveZeros(ref int[] numbers) | |
{ | |
// Create a new array of the same size, NOTE: it's already initialized with zeros | |
var newArray = new int[numbers.Length]; | |
// the "otherIndex" is used to separately track non-zero entries in the copy | |
int otherIndex = 0; | |
for (int index = 0; index < numbers.Length; index++) | |
{ |
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 EntryPoint | |
{ | |
public static void Main(string[] args) | |
{ | |
var n0 = new Perceptron(2); | |
do | |
{ | |
n0.ResetErrorTracking(); |
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
/// <summary> | |
/// SampleService | |
/// </summary> | |
public class SampleService | |
{ | |
private readonly Random _random; | |
/// <summary> | |
/// Initializes a new instance of the <see cref="SampleService"/> class. | |
/// </summary> |
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.IO; | |
using System.Linq; | |
using System.Text; | |
namespace ByteArray | |
{ | |
internal class EntryPoint | |
{ | |
private static readonly string[] helpCmds = { "help", "/?", "--help", "-help", "-h" }; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Map> | |
<Rooms> | |
<Room Id="Room0" Length="20" Width="20"> | |
<Decorations> | |
<Decoration Id="Room0_Altar" Type="Altar" OnEvent="Room0_Altar__Pray"/> | |
</Decorations> | |
<Thresholds> | |
<Door Orientation="Right" Alignment="Center" Id="Room0_Door0" Locked="True"/> | |
<Opening Orientation="Left" Alignment="Center" Id="Room0_Opening0"/> |
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.Generic; | |
using System.Data; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Reflection; | |
using System.Text; | |
using System.Xml.Serialization; |
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.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace SocketableWeapons | |
{ | |
internal class Program | |
{ | |
private static void Main(string[] args) |
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
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
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
/// <summary> | |
/// Authenticate | |
/// </summary> | |
/// <param name="userName">the user name</param> | |
/// <param name="passwordHash">the password hash</param> | |
/// <returns>an auth response object containing -1 on auth failure</returns> | |
DNHAuthResponse DNHService.Iface.Authenticate(string userName, string passwordHash) | |
{ | |
LogCallback(string.Format("Authenticating {0}", userName)); |
NewerOlder