This file contains hidden or 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
const std = @import("std"); | |
const log = std.log.info; | |
const PetersonMutex = struct { | |
flag_: [2]u64 = [_]u64{ 0, 0 }, | |
victim_idx_: u64 = undefined, // 0 or 1 | |
main_thread_id_: std.Thread.Id, | |
pub fn init(main_thread: std.Thread.Id) PetersonMutex { | |
return PetersonMutex{ |
This file contains hidden or 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
wezterm.on('show-or-hide-overlay', function(window, pane) | |
wezterm.log_info 'Event: show-or-hide-terminal' | |
local overlay_pane_ids = wezterm.GLOBAL.overlay_pane_ids | |
local tab_old_pane_ids = {} | |
local found = false | |
if overlay_pane_ids then | |
local active_tab = window:active_tab() | |
for _, pane_with_info in pairs(active_tab:panes_with_info()) do |
This file contains hidden or 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
wezterm.on('show-or-hide-overlay', function(window, pane) | |
wezterm.log_info 'Event: show-or-hide-terminal' | |
local overlay_pane_ids = wezterm.GLOBAL.overlay_pane_ids | |
local tab_old_pane_ids = {} | |
local found = false | |
if overlay_pane_ids then | |
local active_tab = window:active_tab() | |
for _, pane_with_info in pairs(active_tab:panes_with_info()) do |
This file contains hidden or 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
#define BPLUSTREE_TYPE BPlusTree<KeyType, ValueType, KeyComparator> | |
#define INDEX_TEMPLATE_ARGUMENTS template <typename KeyType, typename ValueType, typename KeyComparator> | |
// Main class providing the API for the Interactive B+ Tree. | |
INDEX_TEMPLATE_ARGUMENTS | |
class BPlusTree { | |
public: | |
using InternalPage = BPlusTreeInternalPage<KeyType, page_id_t, KeyComparator>; | |
using LeafPage = BPlusTreeLeafPage<KeyType, ValueType, KeyComparator>; |
This file contains hidden or 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
pub fn pdq( | |
comptime T: type, | |
items: []T, | |
context: anytype, | |
comptime lessThanFn: fn (context: @TypeOf(context), lhs: T, rhs: T) bool, | |
) void { | |
const Context = struct { | |
items: []T, | |
sub_ctx: @TypeOf(context), |
This file contains hidden or 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
const std = @import("std"); | |
const assert = std.debug.assert; | |
const expect = std.testing.expect; | |
const expectEqual = std.testing.expectEqual; | |
const expectError = std.testing.expectError; | |
const expectEqualSlices = std.testing.expectEqualSlices; | |
const MemoryRuntime = @import("memory").MemoryRuntime; | |
const FileBlockManager = @import("io").FileBlockManager; |
This file contains hidden or 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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "lldb", | |
"request": "launch", | |
"name": "Debug", |
This file contains hidden or 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
/* eslint-disable quotes */ | |
/* eslint-disable prettier/prettier */ | |
import React from 'react'; | |
import { Canvas, Fill, Points, Rect, vec } from "@shopify/react-native-skia" | |
import { Dimensions } from "react-native"; | |
const { width, height } = Dimensions.get("window"); | |
const N = 3; | |
const n = new Array(N + 1).fill(0).map((_, i) => i); |
This file contains hidden or 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
diff --git a/package.json b/package.json | |
index ca83026..0a9c4f2 100644 | |
--- a/package.json | |
+++ b/package.json | |
@@ -13,6 +13,9 @@ | |
"**/react-native/**", | |
"**/react-native-web", | |
"**/react-native-svg", | |
+ "**/@shopify/react-native-skia", | |
+ "**/@breeffy/react-native-skia", |
This file contains hidden or 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
packagingOptions { | |
def arches = ["armeabi-v7a", "x86", "arm64-v8a", "x86_64"] | |
def libNames = ["libfbjni", "libreact_nativemodule_core", "libjsi", "libturbomodulejsijni"] | |
arches.collect { arch -> libNames.collect { lib -> pickFirst "lib/${arch}/${lib}.so" } } | |
} |
NewerOlder