MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Reaper",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "1856": {
                "pageid": 1856,
                "ns": 0,
                "title": "React",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "React is a medium-sized framework that is a great fit for developing website front ends.  It combines HTML, JavaScript, (S)CSS into JSX Components that track \"props and state\".  It can increase your website development productivity pretty quickly.  Especially with the addition of npm modules, which literally do everything under the Sun.  (like, four times over, sadly...)\n\nIt can stumble through reactivity when combined with bootstrap to give mediocre mobile support with moderate code changes (I don't love bootstrap on phones, tbh).\n\nMy meta framework of choice is [[Vite]].  I used it to develop a [https://bitpost.com/news/2023/2023-d3-reactive-responsive-skeleton/ 2023 D3 skeleton project].\n\n== Patterns ==\n\n* Use ES6 modules, destructuring/spread, functional components\n* Precisely use Promises and async/await to accomplish [https://github.com/moodboom/Reusable/blob/master/JavaScript/scrap/promises.js CHAIN, PARALLEL, and BATCH processing]\n* Understand and abide by PROP and STATE best practices\n* Add and remove modules properly using npm rather than editing package*.json\n npm install # on new environments\n npm i --save newly-needed-component\n npm i --dev newly-needed-dev-only-component\n npm remove no-longer-needed-component\n* Bootstrap works well for breakpoint-based management of 12 columns; direct use of flex and grid is MUCH more powerful and should be considered for any complex layout\n\n== Issues ==\n* I built an Array of objects with some JSX.  It would NOT allow me to use find() on it.  Weird."
                    }
                ]
            },
            "1444": {
                "pageid": 1444,
                "ns": 0,
                "title": "Reading a binary file",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "<code>\n\n   // EXAMPLES\n   /*\n   #include <iostream>\n   #include <fstream>\n   using namespace std;\n\n   int main(void)\n   {\n      const unsigned int Matrix_Rows = 256;\n      const unsigned int Matrix_Cols = 256;\n      unsigned char area_matrix[Matrix_Rows * Matrix_Cols];\n      unsigned char pointers_matrix[Matrix_Rows][Matrix_Cols];\n      ifstream data_file(\"filename\", ios::binary);\n\n      // Reading an area of bytes \n      data_file.read(area_matrix, sizeof(area_matrix));\n\n      // Rewinding the input file \n      data_file.clear(); // just in case.\n      data_file.seekg(0);\n\n      // Reading a two-dimensional array of bytes \n      for (unsigned int i = 0; i < Matrix_Rows; ++i)\n      {\n      data_file.read(pointers_matrix[i],\n                     Matrix_Cols);\n      }\n\n      return 0;\n   } \n\n   #include &ltfstream>\n   #include &ltctime>\n   #include &ltstring>\n   #include &ltvector>\n\n   using namespace std;\n\n   int main()\n   {\n   std::ifstream in(\"pp1.txt\",std::ios::binary);\n   if (!in)\n   {\n      std::cout << \"problem with file open\" << std::endl;\n      return 0;\n   }\n\n   clock_t c1,c2;\n\n   c1 = clock();\n\n   in.seekg(0,std::ios::end);\n   unsigned long length = in.tellg();\n   in.seekg(0,std::ios::beg);\n\n      vector< char > vTmp(length+1,0);\n      in.read(&vTmp[0],length);\n\n      string str;\n      str.reserve(length);\n      str.assign(&vTmp[0],&vTmp[0]+length); // no NULL at end\n     \n\n   c2 = clock();\n\n   std::cout << static_cast< double >(c2-c1)/static_cast< double >(CLOCKS_PER_SEC) << std::endl;\n\n   return 0;\n   }\n\n   directly into std::string\n\n   #include &ltiostream>\n   #include &ltfstream>\n   #include &ltctime>\n   #include &ltstring>\n\n   using namespace std;\n\n   int main()\n   {\n   std::ifstream in(\"pp1.txt\",std::ios::binary);\n   if (!in)\n   {\n   std::cout << \"problem with file open\" << std::endl;\n   return 0;\n   }\n\n   clock_t c1,c2;\n\n   c1 = clock();\n\n   in.seekg(0,std::ios::end);\n   unsigned long length = in.tellg();\n   in.seekg(0,std::ios::beg);\n\n   string str(length,0);\n   std::copy( std::istreambuf_iterator< char >(in) ,\n   std::istreambuf_iterator< char >() ,\n   str.begin() );\n\n\n   c2 = clock();\n\n   std::cout << static_cast< double >(c2-c1)/static_cast< double >(CLOCKS_PER_SEC) << std::endl;\n\n   return 0;\n   }\n   */\n\n\n</code>"
                    }
                ]
            }
        }
    }
}