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
private function decode_fluency($record){ | |
$values = array('' => 0, 'none' => 0, 'basic' => 1, 'functional' => 2, 'fluent' = 3); | |
$read = $values[$record['can_read']]; | |
$write = $values[$record['can_write']]; | |
$speak = $values[$record['can_speak']]; | |
$this->can_read = ($read > 0); | |
$this->can_write = ($write > 0); | |
$this->can_speak = ($speak > 0); | |
$this->can_understand_spoken = ($speak > 2); //speak is fluent | |
$this->can_peer_review = ($read == 3 && $write >= 2); //read is fluent & write is fluent/functional |
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
<?php | |
$rows = 106; | |
function seek_row_count($rows, $target = 35){ | |
$result = $rows % $target; | |
if($result == 0 || $result > 1) return $target; | |
return seek_row_count($rows, --$target); | |
} | |
print seek_row_count($rows, 35); | |
?> |
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
document.on('click', 'input[name="commit"]', function(evt, elm){ | |
var f = elm.up('form'); | |
fake_progress = new Element('div', {className: 'progress progress-striped active', style: 'width: 100%; clear:both'}); | |
f.insert({before: fake_progress}); | |
var bar = new Element('div', {className: 'bar'}); | |
fake_progress.insert(bar); | |
bar.setStyle('width: 2%'); | |
var rnd = 0.2 | |
function add_random(){ | |
rnd = Math.random(); |
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
// get a reference to all of the thumbnails | |
var thumbnails = $$('#thumbnails img'); | |
// listen for a click on one of them | |
document.on('click', '#thumbnails img', function(evt, elm){ | |
// remove the highlight from the current element | |
thumbnails.invoke('removeClassName', 'active'); | |
// insert a copy of the selected image in the main area | |
$('main').update(elm.clone(true)); | |
// highlight the new current thumbnail | |
elm.addClassName('active'); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Responsive Slides</title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.7/prototype.js"></script> | |
<style type="text/css" media="screen"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>jQuery Without Duplication</title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript" charset="utf-8"></script> | |
</head> |
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
[paperclip] copying assets/blobs/000/011/848/original/Sting_CB_Bounce_Blue.mov to local file /tmp/Sting_CB_Bounce_Blue20140730-24289-1vunrv7.mov | |
Sting_CB_Bounce_Blue.mov | |
[paperclip] [ffmpeg] ffmpeg -i "/tmp/Sting_CB_Bounce_Blue20140730-24289-1vunrv7.mov" 2>&1 | |
[paperclip] [ffmpeg] Command Success |
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
ubuntu@ip-10-93-169-71:~/www$ ffmpeg -i ProRes422HQ_Test.mov -c:v libx264 -b:v 3500k -me_method umh -pix_fmt yuv420p -s 1280x720 -profile:v baseline -c:a libfaac -b:a 128k -ar 48000 ProRes422HQ_Test.mp4 | |
ffmpeg version N-64743-g162cffc Copyright (c) 2000-2014 the FFmpeg developers | |
built on Jul 17 2014 22:56:46 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5) | |
configuration: --prefix=/usr/local --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid | |
libavutil 52. 92.101 / 52. 92.101 | |
libavcodec 55. 69.100 / 55. 69.100 | |
libavformat 55. 48.101 / 55. 48.101 | |
libavdevice 55. 13.102 / 55. 13.102 | |
libavfilter 4. 11.102 / 4. 11.102 | |
libswscale 2. 6.100 / 2. 6.100 |