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
## you may need sudo permission to execute some commands or swith to root | |
# if installed old version by yum, remove it first | |
# sudo yum remove tmux libevent libevent-devel libevent-headers | |
# install deps | |
sudo yum install gcc kernel-devel make ncurses-devel | |
# create temp dir | |
mkdir /tmp/for-latest-tmux |
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 | |
ini_set("error_reporting", E_ALL & ~E_NOTICE); | |
?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Genetic Algorithm : TSP : PHP Implementation by Thomas Hunter</title> | |
<style> | |
body { |
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 | |
# Algorithm found here: http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html | |
$filename = 'image.jpg'; | |
list($width, $height) = getimagesize($filename); | |
$img = imagecreatefromjpeg($filename); | |
$new_img = imagecreatetruecolor(8, 8); |
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 | |
error_reporting(E_ALL); | |
define('NUM_FEATURES', 3); | |
// My dataset describes cities around the world where I might consider living. | |
// Each sample (city) consists of 3 features: | |
// * Feature 1: average low winter temperature in the city | |
// * Feature 2: city population, in millions |
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
.fake_file_input { | |
background: url(../images/fake_file_input.png) no-repeat; | |
cursor: pointer; | |
width: 150px; | |
height: 30px; | |
overflow: hidden; | |
position: relative; | |
display: inline-block; | |
*display: inline; | |
*zoom: 1; |