function braille_pattern(blocks)
{
if(!(blocks instanceof Array) || blocks.length > 8 || blocks.length < 0)
throw new TypeError("Only accept an array in max of 8 elements with 0/1 or true/false.");
// value table
const table = [1, 2, 4, 64, 8, 16, 32, 128];
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
# Gitlab-ce Docker Compose File | |
version: '3' | |
services: | |
web: | |
image: gitlab/gitlab-ce:latest | |
container_name: '容器名稱' | |
restart: always | |
hostname: '網站地址' |
/// <summary>
/// Run code
/// </summary>
/// <returns></returns>
public static async Task<MessageBuilder> OnRunPlainCode(MessageChain message)
{
var codeTemplate = @"
namespace DynamicCodeExecution {
public static class Runnable {
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
keymaps 0-2,4-5,8,12 | |
altgr keycode 2 = F1 | |
altgr keycode 3 = F2 | |
altgr keycode 4 = F3 | |
altgr keycode 5 = F4 | |
altgr keycode 6 = F5 | |
altgr keycode 7 = F6 | |
altgr keycode 8 = F7 | |
altgr keycode 9 = F8 | |
altgr keycode 10 = F9 |
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.Net; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
internal class FuturedSocket : IDisposable | |
{ | |
/// <summary> | |
/// Inner socket |
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
/* | |
* Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz> | |
* | |
* Based on sun8i-h3-orangepi-one.dts, which is: | |
* Copyright (C) 2016 Hans de Goede <hdegoede@redhat.com> | |
* | |
* This file is dual-licensed: you can use it either under the terms | |
* of the GPL or the X11 license, at your option. Note that this dual | |
* licensing only applies to this file, and not this project as a | |
* whole. |
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
// ==UserScript== | |
// @name Fuck Grayscale | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== |
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 SandBox | |
{ | |
private ScriptState<object> _globalState; | |
public SandBox() | |
{ | |
// Create initial script | |
var script = CSharpScript.Create(string.Empty, ScriptOptions.Default); | |
{ | |
// Create an empty state |
Here is an example that shows you how to create a wear tile use Xamarin.
- Create a Xamarin binding library
AndroidX.Wear.Tiles
. - Download the latest androidx.wear.tiles pre-release from maven (current is 1.0.0-alpha11).
Place the aar file intoJar
in your solution, set Build Action toLibraryProjectZip
in the property. - Download the latest androidx.wear.tiles tiles-proto pre-release from maven (current is 1.0.0-alpha11).
Place the jar file intoJar
folder of your solution, set Build Action toEmbeddedReferenceJar
in the property. - Add
Xamarin.Google.Guava.ListenableFuture
NuGet package to this binding solution. - Edit the
Metadata.xml
. (I have fixed some bindings)