Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat
Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.22; | |
import {wadLn, unsafeWadMul, unsafeWadDiv} from "solmate/utils/SignedWadMath.sol"; | |
/// @notice Approximated principal branch of [Lambert W function](https://en.wikipedia.org/wiki/Lambert_W_function) | |
/// @dev Only supports the [1/e, 3+1/e] and [3+1/e, inf] interval | |
/// @dev Approximate [1/e, 3+1/e] with a lookup table weighted average | |
/// @dev Approximate and [3+1/e, inf] with ln(x) - ln(ln(x)) + ln(ln(x))/ln(x) | |
contract Lambert { |
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; | |
using ECDSA for bytes32; | |
// verify signature | |
if ( | |
keccak256(abi.encodePacked(msg.sender, address(this))).toEthSignedMessageHash().recover(signature) != | |
owner() | |
) revert InvalidSignature(); |
Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat
Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.
<?php | |
function session_readonly(){ | |
if(version_compare(PHP_VERSION, '7.0.0') >= 0){ | |
session_start(array('read_and_close' => true)); | |
} else { | |
$session_name = preg_replace('/[^\da-z]/i', '', $_COOKIE[session_name()]); | |
$session_data = file_get_contents(session_save_path() . '/sess_' . $session_name); | |
$return_data = array(); | |
$offset = 0; |
// Client-side parser for .npy files | |
// See the specification: http://docs.scipy.org/doc/numpy-dev/neps/npy-format.html | |
var NumpyLoader = (function () { | |
function asciiDecode(buf) { | |
return String.fromCharCode.apply(null, new Uint8Array(buf)); | |
} | |
function readUint16LE(buffer) { | |
var view = new DataView(buffer); | |
var val = view.getUint8(0); |
/* | |
* Copyright (c) 2012 Masaki Saito | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
# compile | |
$ g++ zlib-example.cpp -lz -o zlib-example | |
# run | |
$ ./zlib-example | |
Uncompressed size is: 36 | |
Uncompressed string is: Hello Hello Hello Hello Hello Hello! | |
---------- |