1) Drop views and partials anywhere in app/views
|-- app | `-- views | `-- shared | `-- angular_views | |-- foo | | `-- view3.html.haml
| #include "anillo.h" | |
| #include "aed2_tests.h" | |
| template<typename T> | |
| string to_s(const Anillo<T>* a) { | |
| ostringstream os; | |
| os << *a; | |
| return os.str(); | |
| } |
| #ifndef AED2_TESTS_ | |
| #define AED2_TESTS_ | |
| #include <iostream> | |
| #include <sstream> | |
| using namespace std; | |
| string mt_bool_to_s(bool b) { return b ? "true" : "false"; } | |
| #define MT_MAKE_ERROR(lhs, rhs, line) { ostringstream os;os << "error en linea " << (line) << endl;os << " se esperaba: " << (rhs) << endl;os << " se obtuvo: " << (lhs);throw os.str(); } | |
| void mt_assert(bool lhs, bool rhs, int line) { if (lhs != rhs) { MT_MAKE_ERROR(mt_bool_to_s(lhs), mt_bool_to_s(rhs), line) } } |
| require 'rexml/document' | |
| class SVG | |
| def initialize(width, height) | |
| @doc = REXML::Document.new | |
| @doc << REXML::XMLDecl.new | |
| @svg = @doc.add_element 'svg' | |
| @svg.add_attribute 'xmlns', 'http://www.w3.org/2000/svg' | |
| @svg.add_attribute 'width', width |
| class ScopedCache | |
| attr_reader :name | |
| def initialize(cache, name, options = nil) | |
| @cache = cache | |
| @name = name | |
| @options = options | |
| end | |
| def read(key) |
| #ifndef MINI_TEST | |
| #define MINI_TEST | |
| /* | |
| Mini Test for C++ | |
| author: Brian J. Cardiff | |
| 1. Create simple test cases. |
1) Drop views and partials anywhere in app/views
|-- app | `-- views | `-- shared | `-- angular_views | |-- foo | | `-- view3.html.haml
| macro collect_alias_method(method, type) | |
| def {{method}} | |
| res = [] of {{type}} | |
| {{method}} do |e| | |
| res << e | |
| end | |
| res | |
| end | |
| end |
| require 'date' | |
| target = ARGV[1] || "." | |
| files = %x(git grep -n 'TODO*' #{target}) | |
| lines = [] | |
| length_author = 0 | |
| length_file = 0 |
Experiment for wkhtmltopdf
brew install wkhtmltopdf
crystal wkhtmltopdf.cr
known issue: althout conversion succeeds the wkhtmltopdf process seems to hanging in the very end :-(
Compiling
crystal build main.cr
will change Settings declaration in main.cr from
class Settings