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 java.util.*; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
String inputString; | |
Stack stack = new Stack(); | |
while(true) { |
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 XCTest | |
class WordCountTest: XCTestCase { | |
func XCTAssertEqualDictionaries(first: [String: Int], second: [String: Int]) { | |
XCTAssertEqual(first, second) | |
} | |
func testCountOneWord() { | |
let words = WordCount(words: "word") |
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)displayDay:(id)sender { | |
NSDate *chosen = [self.datePicker date]; | |
NSDateFormatter *formatter = [[NSDateFormatter alloc]init]; | |
[formatter setDateFormat:@"EEEE"]; | |
NSString *day = [formatter stringFromDate:chosen]; | |
NSString *msg = [[NSString alloc] initWithFormat:@"That's a %@.", day]; | |
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
@IBOutlet weak var datePicker: UIDatePicker! | |
@IBAction func displayDay(sender: AnyObject) { | |
let formatter = NSDateFormatter() | |
formatter.dateFormat = "EEEE" | |
let day = formatter.stringFromDate(datePicker.date) | |
let msg = "Thats a \(day)." | |
let alert = UIAlertView(title: "What day is that?", message: msg, delegate: nil, cancelButtonTitle: "Okay") |
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
SELECT | |
isbn, | |
title, | |
price, | |
imageFilename, | |
compositeName | |
FROM tblbooks books | |
JOIN tblauthors authors | |
ON tblbooksauthorsxref.isbn = books.isbn AND | |
tblbooksauthorsxref.authorId = authors.authorId |
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
-- MySQL dump 10.13 Distrib 5.5.42, for osx10.6 (i386) | |
-- | |
-- Host: localhost Database: volga | |
-- ------------------------------------------------------ | |
-- Server version 5.5.42 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; |
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
var koa = require('koa'); | |
var app = koa(); | |
// x-response-time | |
app.use(function *(next){ | |
var start = new Date; | |
yield next; | |
var ms = new Date - start; | |
this.set('X-Response-Time', ms + 'ms'); |
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
namespace ConsoleApplication | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var chicken = new Animal<Egg>(); | |
} | |
} |
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
namespace FizzBuzz | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
string s; | |
for(int i = 1; i <= 100; 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
if(window.scrollMaxY === null) { | |
Object.defineProperty(window, 'scrollMaxY', { | |
get: function() { return document.documentElement.scrollHeight - document.documentElement.clientHeight; } | |
}); | |
} |
OlderNewer