Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
import java.util.* | |
import kotlin.Int | |
import kotlin.Int as ObserverId | |
class Event<T>() { | |
private val listeners: MutableMap<Int, (T) -> Unit> = HashMap(); | |
private var nextListenerId: Int = 0 | |
fun observe(listener: (T) -> Unit): ObserverId { | |
synchronized(this.listeners) { |
Load up Terminal (Applications > Utilities > Terminal.app) and type the following. | |
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist | |
To turn it back on, just do the opposite: | |
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist |
import UIKit | |
import CoreData | |
import AVFoundation | |
class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, VPDAODelegateProtocol, NSFetchedResultsControllerDelegate { | |
@IBOutlet weak var segmentedControl: UISegmentedControl! | |
@IBOutlet weak var tableView: UITableView! | |
lazy var managedObjectContext : NSManagedObjectContext? = { |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Media; | |
namespace MediaTools | |
{ |
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Switch layout while holding CapsLock</name> | |
<appendix>F12 is implied to be configured as layout switch key</appendix> | |
<identifier>temp.switch.layout.by.capslock</identifier> | |
<autogen>__KeyToKey__ KeyCode::F19, KeyCode::VK_NONE, Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::F12, Option::KEYTOKEY_AFTER_KEYUP, KeyCode::F12</autogen> | |
</item> | |
<item> | |
<name>Right Alt to switch layout</name> |