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
sealed class BadDojo | |
{ | |
public IList<Student> Students { get; set; } | |
public Sensei Sensei { get; set; } | |
public string Summary => $"this dojo is run by {Sensei.Name} and has {Students.Count} students"; | |
} |
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
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.List; | |
/* | |
* To change this license header, choose License Headers in Project Properties. |
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.Linq; | |
using System.Collections.Generic; | |
namespace Generics | |
{ | |
/// <summary> | |
/// We use the interface to describe how an animal should be behave, anything that is an IAnimal has to conform to these specs | |
/// </summary> | |
public interface IAnimal |
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
open System | |
open System.Security.Cryptography | |
let generate() = | |
let key = Array.init 128 (fun i -> byte(i*i)) | |
use cryptoProvider = new RNGCryptoServiceProvider() | |
cryptoProvider.GetBytes(key) | |
Convert.ToBase64String(key) |
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
Imports System.IO | |
Imports System.Text | |
Imports Microsoft.VisualBasic.FileIO | |
Module Module1 | |
Sub Main() | |
dim items = New List(Of string) | |
using parser = New TextFieldParser("filename", Encoding.UTF8) |
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
Imports System.Data.SqlClient | |
Module Updater | |
Sub Main() | |
Console.WriteLine("Welcome to the cool async updater") | |
dim updater = New DatabaseUpdater(new UpdateScanner()) | |
addHandler updater.ErrorRaised, AddressOf InformUserOfError | |
AddHandler Updater.Success, AddressOf InformUserOfSuccess |
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
public class Main | |
private _bus as IEventBus | |
public sub New(IEventBus bus) | |
_bus = bus | |
end sub | |
private Sub click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuSave.Click | |
_bus.publish(new SomethingHappened() with { .Id = 1 }) | |
end sub |
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
<?php | |
$yourfavesite = 'https://www.lol.com' | |
while(true){ | |
$options = array('http' => array('user_agent' => 'Mozilla/4.0 (compatible; MSIE 4.01; Windows CE)')); | |
$context = stream_context_create($options); | |
$response = file_get_contents($yourfavesite, false, $context); | |
print_r($response); | |
sleep(10); | |
} |
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
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-1.12.4.js" integrity="sha256-Qw82+bXyGq6MydymqBxNPYTaUXXq7c8v3CwiYwLLNXU=" crossorigin="anonymous"></script> | |
<script type="text/javascript"> | |
$('document').ready(function() { | |
$('#smstemplate').keyup(function(e){ | |
if (e.keyCode != 13) return false; | |
var $currentTarget = $(e.currentTarget); |
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.Linq; | |
using System.Reflection; | |
using System.Runtime.InteropServices; | |
using System.Runtime.Remoting; | |
using NUnit.Framework; | |
namespace JustForLulz | |
{ |