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; | |
class MainClass { | |
public static void Main (string[] args) { | |
DateTime start = DateTime.Now.Subtract(new TimeSpan(10,0,0)); //example starting time. Take our current time and subtract 10 hours from it. | |
DateTime end = DateTime.Now; //the current time | |
Console.WriteLine("Start Time: " + start.ToString()); | |
Console.WriteLine("End Time: " + end.ToString()); | |
Console.WriteLine("Price: $" + GetParkingCost(start, end)); | |
} | |
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
package fib; | |
import java.util.Scanner; | |
public class App { | |
@SuppressWarnings("resource") | |
public static void main(String[] args) { | |
Scanner stdIn = new java.util.Scanner(System.in); | |
while (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
function printPossibleFactors(number, maxNumber) { | |
for(var i = 0; i < maxNumber; i++) { | |
if ((number/i) == Math.round(number/i)) { | |
console.log(number/i + " * " + i + " | Sum: " + ((number/i) + i)); | |
} | |
} | |
} | |
printPossibleFactors(40, 100); //get all factors for 40 up to 100. |
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
$procInfo = New-Object -TypeName "System.Diagnostics.ProcessStartInfo" | |
$procInfo.UseShellExecute = 0 | |
$procInfo.Filename = "netsh" | |
$procInfo.Arguments = "wlan show networks mode=bssid" | |
$procInfo.CreateNoWIndow = 1 | |
$procInfo.RedirectStandardOutput = 1 | |
$proc = [System.Diagnostics.Process]::Start($procInfo) | |
#$proc.WaitForExit() |
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> | |
<html> | |
<head> | |
<title>Search Test</title> | |
<style> | |
body { | |
background: #fff; | |
font-family: 'Source Code Pro', sans-serif; | |
} | |
.button, .searchbox { |
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
[Script Info] | |
; Script generated by Aegisub 3.0.2 | |
; http://www.aegisub.org/ | |
Title: Default Aegisub file | |
ScriptType: v4.00+ | |
WrapStyle: 1 | |
ScaledBorderAndShadow: yes | |
Collisions: Normal | |
PlayResX: 1440 | |
PlayResY: 1080 |
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
<Window x:Class="MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:dock="clr-namespace:AvalonDock;assembly=AvalonDock" | |
xmlns:edit="clr-namespace:ICSharpCode.AvalonEdit;assembly=ICSharpCode.AvalonEdit" | |
Title="Open Studio UI Concept" Height="453" Width="728"> | |
<Window.Resources> | |
<ResourceDictionary Source="/AvalonDock.Themes;component/themes/dev2010.xaml"/> | |
</Window.Resources> | |
<Grid> |
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 struct MyStruct | |
{ | |
int ID {get;set;} //2 bytes? | |
int Header {get;set;} //5 bytes? | |
} | |
public MyStruct ReadFile(string file) | |
{ | |
MyStruct m = new MyStruct(); | |
using (var fs = new System.IO.FileStream(file, FileMode.Open)) |
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
# | |
# | |
# Nimrod's Runtime Library | |
# (c) Copyright 2010 Andreas Rumpf | |
# | |
# See the file "copying.txt", included in this | |
# distribution, for details about the copyright. | |
# | |
## This module implements a small wrapper for some needed Win API procedures, |
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
import os | |
type | |
TUtf16Char = distinct int16 | |
WideCString = ptr array[0.. 1_000_000, TUtf16Char] | |
const | |
utf8Encoding = 65001 | |
proc len(w: WideCString): int = |
NewerOlder