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
public class T { | |
public static void main(String[] args) | |
{ | |
T t = new T(); | |
try { | |
t.testMe(); | |
//throw t.exception; | |
} catch (IOException ioe) { | |
System.out.println("caught IO!"); | |
} catch (NumberFormatException nfe) { |
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
public class T { | |
public static void main(String[] args) | |
{ | |
T t = new T(); | |
try { | |
throw t.exception; | |
} catch (IOException ioe) { | |
System.out.println("caught IO!"); | |
} catch (NumberFormatException nfe) { | |
System.out.println("caught NumberFormatException!"); |
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
localhost:80 172.16.204.183 - - [27/Jun/2011:14:57:54 -0400] "GET /cheek.mp3 HTTP/1.1" 200 1395984 "-" "QuickTime;NvMM HTTP Client v0.1 (Linux;Android 2.2.1)" | |
localhost:80 172.16.204.183 - - [27/Jun/2011:14:57:55 -0400] "GET /cheek.mp3 HTTP/1.1" 206 420 "-" "QuickTime;NvMM HTTP Client v0.1 (Linux;Android 2.2.1)" | |
localhost:80 172.16.204.183 - - [27/Jun/2011:14:57:55 -0400] "GET /cheek.mp3 HTTP/1.1" 206 72822 "-" "QuickTime;NvMM HTTP Client v0.1 (Linux;Android 2.2.1)" | |
localhost:80 172.16.204.183 - - [27/Jun/2011:14:57:55 -0400] "GET /cheek.mp3 HTTP/1.1" 206 2341 "-" "QuickTime;NvMM HTTP Client v0.1 (Linux;Android 2.2.1)" | |
localhost:80 172.16.204.183 - - [27/Jun/2011:14:57:55 -0400] "GET /cheek.mp3 HTTP/1.1" 206 1992290 "-" "QuickTime;NvMM HTTP Client v0.1 (Linux;Android 2.2.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
Signs that you shouldn't be a programmer | |
The following may not have any remedies if you still suffer from them after taking a programming course in school, so you will stand a better chance of advancing your career by choosing another profession. | |
1. Inability to determine the order of program execution | |
Symptoms | |
a = 5 | |
b = 10 |
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 com.grooveshark.extratest; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.EditText; | |
public class ExtraTestActivity extends Activity { |
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
I/RequestReader(12700): "GET /music.mp3 HTTP/1.0 - | |
I/RequestReader(12700): "GET /music.mp3 HTTP/1.0 bytes=2988415-5007808 | |
I/RequestReader(12700): "GET /music.mp3 HTTP/1.0 bytes=1483115-5007808 | |
I/RequestReader(12700): "GET /music.mp3 HTTP/1.0 bytes=1072586-5007808 | |
I/RequestReader(12700): "GET /music.mp3 HTTP/1.0 bytes=877074-5007808 | |
I/RequestReader(12700): "GET /music.mp3 HTTP/1.0 bytes=720706-5007808 | |
I/RequestReader(12700): "GET /music.mp3 HTTP/1.0 bytes=642486-5007808 | |
I/RequestReader(12700): "GET /music.mp3 HTTP/1.0 bytes=3183903-5007808 | |
I/RequestReader(12700): "GET /music.mp3 HTTP/1.0 bytes=2577885-5007808 | |
I/RequestReader(12700): "GET /music.mp3 HTTP/1.0 bytes=1424465-5007808 |
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 map = function() { | |
for (var i in this.v) { | |
var yes = (this.v[i].v > 0) ? 1 : 0; | |
var no = (this.v[i].v < 0) ? 1 : 0; | |
var key = {themeID: this.v[i].t} | |
var value = { yes: yes, no: no }; | |
emit(key, value); | |
} | |
} |
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
<h1>Sign in</h1> | |
<form action="/login" method="post"> | |
<div class="field"> | |
<label for="email_addr">email_addr</label> | |
<input id="email_addr" name="email_addr" size="30" type="text" /> | |
</div> | |
<div class="field"> | |
<label for="password">password</label> | |
<input id="password" name="password" size="30" type="password" /> |
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
$s = new Savant3(); | |
$f = $s->form('login'); | |
$f->depends('email_addr', 'password'); | |
$f->addValidation('email_addr', new Form_Validation('email', 'Please enter a valid email address')); | |
$f->addValidation('pass_confirm', new Form_Validation('confirm', 'Please confirm your password', array('against' => $f->password))); | |
if ($f->isSubmit() && $f->validate()) { | |
// handle login | |
} |
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
<h1>Sign in</h1> | |
<?= $this->form('login')->toSelf('post'); ?> | |
<div class="field"> | |
<?= $this->form()->label('email_addr'); ?> | |
<?= $this->form()->textField('email_addr'); ?> | |
</div> | |
<div class="field"> | |
<?= $this->form()->label('password'); ?> | |
<?= $this->form()->passwordField('password'); ?> |