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
| SCENARIO("initialize rewind", "[rewind]") { | |
| GIVEN( "an uninitialised environment") { | |
| int rc; | |
| MDB_env *env; | |
| MDB_dbi dbi; | |
| MDB_txn *txn; | |
| WHEN("an environment is created and opened") { | |
| REQUIRE(SuccessFrom(mdb_env_create(&env))); | |
| REQUIRE(SuccessFrom(mdb_env_set_mapsize(env, size_t(1048576000)))); |
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
| TEST_CASE("initialize rewind", "[rewind]") { | |
| int rc; | |
| MDB_env *env; | |
| MDB_dbi dbi; | |
| MDB_txn *txn; | |
| SECTION("create and open an environment") { | |
| REQUIRE(SuccessFrom(mdb_env_create(&env))); | |
| REQUIRE(SuccessFrom(mdb_env_set_mapsize(env, size_t(1048576000)))); |
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
| trait Square { | |
| fn size(&self) -> f64; | |
| fn perimeter(&self) -> f64; | |
| } | |
| trait Circle { | |
| fn radius(&self) -> f64; | |
| fn perimeter(&self) -> f64; | |
| } |
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 fitz # needs: pip install pymupdf | |
| import re | |
| import sys | |
| import glob | |
| import os | |
| def extract_toc_from_pdf(pdf_path, output_path=None): | |
| """ | |
| Extract table of contents from PDF based on large bold headings. |
OlderNewer