This file contains hidden or 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 | |
function get_root_page ( $cur_post, $cnt = 0 ) { | |
if ( $cnt > 100 ) { return false; } | |
$cnt++; | |
if ( $cur_post->post_parent == 0 ) { | |
$root_page = $cur_post; | |
} else { | |
$root_page = get_root_page( get_post( $cur_post->post_parent ), $cnt ); | |
} | |
return $root_page; |
This file contains hidden or 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 | |
$fileName = date('YmdHis').$_FILES['userPicture'][('name')]; | |
move_uploaded_file($_FILES['userPicture']['tmp_name'], APP.'webroot/img/profile'.DS.$fileName); |
This file contains hidden or 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 | |
if (basename($_SERVER['SCRIPT_NAME']) == basename(__FILE__)) exit('Please do not load this page directly'); |
This file contains hidden or 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(){ | |
$('a[href^=#]').click(function(){ | |
var speed = 500; | |
var href= $(this).attr("href"); | |
var target = $(href == "#" || href == "" ? 'html' : href); | |
var position = target.offset().top; | |
$("html, body").animate({scrollTop:position}, speed, "swing"); | |
return false; | |
}); | |
}); |
This file contains hidden or 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 | |
function createCsvLineArray ($csv_file) { | |
$file = $csv_file; | |
$data = file_get_contents($file); | |
$data = mb_convert_encoding($data, 'UTF-8', 'sjis'); | |
$temp = tmpfile(); | |
$csv = array(); | |
fwrite($temp, $data); |
This file contains hidden or 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
@charset "UTF-8"; | |
/* style reset */ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, | |
b, u, i, center, | |
dl, dt, dd, ol, ul, li, |
This file contains hidden or 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 | |
/** | |
* タイトル | |
*/ | |
?> | |
<title><?php bloginfo('name'); ?><?php wp_title( '|', true, 'left' ); ?></title> |
This file contains hidden or 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() { | |
$('#report-map a').hover( | |
function() { | |
var keyid = $(this).attr('id'); | |
$('.'+keyid).animate({opacity: "show"}, "slow"); | |
}, | |
function() { | |
var keyid = $(this).attr('id'); | |
$('.'+keyid).animate({opacity: "hide"}, "fast"); | |
} |
This file contains hidden or 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() { | |
var nav = $('#glo-navi'), | |
offset = nav.offset(); | |
$(window).scroll(function () { | |
if($(window).scrollTop() > offset.top) { | |
nav.addClass('fixed'); | |
} else { | |
nav.removeClass('fixed'); | |
} |
This file contains hidden or 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
File.open("./test.tsv", "w") do |file| | |
@element.each do |key, val| | |
file.write("#{key} #{val}\n") | |
end | |
end |
OlderNewer