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 evdev import UInput, ecodes as e | |
import time | |
# This class sends CTRL+SHIFT+U+<HEXCODE> sequences to produces arbitrary unicode characters. | |
# It works fine on Gnome applications, but not on KDE | |
# in https://en.wikipedia.org/wiki/Unicode_input#In_X11_.28Linux_and_other_Unix_variants.29 | |
class UnicodeInput: | |
def __init__(self): | |
keys = [ | |
e.KEY_LEFTCTRL, |
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 java.util.ArrayList; | |
import java.util.LinkedList; | |
import java.util.List; | |
import java.util.Queue; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.ScheduledExecutorService; | |
import java.util.concurrent.TimeUnit; | |
import org.apache.spark.SparkConf; | |
import org.apache.spark.api.java.JavaRDD; |
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 collections import OrderedDict, deque | |
class PcbObject: | |
def __init__(self, name=None, parent=None): | |
self._parent = parent | |
self._name = name or self.__class__.__name__ | |
def symbol_prefix(self): | |
return self.__class__.__name__.upper().strip("_") |
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 java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.Comparator; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
import java.util.SortedMap; | |
import java.util.TreeMap; |
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 CNP { | |
private final int digits; | |
private final int[] weight; | |
public static final CNP CNPJ = new CNP(6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2) { | |
public String format(String cnp) { | |
cnp = normalize(cnp); | |
return cnp.substring(0, 2) + "." + cnp.substring(2, 5) + "." + cnp.substring(5, 8) + "/" + cnp.substring(8, 12) + "-" + cnp.substring(12); | |
}; | |
}; |
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
/* | |
pins_arduino.h - Pin definition functions for Arduino | |
Part of Arduino - http://www.arduino.cc/ | |
Copyright (c) 2007 David A. Mellis | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. |
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 test; | |
class Outer { | |
public class A1 {} | |
protected class A2 {} | |
private class A3 {} | |
/*package*/ class A4 {} | |
public static class B1 {} | |
protected static class B2 {} |
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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="testapp.android.gradle.inutilfutil.com.myapplication"> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:roundIcon="@mipmap/ic_launcher_round" | |
android:supportsRtl="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
#include <stdio.h> | |
#include <inttypes.h> | |
#include <stdlib.h> | |
void scan(uint64_t min, uint64_t max, uint64_t min_step = 1) { | |
uint64_t step = 1L<<63; | |
printf("%02" PRIu64 "\n", min); | |
while (step > min_step) { | |
for (uint64_t i = min + step / 2; i<max; i+=step) { |
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 com.crowdstrike.android.playstorecontroller.util; | |
import android.Manifest; | |
import android.app.ActivityThread; | |
import android.app.Instrumentation; | |
import android.app.UiAutomation; | |
import android.graphics.Bitmap; | |
import android.nfc.Tag; | |
import android.os.Build; | |
import android.os.Debug; |
OlderNewer