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 PUBLIC "-//W3C//DTD HTML 4.01//EN"> | |
<html lang="en"> | |
<head> | |
<title>App name goes here</title> | |
<!-- Load some CSS here. --> | |
<link rel="stylesheet" type="text/css" href="css/main.css"> | |
</head> | |
<body> | |
<!-- Optional part. Define some global opts. You can set these easily via PHP or so. --> |
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
;(function () { | |
var paths = { ... }; | |
//HANDLE JQUERY IF LOADED ALREADY TO AVOID OVERWRITING EXISTING JQUERY PROPERTIES AND PLUGINS | |
//CHECK FOR OLD VERSIONS OF JQUERY | |
var oldjQuery = !!(window.jQuery && !!window.jQuery.fn.jquery.match(/^1\.[0-4]/)); | |
//LOAD JQUERY IF NOT AVAILABLE OR BELOW MIN | |
if (!window.jQuery || oldjQuery) { | |
paths.jquery = [ |
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
@model SitefinityWebApp.Mvc.Models.NavigationViewModel | |
@if (Model.DisplayParentTitle) | |
{ | |
@Html.Raw(string.Format(Model.TitleFormat, Model.RootPage.Title)) | |
} | |
<ul class="@Model.CssClass"> | |
@for (int i = 0; i < Model.RootPage.Items.Count; i++) | |
{ |
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
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { | |
guard let row = self.tableView.indexPathForSelectedRow?.row, | |
let identifier = segue.identifier else { return } | |
switch (identifier, segue.destinationViewController) { | |
case (SPPostDetailViewController.segueIdentifier, let controller as SPPostDetailViewController): | |
controller.model = models[row] | |
default: return | |
} | |
} |
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
// | |
// Badge.swift | |
// Extensions for Rounded UILabel and UIButton, Badged UIBarButtonItem. | |
// | |
// Usage: | |
// let label = UILabel(badgeText: "Rounded Label"); | |
// let button = UIButton(type: .System); button.rounded = true | |
// let barButton = UIBarButtonItem(badge: "42", title: "How Many Roads", target: self, action: "answer") | |
// | |
// Created by Yonat Sharon on 06.04.2015. |
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 Foundation | |
import PlaygroundSupport | |
/// A thread-safe array. | |
public class SynchronizedArray<Element> { | |
private let queue = DispatchQueue(label: "io.zamzam.ZamzamKit.SynchronizedArray", attributes: .concurrent) | |
private var array = [Element]() | |
public init() { } | |