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 FluentMySQL | |
import Vapor | |
final class User: MySQLModel { // 1 | |
/// The unique identifier for `User` // 2 | |
var id: Int? | |
// Additional properties of `User` // 3 | |
var email: String | |
var password: String |
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
// swift-tools-version:4.0 | |
import PackageDescription | |
let package = Package( | |
name: "blog", | |
dependencies: [ | |
// 💧 A server-side Swift web framework. | |
.package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"), | |
// 🔵 Swift ORM (queries, models, relations, etc) built on MySQL. |
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
/******************************************************************************************************************** | |
Countdown.js is a simple script to add a countdown timer | |
for your website. Currently it can only do full minutes | |
and partial minutes aren't supported. This script is a fork of http://jsfiddle.net/HRrYG/ with some | |
added extensions. Since the original code that I forked was released under Creative Commons by SA license, | |
I have to release this code under the same license. You can view a live demo of this code at http://jsfiddle.net/JmrQE/2/. | |
********************************************************************************************************************/ | |
function countdown(minutes) { | |
var seconds = 60; | |
var mins = minutes |
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
/* | |
* clearIntArray | |
* This function deletes all items in array (sets it to 0) and resizes array according to size (default = 1). | |
* @param int& theArray - passing the array by reference | |
* @param int size - size of the array (default = 1) | |
* @return int blank array of size | |
*/ | |
int clearIntArray( int& theArray[], int size = 0 ) { | |
ArrayResize( theArray, size ); | |
if ( size > 0 ) { ArrayInitialize( theArray, 0 ); } |
NewerOlder