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
Index: app/models/theme.rb | |
=================================================================== | |
--- app/models/theme.rb (revision 2075) | |
+++ app/models/theme.rb (revision 2076) | |
@@ -43,13 +43,6 @@ | |
def border_color | |
handle_native(:border_color, "EFEFEF") | |
end | |
- | |
- # This will eventually become a first-class property and take over outer_background_color. |
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 SymbolReplacer { | |
protected String stringToReplace; | |
SymbolReplacer(String s) { | |
this.stringToReplace = s; | |
} | |
String replace() { | |
Pattern symbolPattern = Pattern.compile("\\$([a-zA-Z]\\w*)"); | |
int startingPosition = 0; |
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.util.Date; | |
public class Worker implements Runnable{ | |
long executionMillis = -1; | |
public void run() { | |
for(int i=0; i<100; 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
import org.junit.Test; | |
import static org.junit.Assert.*; | |
public class WatcherTest { | |
@Test | |
public void testJavaVersion() { | |
assertEquals("1.5.0_16", System.getProperty("java.version")); |
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 org.junit.Test; | |
import static org.junit.Assert.*; | |
public class WatcherTest { | |
@Test | |
public void testJavaVersion() { | |
assertEquals("1.5.0_16", System.getProperty("java.version")); |
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
INSERT | |
INTO promotion_attempts (audience_member_id, state, mailing_id) | |
SELECT memberships.audience_member_id, 'ignorant', 18591 | |
FROM memberships | |
INNER JOIN audience_members ON memberships.audience_member_id = audience_members.id | |
WHERE memberships.audience_list_id IN (7310) | |
AND (audience_members.suppressed IS NULL OR audience_members.suppressed = 0) | |
AND audience_members.email NOT IN ( | |
SELECT promotion_attempts.email | |
FROM promotion_attempts |
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
DROP PROCEDURE IF EXISTS mailing_prevent_resend; | |
DELIMITER // | |
CREATE PROCEDURE mailing_prevent_resend | |
(target_mailing_id INT, prevent_resend BOOLEAN, target_promotion_id INT) | |
BEGIN | |
DROP TEMPORARY TABLE IF EXISTS promotion_attempt_emails; |
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 'mechanize' | |
require 'logger' | |
require 'band' | |
agent = WWW::Mechanize.new | |
agent.max_history = 1 | |
agent.user_agent_alias = 'Mac Safari' | |
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 self.disabled | |
find(:all, :conditions => {:disabled => true}) | |
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
class Module | |
def bool_accessor(attribute) | |
attr_accessor attribute | |
define_method(attribute.to_s + "?") do | |
!!send(attribute) | |
end | |
end | |
end | |
class Bar |