This file contains hidden or 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
| window.addEventListener('DOMContentLoaded', function () { | |
| console.log('breakout.js loaded!'); | |
| // 実装 | |
| class Paddle { | |
| constructor() { | |
| this.x = 240; | |
| this.y = 600; | |
| } | |
| draw(context) { |
This file contains hidden or 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 turtle | |
| def triangle(pen, size): | |
| """penを使用して一辺の長さsizeの正三角形を描きます""" | |
| for a in range(3): | |
| pen.forward(size) | |
| pen.left(120) | |
| def square(pen, size): |
This file contains hidden or 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
| from tkinter import * | |
| import random | |
| import time | |
| class Ball: | |
| def __init__(self, canvas, paddle, speed, color): | |
| self.canvas = canvas | |
| self.paddle = paddle | |
| self.speed = speed | |
| self.id = canvas.create_oval(10, 10, 25, 25, fill=color) |
This file contains hidden or 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 unittest | |
| import student_code | |
| class StudentCodeTest(unittest.TestCase): | |
| exists_student_codes = [ | |
| 's15001', 's15002', 's15003', 's15004', 's15005', | |
| 's15006', 's15007', 's15008', 's15009', 's15010', | |
| 's15011', 's15012', 's15013', 's15014', | |
| 'n15001', 'n15002', 'n15003', 'n15004', 'n15005', |
This file contains hidden or 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 sys | |
| from io import StringIO | |
| import unittest | |
| import fizzbuzz | |
| pattern10 = """1\n2\nfizz\n4\nbuzz\nfizz\n7\n8\nfizz\nbuzz\n""" | |
| pattern100 = """1\n2\nfizz\n4\nbuzz\nfizz\n7\n8\nfizz\nbuzz | |
| 11\nfizz\n13\n14\nfizz buzz\n16\n17\nfizz\n19\nbuzz | |
| fizz\n22\n23\nfizz\nbuzz\n26\nfizz\n28\n29\nfizz buzz | |
| 31\n32\nfizz\n34\nbuzz\nfizz\n37\n38\nfizz\nbuzz | |
| 41\nfizz\n43\n44\nfizz buzz\n46\n47\nfizz\n49\nbuzz |
This file contains hidden or 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
| package jp.ac.it_college.std.nakasone.servicetest; | |
| import android.app.Activity; | |
| import android.content.ComponentName; | |
| import android.content.Intent; | |
| import android.content.ServiceConnection; | |
| import android.os.Bundle; | |
| import android.os.IBinder; | |
| import android.view.View; |
This file contains hidden or 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
| package jp.ac.it_college.std.nakasone.actionbartab; | |
| import android.app.ActionBar; | |
| import android.app.Activity; | |
| import android.app.Fragment; | |
| import android.app.FragmentTransaction; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| import android.view.LayoutInflater; | |
| import android.view.View; |
This file contains hidden or 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 python3 | |
| import sys | |
| import random | |
| argv = sys.argv | |
| argc = len(argv) | |
| if argc not in {2, 3}: | |
| print("Usage: pass_gen digis [mode(1:number,2:lower,4:upper,8:specials]") |
This file contains hidden or 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
| set-option -g prefix C-j | |
| setw -g utf8 on | |
| set -g status-utf8 on | |
| set -g mouse-select-pane on | |
| setw -g mode-mouse on | |
| set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
| set -g base-index 1 |
This file contains hidden or 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 python3 | |
| def isOdd(i): | |
| return False if i & 0x1 == 0 else True | |
| def isEven(i): | |
| return not isOdd(i) | |
| if __name__ == '__main__': | |
| for x in range(100): |
NewerOlder