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 | |
register_taxonomy( | |
'com_category', array('foo', 'bar','hoge','fuga'),array( | |
'label' => '共通カテゴリ', | |
'hierarchical' => true, | |
'show_ui' => true, | |
'query_var' => true, | |
)); | |
?> | |
/*'com_category', array('投稿タイプA', '投稿タイプB','投稿タイプC','投稿タイプD')*/ |
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
<? | |
include_once("facebook/facebook.php"); //include facebook SDK | |
function myurl(){ | |
if ( isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] == 'on' ){ | |
$protocol = 'https://'; | |
}else{ | |
$protocol = 'http://'; | |
} | |
return $protocol.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; |
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 getRecommendations($array, $person, $type) { | |
$totals = array(); | |
$simSums = array(); | |
$rankings = array(); | |
foreach ($array as $other => $v) { | |
if ($other == $person ){ | |
continue; | |
} elseif($type == 'pearson') { | |
$simulate = sim_pearson($array[$person], $array[$other]); | |
if($simulate <= 0) { |