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_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> |
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
footer .privacy { | |
font: 10px/1.2em Arial, Helvetica, sans-serif; | |
color: white; | |
margin: 20px 0; | |
text-align: center; | |
} |
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
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 |
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
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 |
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
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]; | |
} | |
} | |
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
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 | |
} |
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
data State = State { | |
header :: Row, | |
records ::[Row], | |
filename::String, | |
modified::Bool | |
} deriving Show | |
data Row = Row { | |
contents::[String] | |
} deriving Show |
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
public class Message{ | |
public String recipient, sender,body; | |
public Message(String recipient, String sender,String body){ | |
this.recipient=recipient; | |
this.sender=sender; | |
this.body = body; | |
} | |
public void append(String text){ | |
this.body = this.body + text; |
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
promptList (x:[]) partial = do | |
putStrLn ("Enter value for " ++ x) | |
input<-getLine | |
(partial ++ [input]) | |
promptList (x:xs) partial = do | |
putStrLn ("Enter value for " ++ x) | |
input<-getLine | |
promptList xs (partial ++ [input]) |
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
class Employee < ActiveRecord::Base | |
has_many :timeslots | |
scope :free_time, lambda {|day| joins(:timeslots).merge(Timeslot.on(day)) } | |
end |
OlderNewer