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
8..|93.|..2 846|937|152 | |
..9|...|.4. 319|625|847 | |
7.2|1..|96. 752|184|963 | |
---+---+--+ ---+---+--+ | |
2..|...|.9. 285|713|694 | |
.6.|...|.7. 463|859|271 | |
.7.|..6|..5 971|246|385 | |
---+---+--- ---+---+--- | |
.27|..8|4.6 127|598|436 |
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
8..|93.|..2 846|937|152 | |
..9|...|.4. 319|625|847 | |
7.2|1..|96. 752|184|963 | |
---+---+--+ ---+---+--+ | |
2..|...|.9. 285|713|694 | |
.6.|...|.7. 463|859|271 | |
.7.|..6|..5 971|246|385 | |
---+---+--- ---+---+--- | |
.27|..8|4.6 127|598|436 |
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
800|930|002 | |
009|000|040 | |
702|100|960 | |
---+---+--+ | |
200|000|090 | |
060|000|070 | |
070|006|005 | |
---+---+--- | |
027|008|406 | |
030|000|500 |
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 <assert.h> | |
#include <stdint.h> | |
#include <iostream> | |
// From fxtbook.pdf | |
uint64_t binomial(uint64_t n, uint64_t k) | |
{ | |
if ( k>n ) return 0; | |
if ( (k==0) || (k==n) ) return 1; | |
if ( 2*k > n ) k = n-k; // use symmetry |
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
In file included from main.cpp:1: | |
In file included from ../boost-trunk/boost/spirit/include/qi.hpp:16: | |
In file included from ../boost-trunk/boost/spirit/home/qi.hpp:14: | |
In file included from ../boost-trunk/boost/spirit/home/qi/action.hpp:14: | |
In file included from ../boost-trunk/boost/spirit/home/qi/action/action.hpp:16: | |
../boost-trunk/boost/spirit/home/qi/detail/attributes.hpp:153:9: error: ambiguous partial specializations of 'transform_attribute<boost::fusion::extension::adt_attribute_proxy<DoubleInt, 0, false>, double, boost::spirit::qi::domain, void>' | |
: transform_attribute<Exposed, Transformed, qi::domain> | |
^ | |
../boost-trunk/boost/spirit/home/qi/nonterminal/rule.hpp:293:26: note: in instantiation of template class 'boost::spirit::traits::transform_attribute<boost::fusion::extension::adt_attribute_proxy<DoubleInt, 0, false> &, double, boost::spirit::qi::domain, void>' requested here | |
typename transform::type attr_ = transform::pre(made_attr); |
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
rm -f adapt_adt adapt_struct | |
g++ -DADAPT_STRUCT -std=c++11 *.cpp -o adapt_struct | |
g++ -std=c++11 *.cpp -o adapt_adt | |
In file included from /usr/include/boost/spirit/home/qi/action/action.hpp:16:0, | |
from /usr/include/boost/spirit/home/qi/action.hpp:14, | |
from /usr/include/boost/spirit/home/qi.hpp:14, | |
from /usr/include/boost/spirit/include/qi.hpp:16, | |
from main.cpp:1: | |
/usr/include/boost/spirit/home/qi/detail/attributes.hpp: In instantiation of ‘struct boost::spirit::traits::transform_attribute<boost::fusion::extension::adt_attribute_proxy<DoubleInt, 0, false>&, double, boost::spirit::qi::domain, void>’: | |
/usr/include/boost/spirit/home/qi/nonterminal/rule.hpp:292:42: required from ‘bool boost::spirit::qi::rule<Iterator, T1, T2, T3, T4>::parse(Iterator&, const Iterator&, Context&, const Skipper&, Attribute&) const [with Context = boost::spirit::context<boost::fusion::cons<DoubleInt&, boost::fusion::nil>, boost::fusion::vector0<> >; Skipper = boost::sp |
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 <boost/spirit/include/qi.hpp> | |
#include <boost/spirit/include/qi_numeric.hpp> | |
#include <boost/spirit/include/support_adapt_adt_attributes.hpp> | |
#include <boost/fusion/adapted.hpp> | |
#include <iostream> | |
#include <string> | |
class DoubleInt | |
{ |
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 d97e8d6b58053d66dc7447be49a9023b379c1ac9 Mon Sep 17 00:00:00 2001 | |
From: Johannes Laire <johannes@laire.fi> | |
Date: Sun, 15 Apr 2012 21:01:46 +0300 | |
Subject: [PATCH] [S02] typo fix | |
--- | |
S02-bits.pod | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/S02-bits.pod b/S02-bits.pod |
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 f90e8cd65c14bfe60cfdecf520f1a6e71c0da210 Mon Sep 17 00:00:00 2001 | |
From: Johannes Laire <johannes@laire.fi> | |
Date: Sun, 8 Apr 2012 02:42:02 +0300 | |
Subject: [PATCH] vm: Fix free_verifier_state() | |
--- | |
vm/verifier.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/vm/verifier.c b/vm/verifier.c |
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
$ cat Batman.java | |
public class Batman { | |
public static void main(String[] args) { | |
for (int i = 0; i < 8; ++i) System.out.print(0.0/0); | |
System.out.println(" Batman!"); | |
} | |
} | |
$ javac Batman.java | |
$ java Batman | |
NaNNaNNaNNaNNaNNaNNaNNaN Batman! |
NewerOlder