Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
This file contains hidden or 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
let get_xy = (x, y, radius, angle) => { | |
let rad = Math.PI / 180 * angle; | |
return { | |
x: Math.round(x + Math.cos(rad) * radius), | |
y: Math.round(y + Math.sin(rad) * radius) | |
}; | |
}; | |
let generate_flower = (x, y, radius, angle_base) => { | |
let str = ''; |
This file contains hidden or 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
/* http://meyerweb.com/eric/tools/css/reset/ | |
v2.0-modified | 20110126 | |
License: none (public domain) | |
*/ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, |
This file contains hidden or 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 re | |
# input is a list of tokens (token is a number or operator) | |
tokens = raw_input() | |
# remove whitespace | |
tokens = re.sub('\s+', '', tokens) | |
# split by addition/subtraction operators | |
tokens = re.split('(-|\+)', tokens) |
NewerOlder