Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
float decel(float x) { // as an easing function | |
return 1-(x-1)*(x-1); | |
} | |
void setup() { | |
background(255); | |
size(750,750,P2D); | |
PImage img = loadImage("image.png"); | |
strokeWeight(2); | |
noFill(); |
using System; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Text; | |
namespace UDP | |
{ | |
public class UDPSocket | |
{ | |
private Socket _socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); |
// Perlin.swift | |
// Created by Matthew Reagan on 8/7/18. | |
// | |
// Quick implementation of the the classic Perlin noise | |
// generation function, useful for creating organic textures | |
// or terrain. Perlin noise can also be easily generated with | |
// Apple's GameplayKit framework, this code is mostly for | |
// experimentation purposes. (Disclaimer: This code is not | |
// optimized, nor particularly elegant, but it can be used as | |
// a jumping off point for writing custom noise functions.) |
# Put this function to your .bashrc file. | |
# Usage: mv oldfilename | |
# If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
# Original mv is called when it's called with more than one argument. | |
# It's useful when you want to change just a few letters in a long name. | |
# | |
# Also see: | |
# - imv from renameutils | |
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
# blender 2.8 | |
""" | |
This script implements Convey's "Game of Life" in Blender 2.8 | |
It relies on the blender file containing a mesh called "Cube" | |
(sidelength = 1) and an empty collection called "Grid". | |
""" | |
import bpy | |
from random import random |
license: gpl-3.0 | |
height: 960 |
// Thanks to @MonsieurDart for the idea :) | |
func scroll(collectionView:XCUIElement, toFindCellWithId identifier:String) -> XCUIElement? { | |
guard collectionView.elementType == .collectionView else { | |
fatalError("XCUIElement is not a collectionView.") | |
} | |
var reachedTheEnd = false | |
var allVisibleElements = [String]() | |
while !reachedTheEnd { |
// | |
// LocalNetworkPrivacy | |
// | |
// Created by Iurii Khvorost <iurii.khvorost@gmail.com> on 2021/02/04. | |
// Copyright © 2021 Iurii Khvorost. All rights reserved. | |
// | |
// 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 |
<< MaTeX` | |
SetOptions[MaTeX, "Preamble" -> {"\\usepackage{color,txfonts}"}]; | |
SetDirectory[NotebookDirectory[]]; | |
c = 1; | |
\[Alpha] = .7; | |
\[Beta] = .05; | |
k0 = 7; | |
\[Omega]0 = 2 c; | |
vg = c; |