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
/** | |
* Created with IntelliJ IDEA. | |
* User: hiroism007 | |
* Date: 4/23/13 | |
* Time: 11:17 PM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
public class BubbleSort { | |
static int[]testNumbers; | |
public static void main(String[] args){ |
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
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.Arrays; | |
import java.util.ArrayList; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: 橘博之 | |
* Date: 4/20/13 |
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
puts "素数リストを作成します。数えたい最大の数を入れてください\n" | |
max_number = gets.to_i | |
primes = {} | |
for i in 2..max_number do primes[i] =true end | |
for i in 2..max_number do | |
(2*i).step(max_number,i){|n| primes[n] = false } if primes[i]==true | |
end | |
p primes.delete_if{|k,v| v == false}.keys |
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
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.Arrays; | |
import java.util.ArrayList; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: 橘博之 | |
* Date: 4/20/13 |
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
CarrierWave.configure do |config| | |
config.fog_credentials = | |
:provider => 'AWS', | |
:aws_access_key_id => ENV["AWS_S3_KEY_ID"], | |
:aws_secret_access_key => ENV["AWS_S3_SECRET_KEY"] | |
} | |
config.fog_directory = ENV["AWS_S3_BUCKET"] | |
end |
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
require 'fileutils' | |
#path to your minecraft save data.Ordinary minecraft's save data is game_path directory, but if you change your minecraft data to another place, change the game_path. | |
game_path = "/Users/YOUR_ACCOUNT_NAME/Library/Application\ Support/minecraft/saves" | |
#path to your directory where you want to save your minecraft save data. | |
save_path = "/Users/YOUR_ACCOUNT_NAME/Documents/backup/" | |
#make a folder named as daytime by Time.now method and copy save data files in that folder. | |
FileUtils.cp_r(game_path, save_path + Time.now.to_s) |
NewerOlder