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
#include <iostream> | |
#include <sstream> | |
#include <string> | |
static const std::string NIBBLES[] = | |
{ | |
"0000", "1000", "0100", "1100", "0010", "1010", "0110", "1110", | |
"0001", "1001", "0101", "1101", "0011", "1011", "0111", "1111" | |
}; |
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
#include <iostream> | |
#include <sstream> | |
#include <string> | |
static const std::string NIBBLES[] = | |
{ | |
"0000", "1000", "0100", "1100", "0010", "1010", "0110", "1110", | |
"0001", "1001", "0101", "1101", "0011", "1011", "0111", "1111" | |
}; |
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
#include <iostream> | |
#include <sstream> | |
#include <iomanip> | |
#include <string> | |
#include <vector> | |
#include <utility> | |
typedef std::pair<int, int> Pos; | |
typedef std::vector<Pos> Positions; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<dcase:dcase xmlns:dcase="http://www.dependable-os.net/2010/06/dcase" id="emsample2"> | |
<dcase:description/> | |
<dcase:properties/> | |
<dcase:nodes> | |
<dcase:node type="Goal" id="goal1" name="Goal_1"> | |
<dcase:description>GOAL ONE</dcase:description> | |
<dcase:properties/> | |
</dcase:node> | |
<dcase:node type="Evidence" id="evidence1" name="Evidence_1"> |
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 'savon' | |
client = Savon::Client.new(wsdl: "http://localhost:3000/rumbas/wsdl") | |
p client.operations | |
result = client.call(:concat) do | |
message a: "123", b: "abc" | |
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
#include <string> | |
#include <algorithm> | |
#include <sstream> | |
#include <cstdlib> | |
static const int table[][6] = | |
{ | |
{0,0,0,0,0,0}, {1,0,0,0,0,0}, {1,0,0,0,0,0}, {0,1,0,0,0,0}, | |
{1,0,0,0,0,0}, {2,0,0,0,0,0}, {0,1,0,0,0,0}, {0,0,1,0,0,0}, | |
{1,0,0,0,0,0}, {2,0,0,0,0,0}, {2,0,0,0,0,0}, {1,1,0,0,0,0}, |
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
#include "Permutation.h" | |
namespace emattsan | |
{ | |
unsigned long long factorial(int n) | |
{ | |
static std::vector<unsigned long long> memo({1}); | |
while(memo.size() <= n) | |
{ |
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
#include <iostream> | |
#include <sstream> | |
#include <iomanip> | |
#include <iterator> | |
#include <algorithm> | |
#include <utility> | |
#include <vector> | |
#include <bitset> | |
typedef std::bitset<24 * 60> TimeSlot; |
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
#include <iostream> | |
#include <sstream> | |
#include <iomanip> | |
#include <string> | |
#include <map> | |
inline int toMin(int hm) | |
{ | |
return (hm / 100) * 60 + (hm % 100); | |
} |
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
#include <iostream> | |
#include <sstream> | |
#include <vector> | |
#include <bitset> | |
#include <algorithm> | |
#include <iterator> | |
class Sanwa | |
{ | |
public: | |
static const int UPPER_LIMIT = 120; |