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
trigger HandleProductPriceChange on Merchandise__c (after update) { | |
// update invoice line items associated with open invoices | |
} |
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
trigger HandleProductPriceChange on Merchandise__c (after update) { | |
} |
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
trigger HandleProductPriceChange on Merchandise__c (after update) { | |
// update invoice line items associated with open invoices | |
List<Line_Item__c> openLineItems = | |
[SELECT j.Unit_Price__c, j.Merchandise__r.Price__c | |
FROM Line_Item__c j | |
WHERE j.Invoice_Statement__r.Status__c = 'Negotiating' | |
AND j.Merchandise__r.id IN :Trigger.new | |
FOR UPDATE]; |
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
IF( | |
ISNEW(), | |
Merchandise__r.Total_Inventory__c < Units_Sold__c , | |
IF( | |
Units_Sold__c < PRIORVALUE(Units_Sold__c), | |
FALSE, | |
Merchandise__r.Total_Inventory__c < (Units_Sold__c - PRIORVALUE(Units_Sold__c)) | |
) | |
) |
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
require 'rubygems' | |
require 'sinatra' | |
get '/' do | |
erb %{ | |
<p>What your name?</p> | |
<form action='/hello' method='POST'> | |
<input type='text' name='name'> | |
<input type='submit' value='submit'> | |
</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
require 'rubygems' | |
require 'sinatra' | |
get '/' do | |
erb %{ | |
<p>What your name?</p> | |
<form action='/hello' method='POST'> | |
<input type='text' name='name'> | |
<input type='submit' value='submit'> | |
</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
require 'rubygems' | |
require 'sinatra' | |
get '/' do | |
'Hello, world!' | |
end |
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 i in 1..1000 | |
puts "Hello World" | |
end |
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
x = gets.chomp | |
s = x.split(nil) | |
a = x.split[0].to_i | |
b = x.split[1].to_i | |
if a < b | |
puts "a < b" | |
elsif a > b | |
puts "a > b" | |
else a == a |
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
x = gets.chomp | |
s = x.split(nil) | |
a = x.split[0].to_i | |
b = x.split[1].to_i | |
area = a * b | |
compass = a**2 + b**2 | |
puts area.to_s + " " + compass.to_s |
NewerOlder