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
module MyStuff | |
include TheirStuff | |
def their_method | |
raise "doesn't work" | |
end | |
propagate! | |
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
class Report::Result | |
class Base | |
def method_to_be_overriden # von mir hinzugefügte Methode | |
end | |
def group_by(...) # existierende Methode von Base | |
... | |
method_to_be_overriden # Stelle #1 |
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
activerecord (3.0.7) lib/active_record/associations.rb:1713:in `has_and_belongs_to_many_after_destroy_for_reporting_users' | |
activesupport (3.0.7) lib/active_support/callbacks.rb:416:in `_run_destroy_callbacks' | |
activerecord (3.0.7) lib/active_record/callbacks.rb:256:in `destroy' | |
activerecord (3.0.7) lib/active_record/transactions.rb:235:in `destroy' | |
activerecord (3.0.7) lib/active_record/transactions.rb:292:in `with_transaction_returning_status' | |
activerecord (3.0.7) lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction' | |
activerecord (3.0.7) lib/active_record/transactions.rb:207:in `transaction' | |
activerecord (3.0.7) lib/active_record/transactions.rb:290:in `with_transaction_returning_status' | |
activerecord (3.0.7) lib/active_record/transactions.rb:235:in `destroy' | |
app/controllers/topics_controller.rb:92:in `destroy' |
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
<a title="Delete" onclick="if (confirm('Are you sure ?')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method'); m.setAttribute('value', 'delete'); f.appendChild(m);var s = document.createElement('input'); s.setAttribute('type', 'hidden'); s.setAttribute('name', 'authenticity_token'); s.setAttribute('value', 'jGHPe2+3FHbgJ61m83Q/yvgFhp6YsvjObFBEbhJk6R4='); f.appendChild(s);f.submit(); };return false;" href="/cost_entries/351"><img src="/images/delete.png?1309255162" alt="Delete"></a> |
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 MyParentProject(info: ProjectInfo) extends ParentProject(info) { | |
lazy val core = project("core", "mpp-core", new Core(_)) | |
// ... more sub projects | |
lazy val docs = project("docs", "docs", new Docs(_), core /*, ... */) | |
def concatPaths[T](s: Seq[T])(f: PartialFunction[T, PathFinder]): PathFinder = { | |
def finder: T => PathFinder = f orElse { case _ => Path.emptyPathFinder } | |
(Path.emptyPathFinder /: s)(_ +++ finder(_)) |
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
b_ a d g | |
c d f g a | |
d c f g a f g | |
a d d f f d c d a ??? |
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 Hello extends App { | |
val echo = new Echo with TcpConnection { | |
val host = args.drop(1).headOption getOrElse "localhost" | |
val port = args.drop(2).headOption.map(_.toInt) getOrElse 80 | |
} | |
val msg = args.headOption getOrElse "Hallo Welt!" | |
Client.run(echo) { echo => | |
val (text, letters) = echo.echo(msg) | |
println("\"%s\" contains %d letters.".format(text, letters)) |
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
// construct the viewer. | |
osgViewer::Viewer viewer; |
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
trait Connection { | |
def in: InputStream | |
def out: OutputStream | |
} | |
trait Buffer extends Connection { | |
abstract override lazy val in = new BufferedInputStream(super.in) // overriding in, which is abstract | |
} | |
trait TcpConnection extends Connection { |
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 extr { | |
trait Message[T] { | |
def read(in: PushbackInputStream): Option[T] | |
def tag(in: PushbackInputStream) = { | |
val byte = in.read | |
in unread byte | |
byte |