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
/** | |
* Transform a single bison item to named references | |
* | |
* For example to transform only "c_decl" | |
* | |
* node transform.js Source/CParse/parser.y c_decl Source/CParse/parser.y | |
*/ | |
const fs = require('fs'); |
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 <Magick++.h> | |
#include <exception> | |
#include <functional> | |
#include <string> | |
typedef std::function<const char *()> MakeErr; | |
class LambdaException : public std::exception { | |
MakeErr get_err; |
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 <iostream> | |
int main() { | |
auto err = std::logic_error("some error"); | |
std::cout << err.what() << std::endl; | |
// using the derived copy constructor | |
std::logic_error err2 = err; | |
std::cout << err2.what() << std::endl; |
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
<wps:Execute service="WPS" version="1.0.0" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0/../wpsExecute_request.xsd" language="en-US"> | |
<!-- template-version: 0.21 --> | |
<ows:Identifier>hello-nodejs</ows:Identifier> | |
<wps:DataInputs> | |
<wps:Input> | |
<ows:Identifier>S</ows:Identifier> | |
<wps:Data> | |
<wps:LiteralData dataType="string">Garga</wps:LiteralData> | |
</wps:Data> | |
</wps:Input> |
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
{ | |
resolve: { | |
alias: { | |
'react-native$': 'react-native-web', | |
'../Utilities/Platform': 'react-native-web/dist/exports/Platform', | |
'../../Utilities/Platform': 'react-native-web/dist/exports/Platform', | |
'./Platform': 'react-native-web/dist/exports/Platform' | |
} | |
} | |
} |
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
const fns = [ | |
(x) => x + 1.1, | |
(x) => x + 1.1, | |
]; | |
const array = new Float64Array(1e3); | |
for (let i = 0; i < array.length; i++) | |
array[i] = -5 + 10 * (i / (array.length - 1)); | |
let r; |
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
const input = new Float64Array(1e6); | |
const output = new Float64Array(1e6); | |
// We are applying this function to every element from | |
// input to output | |
const fn = (x) => x * x + 2 * x + 1; | |
// This also serves as a cache warm-up | |
for (let i = 0; i < input.length; i++) | |
input[i] = i; |
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 <functional> | |
#include <stdio.h> | |
#include <gdal/gdal.h> | |
#include <chrono> | |
inline double GetSrcVal(const void *pSource, GDALDataType eSrcType, size_t ii) { | |
switch (eSrcType) { | |
case GDT_Unknown: return 0; | |
case GDT_Byte: return static_cast<const GByte *>(pSource)[ii]; | |
case GDT_UInt16: return static_cast<const GUInt16 *>(pSource)[ii]; |
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 <stdio.h> | |
#include <vector> | |
struct S { | |
int a; | |
}; | |
int main() { | |
std::vector<S> v; |
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
for (const ex of Object.keys(examples)) { | |
examples[ex].component = import(/* webpackPrefetch: true */ | |
`./examples/${examples[ex].file}.tsx`) | |
.then((comp) => comp.default); | |
examples[ex].code = import( /* webpackPrefetch: true */ | |
`!!raw-loader!./examples/${examples[ex].file}.tsx`) | |
.then((code) => code.default); | |
} |
NewerOlder