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 * | |
| from tkinter import ttk | |
| okno = Tk() | |
| okno.geometry("500x600") | |
| lbf = Frame(okno) | |
| canvas = Canvas(lbf) | |
| canvas.pack(side="left", fill="both", expand=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
| from typing import Iterator | |
| def fib(n: int) -> Iterator[int]: | |
| a, b = 0, 1 | |
| while a < n: | |
| yield a | |
| a, b = b, a + b | |
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
| center h1 { | |
| display: inline-block; | |
| background-color: rgba(0, 0, 0, 0.5); | |
| padding: 10px; | |
| margin-top: 170px; | |
| } | |
| center h3 { | |
| display: inline-block; | |
| background-color: rgba(0, 0, 0, 0.5); |
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
| class EventFeed: Hashable, Equatable { | |
| var eventId = 0 | |
| var hashValue : Int { return eventId } | |
| func equals(another: EventFeed) -> Bool { | |
| return self.eventId === another.eventId | |
| } | |
| } | |
| func ==(lhs: EventFeed, rhs: EventFeed) -> Bool { |
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
| Apache Maven 3.0.4 | |
| Maven home: /usr/share/maven | |
| Java version: 1.7.0_51, vendor: Oracle Corporation | |
| Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre | |
| Default locale: en_US, platform encoding: UTF-8 | |
| OS name: "linux", version: "3.8.0-19-generic", arch: "amd64", family: "unix" | |
| [INFO] Error stacktraces are turned on. | |
| [DEBUG] Reading global settings from /usr/share/maven/conf/settings.xml | |
| [DEBUG] Reading user settings from /home/lite/.m2/settings.xml | |
| [DEBUG] Using local repository at /home/lite/.m2/repository |
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 tags=./tags;$HOME |
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
| require 'benchmark' | |
| s1 = Struct.new(:login, :password).new("login", "password") | |
| class S | |
| attr_accessor :login, :password | |
| def initialize(login, password) | |
| @login = login | |
| @password = password | |
| end |
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
| require 'delegate' | |
| class Foo | |
| end | |
| class Bar < SimpleDelegator | |
| def my_method | |
| "YAY!" | |
| end | |
| end |
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
| # Logfile created on 2013-03-29 11:33:37 +0100 by logger.rb/v1.2.7 | |
| I, [2013-03-29T11:33:56.887927 #9031] INFO -- : | |
| { | |
| "user-agent": "Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.10.289 Version/12.00", | |
| "host": "ruby-blog.pl:8080", | |
| "accept": "text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1", | |
| "accept-language": "en,en-US;q=0.9", | |
| "accept-encoding": "gzip, deflate", | |
| "connection": "Keep-Alive" | |
| } |
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
| require 'benchmark' | |
| require 'exoteric' | |
| counter = Exoteric.new(:url => 'http://github.com/') | |
| Benchmark.bm do |x| | |
| x.report { 10.times { counter.count(:twitter, :facebook, :plusone) } } | |
| end |
NewerOlder