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
#!/bin/bash | |
if [ ! -f Makefile -a "$1" != "-C" ]; then | |
if [ -f build/Makefile ]; then | |
/usr/bin/make -C build "$@" | |
elif [ -f CMakeLists.txt ]; then | |
( mkdir build && cd build && cmake .. && make "$@" ) | |
else | |
echo "No Makefile, build/Makefile or CMakeLists.txt found." >&2 | |
exit 1 | |
fi |
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
#include <iostream> | |
#include <fstream> | |
#include <map> | |
#include <set> | |
#include <vector> | |
#include <algorithm> | |
struct line { | |
std::string file; | |
size_t line_number; |
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
query("hello"); | |
// executes q("hello"); | |
query("delete where x =", x); | |
// executes q("delete where x = % ", x); | |
query("delete where x =", x, "and a = 5"); | |
// executes q("delete where x = % and a = 5", x); | |
query("delete where x =", x, "and a =", y); |
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
int const * a = nullptr; |
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
= translation_unit | |
declarations | |
* declarations | |
declaration | |
| primary_expression | |
primary_expression_literal | |
primary_expression_this | |
expression_in_parentheses |
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
int main() {} |
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
template<typename R, int p> | |
struct ratio_power { | |
private: | |
using S = typename std::ratio_multiply<R, R>::type; | |
public: | |
using type = typename std::ratio_multiply< | |
typename ratio_power<R, p%2>::type, | |
typename ratio_power<S, p/2>::type | |
>::type; | |
constexpr static intmax_t num = type::num; |
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
class input { | |
// ... | |
/// Read the next character, but put it back. | |
/** | |
* \warning peek() does not work like std::istream::peek(). | |
* This function will actually take the next character from | |
* the stream, and the object returned by peek() will put it back | |
* when it is destroyed, unless take() was called on that object. |
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
#include <array> | |
#include <iostream> | |
#include <stdexcept> | |
#include <string> | |
#include <cstdint> | |
/// An UTF-8 encoded character. | |
class utf8_char { | |
private: |
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
$fs=1; | |
$fa=1; | |
servo_l = 24; | |
servo_w = 13; | |
servo_h = 21; | |
bolt_hole_diameter = 4.5; | |
servo_axis_diameter = 4; |
OlderNewer