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 <cstdio> | |
#include <cstdlib> | |
#include <string> | |
#include <vector> | |
#include <cassert> | |
#include <array> | |
#include "dsu.h" | |
using std::string; |
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 <cstdlib> | |
#include <cstdio> | |
#include <cassert> | |
#include <utility> | |
#include <algorithm> | |
struct AVLTreeNode | |
{ | |
int height; |
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 <cstdio> | |
template <class T> | |
int upper_bound(const T array[], T element, size_t left_index, size_t right_index) | |
{ | |
int result = -1; | |
printf("upper: at start left_index: %lu\n", left_index); | |
printf("upper: at start right_index: %lu\n",right_index); |
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
CC=g++ | |
CFLAGS=-c -Wall | |
LDFLAGS= | |
SOURCES=main.cpp hello.cpp factorial.cpp | |
OBJECTS=$(SOURCES:.cpp=.o) | |
EXECUTABLE=hello | |
all: $(SOURCES) $(EXECUTABLE) | |
$(EXECUTABLE): $(OBJECTS) |
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
import _ = require('underscore') | |
import assert = require('assert') | |
import util = require('util') | |
function denormalizersFactory(services: ExtensionTypes.IDenormalizerExtenionServices) : ExtensionTypes.IExtensionDenormalizers { | |
services.sayDenormalizingHello() | |
return { | |
onXXX: function (event: any) { |
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
namespace ToolkitCode { | |
class IButton { | |
virtual void setTitle(const string &title) = 0; | |
virtual void doOnClick(std::function<void()> handler) = 0; | |
}; | |
class Win32APIButton : public IButton { | |
virtual void setTitle(const string &title) = 0; | |
virtual void doOnClick(std::function<void()> handler) = 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
namespace ToolkitCode { | |
class IButton { | |
virtual void setTitle(const string &title) = 0; | |
virtual void doOnClick(std::function<void()> handler) = 0; | |
}; | |
class Win32APIButton : public IButton { | |
virtual void setTitle(const string &title) = 0; | |
virtual void doOnClick(std::function<void()> handler) = 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
class ICommandHandler { | |
public: | |
virtual void handle(const string &request) = 0; | |
virtual ICommandHandler* cone() = 0; | |
}; | |
class CommandTypeAHandler : public ICommandHandler { | |
void handle(const string &request) override { | |
// ... |
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
import sublime, sublime_plugin | |
#print (str(sublime.__dict__)) | |
#http://code.tutsplus.com/tutorials/how-to-create-a-sublime-text-2-plugin--net-22685 | |
# Usage: in console: view.run_command('cpplit') | |
# Or, place this source as zip-packed cpplit.py in cpplit.sublime-plugin in C:/Users/lsem/AppData/Roming/Sublime Text 3/Installed Packages/ | |
# and define key binding for command('cpplit') | |
class CpplitCommand(sublime_plugin.TextCommand): |
OlderNewer