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
| package jsolver; | |
| import java.io.*; | |
| /* Klasa pozwalajaca na uruchamianie programow. */ | |
| public class Invoker { | |
| /** Uruchamia polecenie systemowe. | |
| * Wymusza, aby proces sie zakonczyl, zanim funkcja powroci z wynikiem. | |
| * | |
| * @param command polecenie do uruchomienia | |
| */ |
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 javax.swing.JButton; | |
| import javax.swing.ImageIcon; | |
| public class GraphicalButtonFactory { | |
| public static JButton createButton(String normal){ | |
| return createButton(new ImageIcon(normal), null, null); | |
| } | |
| public static JButton createButton(String normal, String pressed){ | |
| return createButton(new ImageIcon(normal), new ImageIcon(pressed), null); |
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
| #!/usr/bin/env ruby | |
| def print_board(board) | |
| board.each do |row| | |
| row.each do |i| | |
| print (i ? "x" : ".") | |
| end | |
| puts | |
| end | |
| puts |
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
| WYLOSUJ(ruchy, n) | |
| R := ruchy[random(n)] | |
| ruchy := ruchy - R | |
| zwroc R | |
| RANDOMIZACJA(ruchy, n, k) | |
| p := 0 | |
| najlepszy := WYLOSUJ(ruchy, n) | |
| dopoki p <= K i nie PUSTE(ruchy) | |
| kolejny := WYLOSUJ(ruchy, n) |
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
| #include <cstdio> | |
| #include <cstring> | |
| #include <cstdlib> | |
| #include <climits> | |
| #include <cmath> | |
| #include <utility> | |
| #include <algorithm> | |
| #include <string> | |
| #include <vector> |
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
| #include <d3dx9.h> | |
| #pragma comment (lib, "d3d9.lib") | |
| #pragma comment (lib, "d3dx9.lib") | |
| HWND hWnd; | |
| void init_window(int width = 800, int height = 600, const char* window_name = "SomeWindow"){ | |
| HINSTANCE hProg = GetModuleHandle(0); | |
| WNDCLASS wc; | |
| wc.cbClsExtra = 0; |
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
| require "rubygems" | |
| require "Node" | |
| require "CoreService" | |
| require "Configuration" | |
| require "example-services" | |
| require "mocha" | |
| class NameService | |
| def initialize(bus) | |
| (@mock = Mocha::Mock.new).stubs(:register_address).returns("Agent1", "Agent2") |
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
| require "rubygems" | |
| require "Node" | |
| require "Configuration" | |
| require "CoreService" | |
| require "MonitoringObjectsAttributes" | |
| require "example-services" | |
| require "mocha" | |
| class NameService | |
| def initialize(bus) |
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
| require "rubygems" | |
| require "Node" | |
| require "Configuration" | |
| require "CoreService" | |
| require "MonitoringObjectsAttributes" | |
| require "sga" | |
| require "example-services" | |
| require "mocha" |
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
| require "rubygems" | |
| require "Node" | |
| require "Configuration" | |
| require "CoreService" | |
| require "MonitoringObjectsAttributes" | |
| require "sga" | |
| require "SimpleAgents" | |
| require "actions" | |
| require "example-services" |
OlderNewer