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
<!doctype html> | |
<html lang="fr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Welcome to diabetic kids glycemic digital notebook</title> | |
<link rel="stylesheet" href="styles.css"> | |
<script> | |
function hideShowSecretInfos() { | |
var secretInfos = document.getElementById('secret_infos') | |
var hideShowLink = document.getElementById('showHideSecret') |
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
// | |
// CoreDataTableViewController.swift | |
// | |
// | |
// Created by Fernando Rodríguez Romero on 22/02/16. | |
// Copyright © 2016 udacity.com. All rights reserved. | |
// | |
import UIKit | |
import CoreData |
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
public struct User2712: Preparation { | |
public static func prepare(_ database: Database) throws { | |
try database.modify("users") { modifier in | |
modifier.double("doubleField") | |
} | |
} | |
public static func revert(_ detabase: Database) throws { |
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
func configureDatabase() { | |
let manager = FileManager.default | |
let applicationDirectory = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true) | |
let databasePath = applicationDirectory.first! + "/development.sqlite" | |
if !manager.fileExists(atPath: databasePath) { | |
manager.createFile(atPath: databasePath, contents: nil, attributes: nil) | |
} | |
let driver = try! SQLiteDriver(path: databasePath) | |
self.database = Fluent.Database(driver) | |
} |
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
swiftenv versions | |
* 3.0-dev (set by /Users/adriencanterot/.swift-version) | |
DEVELOPMENT-SNAPSHOT-2016-05-03-a | |
DEVELOPMENT-SNAPSHOT-2016-05-09-a | |
2.2 | |
swift --version | |
Apple Swift version 2.2 (swiftlang-703.0.18.8 clang-703.0.31) | |
Target: x86_64-apple-macosx10.9 |