file stringlengths 16 94 | text stringlengths 32 24.4k | vector list |
|---|---|---|
javascript/reference/global_objects/uint8array/tobase64/index.md | JavaScript - Global Objects - Uint8Array - toBase64:
The `toBase64()` method of `Uint8Array` instances returns a base64-encoded string based on the data in this `Uint8Array` object.
This method should be preferred over `Window.btoa()`, especially if you already have a `Uint8Array` holding the object, because you don'... | [
-0.028114566579461098,
0.0310762207955122,
-0.8690857887268066,
1.0001232624053955,
0.10197433084249496,
-1.520867109298706,
0.3970036506652832,
0.04323798790574074,
0.17904213070869446,
0.2850879728794098,
-0.8266085386276245,
0.8994910717010498,
0.6651924848556519,
0.2042352855205536,
... |
javascript/reference/global_objects/uint8array/tobase64/index.md | JavaScript - Global Objects - Uint8Array - toBase64 - Syntax:
Example:
toBase64()
toBase64(options) | [
0.17503011226654053,
0.4345247149467468,
-0.7774888277053833,
0.7785083651542664,
-0.4715575575828552,
-2.021409749984741,
0.3286989629268646,
0.4401624798774719,
0.09194431453943253,
-0.43457651138305664,
-0.8039276599884033,
0.34468522667884827,
0.4831796884536743,
-0.02484304830431938,
... |
javascript/reference/global_objects/uint8array/tobase64/index.md | JavaScript - Global Objects - Uint8Array - toBase64 - Syntax - Parameters:
- `options` (optional): An object customizing the base64 string format. It can contain the following properties:
- `alphabet` (optional): A string specifying the base64 alphabet to use. It can be one of the following:
- `"base64"` (defaul... | [
0.08925222605466843,
-0.1642344743013382,
-1.0151045322418213,
0.6550268530845642,
0.21962028741836548,
-2.4080586433410645,
1.0290534496307373,
0.24775849282741547,
0.629452109336853,
-0.43733444809913635,
-1.3792729377746582,
0.2758929133415222,
-0.2023475617170334,
0.08982354402542114,
... |
javascript/reference/global_objects/uint8array/tobase64/index.md | JavaScript - Global Objects - Uint8Array - toBase64 - Syntax - Return value:
A base64-encoded string representing the data in the `Uint8Array`. | [
-0.15781114995479584,
-0.4027705192565918,
-1.2892099618911743,
0.17413115501403809,
-0.26006248593330383,
-2.129163980484009,
-0.0055638086050748825,
0.4922429025173187,
0.05526595935225487,
0.11076908558607101,
-0.8888757824897766,
1.1309266090393066,
0.04976300522685051,
0.4995984137058... |
javascript/reference/global_objects/uint8array/tobase64/index.md | JavaScript - Global Objects - Uint8Array - toBase64 - Syntax - Exceptions:
- `TypeError`: Thrown in one of the following cases:
- The `options` object is not an object or `undefined`.
- The `options.alphabet` is not of the expected values or `undefined`. | [
-0.28236135840415955,
-0.36661383509635925,
-0.919544517993927,
0.7079703211784363,
-0.2250903695821762,
-1.4711588621139526,
0.1494336575269699,
0.7270708680152893,
-0.1555512398481369,
-0.2984543740749359,
-0.48188671469688416,
-0.3830580413341522,
0.24728304147720337,
-0.266664206981658... |
javascript/reference/global_objects/uint8array/tobase64/index.md | JavaScript - Global Objects - Uint8Array - toBase64 - Examples - Encoding binary data:
This example uses the default `alphabet` and `omitPadding` options to encode data from a `Uint8Array` into a base64 string.
Example:
const uint8Array = new Uint8Array([29, 233, 101, 161]);
console.log(uint8Array.toBase64()); // "H... | [
-0.2972909212112427,
-0.21908734738826752,
-0.8698009848594666,
0.6427028775215149,
0.3300364017486572,
-1.7904682159423828,
0.02988397143781185,
-0.19168873131275177,
-0.0843832939863205,
0.20503714680671692,
-1.32429838180542,
0.3969956934452057,
0.4727350175380707,
-0.3426497280597687,
... |
javascript/reference/global_objects/uint8array/tobase64/index.md | JavaScript - Global Objects - Uint8Array - toBase64 - Examples - Encoding data without padding:
Example:
const uint8Array = new Uint8Array([29, 233, 101, 161]);
console.log(uint8Array.toBase64({ omitPadding: true })); // "HelloQ" | [
-0.7439798712730408,
-0.2551731765270233,
-0.3212715983390808,
0.23113155364990234,
-0.20465146005153656,
-1.6310499906539917,
0.06851542741060257,
-0.4848116636276245,
-0.5111891031265259,
0.05058867484331131,
-1.1092840433120728,
-0.12982521951198578,
0.43654659390449524,
-0.026254851371... |
javascript/reference/global_objects/uint8array/tobase64/index.md | JavaScript - Global Objects - Uint8Array - toBase64 - Examples - Encoding data with URL-safe alphabet:
This example populates a `URLSearchParams` object with a base64-encoded string using the URL-safe alphabet.
Example:
const uint8Array = new Uint8Array([46, 139, 222, 255, 42, 46]);
const base64 = uint8Array.toBase6... | [
-0.6584945917129517,
-0.12395467609167099,
-0.7407046556472778,
0.6019453406333923,
0.10991987586021423,
-1.0614055395126343,
-0.3717056214809418,
-0.6131750345230103,
-0.23526403307914734,
0.10728421062231064,
-0.9548974633216858,
0.7665579915046692,
0.5424549579620361,
-0.829558968544006... |
javascript/reference/global_objects/uint8array/tobase64/index.md | JavaScript - Global Objects - Uint8Array - toBase64 - Examples - Stream encoding:
This example is adapted from the original proposal, showcasing how to implement streaming in userland. It mimics the `TextEncoder` API with the `stream` option.
Example:
class Base64Encoder {
#extra;
#extraLength;
constructor() {... | [
-0.2804182171821594,
-0.04645046219229698,
-0.33155524730682373,
0.21184314787387848,
0.802412748336792,
-0.4053405523300171,
-0.23559892177581787,
0.5213332176208496,
-0.1456376314163208,
0.44187018275260925,
-0.056453172117471695,
0.3758692145347595,
-0.24127766489982605,
0.3537544012069... |
javascript/reference/global_objects/uint8array/uint8array/index.md | JavaScript - Global Objects - Uint8Array:
The `Uint8Array()` constructor creates `Uint8Array` objects. The contents are initialized to `0` unless initialization data is explicitly provided. | [
-0.33203884959220886,
0.0749090313911438,
-0.7846015095710754,
1.0837253332138062,
-0.5327447056770325,
-1.417641282081604,
-0.49201369285583496,
0.9196022152900696,
-0.752688467502594,
0.24891293048858643,
-0.35768479108810425,
-0.27097195386886597,
0.19452165067195892,
-0.254866510629653... |
javascript/reference/global_objects/uint8array/uint8array/index.md | JavaScript - Global Objects - Uint8Array - Syntax:
Example:
new Uint8Array()
new Uint8Array(length)
new Uint8Array(typedArray)
new Uint8Array(object)
new Uint8Array(buffer)
new Uint8Array(buffer, byteOffset)
new Uint8Array(buffer, byteOffset, length)
Note: `Uint8Array()` can only be constructed with `new`. Attempti... | [
-0.8338339328765869,
0.2664029598236084,
-1.0292038917541504,
0.013266649097204208,
-0.10490701347589493,
-1.7269049882888794,
-0.8146230578422546,
1.2198671102523804,
-0.257476806640625,
0.10544869303703308,
0.12334121018648148,
0.5522928237915039,
0.6439939737319946,
0.4384561777114868,
... |
javascript/reference/global_objects/uint8array/uint8array/index.md | JavaScript - Global Objects - Uint8Array - Syntax - Parameters:
See `TypedArray`. | [
0.23199568688869476,
0.006184861995279789,
-1.0403032302856445,
0.13913019001483917,
-0.5623093843460083,
-1.2160776853561401,
-0.16140970587730408,
1.2572762966156006,
-0.45958560705184937,
0.3832989037036896,
-0.24647581577301025,
0.02340918779373169,
0.6594972014427185,
0.38964506983757... |
javascript/reference/global_objects/uint8array/uint8array/index.md | JavaScript - Global Objects - Uint8Array - Syntax - Exceptions:
See `TypedArray`. | [
-0.10065395385026932,
-0.34292367100715637,
-0.7409822344779968,
0.42644748091697693,
-0.6778834462165833,
-1.6149652004241943,
-0.5638573169708252,
1.368461012840271,
-0.7232339382171631,
0.14562280476093292,
0.04766565188765526,
-0.3775649070739746,
0.3791482448577881,
0.3771999180316925... |
javascript/reference/global_objects/uint8array/uint8array/index.md | JavaScript - Global Objects - Uint8Array - Examples - Different ways to create a Uint8Array:
Example:
// From a length
const uint8 = new Uint8Array(2);
uint8[0] = 42;
console.log(uint8[0]); // 42
console.log(uint8.length); // 2
console.log(uint8.BYTES_PER_ELEMENT); // 1
// From an array
const x = new Uint8Array([21,... | [
-0.1297071874141693,
-0.15729090571403503,
-1.1687089204788208,
0.528952956199646,
0.018996812403202057,
-0.8278695940971375,
-0.9345278143882751,
0.5988530516624451,
-0.3078649938106537,
0.12760625779628754,
0.14403606951236725,
0.42725324630737305,
-0.2146572470664978,
0.0679619833827018... |
javascript/reference/global_objects/uint8array/frombase64/index.md | JavaScript - Global Objects - Uint8Array - fromBase64:
The `Uint8Array.fromBase64()` static method creates a new `Uint8Array` object from a base64-encoded string.
This method should be preferred over `Window.atob()` because it results in a byte array, which is easier to work with than a string containing raw bytes, u... | [
0.14239796996116638,
-0.4382683336734772,
-1.4260903596878052,
1.253025770187378,
0.30464857816696167,
-1.5892964601516724,
0.33533596992492676,
-0.03627907857298851,
0.40760958194732666,
0.473154753446579,
-1.077305793762207,
0.30845704674720764,
0.31420382857322693,
0.04945888742804527,
... |
javascript/reference/global_objects/uint8array/frombase64/index.md | JavaScript - Global Objects - Uint8Array - fromBase64 - Syntax:
Example:
Uint8Array.fromBase64(string)
Uint8Array.fromBase64(string, options) | [
0.16099026799201965,
-0.017978578805923462,
-0.7588930726051331,
0.5613667368888855,
-0.5026435256004333,
-2.114398717880249,
0.4387504756450653,
0.22351323068141937,
0.013269596733152866,
-0.17495380342006683,
-0.5726873278617859,
0.16828082501888275,
0.31365734338760376,
-0.3597109317779... |
javascript/reference/global_objects/uint8array/frombase64/index.md | JavaScript - Global Objects - Uint8Array - fromBase64 - Syntax - Parameters:
- `string`: A base64 string encoding bytes to convert to a `Uint8Array`. The string must only contain characters in the base64 alphabet, which includes A–Z, a–z, 0–9, and two special characters, which are either `+` and `/` (if using `alphabe... | [
0.17023251950740814,
0.11830669641494751,
-0.39595404267311096,
0.5725504755973816,
1.1763867139816284,
-0.5486002564430237,
0.059858452528715134,
0.532698929309845,
-0.03739017993211746,
-0.16246822476387024,
-0.040384404361248016,
0.5622518658638,
0.31420236825942993,
0.3296871781349182,... |
javascript/reference/global_objects/uint8array/frombase64/index.md | JavaScript - Global Objects - Uint8Array - fromBase64 - Syntax - Return value:
A new `Uint8Array` object containing the decoded bytes from the base64-encoded string. | [
0.14985761046409607,
-0.2756638824939728,
-1.399907112121582,
0.29731684923171997,
-0.10359768569469452,
-1.6370028257369995,
0.06143724173307419,
0.45864802598953247,
0.05712571740150452,
0.10205572843551636,
-0.8340581059455872,
0.7800358533859253,
0.26598402857780457,
0.3663051724433899... |
javascript/reference/global_objects/uint8array/frombase64/index.md | JavaScript - Global Objects - Uint8Array - fromBase64 - Syntax - Exceptions:
- `SyntaxError`: Thrown if the input string contains characters outside the specified alphabet, or if the last chunk does not satisfy the `lastChunkHandling` option.
- `TypeError`: Thrown in one of the following cases:
- The input string is... | [
-0.5567102432250977,
-0.42682331800460815,
-0.1395028531551361,
0.6948080658912659,
-0.038116972893476486,
-1.9176839590072632,
0.2654455900192261,
0.4364365041255951,
-0.2675129473209381,
-0.14317721128463745,
-0.3868831396102905,
-0.02022445946931839,
-0.20873834192752838,
-0.31833237409... |
javascript/reference/global_objects/uint8array/frombase64/index.md | JavaScript - Global Objects - Uint8Array - fromBase64 - Examples - Decoding a base64 string:
This example uses the default `alphabet` and `lastChunkHandling` options to decode a base64 string. Note that:
- The whitespace in the space is ignored.
- The string has 14 base64 characters, not a multiple of 4. This is only... | [
0.2562800347805023,
-0.24635151028633118,
-0.86722731590271,
0.39597034454345703,
0.5448566675186157,
-1.330605149269104,
0.819577157497406,
-0.6399151086807251,
-0.11470101773738861,
0.21424292027950287,
-1.037177562713623,
0.44687706232070923,
0.144343763589859,
0.19618594646453857,
0.... |
javascript/reference/global_objects/uint8array/frombase64/index.md | JavaScript - Global Objects - Uint8Array - fromBase64 - Examples - Decoding a URL-safe base64 string:
This example uses the `alphabet` option to decode a URL-safe base64 string.
Example:
const uint8Array = Uint8Array.fromBase64("PGI-TUROPC9iPg", {
alphabet: "base64url",
});
console.log(uint8Array); // Uint8Array(1... | [
-0.30477654933929443,
-0.0341070294380188,
-0.786811888217926,
0.15467436611652374,
0.00477934442460537,
-1.2897645235061646,
0.19041256606578827,
-0.595026969909668,
-0.09722059965133667,
0.2912595868110657,
-0.7335056662559509,
0.5594462156295776,
0.10946619510650635,
-0.6198465824127197... |
javascript/reference/global_objects/uint8array/frombase64/index.md | JavaScript - Global Objects - Uint8Array - fromBase64 - Examples - Decoding a base64 string with strict last chunk handling:
This example uses the `lastChunkHandling` option to decode a base64 string, where the last chunk must be exactly 4 characters long with padding `=` characters, and the overflow bits must be 0.
... | [
0.57999187707901,
-0.16745074093341827,
-0.2949641942977905,
0.7834205627441406,
0.27379634976387024,
-1.7300348281860352,
0.19912627339363098,
-0.5874043703079224,
-0.5079221725463867,
0.42659956216812134,
-0.8312016129493713,
0.2848610579967499,
0.43557044863700867,
0.12610867619514465,
... |
javascript/reference/global_objects/uint8array/frombase64/index.md | JavaScript - Global Objects - Uint8Array - fromBase64 - Examples - Decoding a base64 string with partial last chunk handling:
This example uses the `lastChunkHandling` option to decode a base64 string, ignoring any partial last chunk.
Example:
// The last chunk is complete
const array1 = Uint8Array.fromBase64("PGI+ ... | [
0.13776032626628876,
0.09877883642911911,
0.08750864863395691,
0.8830339312553406,
0.5794917345046997,
-0.4306907653808594,
0.5696752667427063,
0.3447572886943817,
0.23942914605140686,
0.11420252174139023,
-0.38761579990386963,
0.31371983885765076,
0.3599588871002197,
0.5634799599647522,
... |
javascript/reference/global_objects/uint8array/setfromhex/index.md | JavaScript - Global Objects - Uint8Array - setFromHex:
The `setFromHex()` method of `Uint8Array` instances populates this `Uint8Array` object with bytes from a hex-encoded string, returning an object indicating how many bytes were read and written.
This method parses the string into a byte array. To convert the strin... | [
-0.5831224918365479,
0.0021490766666829586,
-0.8116937279701233,
0.5379015803337097,
0.10536200553178787,
-1.8703521490097046,
0.1451537162065506,
0.16409911215305328,
-0.32826822996139526,
-0.09482220560312271,
-0.7883282899856567,
0.6199724674224854,
-0.16595366597175598,
-0.240382790565... |
javascript/reference/global_objects/uint8array/setfromhex/index.md | JavaScript - Global Objects - Uint8Array - setFromHex - Syntax:
Example:
setFromHex(string) | [
-0.6369798183441162,
0.190904438495636,
-0.7877235412597656,
0.13746966421604156,
-0.7785062193870544,
-2.3948144912719727,
0.12181397527456284,
0.5648068785667419,
-0.26729869842529297,
-0.47889405488967896,
-0.47033926844596863,
0.33936163783073425,
-0.04059021919965744,
0.00743893021717... |
javascript/reference/global_objects/uint8array/setfromhex/index.md | JavaScript - Global Objects - Uint8Array - setFromHex - Syntax - Parameters:
- `string`: A hexadecimal string encoding bytes to write into a `Uint8Array`. The string must: - Have an even number of characters because two characters encode one byte. - Only contain characters in the hexadecimal alphabet, which include... | [
-0.4522157609462738,
-0.10057719796895981,
-0.5805312991142273,
-0.014356949366629124,
0.6485255360603333,
-1.6664291620254517,
-0.028519950807094574,
0.19202814996242523,
0.27545490860939026,
-0.2621803879737854,
-0.6980977654457092,
0.6169614791870117,
-0.25411954522132874,
-0.2681786417... |
javascript/reference/global_objects/uint8array/setfromhex/index.md | JavaScript - Global Objects - Uint8Array - setFromHex - Syntax - Return value:
An object containing the following properties:
- `read`: The number of hex characters read from the input string. If the decoded data fits into the array, it is the length of the input string: otherwise, it is the number of complete hex ch... | [
-0.7437177896499634,
-0.008084558881819248,
-0.6430695652961731,
0.46822217106819153,
0.021194983273744583,
-1.6869776248931885,
0.03509281575679779,
0.14201636612415314,
-0.11255494505167007,
0.05041123554110527,
-0.2552129924297333,
0.7538984417915344,
-0.4133741855621338,
0.527544379234... |
javascript/reference/global_objects/uint8array/setfromhex/index.md | JavaScript - Global Objects - Uint8Array - setFromHex - Syntax - Exceptions:
- `SyntaxError`: Thrown if the input string contains characters outside the hex alphabet, or its length is odd.
- `TypeError`: Thrown if the input string is not a string. | [
-1.0444833040237427,
-0.17135024070739746,
-0.4961605966091156,
0.6247945427894592,
0.015256093814969063,
-2.4145169258117676,
-0.17485716938972473,
0.666670024394989,
-0.3693804144859314,
-0.31255489587783813,
-0.7518020868301392,
-0.16617955267429352,
-0.36431339383125305,
-0.43848127126... |
javascript/reference/global_objects/uint8array/setfromhex/index.md | JavaScript - Global Objects - Uint8Array - setFromHex - Examples - Decoding a hexadecimal string:
This example decodes a hexadecimal string into an existing `Uint8Array`.
Example:
const uint8Array = new Uint8Array(8);
const result = uint8Array.setFromHex("cafed00d");
console.log(result); // { read: 8, written: 4 }
c... | [
-0.4894172251224518,
-0.19371473789215088,
-0.3605283200740814,
0.3657856583595276,
0.19602219760417938,
-0.677463173866272,
0.386051744222641,
-0.10250584036111832,
0.0033790431916713715,
-0.3138885498046875,
0.06509578973054886,
0.2913491427898407,
0.35191449522972107,
0.4070359170436859... |
javascript/reference/global_objects/uint8array/setfromhex/index.md | JavaScript - Global Objects - Uint8Array - setFromHex - Examples - Decoding a big string into a small array:
If the string contains more data than the array can hold, the method will only write as many bytes as the array can hold.
Example:
const uint8Array = new Uint8Array(4);
const result = uint8Array.setFromHex("c... | [
-0.5723246335983276,
0.3867080807685852,
-0.48827415704727173,
0.5001607537269592,
0.46107494831085205,
-0.4696590304374695,
0.1169884204864502,
0.1532348394393921,
-0.43582502007484436,
-0.2447582632303238,
0.011508969590067863,
0.38092339038848877,
0.40009555220603943,
0.4183447659015655... |
javascript/reference/global_objects/uint8array/setfromhex/index.md | JavaScript - Global Objects - Uint8Array - setFromHex - Examples - Setting data at a specific offset:
The `setFromHex()` method always starts writing at the beginning of the `Uint8Array`. If you want to write to the middle of the array, you can write to a `TypedArray.prototype.subarray()` instead.
Example:
const uin... | [
-0.6012592911720276,
-0.2302294820547104,
-1.0519649982452393,
0.17872102558612823,
-0.16925914585590363,
-0.9592424631118774,
-0.6270785331726074,
0.9725483655929565,
-0.3264356553554535,
-0.07869761437177658,
-0.029142623767256737,
0.6709676384925842,
0.288305401802063,
-0.33086988329887... |
javascript/reference/global_objects/dataview/index.md | JavaScript - Global Objects - DataView:
The `DataView` view provides a low-level interface for reading and writing multiple number types in a binary `ArrayBuffer`, without having to care about the platform's endianness. | [
-0.6709810495376587,
-0.4460940361022949,
-1.2736680507659912,
-0.09995857626199722,
-0.5399469137191772,
-1.1025729179382324,
0.9513967037200928,
0.21477366983890533,
0.5134938359260559,
0.013998862355947495,
-1.3459587097167969,
-0.7578665018081665,
1.0772870779037476,
0.8296615481376648... |
javascript/reference/global_objects/dataview/index.md | JavaScript - Global Objects - DataView - Description - Endianness:
Multi-byte number formats are represented in memory differently depending on machine architecture — see Endianness for an explanation. `DataView` accessors provide explicit control of how data is accessed, regardless of the executing computer's endiann... | [
-0.49940934777259827,
-0.4508693516254425,
-0.8755624294281006,
-0.5656266808509827,
-1.1669262647628784,
-1.5343188047409058,
0.3818401098251343,
0.6878969073295593,
0.854072093963623,
0.05459405109286308,
-0.543846607208252,
-0.2222815901041031,
0.7650953531265259,
0.5900717973709106,
... |
javascript/reference/global_objects/dataview/index.md | JavaScript - Global Objects - DataView - Constructor:
- `DataView()`: Creates a new `DataView` object. | [
-1.5437575578689575,
-0.6280683279037476,
-0.8184840679168701,
-0.3817240297794342,
-0.5458812117576599,
-1.5722527503967285,
0.031139852479100227,
1.2019516229629517,
-0.10886340588331223,
-0.13951857388019562,
-0.3980398178100586,
-0.689505934715271,
0.4436466693878174,
0.583435952663421... |
javascript/reference/global_objects/dataview/index.md | JavaScript - Global Objects - DataView - Instance properties:
These properties are defined on `DataView.prototype` and shared by all `DataView` instances.
- `DataView.prototype.buffer`: Returns the `ArrayBuffer` referenced by the `DataView`.
- `DataView.prototype.byteLength`: Returns the length (in bytes) of the `Dat... | [
-0.25057581067085266,
-0.5647646188735962,
-0.7386857271194458,
0.0073510282672941685,
-0.3737400770187378,
-1.9016677141189575,
0.4629921019077301,
1.1277300119400024,
0.4525454640388489,
-0.07367925345897675,
-0.8829219341278076,
0.46932682394981384,
0.3077917695045471,
0.781294703483581... |
javascript/reference/global_objects/dataview/index.md | JavaScript - Global Objects - DataView - Instance methods:
- `DataView.prototype.getBigInt64()`: Reads 8 bytes starting at the specified byte offset of this `DataView` and interprets them as a 64-bit signed integer.
- `DataView.prototype.getBigUint64()`: Reads 8 bytes starting at the specified byte offset of this `Dat... | [
-0.3618749678134918,
-0.2276332527399063,
-0.39033931493759155,
0.28682568669319153,
0.5743952393531799,
-0.9818097352981567,
0.7042102813720703,
0.4584178924560547,
0.5350668430328369,
-0.32674476504325867,
-1.010038137435913,
0.22953256964683533,
-0.13479705154895782,
0.00902593415230512... |
javascript/reference/global_objects/dataview/index.md | JavaScript - Global Objects - DataView - Examples - Using DataView:
Example:
const buffer = new ArrayBuffer(16);
const view = new DataView(buffer, 0);
view.setInt16(1, 42);
view.getInt16(1); // 42 | [
-0.12564030289649963,
-0.25947219133377075,
-1.1960583925247192,
-0.11649121344089508,
-0.9422242641448975,
-1.0390112400054932,
0.2843492329120636,
0.6484861969947815,
0.875883162021637,
-0.00011461047688499093,
-0.27438637614250183,
0.3435148596763611,
0.7888906598091125,
0.5428482294082... |
javascript/reference/global_objects/dataview/buffer/index.md | JavaScript - Global Objects - DataView - buffer:
The `buffer` accessor property of `DataView` instances returns the `ArrayBuffer` or `SharedArrayBuffer` referenced by this view at construction time.
Example:
// Create an ArrayBuffer
const buffer = new ArrayBuffer(123);
// Create a view
const view = new DataView(buf... | [
-0.49118489027023315,
-0.5667613744735718,
-1.2436187267303467,
0.5279754996299744,
-0.5504815578460693,
-0.6190506219863892,
0.2901841104030609,
1.176016926765442,
0.8897072672843933,
0.3001636862754822,
-0.7615975141525269,
0.02833651937544346,
0.6606685519218445,
1.4336016178131104,
-... |
javascript/reference/global_objects/dataview/buffer/index.md | JavaScript - Global Objects - DataView - buffer - Description:
The `buffer` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the `DataView` is constructed and cannot be changed. | [
-1.148886799812317,
-0.008542065508663654,
-0.97300785779953,
-0.04918593168258667,
-0.37694767117500305,
-1.5161747932434082,
0.8460188508033752,
1.2800723314285278,
1.2445008754730225,
-0.29218319058418274,
-0.8152514696121216,
-0.3247363567352295,
-0.012385880574584007,
0.72116225957870... |
javascript/reference/global_objects/dataview/buffer/index.md | JavaScript - Global Objects - DataView - buffer - Examples - Using the buffer property:
Example:
const buffer = new ArrayBuffer(8);
const dataview = new DataView(buffer);
dataview.buffer; // ArrayBuffer { byteLength: 8 } | [
-0.5083968639373779,
-0.19342917203903198,
-0.956583559513092,
0.12522387504577637,
-0.9338803887367249,
-1.3429296016693115,
0.4143873453140259,
0.9900169372558594,
0.7638373374938965,
-0.17843057215213776,
-0.8454424142837524,
0.31507065892219543,
0.5444366335868835,
0.3081184923648834,
... |
javascript/reference/global_objects/dataview/getfloat16/index.md | JavaScript - Global Objects - DataView - getFloat16:
The `getFloat16()` method of `DataView` instances reads 2 bytes starting at the specified byte offset of this `DataView` and interprets them as a 16-bit floating point number. There is no alignment constraint; multi-byte values may be fetched from any offset within ... | [
-0.33675631880760193,
-0.8219659328460693,
-1.3561937808990479,
-0.9904403686523438,
-0.02938501164317131,
-0.8123225569725037,
0.06176197901368141,
0.48825278878211975,
0.7196869850158691,
-0.40352264046669006,
-0.2587974965572357,
0.5488543510437012,
0.1934375911951065,
0.728992283344268... |
javascript/reference/global_objects/dataview/getfloat16/index.md | JavaScript - Global Objects - DataView - getFloat16 - Syntax:
Example:
getFloat16(byteOffset)
getFloat16(byteOffset, littleEndian) | [
-1.2479497194290161,
-0.2053808867931366,
-1.355635404586792,
-1.2001992464065552,
-0.4254000186920166,
-1.8324064016342163,
-0.03352906182408333,
1.125626802444458,
-0.16934992372989655,
-0.47054123878479004,
0.6512811183929443,
0.7290863990783691,
-0.07424397766590118,
0.4433646202087402... |
javascript/reference/global_objects/dataview/getfloat16/index.md | JavaScript - Global Objects - DataView - getFloat16 - Syntax - Parameters:
- `byteOffset`: The offset, in bytes, from the start of the view to read the data from.
- `littleEndian` (optional): Indicates whether the data is stored in little- or big-endian format. If `false` or `undefined`, a big-endian value is read. | [
-0.6578599214553833,
-0.7258928418159485,
-1.5693767070770264,
-1.0973109006881714,
0.022165024653077126,
-1.6602108478546143,
0.5239067077636719,
0.7948019504547119,
0.21059143543243408,
-0.2964981496334076,
-0.3057508170604706,
0.3860274851322174,
-0.004873319063335657,
0.731689453125,
... |
javascript/reference/global_objects/dataview/getfloat16/index.md | JavaScript - Global Objects - DataView - getFloat16 - Syntax - Return value:
A floating point number from `-65504` to `65504`. | [
-0.48428502678871155,
-0.6118931174278259,
-1.360949158668518,
-1.4364128112792969,
-0.5396560430526733,
-1.8549082279205322,
0.17993555963039398,
1.4576642513275146,
-0.12407685071229935,
-0.31468144059181213,
0.0851471945643425,
1.0039997100830078,
-0.1648103892803192,
0.2245365381240844... |
javascript/reference/global_objects/dataview/getfloat16/index.md | JavaScript - Global Objects - DataView - getFloat16 - Syntax - Exceptions:
- `RangeError`: Thrown if the `byteOffset` is set such that it would read beyond the end of the view. | [
-0.8829236030578613,
-0.19498977065086365,
-1.0932523012161255,
-0.7038165330886841,
-0.12100083380937576,
-1.9791733026504517,
-0.06951633095741272,
1.0420953035354614,
-0.4664735198020935,
-0.43573373556137085,
0.4989016056060791,
0.31601789593696594,
-0.6428360342979431,
0.4368421733379... |
javascript/reference/global_objects/dataview/getfloat16/index.md | JavaScript - Global Objects - DataView - getFloat16 - Examples - Using getFloat16():
Example:
const { buffer } = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
const dataview = new DataView(buffer);
console.log(dataview.getFloat16(1)); // 0.00001537799835205078 | [
-1.089721918106079,
-0.08324632793664932,
-1.4825243949890137,
-0.8866605162620544,
-0.5293863415718079,
-1.047911524772644,
-0.5402402281761169,
0.5140301585197449,
0.17155902087688446,
-0.12915009260177612,
0.5123056173324585,
0.24723629653453827,
0.1570637822151184,
0.6161590814590454,
... |
javascript/reference/global_objects/dataview/getbiguint64/index.md | JavaScript - Global Objects - DataView - getBigUint64:
The `getBigUint64()` method of `DataView` instances reads 8 bytes starting at the specified byte offset of this `DataView` and interprets them as a 64-bit unsigned integer. There is no alignment constraint; multi-byte values may be fetched from any offset within b... | [
-0.26798805594444275,
-0.6825498342514038,
-1.065415620803833,
-0.3042859435081482,
-0.07882581651210785,
0.019085634499788284,
-0.17918305099010468,
-0.13653166592121124,
0.43327200412750244,
0.11047102510929108,
-0.7955188751220703,
0.20808295905590057,
0.36178651452064514,
0.62478381395... |
javascript/reference/global_objects/dataview/getbiguint64/index.md | JavaScript - Global Objects - DataView - getBigUint64 - Syntax:
Example:
getBigUint64(byteOffset)
getBigUint64(byteOffset, littleEndian) | [
-0.7161353826522827,
-0.11332904547452927,
-1.0118895769119263,
-0.5870261788368225,
-0.4348081350326538,
-1.4032878875732422,
-0.3321234881877899,
0.6245282292366028,
-0.08096998184919357,
-0.05082964897155762,
-0.330680251121521,
0.2999447286128998,
0.5437726974487305,
0.4653055965900421... |
javascript/reference/global_objects/dataview/getbiguint64/index.md | JavaScript - Global Objects - DataView - getBigUint64 - Syntax - Parameters:
- `byteOffset`: The offset, in bytes, from the start of the view to read the data from.
- `littleEndian` (optional): Indicates whether the data is stored in little- or big-endian format. If `false` or `undefined`, a big-endian value is read. | [
-0.4253966808319092,
-0.6911875009536743,
-1.4078428745269775,
-0.6358321905136108,
0.0009875150863081217,
-1.33948814868927,
0.24523498117923737,
0.6229989528656006,
0.3773685395717621,
0.06646090745925903,
-1.0275192260742188,
0.21495194733142853,
0.24444086849689484,
0.6997469663619995,... |
javascript/reference/global_objects/dataview/getbiguint64/index.md | JavaScript - Global Objects - DataView - getBigUint64 - Syntax - Return value:
A `BigInt` from 0 to 264-1, inclusive. | [
-1.9529927968978882,
-0.2670287787914276,
-0.4167810082435608,
-0.5738288760185242,
-0.5367075204849243,
-0.8728528022766113,
-0.18144354224205017,
-0.07753463089466095,
-0.33875972032546997,
-0.2423139214515686,
-0.2650798559188843,
0.7529399991035461,
0.28063350915908813,
0.2542782425880... |
javascript/reference/global_objects/dataview/getbiguint64/index.md | JavaScript - Global Objects - DataView - getBigUint64 - Syntax - Exceptions:
- `RangeError`: Thrown if the `byteOffset` is set such that it would read beyond the end of the view. | [
-0.6455820202827454,
-0.209778293967247,
-0.8523277044296265,
-0.1748364418745041,
-0.13652874529361725,
-1.6428683996200562,
-0.5672630071640015,
0.7086412906646729,
-0.38087111711502075,
-0.09443922340869904,
-0.17870056629180908,
0.18368005752563477,
-0.434333860874176,
0.47213390469551... |
javascript/reference/global_objects/dataview/getbiguint64/index.md | JavaScript - Global Objects - DataView - getBigUint64 - Examples - Using getBigUint64():
Example:
const { buffer } = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
const dataview = new DataView(buffer);
console.log(dataview.getBigUint64(1)); // 72623859790382856n | [
-0.37463340163230896,
-0.15113432705402374,
-0.9771129488945007,
-0.4550812542438507,
-0.8597456216812134,
-0.7505618333816528,
-1.0662071704864502,
0.04201462119817734,
0.221584290266037,
0.009096858091652393,
-0.3546181917190552,
-0.015450315549969673,
0.3444027602672577,
0.4631891846656... |
javascript/reference/global_objects/dataview/getint8/index.md | JavaScript - Global Objects - DataView - getInt8:
The `getInt8()` method of `DataView` instances reads 1 byte at the specified byte offset of this `DataView` and interprets it as an 8-bit signed integer.
Example:
// Create an ArrayBuffer with a size in bytes
const buffer = new ArrayBuffer(16);
const view = new Data... | [
-0.5721235275268555,
-0.741483211517334,
-1.1153037548065186,
-0.32417038083076477,
0.008340282365679741,
-1.0924500226974487,
-0.3611401617527008,
0.4032098948955536,
0.3842325806617737,
0.07028273493051529,
-0.3022236227989197,
0.1050463542342186,
0.5822460055351257,
0.3059775233268738,
... |
javascript/reference/global_objects/dataview/getint8/index.md | JavaScript - Global Objects - DataView - getInt8 - Syntax:
Example:
getInt8(byteOffset) | [
-0.841780960559845,
-0.35442695021629333,
-0.891926646232605,
-0.6509408354759216,
-0.4799244999885559,
-1.918276309967041,
-0.07477286458015442,
0.7615180015563965,
-0.41631850600242615,
-0.4223620891571045,
-0.3701140284538269,
0.538702666759491,
0.010065817274153233,
0.20271021127700806... |
javascript/reference/global_objects/dataview/getint8/index.md | JavaScript - Global Objects - DataView - getInt8 - Syntax - Parameters:
- `byteOffset`: The offset, in bytes, from the start of the view to read the data from. | [
-0.17939762771129608,
-0.45987141132354736,
-1.31316339969635,
-0.6962756514549255,
0.4323270618915558,
-1.6278363466262817,
-0.056802283972501755,
1.1097111701965332,
0.21838948130607605,
-0.477059930562973,
-0.9540722370147705,
0.25249963998794556,
-0.19063496589660645,
0.367608636617660... |
javascript/reference/global_objects/dataview/getint8/index.md | JavaScript - Global Objects - DataView - getInt8 - Syntax - Return value:
An integer from -128 to 127, inclusive. | [
-1.5293285846710205,
-0.2896854281425476,
-0.8416311740875244,
-0.8458101153373718,
-0.31427982449531555,
-0.6540160179138184,
-0.061495229601860046,
0.4969348907470703,
-0.5610923171043396,
-0.15949955582618713,
-0.2770920991897583,
0.8060445785522461,
0.040466856211423874,
0.562215626239... |
javascript/reference/global_objects/dataview/getint8/index.md | JavaScript - Global Objects - DataView - getInt8 - Syntax - Exceptions:
- `RangeError`: Thrown if the `byteOffset` is set such that it would read beyond the end of the view. | [
-0.7177615165710449,
-0.21403776109218597,
-0.8595736026763916,
-0.09413754194974899,
-0.08616121113300323,
-2.1222212314605713,
-0.5740793347358704,
0.7642369270324707,
-0.7077918648719788,
-0.19166216254234314,
-0.18683531880378723,
0.07069499790668488,
-0.5087456703186035,
0.16942758858... |
javascript/reference/global_objects/dataview/getint8/index.md | JavaScript - Global Objects - DataView - getInt8 - Examples - Using getInt8():
Example:
const { buffer } = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
const dataview = new DataView(buffer);
console.log(dataview.getInt8(1)); // 1 | [
-0.3957064747810364,
-0.07937921583652496,
-0.9685511589050293,
-0.15750084817409515,
-0.641301691532135,
-1.409521460533142,
-0.5295788049697876,
0.37896376848220825,
0.10626094043254852,
0.19144093990325928,
-0.2725224494934082,
0.07907800376415253,
0.24832430481910706,
0.421421498060226... |
javascript/reference/global_objects/dataview/getint16/index.md | JavaScript - Global Objects - DataView - getInt16:
The `getInt16()` method of `DataView` instances reads 2 bytes starting at the specified byte offset of this `DataView` and interprets them as a 16-bit signed integer. There is no alignment constraint; multi-byte values may be fetched from any offset within bounds.
Ex... | [
-0.0853995606303215,
-0.4642261266708374,
-0.841195821762085,
-0.16616997122764587,
0.01817406341433525,
-0.7973006963729858,
-0.06144760549068451,
0.3157300651073456,
0.7863805294036865,
-0.26703694462776184,
-0.2108539640903473,
0.6682947278022766,
0.22342436015605927,
0.4920608997344970... |
javascript/reference/global_objects/dataview/getint16/index.md | JavaScript - Global Objects - DataView - getInt16 - Syntax:
Example:
getInt16(byteOffset)
getInt16(byteOffset, littleEndian) | [
-0.6854544878005981,
0.022868916392326355,
-0.8049570322036743,
-0.6083087921142578,
-0.2682825028896332,
-1.821801781654358,
0.10242409259080887,
0.8093669414520264,
-0.10536343604326248,
-0.31012895703315735,
-0.04623951390385628,
0.7853461503982544,
0.2218717336654663,
0.304129153490066... |
javascript/reference/global_objects/dataview/getint16/index.md | JavaScript - Global Objects - DataView - getInt16 - Syntax - Parameters:
- `byteOffset`: The offset, in bytes, from the start of the view to read the data from.
- `littleEndian` (optional): Indicates whether the data is stored in little- or big-endian format. If `false` or `undefined`, a big-endian value is read. | [
-0.3369732201099396,
-0.6644209027290344,
-1.3015062808990479,
-0.6381543278694153,
0.1291395127773285,
-1.5856561660766602,
0.4097864329814911,
0.6867184042930603,
0.31823059916496277,
-0.1412883847951889,
-0.7469156980514526,
0.39668238162994385,
0.007588775362819433,
0.6227484345436096,... |
javascript/reference/global_objects/dataview/getint16/index.md | JavaScript - Global Objects - DataView - getInt16 - Syntax - Return value:
An integer from -32768 to 32767, inclusive. | [
-1.6360764503479004,
0.34381672739982605,
-0.32896745204925537,
-0.5494841933250427,
-0.48714327812194824,
-1.1062450408935547,
-0.5381116271018982,
-0.026276998221874237,
-0.2260330766439438,
-0.3294420540332794,
0.23969566822052002,
1.1081583499908447,
-0.22455841302871704,
0.76984423398... |
javascript/reference/global_objects/dataview/getint16/index.md | JavaScript - Global Objects - DataView - getInt16 - Syntax - Exceptions:
- `RangeError`: Thrown if the `byteOffset` is set such that it would read beyond the end of the view. | [
-0.6192660331726074,
-0.11486479640007019,
-0.7423443794250488,
-0.12141294032335281,
0.06436005234718323,
-1.9447047710418701,
-0.30039075016975403,
0.8534980416297913,
-0.45721790194511414,
-0.26271894574165344,
0.04309901222586632,
0.3695184588432312,
-0.5882914662361145,
0.281710386276... |
javascript/reference/global_objects/dataview/getint16/index.md | JavaScript - Global Objects - DataView - getInt16 - Examples - Using getInt16():
Example:
const { buffer } = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
const dataview = new DataView(buffer);
console.log(dataview.getInt16(1)); // 258 | [
-0.30687835812568665,
0.06368225067853928,
-0.9414467811584473,
-0.20524990558624268,
-0.5888084769248962,
-1.1503502130508423,
-0.4286285638809204,
0.47420743107795715,
0.2686707377433777,
0.07316707819700241,
-0.023303793743252754,
0.4112641215324402,
0.17278088629245758,
0.4122828543186... |
javascript/reference/global_objects/dataview/setuint8/index.md | JavaScript - Global Objects - DataView - setUint8:
The `setUint8()` method of `DataView` instances takes a number and stores it as an 8-bit unsigned integer in the byte at the specified byte offset of this `DataView`.
Example:
// Create an ArrayBuffer with a size in bytes
const buffer = new ArrayBuffer(16);
const v... | [
-0.746174693107605,
-0.8865363597869873,
-1.3833686113357544,
0.4518562853336334,
-0.5550218820571899,
-0.6527575850486755,
0.05732705444097519,
0.6568048596382141,
0.21389369666576385,
0.10584059357643127,
-0.4753963053226471,
0.5939036011695862,
1.0040004253387451,
0.5042680501937866,
... |
javascript/reference/global_objects/dataview/setuint8/index.md | JavaScript - Global Objects - DataView - setUint8 - Syntax:
Example:
setUint8(byteOffset, value) | [
-1.3085308074951172,
-0.5802852511405945,
-0.945095419883728,
0.05705862119793892,
-0.6863808631896973,
-1.4591691493988037,
0.07269196212291718,
1.0928797721862793,
-0.10642052441835403,
-0.598833441734314,
-0.3616628348827362,
0.5631402134895325,
0.7809098958969116,
0.13473345339298248,
... |
javascript/reference/global_objects/dataview/setuint8/index.md | JavaScript - Global Objects - DataView - setUint8 - Syntax - Parameters:
- `byteOffset`: The offset, in bytes, from the start of the view to store the data in.
- `value`: The value to set. For how the value is encoded in bytes, see Value encoding and normalization. | [
-0.20617929100990295,
-0.4570961892604828,
-1.38954758644104,
0.10652195662260056,
0.16195861995220184,
-1.5032685995101929,
-0.19770026206970215,
1.3147661685943604,
0.5078473687171936,
-0.40164539217948914,
-0.7478660345077515,
0.646406352519989,
0.2742689847946167,
0.35716012120246887,
... |
javascript/reference/global_objects/dataview/setuint8/index.md | JavaScript - Global Objects - DataView - setUint8 - Syntax - Return value:
`undefined`. | [
-1.370235800743103,
-0.05524482950568199,
-1.0034070014953613,
-0.5820147395133972,
-0.9615955948829651,
-1.1896172761917114,
0.4430604875087738,
0.8875690698623657,
-0.6004471778869629,
-0.04523883014917374,
0.0009149217512458563,
0.18656376004219055,
0.6581581234931946,
0.405585110187530... |
javascript/reference/global_objects/dataview/setuint8/index.md | JavaScript - Global Objects - DataView - setUint8 - Syntax - Exceptions:
- `RangeError`: Thrown if the `byteOffset` is set such that it would store beyond the end of the view. | [
-0.772627592086792,
-0.4866426885128021,
-1.0905942916870117,
0.41020968556404114,
-0.47991883754730225,
-1.9834367036819458,
-0.5578457713127136,
1.2035596370697021,
-0.8144350647926331,
-0.35844770073890686,
-0.1432373821735382,
0.39328229427337646,
-0.22602948546409607,
0.44658437371253... |
javascript/reference/global_objects/dataview/setuint8/index.md | JavaScript - Global Objects - DataView - setUint8 - Examples - Using setUint8():
Example:
const buffer = new ArrayBuffer(10);
const dataview = new DataView(buffer);
dataview.setUint8(0, 3);
dataview.getUint8(0); // 3 | [
-0.8445138335227966,
-0.2682369649410248,
-1.312406063079834,
0.24697726964950562,
-1.0147275924682617,
-1.2284446954727173,
-0.13178664445877075,
0.8309757709503174,
0.0459485687315464,
0.2434406727552414,
-0.5075831413269043,
0.3803772032260895,
0.838851273059845,
0.41235047578811646,
... |
javascript/reference/global_objects/dataview/setint16/index.md | JavaScript - Global Objects - DataView - setInt16:
The `setInt16()` method of `DataView` instances takes a number and stores it as a 16-bit signed integer in the 2 bytes starting at the specified byte offset of this `DataView`. There is no alignment constraint; multi-byte values may be stored at any offset within boun... | [
-0.07403650134801865,
-0.6634615659713745,
-1.001920223236084,
0.5167573690414429,
-0.10416202247142792,
-0.6766589879989624,
-0.046296484768390656,
0.7509410977363586,
0.9977394342422485,
-0.3278687596321106,
-0.26632848381996155,
0.8561384081840515,
0.7199636697769165,
0.6364554762840271... |
javascript/reference/global_objects/dataview/setint16/index.md | JavaScript - Global Objects - DataView - setInt16 - Syntax:
Example:
setInt16(byteOffset, value)
setInt16(byteOffset, value, littleEndian) | [
-0.974806010723114,
-0.06084451451897621,
-0.6959410309791565,
0.14561745524406433,
-0.36856770515441895,
-1.5203168392181396,
0.29453766345977783,
1.0937509536743164,
0.26200127601623535,
-0.5773606300354004,
-0.05713288486003876,
0.7453542947769165,
0.6008080244064331,
0.0744066387414932... |
javascript/reference/global_objects/dataview/setint16/index.md | JavaScript - Global Objects - DataView - setInt16 - Syntax - Parameters:
- `byteOffset`: The offset, in bytes, from the start of the view to store the data in.
- `value`: The value to set. For how the value is encoded in bytes, see Value encoding and normalization.
- `littleEndian` (optional): Indicates whether the da... | [
-0.22915016114711761,
-0.5374996662139893,
-1.2141716480255127,
-0.057174865156412125,
0.18037566542625427,
-1.6098829507827759,
0.21590997278690338,
1.0057241916656494,
0.601879358291626,
-0.2836609482765198,
-0.5319873690605164,
0.7484469413757324,
0.40758830308914185,
0.5266221761703491... |
javascript/reference/global_objects/dataview/setint16/index.md | JavaScript - Global Objects - DataView - setInt16 - Syntax - Return value:
`undefined`. | [
-1.1948436498641968,
0.16149960458278656,
-0.7504782676696777,
-0.7345066070556641,
-0.5511341691017151,
-0.9800388813018799,
0.7404210567474365,
1.052336573600769,
-0.15041227638721466,
-0.3060370683670044,
0.3323017656803131,
0.5148738622665405,
0.35741114616394043,
0.40961918234825134,
... |
javascript/reference/global_objects/dataview/setint16/index.md | JavaScript - Global Objects - DataView - setInt16 - Syntax - Exceptions:
- `RangeError`: Thrown if the `byteOffset` is set such that it would store beyond the end of the view. | [
-0.5509771704673767,
-0.3784680962562561,
-0.9363391995429993,
0.41776224970817566,
-0.22779588401317596,
-1.8850369453430176,
-0.3828945755958557,
1.326911211013794,
-0.47524362802505493,
-0.4743656516075134,
0.06422805041074753,
0.5427243709564209,
-0.37061524391174316,
0.459572523832321... |
javascript/reference/global_objects/dataview/setint16/index.md | JavaScript - Global Objects - DataView - setInt16 - Examples - Using setInt16():
Example:
const buffer = new ArrayBuffer(10);
const dataview = new DataView(buffer);
dataview.setInt16(0, 3);
dataview.getInt16(1); // 768 | [
-0.6850541830062866,
0.06947324424982071,
-1.032555103302002,
-0.05289774760603905,
-0.7282199859619141,
-0.8925685882568359,
-0.12916958332061768,
0.6053445339202881,
0.7075680494308472,
-0.2181214690208435,
-0.12670281529426575,
0.7318757772445679,
0.5569370985031128,
0.5188905000686646,... |
javascript/reference/global_objects/dataview/setfloat16/index.md | JavaScript - Global Objects - DataView - setFloat16:
The `setFloat16()` method of `DataView` instances takes a number and stores it as a 16-bit floating point number in the 2 bytes starting at the specified byte offset of this `DataView`. There is no alignment constraint; multi-byte values may be stored at any offset ... | [
-0.5512186884880066,
-1.0019546747207642,
-1.4765002727508545,
-0.2655302584171295,
-0.24273085594177246,
-0.6626349687576294,
-0.030473433434963226,
0.9638795256614685,
0.7219001054763794,
-0.5333575010299683,
-0.19115573167800903,
0.9411966800689697,
0.691031277179718,
0.8890315890312195... |
javascript/reference/global_objects/dataview/setfloat16/index.md | JavaScript - Global Objects - DataView - setFloat16 - Syntax:
Example:
setFloat16(byteOffset, value)
setFloat16(byteOffset, value, littleEndian) | [
-1.4670761823654175,
-0.38388144969940186,
-1.2484689950942993,
-0.5763125419616699,
-0.609122097492218,
-1.6056668758392334,
0.2219717800617218,
1.2212265729904175,
0.16539400815963745,
-0.6491848230361938,
0.6170487403869629,
0.6412185430526733,
0.441407173871994,
0.30124431848526,
1.3... |
javascript/reference/global_objects/dataview/setfloat16/index.md | JavaScript - Global Objects - DataView - setFloat16 - Syntax - Parameters:
- `byteOffset`: The offset, in bytes, from the start of the view to store the data in.
- `value`: The value to set. For how the value is encoded in bytes, see Value encoding and normalization.
- `littleEndian` (optional): Indicates whether the ... | [
-0.5467708110809326,
-0.6288700699806213,
-1.504589319229126,
-0.4004025459289551,
0.1031036302447319,
-1.6026921272277832,
0.3373483121395111,
1.0869901180267334,
0.5090815424919128,
-0.33005449175834656,
-0.11987675726413727,
0.6755940914154053,
0.42664796113967896,
0.6546728014945984,
... |
javascript/reference/global_objects/dataview/setfloat16/index.md | JavaScript - Global Objects - DataView - setFloat16 - Syntax - Return value:
`undefined`. | [
-1.6010676622390747,
-0.021439796313643456,
-1.266239047050476,
-1.362318515777588,
-0.7557724118232727,
-1.1719539165496826,
0.8195570707321167,
1.2097413539886475,
-0.11810914427042007,
-0.5096518993377686,
0.8409748673439026,
0.3990751802921295,
0.24766433238983154,
0.52177494764328,
... |
javascript/reference/global_objects/dataview/setfloat16/index.md | JavaScript - Global Objects - DataView - setFloat16 - Syntax - Exceptions:
- `RangeError`: Thrown if the `byteOffset` is set such that it would store beyond the end of the view. | [
-0.75736403465271,
-0.5286303162574768,
-1.272416353225708,
-0.0959046483039856,
-0.40535205602645874,
-1.9100550413131714,
-0.20223073661327362,
1.3967801332473755,
-0.54637610912323,
-0.6118572354316711,
0.45640528202056885,
0.49324291944503784,
-0.38303983211517334,
0.5730044841766357,
... |
javascript/reference/global_objects/dataview/setfloat16/index.md | JavaScript - Global Objects - DataView - setFloat16 - Examples - Using setFloat16():
Example:
const buffer = new ArrayBuffer(10);
const dataview = new DataView(buffer);
dataview.setFloat16(0, 3);
dataview.getFloat16(1); // 0 | [
-1.2600927352905273,
-0.3017207682132721,
-1.7873127460479736,
-0.5535140037536621,
-0.7093706727027893,
-0.8811014890670776,
0.15792697668075562,
1.0276422500610352,
0.5915124416351318,
-0.2317776083946228,
0.4224848449230194,
0.583815336227417,
0.6078540682792664,
0.560660719871521,
0.... |
javascript/reference/global_objects/dataview/getuint8/index.md | JavaScript - Global Objects - DataView - getUint8:
The `getUint8()` method of `DataView` instances reads 1 byte at the specified byte offset of this `DataView` and interprets it as an 8-bit unsigned integer.
Example:
// Create an ArrayBuffer with a size in bytes
const buffer = new ArrayBuffer(16);
const view = new ... | [
-0.8587399125099182,
-0.6749399900436401,
-1.286003828048706,
-0.25693923234939575,
-0.4508889317512512,
-0.9048991799354553,
-0.14866724610328674,
0.42563068866729736,
0.13806840777397156,
0.16172976791858673,
-0.39061325788497925,
0.2786979675292969,
0.6653938293457031,
0.338208794593811... |
javascript/reference/global_objects/dataview/getuint8/index.md | JavaScript - Global Objects - DataView - getUint8 - Syntax:
Example:
getUint8(byteOffset) | [
-0.9762637615203857,
-0.39803341031074524,
-1.0491410493850708,
-0.6202433705329895,
-0.6681610941886902,
-1.8221629858016968,
-0.07549510151147842,
0.9480153918266296,
-0.5910532474517822,
-0.34882277250289917,
-0.39469218254089355,
0.5903323292732239,
0.2774183750152588,
0.27900037169456... |
javascript/reference/global_objects/dataview/getuint8/index.md | JavaScript - Global Objects - DataView - getUint8 - Syntax - Parameters:
- `byteOffset`: The offset, in bytes, from the start of the view to read the data from. | [
-0.2993747293949127,
-0.4372669756412506,
-1.3442763090133667,
-0.6298583745956421,
0.22906628251075745,
-1.5594218969345093,
-0.09653568267822266,
1.1679693460464478,
0.10521121323108673,
-0.4670340418815613,
-0.9598439931869507,
0.32882922887802124,
-0.1082504466176033,
0.444866806268692... |
javascript/reference/global_objects/dataview/getuint8/index.md | JavaScript - Global Objects - DataView - getUint8 - Syntax - Return value:
An integer from 0 to 255, inclusive. | [
-1.8262430429458618,
-0.39265888929367065,
-0.7862952947616577,
-0.4830411970615387,
-0.823207437992096,
-1.0348732471466064,
-0.12394950538873672,
0.5619186162948608,
-0.6712262034416199,
-0.17999887466430664,
-0.32552358508110046,
1.20517897605896,
-0.06982944160699844,
0.201932117342948... |
javascript/reference/global_objects/dataview/getuint8/index.md | JavaScript - Global Objects - DataView - getUint8 - Syntax - Exceptions:
- `RangeError`: Thrown if the `byteOffset` is set such that it would read beyond the end of the view. | [
-0.8714911341667175,
-0.1970662921667099,
-0.8929371237754822,
-0.06770410388708115,
-0.31610894203186035,
-2.052868604660034,
-0.5463162064552307,
0.8837162852287292,
-0.8491584062576294,
-0.19887283444404602,
-0.14642545580863953,
0.19666624069213867,
-0.3897237181663513,
0.3261327147483... |
javascript/reference/global_objects/dataview/getuint8/index.md | JavaScript - Global Objects - DataView - getUint8 - Examples - Using getUint8():
Example:
const { buffer } = new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
const dataview = new DataView(buffer);
console.log(dataview.getUint8(1)); // 1 | [
-0.4724898636341095,
-0.108244389295578,
-1.0939888954162598,
-0.2475576102733612,
-0.8831605911254883,
-1.3482141494750977,
-0.4971785545349121,
0.4266497790813446,
0.0556485652923584,
0.17792804539203644,
-0.2753162086009979,
0.1259716898202896,
0.34946247935295105,
0.5634891390800476,
... |
javascript/reference/global_objects/dataview/setbiguint64/index.md | JavaScript - Global Objects - DataView - setBigUint64:
The `setBigUint64()` method of `DataView` instances takes a BigInt and stores it as a 64-bit unsigned integer in the 8 bytes starting at the specified byte offset of this `DataView`. There is no alignment constraint; multi-byte values may be stored at any offset w... | [
-0.5438237190246582,
-0.7655731439590454,
-1.1409635543823242,
0.3190305233001709,
-0.2458038181066513,
0.08398006111383438,
-0.28909412026405334,
0.32530802488327026,
0.6092231869697571,
-0.177149698138237,
-0.718164324760437,
0.5564862489700317,
0.6036179661750793,
0.8273518681526184,
... |
javascript/reference/global_objects/dataview/setbiguint64/index.md | JavaScript - Global Objects - DataView - setBigUint64 - Syntax:
Example:
setBigUint64(byteOffset, value)
setBigUint64(byteOffset, value, littleEndian) | [
-1.1547819375991821,
-0.22852836549282074,
-0.8366130590438843,
0.1246369481086731,
-0.5196499824523926,
-1.1137815713882446,
-0.09551936388015747,
0.7701455950737,
0.2937604486942291,
-0.37998366355895996,
-0.34320226311683655,
0.3063100576400757,
1.0807822942733765,
0.14457544684410095,
... |
javascript/reference/global_objects/dataview/setbiguint64/index.md | JavaScript - Global Objects - DataView - setBigUint64 - Syntax - Parameters:
- `byteOffset`: The offset, in bytes, from the start of the view to store the data in.
- `value`: The value to set as a `BigInt`. For how the value is encoded in bytes, see Value encoding and normalization.
- `littleEndian` (optional): Indica... | [
-0.5082929134368896,
-0.6373965740203857,
-1.3022516965866089,
0.05776192247867584,
0.08895735442638397,
-1.2971504926681519,
0.014190512709319592,
0.9400381445884705,
0.616037905216217,
-0.1260024607181549,
-0.7284611463546753,
0.5244291424751282,
0.5604912042617798,
0.6059120893478394,
... |
javascript/reference/global_objects/dataview/setbiguint64/index.md | JavaScript - Global Objects - DataView - setBigUint64 - Syntax - Return value:
`undefined`. | [
-1.2215815782546997,
0.08020051568746567,
-0.8146721720695496,
-0.7184802889823914,
-0.7778645157814026,
-0.5822816491127014,
0.3058067262172699,
0.7800115942955017,
-0.13555112481117249,
-0.04643455520272255,
0.008750654757022858,
0.14635495841503143,
0.7365025281906128,
0.421860486268997... |
javascript/reference/global_objects/dataview/setbiguint64/index.md | JavaScript - Global Objects - DataView - setBigUint64 - Syntax - Exceptions:
- `RangeError`: Thrown if the `byteOffset` is set such that it would store beyond the end of the view. | [
-0.6121943593025208,
-0.417368084192276,
-1.0094491243362427,
0.32691285014152527,
-0.4010447859764099,
-1.6155697107315063,
-0.587028980255127,
1.1302860975265503,
-0.4532001316547394,
-0.3057999312877655,
-0.16752512753009796,
0.3957943320274353,
-0.22288493812084198,
0.5588709712028503,... |
javascript/reference/global_objects/dataview/setbiguint64/index.md | JavaScript - Global Objects - DataView - setBigUint64 - Examples - Using setBigUint64():
Example:
const buffer = new ArrayBuffer(10);
const dataview = new DataView(buffer);
dataview.setBigUint64(0, 3n);
dataview.getBigUint64(1); // 768n | [
-0.5969324707984924,
-0.15101464092731476,
-1.1159125566482544,
-0.16042417287826538,
-0.843387246131897,
-0.5349386930465698,
-0.42020198702812195,
0.35378262400627136,
0.2808394730091095,
0.0801103264093399,
-0.5764474272727966,
0.27887609601020813,
0.5501635670661926,
0.6981112957000732... |
javascript/reference/global_objects/dataview/bytelength/index.md | JavaScript - Global Objects - DataView - byteLength:
The `byteLength` accessor property of `DataView` instances returns the length (in bytes) of this view.
Example:
// Create an ArrayBuffer with a size in bytes
const buffer = new ArrayBuffer(16);
const view1 = new DataView(buffer);
const view2 = new DataView(buffer... | [
-0.43664494156837463,
-0.7680559754371643,
-1.234905481338501,
0.030243216082453728,
-0.28761526942253113,
-1.1784586906433105,
-0.19495511054992676,
0.14053069055080414,
0.8457233905792236,
-0.1990254819393158,
-0.6365693211555481,
0.362368643283844,
0.5142340064048767,
0.5140699744224548... |
javascript/reference/global_objects/dataview/bytelength/index.md | JavaScript - Global Objects - DataView - byteLength - Description:
The `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. If the `DataView` is length-tracking, then its length depends on the length of the underlying buffer, and may ch... | [
-1.6930673122406006,
-0.743841290473938,
-0.8242006301879883,
0.4173317551612854,
-0.17614494264125824,
-1.9245805740356445,
0.2973252534866333,
0.47396159172058105,
0.3337966203689575,
-0.3612234592437744,
-0.6958429217338562,
-0.131764754652977,
0.04610768333077431,
0.42698949575424194,
... |
javascript/reference/global_objects/dataview/bytelength/index.md | JavaScript - Global Objects - DataView - byteLength - Examples - Using the byteLength property:
Example:
const buffer = new ArrayBuffer(8);
const dataview = new DataView(buffer);
dataview.byteLength; // 8 (matches the byteLength of the buffer)
const dataview2 = new DataView(buffer, 1, 5);
dataview2.byteLength; // 5 ... | [
-0.26727205514907837,
-0.45136696100234985,
-0.6133303046226501,
0.22565142810344696,
0.2709415555000305,
-0.8753005862236023,
0.5046817064285278,
0.6013646125793457,
0.12913069128990173,
-0.0363142266869545,
-0.5941686630249023,
0.3975347578525543,
0.034938279539346695,
0.230963796377182,... |
javascript/reference/global_objects/dataview/setint32/index.md | JavaScript - Global Objects - DataView - setInt32:
The `setInt32()` method of `DataView` instances takes a number and stores it as a 32-bit signed integer in the 4 bytes starting at the specified byte offset of this `DataView`. There is no alignment constraint; multi-byte values may be stored at any offset within boun... | [
-0.3916873037815094,
-0.4452170133590698,
-0.8438906073570251,
0.7365773916244507,
0.03752690181136131,
-0.7033622860908508,
-0.2624977231025696,
0.6014837026596069,
0.764033854007721,
-0.11106090247631073,
-0.3227055072784424,
0.30393698811531067,
0.8232002854347229,
0.5644973516464233,
... |
javascript/reference/global_objects/dataview/setint32/index.md | JavaScript - Global Objects - DataView - setInt32 - Syntax:
Example:
setInt32(byteOffset, value)
setInt32(byteOffset, value, littleEndian) | [
-1.326419472694397,
0.01923312246799469,
-0.5265695452690125,
0.6747267246246338,
-0.2918466031551361,
-1.6036347150802612,
-0.05875993147492409,
1.0181056261062622,
0.17894579470157623,
-0.39796677231788635,
-0.10109121352434158,
0.13227523863315582,
0.8447893261909485,
0.0741178691387176... |
javascript/reference/global_objects/dataview/setint32/index.md | JavaScript - Global Objects - DataView - setInt32 - Syntax - Parameters:
- `byteOffset`: The offset, in bytes, from the start of the view to store the data in.
- `value`: The value to set. For how the value is encoded in bytes, see Value encoding and normalization.
- `littleEndian` (optional): Indicates whether the da... | [
-0.4042908549308777,
-0.4934280812740326,
-1.1472971439361572,
0.10726223140954971,
0.23313991725444794,
-1.617364764213562,
0.11948098242282867,
1.0230144262313843,
0.5491815209388733,
-0.14495371282100677,
-0.5620600581169128,
0.46492141485214233,
0.5801716446876526,
0.563828706741333,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.