1m
- ライブラリ本の宣伝
- WEB+DB Press 6月号の宣伝
package jp.dip.sys1.yagi.randomstring; | |
import java.util.Random; | |
public class GenSeed { | |
public static class Seed{ | |
long seed; | |
int length; | |
public Seed(long seed, int length){ | |
this.seed = seed; |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.List; |
task fizzbuzz << { | |
100.times {i -> | |
i = i+1 | |
if( i % 15 == 0){ | |
println("fizzbuzz") | |
} | |
else if( i % 3 == 0){ | |
println("fizz") | |
} | |
else if( i % 5 == 0){ |
task fizzbuzz << {} | |
task initFizzBuzz{ | |
fizz={i -> if( i % 3 == 0) print("fizz") } | |
buzz={i -> if( i % 5 == 0) print("buzz") } | |
number={i -> if( i % 3 != 0 && i % 5 != 0) print(i) } | |
100.times {i -> | |
suffix = sprintf("%03d", i+1) | |
task "fizzbuzz_decision_${suffix}" << { | |
fizz(i+1) | |
buzz(i+1) |
/* | |
Copyright (c) 2013 toshihiro yagi | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
apply plugin: 'java' | |
apply plugin: 'eclipse' | |
sourceCompatibility = 1.7 | |
version = '1.0' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { |
package jp.mydns.sys1yagi.android.mockitosample; | |
import java.io.IOException; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.os.Bundle; | |
import android.support.v4.app.FragmentActivity; |
package jp.mydns.sys1yagi.android.mockitosample; | |
import java.io.IOException; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.os.AsyncTask; | |
import android.view.View; |
private QuestionListAdapter adapter; | |
public void reload() { | |
adapter.setNotifyOnChange(false); | |
adapter.clear(); | |
List<Question> questions = spm.loadQuestions(); | |
for (Question question : questions) { | |
adapter.add(question); | |
} |