Skip to content

Instantly share code, notes, and snippets.

View Mongey's full-sized avatar

Conor Mongey Mongey

View GitHub Profile
data State = State {
header :: Row,
records ::[Row],
filename::String,
modified::Bool
} deriving Show
data Row = Row {
contents::[String]
} deriving Show
load filename = do
handle <- openFile filename ReadMode
contents <- hGetContents handle
let unparsed = splitlines contents "" []
let result = myRow unparsed []
let the_state = State{
spreadsheet = result,
filename = filename,
modified = True
}
for(int i=1; i<this.tags.length;i++){
if(this.tags[i-1]==null && this.tags[i]!=null){
this.tags[i-1] = this.tags[i];
}
}
Traceback (most recent call last):
File "/Users/conormongey/NBZ/SickBeard/cherrypy/_cprequest.py", line 660, in respond
response.body = self.handler()
File "/Users/conormongey/NBZ/SickBeard/cherrypy/lib/encoding.py", line 193, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/Users/conormongey/NBZ/SickBeard/cherrypy/_cpdispatch.py", line 25, in __call__
return self.callable(*self.args, **self.kwargs)
File "/Users/conormongey/NBZ/SickBeard/sickbeard/webserve.py", line 2353, in setStatus
logger.log(u"Sending backlog for "+showObj.name+" season "+str(cur_segment)+" because some eps were set to wanted")
File "/Users/conormongey/NBZ/SickBeard/sickbeard/logger.py", line 179, in log
def calculate_totals
@sub_total = 0
@vat_total = 0
@total = 0
self.line_items.each do |line|
@total = @total + line.total
@sub_total = @sub_total + line.subtotal
@vat_total = @vat_total + ( line.total - line.subtotal)
end
self.sub_total = @sub_total
footer .privacy {
font: 10px/1.2em Arial, Helvetica, sans-serif;
color: white;
margin: 20px 0;
text-align: center;
}
<%= form_for LineItem.new, :remote => true do |f| %>
<div class="field">
<%= f.label :part_id %><br />
<%= f.select("part_id", Part.all.collect {|c| [ c.name, c.id ] })%>
</div>
<div class="field">
<%= f.hidden_field :invoice_id, :value => @invoice.id %>
</div>