This file contains 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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
This file contains 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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #dddddd; | |
min-height: 100%; |
This file contains 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
/** | |
* Inset Box | |
*/ | |
html { | |
background: white; | |
min-height:100%; | |
} | |
.inset_box { |
This file contains 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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
html { | |
font-family:verdana; | |
background-color:#232323; | |
} | |
ul { | |
list-style:none; |
This file contains 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
let maxMagnitude = 4000.0 | |
let magnitudeRatio = magnitude / maxMagnitude | |
strengthIndicator.progress = Float(magnitudeRatio) |
This file contains 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
@IBAction func captureImageWithQRCode(_ sender: UIButton) { | |
let solutionLogger = SolutionLogger(viewController: self) | |
solutionLogger.scanQRCodeAndCaptureImage { (qrCode: String, image: UIImage) in | |
// use qrCode and image | |
} | |
} |
This file contains 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
let fetchRequest: NSFetchRequest<MemoryPair> = MemoryPair.fetchRequest() | |
fetchRequest.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: true)] | |
do { | |
let pairs: [MemoryPair] = try coreDataStack.context.fetch(fetchRequest) | |
// display the memory pairs | |
} catch { | |
print(error) | |
} |
This file contains 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
let memoryPair = MemoryPair(context: coreDataStack.context) | |
memoryPair.creationDate = Date() | |
memoryPair.image1 = image1 | |
memoryPair.text1 = code1 | |
memoryPair.image2 = image2 | |
memoryPair.text2 = code2 | |
coreDataStack.saveContext() |
This file contains 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
coreDataStack.context.delete(memoryPair) | |
coreDataStack.saveContext() |
This file contains 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
import Basic | |
import PackageGraph | |
import PackageLoading | |
import Workspace | |
class MyWorkspaceDelegate: WorkspaceDelegate { | |
func packageGraphWillLoad(currentGraph: PackageGraph, dependencies: AnySequence<ManagedDependency>, missingURLs: Set<String>) { | |
print("packageGraphWillLoad") | |
} |