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
$( function() { | |
$('form').find('input:text').val( function(i, val) { | |
return randomText(); | |
}); | |
$('form').find('input[type="number"]').val( function(i, val) { | |
return randomInt(); | |
}); |
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.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.Statement; | |
import java.sql.ResultSet; | |
import javax.sql.rowset.CachedRowSet; | |
import com.sun.rowset.CachedRowSetImpl; | |
/** | |
* | |
* @author beastieux | |
*/ |
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.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.ResultSet; | |
import java.sql.Statement; | |
import javax.sql.rowset.CachedRowSet; | |
import com.sun.rowset.CachedRowSetImpl; | |
/** | |
* | |
* @author beastieux |
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
ּ_בּ | |
בּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ | |
תּ_תּ | |
٩(×̯×)۶ | |
٩(̾●̮̮̃̾•̃̾)۶ |
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
// ES7, async/await | |
function sleep(ms = 0) { | |
return new Promise(r => setTimeout(r, ms)); | |
} | |
(async () => { | |
console.log('a'); | |
await sleep(1000); | |
console.log('b'); | |
})() |
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 m from 'mithril'; | |
import stream from 'mithril/stream'; | |
import {Button} from '../../ui'; | |
import {Account} from '../../models'; | |
export const FormAccountPublicPage = { | |
oninit(vnode) { | |
this.loading = true; | |
this.saving = false; | |
this.errors = false; |
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 Component from './component'; | |
class Widget extends Component { | |
init(ctrl) { | |
var props = this.props; | |
ctrl.counter = props.initialValue; | |
ctrl.increment = function() { | |
ctrl.counter++; |
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
.background-flicker { | |
background-color: #FFF; | |
animation: flicker 2s; | |
-webkit-animation: flicker 2s; | |
-moz-animation: flicker 2s; | |
animation-iteration-count: infinite; | |
-webkit-animation-iteration-count: infinite; | |
-moz-animation-iteration-count: infinite | |
} |
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
struct Man { | |
name: &'static str, | |
cellphone: i64, | |
is_alive: bool, | |
} | |
trait Person { | |
fn new(name: &'static str, cellphone: &i64) -> Self; | |
fn name(&self) -> &'static str; | |
fn is_alive(&self) -> &bool; |
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
// other Code ... | |
trait Travel { | |
fn new(destination: &'static str) -> Self; | |
fn go(&self) -> &'static str; | |
} | |
impl Travel for Man { | |
fn new(destination: &'static str) -> Man { | |
// logic ... |
OlderNewer