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 AlignableWrapPanel : Panel { | |
public AlignableWrapPanel() { | |
_orientation = Orientation.Horizontal; | |
} | |
private static bool IsWidthHeightValid(object value) { | |
var v = (double)value; | |
return (double.IsNaN(v)) || (v >= 0.0d && !double.IsPositiveInfinity(v)); | |
} |
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> | |
/// VDF section. | |
/// </summary> | |
public class Vdf { | |
/// <summary> | |
/// String values. | |
/// </summary> | |
public Dictionary<string, string> Values { get; } = new Dictionary<string, string>(); | |
/// <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
// 2>nul & node %0 "%1" "%2" "%3" "%4" "%5" & goto :eof | |
var fs = require('fs'); | |
var readline = require('readline'); | |
console.log('\u001BcNode.JS is here!'); | |
console.log(` Working dir: ${__dirname}`); | |
console.log(` Arguments: ${process.argv.slice(2).join(' ')}`); | |
var rl = readline.createInterface({ |
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 abstract class BaseSwitch : FrameworkElement { | |
public static readonly DependencyProperty ResetElementNameBindingsProperty = DependencyProperty.Register(nameof(ResetElementNameBindings), typeof(bool), | |
typeof(BaseSwitch), new FrameworkPropertyMetadata(false)); | |
public bool ResetElementNameBindings { | |
get { return (bool)GetValue(ResetElementNameBindingsProperty); } | |
set { SetValue(ResetElementNameBindingsProperty, value); } | |
} | |
protected abstract UIElement GetChild(); |
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 ConverterHelper { | |
public static int AsInt([CanBeNull] this object value) { | |
return value.AsInt(0); | |
} | |
public static int AsInt([CanBeNull] this string value) { | |
return value.AsInt(0); | |
} | |
public static int AsInt([CanBeNull] this object value, int defaultValue) { |
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
javascript:(function () { | |
function wait(ms = null) { | |
return new Promise(r => setTimeout(r, ms == null ? (500 + Math.random() * 1e3) : ms)); | |
} | |
async function clickWait(parent, query) { | |
const e = parent.querySelector(query); | |
if (!e) return false; | |
e.click(); | |
await wait(); |
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
#include <memory> | |
#include <string> | |
#include <iostream> | |
#include <Windows.h> | |
#include <mmdeviceapi.h> | |
#include <endpointvolume.h> | |
#pragma comment(lib, "Ole32.lib") | |
#define CRUCIAL(cmd) \ |