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 <string> | |
using namespace std; | |
typedef struct { | |
string english; | |
string japanese; | |
} WORDSET; |
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 <string> | |
using namespace std; | |
unsigned char original_text[] = "Team Swift"; | |
unsigned char original_pattern[] = "if"; | |
unsigned char *simple_search(unsigned char* text, unsigned char* pattern) { | |
int i; |
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 <string> | |
using namespace std; | |
#define PATTERN_LENGTH 13 | |
unsigned char original_text[] = "a eighty-eighty-eighth key"; | |
unsigned char original_pattern[] = "eighty-eighth"; |
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 <string> | |
using namespace std; | |
#define PATTERN_LENGTH 12 | |
unsigned char original_text[] = "List<Event> events = EventService.get().search(query, category, sortOrder, Boolean.parseBoolean(beforeDeadlineOnly), maxNum);"; | |
unsigned char original_pattern[] = "parseBoolean"; |
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> | |
using namespace std; | |
int board[8][8]; | |
int check(int x, int y) { | |
int p, q; | |
for (p = 0; p < x; p++) |
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
a = 'found!' | |
class ScopeTest | |
puts a | |
def my_method | |
puts a | |
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
a = 'found!' | |
ScopeTest = Class.new do | |
puts a | |
def my_method | |
puts a | |
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
a = 'found!' | |
ScopeTest = Class.new do | |
puts a | |
define_method :my_method do | |
puts a | |
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 <iostream> | |
#define STACK_SIZE 10 | |
//#define DEBUG | |
using namespace std; | |
typedef struct t_fraction { | |
int numerator; | |
int denominator; |
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
# sample class | |
class Book < ActiveRecord::Base | |
attr_accessible :author, :status, :title | |
state_machine :status, :initial => :draft do | |
state :draft, :public, :suspending, :archived | |
state :draft do | |
def published?; false end |