[ Launch: scaler ascii ] 5780917 by bollig[ Launch: scaler ascii ] 5780169 by enjalot[ Launch: scaler ] 5780132 by enjalot[ Launch: scaler ] 5780057 by ejfox[ Launch: scaler ] 5779793 by enjalot
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
| <?php | |
| function shutdown() { | |
| $error = error_get_last(); | |
| if ($error['type'] === E_ERROR) { | |
| // fatal error has occured | |
| $trace = array_reverse($GLOBALS['dbg_stack']); | |
| array_pop($trace); | |
| if(php_sapi_name() == 'cli') { | |
| echo 'Backtrace for: \'' . $error['message'] . '\' at ' . $error['file'] . ':' . $error['line'] . ':' . "\n"; | |
| foreach($trace as $item) |
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
| require 'rake/clean' | |
| JRUBY_VERSION = "1.7.3" | |
| PROCESSING_VERSION = "2.0b8" | |
| CLOBBER.include("processing-#{PROCESSING_VERSION}-windows32.zip", "jruby-complete-#{JRUBY_VERSION}.jar") | |
| desc "download, and copy to ruby-processing" | |
| task :default => [:download, :copy] |
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
| package bcomposes.twitter | |
| import twitter4j._ | |
| object StatusStreamer { | |
| def main(args: Array[String]) { | |
| val twitterStream = new TwitterStreamFactory(Util.config).getInstance | |
| twitterStream.addListener(Util.simpleStatusListener) | |
| twitterStream.sample | |
| Thread.sleep(2000) |
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
| /* | |
| not terribly difficult to predict which statements print what. | |
| */ | |
| function foo() { | |
| var a, b, c, d; | |
| if (true) { | |
| if (true) { | |
| a = 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
| // var: poor stylistic form, but no leakage | |
| function foo() { | |
| bar = 3; | |
| if (true) { | |
| var bar = 5; | |
| } | |
| } | |
| // let: will leak an auto-global | |
| function foo() { |
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
| package pong.functional | |
| sealed trait Event | |
| sealed trait Action | |
| object Action { | |
| case object MoveUp extends Action | |
| case object MoveDown extends Action | |
| case object ShootMissile extends Action | |
| } |
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
| package pong.imperative | |
| sealed trait Event | |
| class PongConnection { | |
| def isConnected(): Boolean = sys.error("not implemented") | |
| def readEvent(): Event = sys.error("not implemented") | |
| def moveUp(): Unit = sys.error("not implemented") | |
| def moveDown(): Unit = sys.error("not implemented") | |
| def shootMissile(): Unit = sys.error("not implemented") |
###Answer by Jim Dennis on Stack Overflow
#Your problem with Vim is that you don't grok vi.
You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).
The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:
0 go to the beginning of this line. y yank from here (up to where?)