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
| if value.instance_of?(String) | |
| value = value.tosjis | |
| end |
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
| time = DateTime.now | |
| prefix = time.strftime("%Y%m%d%H%M") |
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_name = File.basename(url) | |
| open(file_name, 'wb') do |output| | |
| open(url) do |data| | |
| output.write(data.read) | |
| end | |
| end |
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
| CSV.open(file_name, "w") do |csv| | |
| csv << @element.keys | |
| csv << @element.values | |
| end | |
| #<< の引数には配列を与える |
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 |
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
| $(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
| <?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
| @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 | |
| 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); |