file_hexsha
stringlengths
40
40
chunk_index
int64
0
3.61k
content
stringlengths
1
512
language
stringclasses
285 values
split
stringclasses
1 value
file_total_chunks
int64
1
3.61k
file_max_stars_repo_licenses
stringclasses
615 values
file_max_forks_repo_licenses
stringclasses
614 values
file_max_issues_repo_licenses
stringclasses
611 values
00003a50b085c0f8c1a8cdaf1902823ebdd67a02
9
(param i32 i32) local.get 0 local.get 1 i32.const 5 call_indirect (type 0) ) (func (;6;) (type 2) (param i32) local.get 0 i32.const 6 call_indirect (type 2) ) (func (;7;) (type 2) (param i32) local.get 0 i32.const 7 call_indirect (type 2) ...
WebAssembly
train
19
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
00003a50b085c0f8c1a8cdaf1902823ebdd67a02
10
l_indirect (type 3) ) (func (;10;) (type 2) (param i32) local.get 0 i32.const 10 call_indirect (type 2) ) (table (;0;) 11 11 funcref) (export "0" (func 0)) (export "1" (func 1)) (export "2" (func 2)) (export "3" (func 3)) (export "4" (func 4)) (export "5" (func ...
WebAssembly
train
19
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
00003a50b085c0f8c1a8cdaf1902823ebdd67a02
11
(type (;0;) (func (param i32 i32))) (type (;1;) (func (param i32 i32 i32))) (type (;2;) (func (param i32))) (type (;3;) (func (param i32))) (import "" "0" (func (;0;) (type 0))) (import "" "1" (func (;1;) (type 0))) (import "" "2" (func (;2;) (type 1))) (import "" "3" (func (;3;) (type 0))...
WebAssembly
train
19
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
00003a50b085c0f8c1a8cdaf1902823ebdd67a02
12
nc (;8;) (type 2))) (import "" "9" (func (;9;) (type 3))) (import "" "10" (func (;10;) (type 2))) (import "" "$imports" (table (;0;) 11 11 funcref)) (elem (;0;) (i32.const 0) func 0 1 2 3 4 5 6 7 8 9 10) ) (instance (;1;) (instantiate (module 1))) (alias export (instance 0) "a" (func (;0;))) (al...
WebAssembly
train
19
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
00003a50b085c0f8c1a8cdaf1902823ebdd67a02
13
export (instance 0) "f" (func (;5;))) (alias export (instance 1) "3" (func (;6;))) (alias export (instance 1) "4" (func (;7;))) (alias export (instance 1) "5" (func (;8;))) (alias export (instance 0) "j" (func (;9;))) (alias export (instance 1) "6" (func (;10;))) (alias export (instance 1) "7" (func (;11;))...
WebAssembly
train
19
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
00003a50b085c0f8c1a8cdaf1902823ebdd67a02
14
)) (func (;16;) (canon.lower (func 0))) (func (;17;) (canon.lower (func 4))) (func (;18;) (canon.lower (func 5))) (func (;19;) (canon.lower (func 9))) (func (;20;) (canon.lower (func 13))) (instance (;2;) core (export "a" (func 16)) (export "b" (func 1)) (export "c" (func 2)) (export "d" (func 3)) (export "...
WebAssembly
train
19
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
00003a50b085c0f8c1a8cdaf1902823ebdd67a02
15
)) (export "n" (func 20)) (export "o" (func 14)) (export "p" (func 15))) (instance (;3;) (instantiate (module 0) (with "foo" (instance 2)))) (alias export (instance 1) "$imports" (table (;0;))) (alias export (instance 0) "b" (func (;21;))) (alias export (instance 0) "c" (func (;22;))) (alias export (instance ...
WebAssembly
train
19
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
00003a50b085c0f8c1a8cdaf1902823ebdd67a02
16
0) "k" (func (;27;))) (alias export (instance 0) "l" (func (;28;))) (alias export (instance 0) "m" (func (;29;))) (alias export (instance 0) "o" (func (;30;))) (alias export (instance 0) "p" (func (;31;))) (func (;32;) (canon.lower utf8 (into (instance 3)) (func 21))) (func (;33;) (canon.lower utf8 (into (i...
WebAssembly
train
19
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
00003a50b085c0f8c1a8cdaf1902823ebdd67a02
17
(instance 3)) (func 25))) (func (;37;) (canon.lower (into (instance 3)) (func 26))) (func (;38;) (canon.lower (into (instance 3)) (func 27))) (func (;39;) (canon.lower utf8 (into (instance 3)) (func 28))) (func (;40;) (canon.lower (into (instance 3)) (func 29))) (func (;41;) (canon.lower utf8 (into (instance...
WebAssembly
train
19
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
00003a50b085c0f8c1a8cdaf1902823ebdd67a02
18
c 34)) (export "3" (func 35)) (export "4" (func 36)) (export "5" (func 37)) (export "6" (func 38)) (export "7" (func 39)) (export "8" (func 40)) (export "9" (func 41)) (export "10" (func 42))) (instance (;5;) (instantiate (module 2) (with "" (instance 4)))) )
WebAssembly
train
19
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
00005f02c736cc234e813a243f0e6feea90d9822
0
/* +------------------------------------------------------------------------+ | Phalcon Framework | +------------------------------------------------------------------------+ | Copyright (c) 2011-2015 Phalcon Team (http://www.phalconphp.com) | +----------...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
1
| | | | If you did not receive a copy of the license and are unable to | | obtain it through the world-wide-web, please send an email | | to license@phalconphp.com so we can send you a copy immediately. ...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
2
r@phalconphp.com> | +------------------------------------------------------------------------+ */ namespace Phalcon\Forms; use Phalcon\Tag; use Phalcon\Forms\Exception; use Phalcon\Validation\Message; use Phalcon\Validation\MessageInterface; use Phalcon\Validation\Message\Group; use Phalcon\...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
3
d _name; protected _value; protected _label; protected _attributes; protected _validators; protected _filters; protected _options; protected _messages; /** * Phalcon\Forms\Element constructor * * @param string name * @param array attributes */ public function __construct(string name, var attr...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
4
m to the element */ public function setForm(<Form> form) -> <ElementInterface> { let this->_form = form; return this; } /** * Returns the parent form to the element */ public function getForm() -> <ElementInterface> { return this->_form; } /** * Sets the element name */ public function setNam...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
5
/** * Sets the element filters * * @param array|string filters * @return \Phalcon\Forms\ElementInterface */ public function setFilters(var filters) -> <ElementInterface> { if typeof filters != "string" && typeof filters != "array" { throw new Exception("Wrong filter type added"); } let this->_filte...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
6
_filters; if typeof filters == "array" { let this->_filters[] = filter; } else { if typeof filters == "string" { let this->_filters = [filters, filter]; } else { let this->_filters = [filter]; } } return this; } /** * Returns the element filters * * @return mixed */ public functi...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
7
blic function addValidators(array! validators, boolean merge = true) -> <ElementInterface> { var currentValidators, mergedValidators; if merge { let currentValidators = this->_validators; if typeof currentValidators == "array" { let mergedValidators = array_merge(currentValidators, validators); } else...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
8
ValidatorInterface> validator) -> <ElementInterface> { let this->_validators[] = validator; return this; } /** * Returns the validators registered for the element */ public function getValidators() -> <ValidatorInterface[]> { return this->_validators; } /** * Returns an array of prepared attributes...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
9
tes = null, boolean useChecked = false) { var value, name, widgetAttributes, mergedAttributes, defaultAttributes, currentValue; let name = this->_name; /** * Create an array of parameters */ if typeof attributes != "array" { let widgetAttributes = []; } else { let widgetAttributes = attribut...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
10
let mergedAttributes = array_merge(defaultAttributes, widgetAttributes); } else { let mergedAttributes = widgetAttributes; } /** * Get the current element value */ let value = this->getValue(); /** * If the widget has a value set it as default value */ if value !== null { if useChecked...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
11
e, mergedAttributes["value"] { if currentValue == value { let mergedAttributes["checked"] = "checked"; } } else { /** * Evaluate the current value and mark the check as checked */ if value { let mergedAttributes["checked"] = "checked"; } let mergedAttributes["va...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
12
ribute * @param mixed value * @return \Phalcon\Forms\ElementInterface */ public function setAttribute(string attribute, value) -> <ElementInterface> { let this->_attributes[attribute] = value; return this; } /** * Returns the value of an attribute if present * * @param string attribute * @param m...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
13
, attributes[attribute] { return value; } return defaultValue; } /** * Sets default attributes for the element */ public function setAttributes(array! attributes) -> <ElementInterface> { let this->_attributes = attributes; return this; } /** * Returns the default attributes for the element */...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
14
ts an option for the element * * @param string option * @param mixed value * @return \Phalcon\Forms\ElementInterface */ public function setUserOption(string option, value) -> <ElementInterface> { let this->_options[option] = value; return this; } /** * Returns the value of an option if present * ...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
15
n] { return value; } return defaultValue; } /** * Sets options for the element * * @param array options * @return \Phalcon\Forms\ElementInterface */ public function setUserOptions(options) -> <ElementInterface> { let this->_options = options; return this; } /** * Returns the options for t...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
16
Interface> { let this->_label = label; return this; } /** * Returns the element label */ public function getLabel() -> string { return this->_label; } /** * Generate the HTML to label the element * * @param array attributes * @return string */ public function label(var attributes = null) -...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
17
rnalAttributes["id"] { let name = this->_name; } if typeof attributes == "array" { if !isset attributes["for"] { let attributes["for"] = name; } } else { let attributes = ["for": name]; } let code = Tag::renderAttributes("<label", attributes); /** * Use the default label or leave the s...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
18
ts a default value in case the form does not use an entity * or there is no value available for the element in _POST * * @param mixed value * @return \Phalcon\Forms\ElementInterface */ public function setDefault(value) -> <ElementInterface> { let this->_value = value; return this; } /** * Returns t...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
19
ublic function getValue() { var name, form, value; let name = this->_name, value = null; /** * Get the related form */ let form = this->_form; if typeof form == "object" { /** * Gets the possible value for the widget */ let value = form->getValue(name); /** * Check if the tag...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
20
ble */ if typeof value == "null" { let value = this->_value; } return value; } /** * Returns the messages that belongs to the element * The element needs to be attached to a form */ public function getMessages() -> <Group> { return this->_messages; } /** * Checks whether there are message...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
21
unction setMessages(<Group> group) -> <ElementInterface> { let this->_messages = group; return this; } /** * Appends a message to the internal message list */ public function appendMessage(<MessageInterface> message) -> <ElementInterface> { this->_messages->appendMessage(message); return this; } /*...
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00005f02c736cc234e813a243f0e6feea90d9822
22
ing renders the widget without atttributes */ public function __toString() -> string { return this->{"render"}(); } }
Zephir
train
23
["BSD-3-Clause"]
["BSD-3-Clause"]
["BSD-3-Clause"]
00008a7b065bedf5ff67bb72fb37d892727db059
0
{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 8, "minor" : 1, "revision" : 11, "architecture" : "x64", "modernui" : 1 } , "classnamespace" : "box", "rect" : [ 592.0, 301.0, 540.0, 384.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, "default_...
Max
train
10
["MIT"]
["MIT"]
["MIT"]
00008a7b065bedf5ff67bb72fb37d892727db059
1
le" : 1, "lefttoolbarpinned" : 2, "toptoolbarpinned" : 2, "righttoolbarpinned" : 2, "bottomtoolbarpinned" : 2, "toolbars_unpinned_last_save" : 15, "tallnewobj" : 0, "boxanimatetime" : 200, "enablehscroll" : 1, "enablevscroll" : 1, "devicewidth" : 0.0, "description" : "", "digest" : "", "tags" ...
Max
train
10
["MIT"]
["MIT"]
["MIT"]
00008a7b065bedf5ff67bb72fb37d892727db059
2
"id" : "obj-18", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 77.0, 201.0, 118.0, 20.0 ], "presentation_linecount" : 2, "text" : "Transmits uint8_t list" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "o...
Max
train
10
["MIT"]
["MIT"]
["MIT"]
00008a7b065bedf5ff67bb72fb37d892727db059
3
{ "fontname" : "Arial", "id" : "obj-15", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 191.0, 293.0, 49.0, 22.0 ] } } , { "box" : { "fontname" : "Arial", "id" ...
Max
train
10
["MIT"]
["MIT"]
["MIT"]
00008a7b065bedf5ff67bb72fb37d892727db059
4
0, 22.0 ] } } , { "box" : { "fontname" : "Arial", "id" : "obj-13", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 77.0, 293.0, 49.0, 22.0 ] } } , { "box" : ...
Max
train
10
["MIT"]
["MIT"]
["MIT"]
00008a7b065bedf5ff67bb72fb37d892727db059
5
"patching_rect" : [ 20.0, 293.0, 49.0, 22.0 ] } } , { "box" : { "fontname" : "Arial", "id" : "obj-10", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 4, "outlettype" : [ "int", "int", "int", "int" ], "patching_rect" : [ 20.0, 245.0, 190.0, 22.0 ], "te...
Max
train
10
["MIT"]
["MIT"]
["MIT"]
00008a7b065bedf5ff67bb72fb37d892727db059
6
ttype" : [ "" ], "patching_rect" : [ 20.0, 200.0, 41.0, 22.0 ], "text" : "ht.f2bi" } } , { "box" : { "border" : 0, "filename" : "helpdetails.js", "id" : "obj-7", "ignoreclick" : 1, "jsarguments" : [ "ht.f2bi" ], "maxclass" : "jsui", "numinlets" : 1, "...
Max
train
10
["MIT"]
["MIT"]
["MIT"]
00008a7b065bedf5ff67bb72fb37d892727db059
7
"format" : 6, "id" : "obj-3", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 20.0, 155.0, 50.0, 22.0 ] } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-12", 0...
Max
train
10
["MIT"]
["MIT"]
["MIT"]
00008a7b065bedf5ff67bb72fb37d892727db059
8
"destination" : [ "obj-14", 0 ], "source" : [ "obj-10", 2 ] } } , { "patchline" : { "destination" : [ "obj-15", 0 ], "source" : [ "obj-10", 3 ] } } , { "patchline" : { "destination" : [ "obj-9", 0 ], "source" : [ "obj-3", 0 ] } } , { "pa...
Max
train
10
["MIT"]
["MIT"]
["MIT"]
00008a7b065bedf5ff67bb72fb37d892727db059
9
esources", "type" : "TEXT", "implicit" : 1 } , { "name" : "ht.f2bi.mxo", "type" : "iLaX" } ], "autosave" : 0, "styles" : [ { "name" : "tap", "default" : { "fontname" : [ "Lato Light" ] } , "parentstyle" : "", "multi" : 0 } ] } }
Max
train
10
["MIT"]
["MIT"]
["MIT"]
00009eb4fcdce7aac5bb372e9e67a68d57d26f62
0
[ .paths | to_entries[] | .key as $path | .value | to_entries[] # Only process path infos with GVK (methods) and ignore deprecated. | .value["x-kubernetes-group-version-kind"]? as $gvk | select($gvk != null and (.value.description | test("deprecated: "; "i") | not)) # Keep group and version from path beca...
JSONiq
train
3
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
00009eb4fcdce7aac5bb372e9e67a68d57d26f62
1
) as $gv | (if $gv.coreVersion != null then "\($gv.coreVersion)" else "\($gv.group)/\($gv.version)" end) as $apiGroupVersion # Fall back to method name. | (.value["x-kubernetes-action"] // .key) as $verb | { path: $path, verb: (if $verb == "post" then "create" elif $verb == "put" then "update" else $ver...
JSONiq
train
3
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
00009eb4fcdce7aac5bb372e9e67a68d57d26f62
2
ource: ($path | test("\\{name\\}/")), consumes: (.value.consumes? // ["*/*"] | join(", ")), produces: (.value.produces? // ["*/*"] | join(", ")), # Plural name. Includes a subresource name like in `APIResourceList`. name: ( $path | sub("^/apis?/\($apiGroupVersion)/(?:namespaces/\\{namespace\...
JSONiq
train
3
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
0000a2df2adb6abcc4dd8adbe32d72b228bd92c3
0
class ClassicWeapDef_9mmDual extends KFWeapDef_9mmDual; static function string GetItemLocalization( string KeyName ) { return class'KFWeapDef_9mmDual'.Static.GetItemLocalization(KeyName); } DefaultProperties { WeaponClassPath="KFClassicMode.ClassicWeap_Pistol_Dual9mm" BuyPrice=150 AmmoPricePerMag=20 ...
UnrealScript
train
1
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
0000be22d1abf02b811e80cf620d3fbe29804aee
0
{ "spawn_weight": { "dandelion_moobloom": 10, "poppy_moobloom": 10, "blue_orchid_moobloom": 10, "allium_moobloom": 10, "oxeye_daisy_moobloom": 10, "cornflower_moobloom": 10, "wither_rose_moobloom": 80, "suncower": 10, "bambmoo": 60, "cluckshroom": 10 }, "auto_block_spawning": { // If mooblooms ...
JSON5
train
1
["MIT"]
["MIT"]
["MIT"]
0000bf4c9a8c69de25b7821439fdfd76ffa6a8da
0
global int GL_MAJOR = 0; global int GL_MINOR = 0; fn gladLoad{{ feature_set.api|api }}(load : Loader) bool { glGetString = cast(typeof(glGetString))load("glGetString"); if(glGetString is null) { return false; } if(glGetString(GL_VERSION) is null) { return false; } find_core{{ feature_set.api|api }}()...
Volt
train
6
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
0000bf4c9a8c69de25b7821439fdfd76ffa6a8da
1
ons %} load_{{ extension.name }}(load); {% endfor %} return GL_MAJOR != 0 || GL_MINOR != 0; } private { private fn!C strstr(const(char)*, const(char)*) char*; private fn!C strcmp(const(char)*, const(char)*) i32; private fn!C strncmp(const(char)*, const(char)*, size_t) i32; private fn!C strlen(const(char...
Volt
train
6
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
0000bf4c9a8c69de25b7821439fdfd76ffa6a8da
2
terminator : const(char)*; if(extensions is null || ext is null) { return false; } while(1) { loc = strstr(extensions, ext); if(loc is null) { return false; } terminator = loc + strlen(ext); if((loc...
Volt
train
6
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
0000bf4c9a8c69de25b7821439fdfd76ffa6a8da
3
} else { int num; glGetIntegerv(GL_NUM_EXTENSIONS, &num); for(u32 i=0; i < cast(u32)num; i++) { if(strcmp(cast(const(char)*)glGetStringi(GL_EXTENSIONS, i), ext) == 0) { return true; } } } return false; } fn find_core{{ feature_set.a...
Volt
train
6
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
0000bf4c9a8c69de25b7821439fdfd76ffa6a8da
4
i : int; glversion : const(char)*; prefixes : const(char)*[] = [ "OpenGL ES-CM ".ptr, "OpenGL ES-CL ".ptr, "OpenGL ES ".ptr, "OpenGL SC ".ptr, ]; glversion = cast(const(char)*)glGetString(GL_VERSION); if (glversion is null) return; foreach(prefix; prefixes) { ...
Volt
train
6
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
0000bf4c9a8c69de25b7821439fdfd76ffa6a8da
5
] - '0'; minor : i32 = glversion[2] - '0'; GL_MAJOR = major; GL_MINOR = minor; {% for feature in feature_set.features %} {{ feature.name }} = (major == {{ feature.version.major }} && minor >= {{ feature.version.minor }}) || major > {{ feature.version.major }}; {% endfor %} return; } fn find_ext...
Volt
train
6
["Apache-2.0"]
["Apache-2.0"]
["Apache-2.0"]
0000ca275571f65f1b8780ce7da72acf41e4f98f
0
#include "isx/isx.iss" [Setup] AppName=testApp AppVersion=1.0.0 DefaultDirName={pf}\testApp [code] procedure example1(); var hJson: Integer; a: Integer; pi: Single; greeting: AnsiString; str: AnsiString; begin str := '{ "a":5, "foo":{ "greeting": "hello" }, "pi":3.141516 }'; if (not ISX_JsonParse...
Inno-Setup
train
4
["MIT"]
["MIT"]
["MIT"]
0000ca275571f65f1b8780ce7da72acf41e4f98f
1
)) then exit; a := 2*a; pi := pi/2; greeting := greeting + ' world !'; if (not ISX_JsonInt(hJson, 'a', 1, a)) then exit; if (not ISX_JsonFloat(hJson, 'pi', 1, pi)) then exit; if (not ISX_JsonString(hJson, 'foo.greeting', 1, greeting)) then exit; if (not ISX_JsonStringify(hJson, str)) then exit; Lo...
Inno-Setup
train
4
["MIT"]
["MIT"]
["MIT"]
0000ca275571f65f1b8780ce7da72acf41e4f98f
2
ISX_JsonParse('[]', hArray); for i := 0 to 10 do begin a := i*10; ISX_JsonIntFromIdx(hArray, i, 1, a); end; ISX_JsonStringify(hArray, str); Log(str); // [0,10,20,30,40,50,60,70,80,90,100] count := ISX_JsonSize(hArray) ISX_JsonIntFromIdx(hArray, count/2, 0, a); Log(IntToStr(a)) // 50 end...
Inno-Setup
train
4
["MIT"]
["MIT"]
["MIT"]
0000ca275571f65f1b8780ce7da72acf41e4f98f
3
1, j1); ISX_JsonParse('{"c":1, "d":2}', j2); ISX_JsonObj(hJson, 'B', 1, j2); ISX_JsonStringify(hJson, str); Log(str); // {"A":{"a":1,"b":2},"B":{"c":1,"d":2}} ISX_JsonObj(hJson, 'B', 0, j3); ISX_JsonStringify(j3, str); Log(str); // {"c":1,"d":2} end; function InitializeSetup(): Boolean; begin Result...
Inno-Setup
train
4
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
0
= Rodauth Rodauth is Ruby's most advanced authentication framework, designed to work in any rack application. It's built using Roda and Sequel, but it can be used with other web frameworks, database libraries, and databases. When used with PostgreSQL, MySQL, and Microsoft SQL Server in the default configuration, it ...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
1
methods, and offers both an HTML and JSON API for all supported features. == Design Goals * Security: Ship in a maximum security by default configuration * Simplicity: Allow for easy configuration via a DSL * Flexibility: Allow for easy overriding of any part of the framework == Features * Login * Logout * Change P...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
2
* Email Authentication (Passwordless login via email link) * WebAuthn (Multifactor authentication via WebAuthn) * WebAuthn Login (Passwordless login via WebAuthn) * WebAuthn Verify Account (Passwordless WebAuthn Setup) * OTP (Multifactor authentication via TOTP) * Recovery Codes (Multifactor authentication via backup c...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
3
Password Grace Period (Don't require password entry if recently entered) * Password Complexity (More sophisticated checks) * Password Pepper * Disallow Password Reuse * Disallow Common Passwords * Password Expiration * Account Expiration * Session Expiration * Active Sessions (Prevent session reuse after logout, allow ...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
4
esource Sharing) * Update Password Hash (when hash cost changes) * HTTP Basic Auth * Change Password Notify == Resources Website :: http://rodauth.jeremyevans.net Demo Site :: http://rodauth-demo.jeremyevans.net Source :: http://github.com/jeremyevans/rodauth Bugs :: http://github.com/jeremyevans/rodauth/issues Googl...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
5
use. These are development dependencies instead of runtime dependencies in the gem as it is possible to run without them: tilt :: Used by all features unless in JSON API only mode. rack_csrf :: Used for CSRF support if the :csrf=>:rack_csrf plugin option is given (the default is to use Roda's route_csrf ...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
6
dden for custom authentication. mail :: Used by default for mailing in the reset password, verify account, verify_login_change, change_password_notify, lockout, and email_auth features. rotp :: Used by the otp feature rqrcode :: Used by the otp feature jwt :: Used by the jwt feature webauthn :: Used by ...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
7
d hashes, with the user running the application unable to get direct access to password hashes. This reduces the risk of an attacker being able to access password hashes and use them to attack other sites. The rest of this section describes this feature in more detail, but note that Rodauth does not require this feat...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
8
e you are using. Passwords are hashed using bcrypt, and the password hashes are kept in a separate table from the accounts table, with a foreign key referencing the accounts table. Two database functions are added, one to retrieve the salt for a password, and the other to check if a given password hash matches the pa...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
9
to read the password hashes. The other account handles password hashes and is referred to as the +ph+ account. The +ph+ account sets up the database functions that can retrieve the salt for a given account's password, and check if a password hash matches for a given account. The +ph+ account sets these functions up ...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
10
e the +app+ account is not be able to read password hashes, it is still be able to insert password hashes, update passwords hashes, and delete password hashes, so the additional security is not that painful. By disallowing the +app+ account access to the password hashes, it is much more difficult for an attacker to ac...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
11
hes stems from the fact that people tend to choose poor passwords and reuse passwords, so a compromise of one database containing password hashes can result in account access on other sites, making password hash storage of critical importance even if the other data stored is not that important. If you are storing othe...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
12
ail auth, verify login change, remember, and lockout tokens all use a similar approach. They all provide a token, in the format "account-id_long-random-string". By including the id of the account in the token, an attacker can only attempt to bruteforce the token for a single account, instead of being able to brutefor...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
13
risk of timing attacks. == HMAC By default, for backwards compatibility, Rodauth does not use HMACs, but you are strongly encouraged to use the +hmac_secret+ configuration method to set an HMAC secret. Setting an HMAC secret will enable HMACs for additional security, as described below. === email_base feature All...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
14
make it so if the tokens in the database are leaked (e.g. via an SQL injection vulnerability), they will not be usable without also having access to the +hmac_secret+. Without an HMAC, the raw token is sent in the email, and if the tokens in the database are leaked, they will be usable. To allow for an graceful trans...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
15
ecurity that +hmac_secret+ adds. Most features that send email have tokens that expire by default in 1 day. The exception is the verify_account feature, which has tokens that do not expire. For the verify_account feature, if the user requested an email before +hmac_secret+ was set, after +allow_raw_email_token+ is n...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
16
ase feature, this uses HMACs for remember tokens, while storing the raw tokens in the database. This makes it so if the raw tokens in the database are leaked, the remember tokens are not usable without knowledge of the +hmac_secret+. The +raw_remember_token_deadline+ configuration method can be set to allow a previou...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
17
eadline is 14 days after the token is created, so this should be set to 14 days after the time you enable the HMAC for the remember feature if you are using the defaults. === otp feature Setting +hmac_secret+ will provide HMACed OTP keys to users, and would store the raw OTP keys in the database. This will make so i...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
18
nsition for existing users. When introducing +hmac_secret+ to a Rodauth installation that already uses the otp feature, you will have to either revoke and replace all OTP keys, set +otp_keys_use_hmac?+ to false and continue to use raw OTP keys, or override +otp_keys_use_hmac?+ to return false if the user was issued an ...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
19
true, Rodauth will also ensure during OTP setup that the OTP key was generated by the server. If +otp_keys_use_hmac?+ is false, any OTP key in a valid format will be accepted during setup. If +otp_keys_use_hmac?+ is true, the jwt and otp features are in use and you are setting up OTP via JSON requests, you need to f...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
20
request to setup OTP, along with a valid OTP auth code for the +otp_secret+. === webauthn feature Setting +hmac_secret+ is required to use the webauthn feature, as it is used for checking that the provided authentication challenges have not been modified. === active_sessions feature Setting +hmac_secret+ is requir...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
21
the session will be an HMACed. This does not affect security, as the session itself should at the least by protected by an HMAC (if not encrypted). This is only done for consistency, so that the raw tokens in the database are distinct from the tokens provided to the users. To allow for a graceful transition, +allow_r...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
22
1. database superuser account (usually postgres) 2. +app+ account (same name as application) 3. +ph+ account (application name with +_password+ appended) The database superuser account is used to load extensions related to the database. The application should never be run using the database superuser account. === C...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
23
best to name this account the same as the database name. You should also create the +ph+ database account which will handle access to the password hashes. Example for PostgreSQL: createuser -U postgres ${DATABASE_NAME} createuser -U postgres ${DATABASE_NAME}_password Note that if the database superuser account...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
24
= Create database In general, the +app+ account is the owner of the database, since it will own most of the tables: createdb -U postgres -O ${DATABASE_NAME} ${DATABASE_NAME} Note that this is not the most secure way to develop applications. For maximum security, you would want to use a separate database account a...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
25
yond the scope of Rodauth, though. === Load extensions If you want to use the login features for Rodauth, you need to load the citext extension if you want to support case insensitive logins. Example: psql -U postgres -c "CREATE EXTENSION citext" ${DATABASE_NAME} Note that on Heroku, this extension can be loaded...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
26
he migration below to use +String+ instead of +citext+ for the email in that case. === Using non-default schema PostgreSQL sets up new tables in the public schema by default. If you would like to use separate schemas per user, you can do: psql -U postgres -c "DROP SCHEMA public;" ${DATABASE_NAME} psql -U postgre...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
27
${DATABASE_NAME} psql -U postgres -c "GRANT USAGE ON SCHEMA ${DATABASE_NAME} TO ${DATABASE_NAME}_password;" ${DATABASE_NAME} psql -U postgres -c "GRANT USAGE ON SCHEMA ${DATABASE_NAME}_password TO ${DATABASE_NAME};" ${DATABASE_NAME} You'll need to modify the code to load the extension to specify the schema: psq...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
28
create_table(:account_password_hashes) do foreign_key :id, Sequel[:${DATABASE_NAME}][:accounts], :primary_key=>true, :type=>:Bignum String :password_hash, :null=>false end Rodauth.create_database_authentication_functions(self, :table_name=>"${DATABASE_NAME}_password.account_password_hashes") # if usin...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
29
], :type=>:Bignum String :password_hash, :null=>false end Rodauth.create_database_previous_password_check_functions(self, :table_name=>"${DATABASE_NAME}_password.account_previous_password_hashes") You'll also need to use the following Rodauth configuration methods so that the app account calls functions in a s...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
30
sallow_password_reuse feature: previous_password_hash_table Sequel[:${DATABASE_NAME}_password][:account_previous_password_hashes] == MySQL Database Setup MySQL does not have the concept of object owners, and MySQL's GRANT/REVOKE support is much more limited than PostgreSQL's. When using MySQL, it is recommended to ...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
31
'; CREATE USER '${DATABASE_NAME}_password'@'localhost' IDENTIFIED BY '${OTHER_PASSWORD}'; GRANT ALL ON ${DATABASE_NAME}.* TO '${DATABASE_NAME}_password'@'localhost' WITH GRANT OPTION; You should run all migrations as the +ph+ account, and GRANT specific access to the +app+ account as needed. Adding the database f...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
32
ncept of database owners, but similar to MySQL usage it's recommended to use the +ph+ account as the superuser for the database, and have it GRANT permissions to the +app+ account: CREATE LOGIN rodauth_test WITH PASSWORD = 'rodauth_test'; CREATE LOGIN rodauth_test_password WITH PASSWORD = 'rodauth_test'; CREATE ...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
33
should run all migrations as the +ph+ account, and GRANT specific access to the +app+ account as needed. == Creating tables Because two different database accounts are used, two different migrations are required, one for each database account. Here are example migrations. You can modify them to add support for addi...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
34
ver this should be run with the +ph+ account. Note that these migrations require Sequel 4.35.0+. Sequel.migration do up do extension :date_arithmetic # Used by the account verification and close account features create_table(:account_statuses) do Integer :id, :primary_key=>true ...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
35
e(:accounts) do primary_key :id, :type=>:Bignum foreign_key :status_id, :account_statuses, :null=>false, :default=>1 if db.database_type == :postgres citext :email, :null=>false constraint :valid_email, :email=>/^[^,;@ \r\n]+@[^,@; \r\n]+\.[^,@; \r\n]+$/ index :emai...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
36
ys| if database_type == :mysql {:null=>false} else {:null=>false, :default=>Sequel.date_add(Sequel::CURRENT_TIMESTAMP, :days=>days)} end end # Used by the audit logging feature json_type = case database_type when :postgres :jsonb when :s...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
37
d, :accounts, :null=>false, :type=>:Bignum DateTime :at, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP String :message, :null=>false column :metadata, json_type index [:account_id, :at], :name=>:audit_account_at_idx index :at, :name=>:audit_at_idx end # Used by t...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
38
ateTime :deadline, deadline_opts[1] DateTime :email_last_sent, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP end # Used by the jwt refresh feature create_table(:account_jwt_refresh_keys) do primary_key :id, :type=>:Bignum foreign_key :account_id, :accounts, :null=>false, :...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
39
ount verification feature create_table(:account_verification_keys) do foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum String :key, :null=>false DateTime :requested_at, :null=>false, :default=>Sequel::CURRENT_TIMESTAMP DateTime :email_last_sent, :null=>false, :default...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
40
:type=>:Bignum String :key, :null=>false String :login, :null=>false DateTime :deadline, deadline_opts[1] end # Used by the remember me feature create_table(:account_remember_keys) do foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum String :key, ...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]
0000f5be6ebb1f837d4949a5362dd4d127230b18
41
imary_key=>true, :type=>:Bignum Integer :number, :null=>false, :default=>1 end create_table(:account_lockouts) do foreign_key :id, :accounts, :primary_key=>true, :type=>:Bignum String :key, :null=>false DateTime :deadline, deadline_opts[1] DateTime :email_last_sent ...
RDoc
train
112
["MIT"]
["MIT"]
["MIT"]