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 <map> | |
#include <utility> | |
#include <sstream> | |
#include <iostream> | |
#include <fstream> | |
// #include <pair> | |
using namespace std; |
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 ETNode { | |
public: | |
char value; | |
ETNode *left, *right; | |
ETNode(char value_); | |
ETNode(char value_, ETNode* left_, ETNode* right_); | |
}; | |
// A very simple expression tree class that converts a parenthesized input | |
// consisting of addition and multiplication operations, into an expression tree. |
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
input[ 0 ] = '2' | |
st = [ ] | |
t = { 'value': '2' } | |
input[ 1 ] = '+' | |
st = [ | |
{ 'value': '2' } ] | |
t = { 'value': '+' } | |
input[ 2 ] = '(' |
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 "Expression_Tree.h" | |
#include <iostream> | |
#include <stack> | |
#include <string> | |
#include <iomanip> | |
using namespace std; | |
bool isDigit(char ch) { | |
return (ch >='0' && ch <= '9'); | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# BEGIN Derwent qTranslatex mods | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^(en|fr)(/.*|)$ $2 [L,NC,R=301] | |
</IfModule> | |
# END Derwent qTranslatex mods |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
import time | |
import re | |
# import pyuarm | |
import yaml | |
from pprint import pformat |
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 pyperclip, pprint; pyperclip.copy( pprint.pformat( @cursor ) ) |
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
from pygments import highlight; from pygments.lexers import PythonLexer; from pygments.formatters import Terminal256Formatter; from pprint import pformat; print(highlight(pformat( @cursor ), PythonLexer(), Terminal256Formatter())) |
OlderNewer