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
package bufferedoutputstreamtest; | |
import java.io.BufferedOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
/** | |
* Contrary to what you'd expect, this runs with no exception thrown. | |
* Thanks, BufferedOutputStream! | |
*/ |
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.awt.Canvas; | |
import java.awt.Color; | |
import java.awt.Font; | |
import java.awt.Graphics2D; | |
import java.awt.RenderingHints; | |
import java.awt.event.KeyEvent; | |
import java.awt.event.KeyListener; | |
import java.awt.event.MouseEvent; | |
import java.awt.event.MouseListener; |
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.awt.Canvas; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.awt.event.KeyEvent; | |
import java.awt.event.KeyListener; | |
import java.awt.image.BufferStrategy; | |
import java.util.Random; | |
import javax.swing.JApplet; |
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
Started up flow development server on port 8000. | |
Traceback (most recent call last): | |
File "/Users/zar/Python/flow/utils/template/parser.py", line 160, in render_node | |
return node(params) | |
File "/Users/zar/Python/flow/utils/template/macros.py", line 110, in for_node | |
return "".join(map(process_item, items)) | |
File "/Users/zar/Python/flow/utils/template/macros.py", line 107, in process_item | |
name.set(params, item) | |
File "/Users/zar/Python/flow/utils/template/parser.py", line 76, in set | |
raise ValueError("Need more that {} values to unpack.".format(len(self.names))) |
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
Started up flow development server on port 8000. | |
Traceback (most recent call last): | |
File "/Users/zar/Python/flow/utils/template/parser.py", line 201, in parse_template_chunk | |
node = macro(self, token_contents) | |
File "/Users/zar/Python/flow/utils/template/macros.py", line 16, in wrapper | |
return func(parser, *match.groups(), **match.groupdict()) | |
File "/Users/zar/Python/flow/utils/template/macros.py", line 45, in render_macro | |
return partial(render_node, Expression(expression)) | |
File "/Users/zar/Python/flow/utils/template/parser.py", line 89, in __init__ | |
self.compiled_expression = compile(expression, "<string>", "eval") |
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
<form action="somewhere" method="POST"> | |
<!-- single <input type="text"> row --> | |
{% render forms.text_row("name", name) %} | |
<!-- single <input type="text"> row driven by model --> | |
{% render forms.model_row(model, "name") %} | |
<!-- entire model as a form --> | |
{% render forms.model_form(model) %} | |
</form> |
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 pygame | |
import math | |
import numpy | |
import random | |
import scipy | |
import scipy.spatial | |
SCREEN_SIZE = 300 | |
clock = pygame.time.Clock() | |
screen = pygame.display.set_mode((SCREEN_SIZE, SCREEN_SIZE))#, pygame.FULLSCREEN) |
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
"""Parser for multipart/form-data.""" | |
import re | |
import tempfile | |
import os | |
class RequestFile: | |
""" | |
An uploaded file. | |
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
- can we still end up with the stores window coming up too soon? | |
- fuzzy ranking and cutoff of tag suggestions | |
- fulltext-based suggestions | |
- choose *fastest* store in multiplex for read, not *master* | |
- when accessing slave store, display as read-only and have menu item to emancipate store | |
-> consequence: master store on s3, slave stores locally for caching and offline access | |
- per-session global undo/redo - so we can undo the "oh shit I did not mean to do that" moments | |
- we do really want a comment field, methinks | |
- change "delete original" to "store a copy", reverse polarity | |
- make loading store configs from prefs much more robust: individual store config load faults should be insulated, and less verification at config load time - so what if it references a nonexistent folder |
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
// This is supposed to show a modal dialog and then hide it again. In practice, | |
// this works about 75% of the time, and the other 25% of the time, the dialog | |
// stays visible. | |
// This always prints | |
// setVisible(true) about to happen | |
// setVisible(false) about to happen | |
// setVisible(false) has just happened | |
// even when the dialog stays visible. | |
package modalproblemdemo; |