Skip to content

Instantly share code, notes, and snippets.

View Daniel-Wang's full-sized avatar

Daniel Daniel-Wang

View GitHub Profile
@Daniel-Wang
Daniel-Wang / about.md
Created September 21, 2019 14:21
About me

Daniel Wang

Hi! I am a 3B CS student. I get bored easily!!!

Courses I'm Taking

  1. CO 487 Applied Cryptography
  2. CS 456 Computer Networks
  3. CS 458 Security and Privacy
case 'u':
{
for (int i = 0; i < n; i++) {
if (!_app.commandStack().empty() && _app.commandStack().top()->canUndo()) {
_app.commandStack().top()->undo();
_app.commandStack().pop();
}
}
if (_app.commandStack().empty()) {
_app.textView().buffer().setUnsavedChanges(false);
@Daniel-Wang
Daniel-Wang / keybase.md
Created September 30, 2018 18:29
Keybase Verification

Keybase proof

I hereby claim:

  • I am daniel-wang on github.
  • I am danielw68 (https://keybase.io/danielw68) on keybase.
  • I have a public key ASB0f0jUloH-pSkuoc4cMgufkngii_5vgWXnHiSg4ihrswo

To claim this, I am signing this object:

Verifying my Blockstack ID is secured with the address 1GcD6y28FsUJK5XkXvL7Pd1TnSQ5cPK4X5 https://explorer.blockstack.org/address/1GcD6y28FsUJK5XkXvL7Pd1TnSQ5cPK4X5
@Daniel-Wang
Daniel-Wang / Buffer.h
Created April 23, 2018 17:58
Buffer header file for vm
class Buffer {
public:
explicit Buffer(int maxLines);
std::string readFile(const std::string& fileName);
void replaceChar (char c, int x, int y);
void insertChar (char c, int x, int y);
void insertString (const std::string& str, int x, int y);
void insertNewLine(int x, int y);
void deleteChar (int x, int y);
@Daniel-Wang
Daniel-Wang / undo.cc
Created April 15, 2018 07:46
Undo Command
if (!_app.commandStack().empty() && _app.commandStack().top()->canUndo()) {
_app.commandStack().top()->undo();
_app.commandStack().pop();
}
@Daniel-Wang
Daniel-Wang / Controller.h
Last active April 23, 2018 18:01
Controller header file for Vm
// Includes here
class Controller {
public:
explicit Controller(Application& app);
void listenForInputs();
private:
void listenInsertMode();
@Daniel-Wang
Daniel-Wang / View.h
Last active April 21, 2018 08:27
View header file for Vm
// Includes
namespace vm {
class View {
public:
View(int height, int width, int startX, int startY);
~View();
void printBufferContent();
void setHighlighter(std::unique_ptr<Highlighter> highlighter);
@Daniel-Wang
Daniel-Wang / Application.h
Last active April 23, 2018 18:02
Application header file for Vm project
// Includes
namespace vm {
enum MODE {
COMMAND,
INSERT,
REPLACE
};
class Application {
@Daniel-Wang
Daniel-Wang / gist:125e788149b7161cbf8dfbf3b76173f9
Created March 24, 2018 04:42
Github verification for Blockstack
Verifying my Blockstack ID is secured with the address 1FZPsTSx1N4CxLLk6vPKF8p4VumMyk4E2D https://explorer.blockstack.org/address/1FZPsTSx1N4CxLLk6vPKF8p4VumMyk4E2D