This file contains hidden or 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
object AuthMailer extends Mailer { | |
def sendWelcomeEmail(account: Account)(implicit settings: MailerSettings) { | |
val subject = "[Progstr Filer] Welcome to Progstr Filer!" | |
send( | |
From("[email protected]", "Mysite Support"), | |
To(account.email -> account.name), | |
Subject(subject), | |
HtmlTemplate("welcome-html", | |
'name -> "Hristo", 'subject -> subject, 'account -> account), | |
TextTemplate("welcome-text", |
This file contains hidden or 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
//Invoke with: scala -cp /opt/processing-1.5.1/lib/core.jar processing.scala | |
import processing.core._ | |
import java.io._ | |
import java.awt.image._ | |
import javax.imageio._ | |
class Image extends PApplet { | |
private[this] val width = 200 | |
private[this] val height = 200 |
This file contains hidden or 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 User < ActiveRecord::Base | |
has_file :avatar, AvatarUploader | |
validates_file_extension_of :avatar, :allowed => ["jpg", "png"] | |
end |
This file contains hidden or 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
scala> :javap Greeter -c | |
Compiled from "<console>" | |
public class Greeter extends java.lang.Object implements scala.ScalaObject{ | |
public static {}; | |
Code: | |
0: iconst_0 | |
1: anewarray #8; //class java/lang/Class | |
4: putstatic #14; //Field reflParams$Cache1:[Ljava/lang/Class; | |
7: new #16; //class java/lang/ref/SoftReference | |
10: dup |
NewerOlder