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.ArrayList; | |
public class Runner { | |
public static void main(String[] args) { | |
Person msM = new Teacher("Ms.", "M"); | |
ArrayList<Person> people = new ArrayList<Person>(); | |
people.add(msM); | |
msM.getName(); | |
((Teacher) msM).assignHomework(); |
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.ArrayList; | |
public class Zoo { | |
public static void main(String[] args) { | |
ArrayList<Animal> animals = new ArrayList<Animal>(); | |
// Generate 100 random animals. | |
for (int i = 0; i < 100; i++) { | |
double randomNum = Math.random(); |
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 time | |
import BaseHTTPServer | |
HOST_NAME = 'localhost' | |
PORT_NUMBER = 9000 # Choose a number > 1024. | |
class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler): | |
def do_GET(s): | |
"""Respond to a GET request.""" | |
s.send_response(200) |
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
# Copyright 2015 The Bazel Authors. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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/bash | |
set -e | |
js/closure-library/closure/bin/build/depswriter.py --root_with_prefix='. ../../../..' > deps.js | |
cat deps.js |
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
#!/usr/bin/env python | |
# | |
# Copyright 2016 The Bazel Authors. All arights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
load("//:tester.bzl", "greet") | |
greet( | |
name = "a-greeting", | |
my_name = "kristina", | |
) |
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
(setq-default indent-tabs-mode nil) | |
(setq column-number-mode t) | |
(custom-set-variables | |
'(js2-global-externs (quote ("goog")))) | |
(add-hook 'js2-post-parse-callbacks | |
(lambda () | |
(let ((buf (buffer-string)) | |
(index 0)) | |
(while (string-match "\\(goog\\.require\\|goog\\.provide\\)('\\([^'.]*\\)" buf index) | |
(setq index (+ 1 (match-end 0))) |
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
load('//:my-first-extension.bzl', 'greeting') | |
greeting() |
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
load('//bazel:my-first-rule.bzl', 'my_rule') | |
my_rule(name = 'whatever') |