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
import java.util.*; | |
import com.pokutuna.lifelog.db.dao.SensingDAOForJava; | |
import com.pokutuna.lifelog.db.model.SensingModel.*; | |
import com.pokutuna.lifelog.util.DateTime; | |
public class MinuteSeparateSample { | |
SensingDAOForJava sdao = new SensingDAOForJava("jdbc:sqlite:sensing.db"); | |
Map<String, Set<String>> noRepetition = new TreeMap<String, Set<String>>(); | |
//1分区間の開始時間と、その区間内で検出されたアドレスの集合のハッシュ |
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
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAlyLFtDgkukNhGJ6CMDCsIGp8e6c5c34hZMAWsJ8VQTUUDbkwQSo3Dr3HIDDGi2wr6scX/3+jZiUdtSe+4p/jXr7C9euw/gWehxaDd6OnH4Cqz0DaengmBG5HFvtAaIhdJb+w4yHipV6+1Y4TWNW1oJFKTLAlGtxg2WyvNVq9y3MZ9O+sJAOQixuDdQ/BvQYbYW95/mdYlCviji8Qu8imbs+JSMRSXHmkGCdWwgQJCiAg1cMc+2ucd7UcJJ+n4uHALS2xYNZ3tZZZEcyZ+/35W3PaApjXaM7Xk4OSuG1+xmllH+Y79Yxnvb3Xl79aASPXdmflC915qf3RGFsuX/+HqQ== pokutuna@MBA |
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
#include <stdio.h> | |
#include "munit.h" | |
int mu_nfail=0; | |
int mu_ntest=0; | |
int mu_nassert=0; | |
static void test_foo(){ | |
int foo=7; | |
mu_assert(foo==7); | |
mu_assert(foo==0||foo==7); |
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
require 'rake/clean' | |
require 'yaml' | |
config = YAML.load_file(File.dirname(__FILE__) + '/config.yaml') | |
img_require_bb = FileList['img/*.png', 'img/*.jpg', 'img/*.pdf'] | |
CLEAN.include(FileList['*.log', '*.aux', '*.dvi', '*.toc', '*.ps']) | |
CLOBBER.include(FileList['*.pdf', '**/*.bb', '**/*.xbb']) | |
task :default => :open |
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
#!/usr/bin/ruby | |
`nkf -w --overwrite *.c` | |
sources = Dir.glob('*.c') | |
sources.each do |s| | |
puts "--- #{s} ---" | |
puts `gcc #{s} -o #{s.gsub(/\.c$/, '')}` | |
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
# -*- coding: utf-8 -*- | |
require 'open-uri' | |
require 'nokogiri' | |
@endpoint = 'http://www.google.com/calendar/feeds/[email protected]/public/full-noattendees' | |
def japanese_holiday?(time) | |
param = { | |
'start-min' => time.strftime('%F'), | |
'start-max' => (time + 24 * 60 * 60).strftime('%F'), |
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
#include <stdio.h> | |
int main (void) | |
{ | |
int m, n; | |
char s, t; | |
printf("int n ->"); | |
scanf("%d", &n); | |
printf("int 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
#include <stdio.h> | |
#include <math.h> | |
double calc_clause(double x, int k) | |
{ | |
return k == 0 ? 1 : pow(x, k) / (double)fact(k); | |
} | |
int fact(int i) | |
{ |
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
# -*- coding: utf-8 -*- | |
require 'open-uri' | |
require 'date' | |
require 'rexml/document' | |
require 'rexml/xpath' | |
module IsJapanese | |
@endpoint = 'http://www.google.com/calendar/feeds/[email protected]/public/full-noattendees' | |
def self.holiday?(date) |
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
# -*- coding: utf-8 -*- | |
require 'sequel' | |
require 'benchmark' | |
@date_range = (Time.new(2001, 1, 1, 0, 0, 0).to_i)..(Time.new(2011, 12, 31, 23, 59, 59).to_i) | |
def generate_record | |
time = Time.at(rand(@date_range)) | |
[time.to_s, time.strftime('%F %X')] | |
end |