Scientific categorization with basic descriptions
HUMAINE proposal for EARL (Emotion Annotationand Representation Language)
- Negative and forceful
<?php | |
function obrazki($tag) { | |
$dir = './images/foto'; | |
if (is_dir($dir)) { | |
if ($dir_open = opendir($dir)) { | |
while ($file = readdir($dir_open)) { | |
if ($file == "." || $file == "..") continue; | |
$file_tag = substr($file,0,strlen($file)-7); | |
if ($file_tag == $tag) $tab[] = $file; | |
} |
// Fisher-Yates shuffle algorithm: http://bost.ocks.org/mike/shuffle/ | |
function shuffle(array) { | |
var m = array.length, t, i; | |
// while there remain elements to shuffle | |
while (m) { | |
// pick a remaining element | |
i = Math.floor(Math.random() * m--); | |
// and swap it with the current element | |
t = array[m]; | |
array[m] = array[i]; |
// declarations | |
var positions = []; | |
// Returns a random integer between min (included) and max (excluded) | |
// Using Math.round() will give you a non-uniform distribution! | |
function getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min)) + min; | |
} | |
// generate random positions |
/* | |
+-----------------------------------------------------------------+ | |
| Created by Chirag Mehta - http://chir.ag/projects/ntc | | |
|-----------------------------------------------------------------| | |
| ntc js (Name that Color JavaScript) | | |
+-----------------------------------------------------------------+ | |
All the functions, code, lists etc. have been written specifically | |
for the Name that Color JavaScript by Chirag Mehta unless otherwise |
Ctrl+A
and Ctrl+C
)alt+click
on the mask icon/thumbnail)<table data-comprowssor> | |
<caption>Middle Jurassic sections</caption> | |
<thead> | |
<tr> | |
<th>Name</th> | |
<th>Period <small>[Mya]</small></th> | |
<th>Duration <small>[My]</small></th> | |
<th>Species</th> | |
</tr> | |
</thead> |
function hexToRgb(hex) { | |
// Expand shorthand form ("#FFF") to full form ("#FFFFF") | |
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; | |
hex = hex.replace(shorthandRegex, function(m, r, g, b) { | |
return r + r + g + g + b + b; | |
}); | |
// return hex values | |
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); | |
return result ? { | |
r: parseInt(result[1], 16), |