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 * as THREE from "three"; | |
function isLineBasicMaterial(mat: THREE.Material & { isLineBasicMaterial?: boolean }): mat is THREE.LineBasicMaterial { | |
return Boolean(mat.isLineBasicMaterial); | |
} | |
function isOrthographicCamera(camera: THREE.Camera & { isOrthographicCamera?: boolean }): camera is THREE.OrthographicCamera { | |
return Boolean(camera.isOrthographicCamera); | |
} |
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
(module | |
(func $func132 (param i32 i32 i32 i32)) | |
(func $main | |
i32.const 0 | |
i32.const 0 | |
i32.const 0 | |
i32.const 0 | |
call $func132) |
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
(module | |
(func $func15 (result i32) | |
call $func130 | |
i32.const 0 | |
drop | |
i32.const 0 | |
drop | |
i32.const 0) | |
(func $func63 |
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
(module | |
(func $main | |
loop | |
loop | |
loop | |
loop | |
loop | |
loop | |
loop | |
loop |
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
# https://github.com/protocolbuffers/protobuf-javascript/issues/105 | |
# https://github.com/protocolbuffers/protobuf/pull/9874 | |
FROM alpine | |
RUN apk --no-cache add gcompat | |
ARG protoc_js_ver=3.21.2 | |
RUN cd /usr/local &&\ | |
wget -Oprotojs.tar.gz "https://github.com/protocolbuffers/protobuf-javascript/releases/download/v$protoc_js_ver/protobuf-javascript-$protoc_js_ver-linux-$(uname -m).tar.gz" &&\ |
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
#! /bin/bash | |
# | |
# Wrapper script to add command line options to the AVD emulator. | |
# | |
# avdmanager should support the studio.emu.params environment variable, but it doesn't handle commas well. | |
# | |
# ## Installation | |
# | |
# 1. Find your AVD home directory. It should have an `emulator` subdirectory. | |
# 2. Move the `emulator/emulator` file to `emulator/emulator-orig`. |
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
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |
<application | |
android:label="example" | |
android:name="${applicationName}" | |
android:icon="@mipmap/ic_launcher"> | |
<activity | |
android:name=".MainActivity" | |
android:exported="true" | |
android:launchMode="singleTop" | |
android:theme="@style/LaunchTheme" |
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
;; gpasm --mpasm-compatible -p p16f887 repro.asm | |
;; | |
;; Should produce four nop, but produces none, because the m2 i | |
;; binding leaks into the m1 i via the n parameter. | |
;; | |
;; See also https://forum.microchip.com/s/topic/a5C3l000000LzjcEAC/t229040 | |
m1 macro n | |
local i | |
i set 0 |
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
// Shader to display a full rainbow and grayscales. | |
// A 2D color picker in a single pane. | |
// | |
// adapted from https://github.com/wsmind/js-pride/blob/master/shaders/rainbow.glsl | |
#define SMOOTH 1 | |
// level is [0,5], assumed to be a whole number | |
vec3 rainbow(float level) | |
{ |
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
class Node: | |
def __init__(self, value): | |
self.value = value | |
self.visited = False | |
self.prev = None | |
self.next = None | |
class SieveCache: | |
def __init__(self, capacity): | |
self.capacity = capacity |
NewerOlder