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
@@ -23,25 +23,27 @@ package models.healing | |
public var cooldown: int = 0; | |
public static function calculateRepairPrice(building: Building): HealPrice | |
{ | |
var priceMod : Number = tech.repairPriceMod; | |
var cooldownMod: Number = tech.repairCooldownMod; | |
- price.metal = Math.round(Upgradable.calculateCost(UpgradableType.BUILDINGS, | |
- building.type, ResourceType.METAL, {'level': building.level}) | |
- * priceMod * building.damagePercentage); |
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
arturas@zeus:~/work/spacegame/server$ jruby --1.9 -S rake spec:controllers | |
/home/arturas/.rvm/rubies/jruby-1.6.5/bin/jruby -S rspec spec/controllers/players_controller_spec.rb spec/controllers/buildings_controller_spec.rb spec/controllers/technologies_controller_spec.rb spec/controllers/announcements_controller_spec.rb spec/controllers/daily_bonus_controller_spec.rb spec/controllers/player_options_controller_spec.rb spec/controllers/chat_controller_spec.rb spec/controllers/objects_controller_spec.rb spec/controllers/quests_controller_spec.rb spec/controllers/routes_controller_spec.rb spec/controllers/market_controller_spec.rb spec/controllers/solar_systems_controller_spec.rb spec/controllers/planets_controller_spec.rb spec/controllers/alliances_controller_spec.rb spec/controllers/notifications_controller_spec.rb spec/controllers/units_controller_spec.rb spec/controllers/game_controller_spec.rb spec/controllers/combat_logs_controller_spec.rb spec/controllers/galaxies_controller_spec.rb spec/controllers/constru |
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
describe "fail" do | |
it "should not fail" do | |
a = some_method_that_returns_activerecord_relation | |
a.include?(object).should be_true # This does not fail. | |
a.should include(object) # This fails. | |
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
arturas@zeus:~/work/spacegame/server$ ruby ctest.rb | |
Starting simulation | |
18:03:09 [worker_1|#<Thread:0x917da50>] --- message arrived --- | |
18:03:09 [worker_1|#<Thread:0x917da50>] Starting work for 1 seconds. | |
18:03:09 [worker_2|#<Thread:0x909136c>] --- message arrived --- | |
18:03:09 [worker_2|#<Thread:0x909136c>] Starting work for 3 seconds. | |
18:03:10 [worker_1|#<Thread:0x917da50>] Done working. | |
18:03:10 [worker_1|#<Thread:0x917da50>] --- message arrived --- | |
18:03:10 [worker_1|#<Thread:0x917da50>] Waiting until worker_2 is done. | |
18:03:10 [worker_1|#<Thread:0x917da50>] --- message arrived --- |
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
arturas@zeus:~/work/spacegame/server$ cat t.scala | |
object T { | |
def three = 3 | |
} | |
arturas@zeus:~/work/spacegame/server$ scalac t.scala | |
arturas@zeus:~/work/spacegame/server$ javap T.class | |
Compiled from "t.scala" | |
public final class T { |
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
scala> arturas@zeus:~/work/spacegame/server$ scala | |
Welcome to Scala version 2.9.1.final (Java HotSpot(TM) Server VM, Java 1.7.0). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> :paste | |
// Entering paste mode (ctrl-D to finish) | |
object A { def t = 3 } | |
class A { def t = 4 } |
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
$LOAD_PATH << "lib/" | |
require 'celluloid' | |
class LogActor | |
include Celluloid | |
def log(message); puts message; end | |
end | |
LOG = LogActor.new |
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
spacegame@nexar:~/nebula-server/current$ jstack 1241 | |
1241: Unable to open socket file: target process not responding or HotSpot VM not loaded | |
The -F option can be used when the target process is not responding | |
spacegame@nexar:~/nebula-server/current$ jstack -F 1241 | |
Attaching to process ID 1241, please wait... | |
Debugger attached successfully. | |
Server compiler detected. | |
JVM version is 22.0-b10 | |
Deadlock Detection: |
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
^\2012-01-31 17:15:33 | |
Full thread dump Java HotSpot(TM) Server VM (22.0-b10 mixed mode): | |
"process reaper" daemon prio=10 tid=0x09f15400 nid=0x1ecf waiting on condition [0x8cfe2000] | |
java.lang.Thread.State: TIMED_WAITING (parking) | |
at sun.misc.Unsafe.park(Native Method) | |
- parking to wait for <0x98ddc190> (a java.util.concurrent.SynchronousQueue$TransferStack) | |
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226) | |
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460) | |
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359) |
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
^\2012-01-31 17:18:23 | |
Full thread dump Java HotSpot(TM) Server VM (22.0-b10 mixed mode): | |
"Service Thread" daemon prio=10 tid=0x09f44000 nid=0x1fe9 runnable [0x00000000] | |
java.lang.Thread.State: RUNNABLE | |
"C1 CompilerThread1" daemon prio=10 tid=0x09f39800 nid=0x1fe8 waiting on condition [0x00000000] | |
java.lang.Thread.State: RUNNABLE | |
"C2 CompilerThread0" daemon prio=10 tid=0x09f37c00 nid=0x1fe7 runnable [0x00000000] |