Skip to content

Instantly share code, notes, and snippets.

@Nyconing
Nyconing / gist:c2a69c7f40eae8e044f24f11d9ce8df3
Last active June 25, 2019 10:45
AutoPOS Script: POSMemberEditForm (Forcefully bypassing Enter key)
View gist:c2a69c7f40eae8e044f24f11d9ce8df3
using BCE.AutoCount.POS.Maintenance.Member;
using System.Windows.Forms;
using System.Reflection;
using System.ComponentModel;
public void OnFormInitialize(FormAddMember.FormInitializeEventArgs args){
var eventStaticNameProp = typeof(Control).GetField("EventKeyDown", BindingFlags.Static | BindingFlags.NonPublic);
var eventStaticName = eventStaticNameProp.GetValue(args.Form);
var eventsProp = args.Form.GetType().GetProperty("Events", BindingFlags.NonPublic | BindingFlags.Instance);
EventHandlerList list = (EventHandlerList)eventsProp.GetValue(args.Form, null);
@Nyconing
Nyconing / Program.cs
Last active January 17, 2019 06:50
TupleBenchmarking
View Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TupleBenchmarking
{
using System;
using System.Collections.Generic;
@Nyconing
Nyconing / NavigationbarSize.cs
Last active December 13, 2018 07:50
Java class to Xamarin.Android port. Community feedback for Egis answer
View NavigationbarSize.cs
using Android.Content;
using Android.Graphics;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Java.Lang;
using Java.Lang.Reflect;
public static class NavigationbarSize {
public static Point getNavigationBarSize(Context context) {
View regex benchmark
private static void Main()
{
Console.ReadLine();
Console.WriteLine("Hello, world!");
Console.WriteLine("Usage: benchmark <filename>");
string data = DataIsFuxxkingBig();
// Email
Measure(data, new Regex(@"[\w\.+-]+@[\w\.-]+\.[\w\.-]+", RegexOptions.Compiled) );