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 'gosu' | |
require 'date' | |
$Kcode = 'u' | |
def remain(date) | |
intervals = [["天",1],["小時",24],["分鐘",60],["秒",60]] | |
elapsed = DateTime.now - date | |
interval = 1.0 | |
parts = intervals.collect do |name,new_interval| |
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 'gosu' | |
require 'date' | |
$Kcode = 'u' | |
config = File.open("config.txt",'r') | |
$deadline = config.gets.chomp | |
config.close | |
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
Started POST "/messages" for 221.120.70.217 at 2010-11-06 00:10:21 +0000 | |
Processing by MessagesController#create as HTML | |
Parameters: {"message"=>{"medium_id"=>"194"}, "receiver"=>"0952635533"} | |
User Load (1.8ms) SELECT `users`.* FROM `users` WHERE (`users`.`UUID` = 'f13f47d4-d830-11df-9231-12313909e161') LIMIT 1 | |
User Load (2.0ms) SELECT `users`.* FROM `users` WHERE (`users`.`number` = '886952635533') LIMIT 1 | |
SQL (1.7ms) BEGIN | |
SQL (1.8ms) INSERT INTO `messages` (`created_at`, `mask_id`, `medium_id`, `receiver_id`, `sender_id`, `updated_at`) VALUES ('2010-11-06 00:10:21', NULL, 194, 38, 11, '2010-11-06 00:10:21') | |
SQL (68.9ms) COMMIT | |
Completed 200 OK in 309ms (Views: 1.4ms | ActiveRecord: 76.4ms) |
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
>> quit | |
<internal:lib/rubygems/custom_require>:29: [BUG] Segmentation fault | |
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0] | |
-- control frame ---------- | |
c:0014 p:---- s:0047 b:0047 l:000046 d:000046 CFUNC :require | |
c:0013 p:0013 s:0043 b:0043 l:000042 d:000042 METHOD <internal:lib/rubygems/custom_require>:29 | |
c:0012 p:0041 s:0038 b:0038 l:000037 d:000037 METHOD /Users/poga/.rvm/gems/ruby-1.9.2-p0/gems/ripl-rc-0.2.1/lib/ripl/rc/mkdir_history.rb:10 | |
c:0011 p:0011 s:0035 b:0035 l:000034 d:000034 METHOD /Users/poga/.rvm/gems/ruby-1.9.2-p0/gems/ripl-0.3.5/lib/ripl/history.rb:22 | |
c:0010 p:0053 s:0032 b:0032 l:000031 d:000031 METHOD /Users/poga/.rvm/gems/ruby-1.9.2-p0/gems/ripl-rc-0.2.1/lib/ripl/rc/ctrld_newline.rb:11 |
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
大哉問,但是我覺得我沒辦法正面回答。 | |
在《人月神話》裡面有提到軟體開發的一個現象, | |
就是軟體越大,維護越困難(廢話)。 | |
這是因為初期的設計不可能考慮到後期的需求, | |
所以增加新功能,要顧慮到所有與原有設計接合的部份, | |
所以增加一個新功能的成本,跟這個軟體的規模成正比。 | |
也就是說,當軟體規模是 10 的時候,加一個新功能成本的 10。 |
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
traceroute to 216.81.59.173 (216.81.59.173), 64 hops max, 52 byte packets | |
1 192.168.1.1 (192.168.1.1) 4.170 ms 1.128 ms 1.079 ms | |
2 h254.s98.ts.hinet.net (168.95.98.254) 54.052 ms 13.208 ms 13.508 ms | |
3 tchn-3301.hinet.net (168.95.144.14) 13.575 ms 12.907 ms 12.620 ms | |
4 tchn-3012.hinet.net (220.128.17.114) 18.657 ms | |
tchn-3011.hinet.net (220.128.16.114) 40.248 ms | |
tchn-3011.hinet.net (220.128.16.202) 26.186 ms | |
5 tpdt-3012.hinet.net (220.128.17.10) 19.243 ms | |
tpdt-3011.hinet.net (220.128.16.6) 18.610 ms 19.000 ms | |
6 r4102-s2.tp.hinet.net (220.128.7.149) 16.352 ms 15.502 ms 15.393 ms |
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
<html> | |
<head> | |
</head> | |
<body> | |
<input id="file_input" type="file" webkitdirectory directory /> | |
<a href="#" id="button">Scan</a> | |
</body> | |
<script> | |
document.getElementById("file_input").onchange = function (e) { |
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
using UnityEngine; | |
using System; | |
using System.Collections; | |
public class MoveToAttackCommand : ICommand { | |
public GameObject target; | |
public MoveToAttackCommand(GameObject target) { | |
this.target = target; |
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
Shader "Custom/White" { | |
Properties { | |
_Color ("Color", Color) = (1,1,1) | |
} | |
SubShader { | |
Color [_Color] | |
Pass {} | |
} | |
FallBack "Diffuse" |
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
while (!targetUnit.IsDead()) { | |
actor.animation.Play("run"); | |
while (Vector3.Distance(actor.transform.position, target.transform.position) > actorUnit.attackRange) { | |
actorUnit.MoveTo(target.transform.position); | |
yield return null; | |
} | |
while (Vector3.Angle(actor.transform.forward, target.transform.position - actor.transform.position) > 10) { |
OlderNewer