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
from asciimatics.event import KeyboardEvent | |
from asciimatics.widgets import Frame, Layout, MultiColumnListBox, Widget, Label, TextBox | |
from asciimatics.scene import Scene | |
from asciimatics.screen import Screen | |
from asciimatics.exceptions import ResizeScreenError, StopApplication, NextScene | |
import sys | |
class MainFrame(Frame): | |
def __init__(self, screen, has_border=True, name='MainFrame'): |
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
Mark-Cotners-Mac-Pro:reflectr mcotner$ jruby -S rake torquebox:deploy[/reflectr] | |
(in /Users/mcotner/projects/reflectr) | |
rake aborted! | |
No TorqueBox deployer installed in /opt/torquebox-current/jboss/server/default/deployers | |
(See full trace by running task with --trace) | |
here it is with --trace | |
Mark-Cotners-Mac-Pro:reflectr mcotner$ jruby -S rake --trace torquebox:deploy[/reflectr] |
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't change resolved type for param: 3 from 23 to 20 | |
org.postgresql.core.v3.SimpleParameterList.setResolvedType(SimpleParameterList.java:230) | |
org.postgresql.core.v3.QueryExecutorImpl.sendOneQuery(QueryExecutorImpl.java:1488) | |
org.postgresql.core.v3.QueryExecutorImpl.sendQuery(QueryExecutorImpl.java:1062) | |
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) | |
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479) | |
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367) | |
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271) | |
data_objects.Command.execute_non_query(Command.java:151) | |
data_objects.Command$i_method_0_1$RUBYINVOKER$execute_non_query.call(data_objects/Command$i_method_0_1$RUBYINVOKER$execute_non_query.gen:65535) |
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 jruby | |
require 'rexml/document' | |
require 'net/http' | |
doc = REXML::Document.new(Net::HTTP.get('dgcsc.org', '/goldprices2.xml')) | |
# Get current gram price in USD | |
grams_usd = doc.elements["GoldPrice/Price[@currencycode='USD']"].elements['Ask'].texts.first.to_s.to_f | |
grams_usd_rounded = sprintf('%.2f', grams_usd) | |
# Get current ounce price in USD |