Tiny wrapper component for React-Datepicker to stylistically fit with Chakra-UI 1.x.
<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} />
import Foundation | |
import SwiftUI | |
import UIKit | |
extension UIBlurEffect { | |
public static func variableBlurEffect(radius: Double, imageMask: UIImage) -> UIBlurEffect? { | |
let methodType = (@convention(c) (AnyClass, Selector, Double, UIImage) -> UIBlurEffect).self | |
let selectorName = ["imageMask:", "effectWithVariableBlurRadius:"].reversed().joined() | |
let selector = NSSelectorFromString(selectorName) |
import SwiftUI | |
struct AdaptiveStack<Content: View>: View { | |
@Environment(\.horizontalSizeClass) var sizeClass | |
let horizontalAlignment: HorizontalAlignment | |
let verticalAlignment: VerticalAlignment | |
let spacing: CGFloat? | |
let isVertical: Bool? | |
let content: () -> Content |
Mix.install([:mint, :castore]) | |
defmodule Main do | |
def run() do | |
total = | |
Stream.resource( | |
fn -> | |
{:ok, conn} = Mint.HTTP.connect(:https, "ftp.bit.nl", 443, mode: :passive) | |
{:ok, conn, _ref} = Mint.HTTP.request(conn, "GET", "/speedtest/10mb.bin", [], nil) | |
{conn, true} |
export const chaosTestStrings = (): void => { | |
const textNodes = getAllTextNodes(document.body); | |
for (const node of textNodes) { | |
const textNodeLength = node.textContent ? node.textContent.length : 0; | |
if (node.textContent === null) { | |
return; | |
} | |
if (node.parentElement instanceof Element) { | |
if (node.parentElement.dataset.originalText === undefined) { |
Tiny wrapper component for React-Datepicker to stylistically fit with Chakra-UI 1.x.
<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} />
This is a curated list of iOS (Swift & ObjC) frameworks which are inspired by React and Elm.
import os | |
import sys | |
import time | |
import atomac | |
import subprocess | |
if len(sys.argv) < 2: | |
print "Usage: bouncer.py <path_to_logic_project> (<path_to_logic_project>)" | |
os.exit(1) |
(function() { | |
var defaultFrameRate = 20, // fps lock for old browsers | |
// This is the default fallback throttle function | |
framerateThrottle = function(callback) { | |
return _.throttle(callback, 1 / (defaultFrameRate * 1000)); | |
}; | |
// Feature detection - should have requestAnimationFrame | |
if (window.requestAnimationFrame) { | |
framerateThrottle = function(callback) { |