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
# Console dump | |
jesper-josefssons-macbook-pro:blog2 jesper$ rails server | |
=> Booting WEBrick | |
=> Rails 3.0.0.beta3 application starting in development on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
Exiting | |
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/session/cookie_store.rb:178:in `ensure_session_key': A key is required to write a cookie containing the session data. Use config.action_controller.session_store :cookie_store, { :key => "_myapp_session" } in config/application.rb (ArgumentError) | |
from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/session/cookie_store.rb:88:in `initialize' |
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
class Run { | |
public static void main(String [] args) { | |
Skipcheck skip = new Skipcheck(100000000); | |
skip.tester(); | |
} | |
} |
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.ArrayList; | |
class Run { | |
public static void main (String[] args) { | |
FotbollsLag team1 = new FotbollsLag("BK Hejsan"); | |
FotbollsLag team2 = new FotbollsLag("BK Nej"); | |
FotbollsLag team3 = new FotbollsLag("BKKK"); | |
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
class Calendar < ActiveRecord::Base | |
def self.get_rooms | |
c = Marshal.load(Calendar.last.cal_dump) | |
events = {} | |
c.events.each do |c| | |
if events.has_key? c.location | |
events[c.location].push(c.occurences.first) | |
else | |
events.store(c.location, Array[c.occurences.first]) | |
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
HC1Mon Oct 11 09:00:00 +0200 2010Mon Oct 11 10:00:00 +0200 2010Mon Oct 11 13:15:00 +0200 2010Mon Oct 11 15:15:00 +0200 2010Tue Oct 12 08:00:00 +0200 2010Tue Oct 12 13:15:00 +0200 2010Wed Oct 13 08:00:00 +0200 2010Wed Oct 13 10:00:00 +0200 2010Wed Oct 13 13:15:00 +0200 2010Thu Oct 14 10:00:00 +0200 2010Thu Oct 14 13:15:00 +0200 2010Fri Oct 15 08:00:00 +0200 2010Sat Oct 16 08:00:00 +0200 2010Mon Oct 18 08:00:00 +0200 2010Tue Oct 19 08:00:00 +0200 2010Wed Oct 20 08:00:00 +0200 2010Thu Oct 21 08:00:00 +0200 2010Fri Oct 22 08:00:00 +0200 2010Sat Oct 23 08:00:00 +0200 2010Mon Oct 25 08:00:00 +0200 2010Mon Oct 25 10:00:00 +0200 2010Mon Oct 25 13:15:00 +0200 2010Mon Oct 25 15:15:00 +0200 2010Tue Oct 26 10:00:00 +0200 2010Wed Oct 27 08:00:00 +0200 2010Wed Oct 27 10:00:00 +0200 2010Wed Oct 27 13:15:00 +0200 2010Thu Oct 28 10:00:00 +0200 2010Thu Oct 28 13:15:00 +0200 2010Fri Oct 29 08:00:00 +0200 2010Fri Oct 29 13:15:00 +0200 2010HC2Mon Oct 11 10:00:00 +0200 2010Mon Oct 11 13:15:00 +0200 2010Tue Oct 12 10:00:00 +0200 20 |
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
class MMult { | |
public static int[][] mult(int[][] a, int[][] b) { | |
int rows = a.length; | |
int elements = a[0].length; | |
int columns = b[0].length; | |
int[][] results = new int[rows][columns]; | |
for (int n = 0; n < rows; n++) { | |
for (int m = 0; m < rows; m++) { | |
for (int i = 0; i < elements; i++) { | |
results[n][m] += a[n][i]*b[i][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
# views/layouts/application.html.haml | |
!!! | |
%html | |
%head | |
%body | |
%nav#menu | |
Some content | |
#wrapper | |
%section#content | |
= yield |
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
library ieee; | |
use ieee.std_logic_1164.all; | |
use ieee.numeric_std.all; | |
use ieee.std_logic_unsigned.all; | |
entity bcd59 is | |
port ( | |
clk, ce, reset : in std_logic; | |
count : out std_logic_vector(7 downto 0); | |
ceo : out std_logic | |
) ; |
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
process mainLoop { | |
MyTime t; | |
while (numberOfDrinks < Constants.MAX_DRINKS) { | |
t = new MyTime(clock.getTime().getValue()); | |
drink = orderQueue(myOrder, t); | |
if (drink instanceof Landlord.Refusal) { | |
System.out.println("Customer says: I was refused!!!! I'll return later with an AK-47 and blast the place."); | |
break; | |
} | |
numberOfDrinks++; |
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
main2() -> | |
spawn(callhome(self)), | |
receive | |
done -> | |
io:format("Done!",[]) | |
end. | |
callhome(Main) -> | |
callhome(Main, 10). | |
OlderNewer