Search completed in 2.17 seconds.
375 results for "binary":
Your results are loading. Please wait...
Sending and Receiving Binary Data - Web APIs
receiving binary data using javascript typed arrays the responsetype property of the xmlhttprequest object can be set to change the expected response type from the server.
... this example reads an image as a binary file and creates an 8-bit unsigned integer array from the raw bytes.
...q.open("get", "/myfile.png", true); oreq.responsetype = "arraybuffer"; oreq.onload = function (oevent) { var arraybuffer = oreq.response; // note: not oreq.responsetext if (arraybuffer) { var bytearray = new uint8array(arraybuffer); for (var i = 0; i < bytearray.bytelength; i++) { // do something with each byte in the array } } }; oreq.send(null); you can also read a binary file as a blob by setting the string "blob" to the responsetype property.
...And 13 more matches
Binary strings - Web APIs
WebAPIDOMStringBinary
a binary string is a concept similar to the ascii subset, but instead of limiting the range to 127, it allows code points until 255.
... its purpose however is not to represent characters, but binary data.
... the size of the data so represented is twice as big as it would be in normal binary format, however this will not be visible to the final user, since the length of javascript strings is calculated using two bytes as the unit.
...And 6 more matches
XMLHttpRequest.sendAsBinary() - Web APIs
the obsolete xmlhttprequest method sendasbinary() is a variant of the send() method that sends binary data.
... the send() method now supports binary data and should now be used instead.
...you should instead simply use the send() method, which now supports binary data in various forms.
...And 6 more matches
Bundling multiple binary components
background binary xpcom components are sometimes required to implement low-level features for extensions.
... since binary components are linked against a single gecko sdk, a dependency to a particular version of gecko is created.
... if the component uses only "frozen" xpcom interfaces, there is a good chance the same binary component will work with different versions of gecko (version 1.8 and 1.9, for example).
...And 5 more matches
RTCDataChannel.binaryType - Web APIs
the property binarytype on the rtcdatachannel interface is a domstring which specifies the type of javascript object which should be used to represent binary data received on the rtcdatachannel.
... values allowed by the websocket.binarytype property are also permitted here: "blob" if blob objects are being used or "arraybuffer" if arraybuffer objects are being used.
... when a binary message is received on the data channel, the resulting message event's messageevent.data property is an object of the type specified by the binarytype.
...And 4 more matches
File.getAsBinary() - Web APIs
WebAPIFilegetAsBinary
summary the getasbinary method allows to access the file's data in raw binary format.
... note: this method is obsolete; you should use the filereader method readasbinarystring() or readasarraybuffer() instead.
... syntax var binary = instanceoffile.getasbinary(); returns a string.
... example // fileinput is an htmlinputelement: <input type="file" id="myfileinput" multiple> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (similar to nodelist) var files = fileinput.files; // object for allowed media types var accept = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i < files.length; i++) { file = files[i]; // if file type could be detected if (file !== null) { if (accept.binary.indexof(file.type) > -1) { // file is a binary, which we accept var data = file.getasbinary(); } else if (accept.text.indexof(file.type) > -1) { // file is of type text, which we accept var data = file.getastext(); // modif...
FileReader.readAsBinaryString() - Web APIs
the readasbinarystring method is used to start reading the contents of the specified blob or file.
...at that time, the result attribute contains the raw binary data from the file.
... syntax instanceoffilereader.readasbinarystring(blob); parameters blob the blob or file from which to read.
...anvas'); var height = 200; var width = 200; canvas.width = width; canvas.height = height; var ctx = canvas.getcontext('2d'); ctx.strokestyle = '#090'; ctx.beginpath(); ctx.arc(width/2, height/2, width/2 - width/10, 0, math.pi*2); ctx.stroke(); canvas.toblob(function (blob) { var reader = new filereader(); reader.onload = function () { console.log(reader.result); } reader.readasbinarystring(blob); }); specifications specification status comment file apithe definition of 'readasbinarystring' in that specification.
FileReaderSync.readAsBinaryString() - Web APIs
the readasbinarystring() method of the filereadersync interface allows to read file or blob objects in a synchronous way into an domstring.
... syntax readasbinarystring(file); readasbinarystring(blob); parameters blob the dom file or blob to read.
... specifications specification status comment file apithe definition of 'readasbinarystringsync' in that specification.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreadasbinarystringchrome full support yesedge full support 12firefox full support 8ie full support yesopera full support yessafari full support ...
nsIBinaryOutputStream
xpcom/io/nsibinaryoutputstream.idlscriptable this interface allows writing of primitive data types (integers, floating-point values, booleans, and so on.) to a stream in a binary, untagged, fixed-endianness format.
... this might be used, for example, to implement network protocols or to produce architecture-neutral binary disk files, that is ones that can be read and written by both big-endian and little-endian platforms.
... see also nsibinaryinputstream nsioutputstream nsiinputstream ...
WebSocket.binaryType - Web APIs
the websocket.binarytype property returns the type of binary data being transmitted by the connection.
... syntax var binarytype = awebsocket.binarytype; value a domstring: "blob" if blob objects are used.
... specifications specification status comment html living standardthe definition of 'websocket: binarytype' in that specification.
nsIBinaryInputStream
xpcom/io/nsibinaryinputstream.idlscriptable this interface allows consumption of primitive data types from a "binary stream" containing untagged, big-endian binary data, that is as produced by an implementation of nsibinaryoutputstream.
... see also nsibinaryoutputstream nsiinputstream nsioutputstream ...
Binary compatibility
for more information on issues of componentization and binary compatibility, see http://mozilla.org/projects/xpcom/gl...ent_reuse.html .
nsIAnnotationService
ng aname, in long long avalue, in long aflags, in unsigned short aexpiration); void setpageannotationdouble(in nsiuri auri, in autf8string aname, in double avalue, in long aflags, in unsigned short aexpiration); void setitemannotationdouble(in long long aitemid, in autf8string aname, in double avalue, in long aflags, in unsigned short aexpiration); void setpageannotationbinary(in nsiuri auri, in autf8string aname,[const, array, size_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string amimetype, in long aflags, in unsigned short aexpiration); void setitemannotationbinary(in long long aitemid, in autf8string aname,[const, array, size_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string amimetype, in long aflags, in unsigned...
...long aitemid, in autf8string aname); long long getpageannotationint64(in nsiuri auri, in autf8string aname); long long getitemannotationint64(in long long aitemid, in autf8string aname); double getpageannotationdouble(in nsiuri auri, in autf8string aname); double getitemannotationdouble(in long long aitemid, in autf8string aname); void getpageannotationbinary(in nsiuri auri, in autf8string aname,[array, size_is(adatalen)] out octet adata, out unsigned long adatalen, out autf8string amimetype); void getitemannotationbinary(in long long aitemid, in autf8string aname,[array, size_is(adatalen)] out octet adata, out unsigned long adatalen, out autf8string amimetype); void getpageannotationinfo(in nsiuri auri, in autf8string aname, out pri...
... type_binary 4 binary type constant.
...And 39 more matches
Index - Web APIs
WebAPIIndex
286 blob api, blob, file, file api, interface, raw, reference, data a blob object represents a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a readablestream so its methods can be used for processing the data.
... 288 blob.arraybuffer() api, arraybuffer, blob, file api, method, reference, binary, read the arraybuffer() method in the blob interface returns a promise that resolves with the contents of the blob as binary data contained in an arraybuffer.
... 763 binary strings dom, javascript, javascript typed arrays, reference, string javascript strings are utf-16 encoded strings.
...And 15 more matches
Using XMLHttpRequest - Web APIs
handling binary data although xmlhttprequest is most commonly used to send and receive textual data, it can be used to send and receive binary content.
... there are several well tested methods for coercing the response of an xmlhttprequest into sending binary data.
... var oreq = new xmlhttprequest(); oreq.open("get", url); // retrieve data unprocessed as a binary string oreq.overridemimetype("text/plain; charset=x-user-defined"); /* ...
...And 11 more matches
cfx - Archive of obsolete content
you can specify a different version of the host application using the --binary option, passing in the path to the application binary to run.
... -b binary, --binary=binary use the host application binary specified in binary.
... binary may be specified as a full path or as a path relative to the current directory.
...And 9 more matches
jpm - Archive of obsolete content
then jpm creates a skeleton add-on, as a starting point for your add-on development, with the following file structure: my-addon index.js package.json test test-index.js jpm run this command runs a new instance of firefox with the add-on installed: jpm run jpm run accepts the following options: -b --binary binary use the version of firefox specified in binary.
... binary may be specified as a full path or as a path relative to the current directory.
... --binary-args cmdargs pass extra arguments to firefox.
...And 9 more matches
Index
MozillaTechXPCOMIndex
4 binary compatibility xpcom if mozilla decides to upgrade to a compiler that does not have the same abi as the current version, any built component may fail.
... 5 bundling multiple binary components binary xpcom components are sometimes required to implement low-level features for extensions.
... since binary components are linked against a single gecko sdk, a dependency to a particular version of gecko is created.
...And 9 more matches
StringView - Archive of obsolete content
ipt strings to work with unicode encodings other than javascript's default utf-16 domstrings introduction as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
... however, this is slow and error-prone, due to the need for multiple conversions (especially if the binary data is not actually byte-format data, but, for example, 32-bit integers or floats).
... javascript typed arrays provide a mechanism for accessing raw binary data much more efficiently.
...And 8 more matches
Sending forms through JavaScript - Learn web development
for transmitting binary data, the http request is reshaped into multipart/form-data.
... dealing with binary data if you use a formdata object with a form that includes <input type="file"> widgets, the data will be processed automatically.
... but to send binary data by hand, there's extra work to do.
...And 8 more matches
XPIDL
however, the presence of the binaryname property allows the user to select another name to use in native code (to avoid conflicts with other functions).
... for example, the method '[binaryname(foo)] void bar();' becomes 'nsresult foo()' in native code (note that capitalization is still applied).
... however, the capitalization is not applied when using binaryname with attributes; i.e., [binaryname(foo)] readonly attribute quux bar; becomes getfoo(quux**) in native code.
...And 7 more matches
Expressions and operators - JavaScript
assignment operators comparison operators arithmetic operators bitwise operators logical operators string operators conditional (ternary) operator comma operator unary operators relational operators javascript has both binary and unary operators, and one special ternary operator, the conditional operator.
... a binary operator requires two operands, one before the operator and one after the operator: operand1 operator operand2 for example, 3+4 or x*y.
...for example: 1 / 2; // 0.5 1 / 2 == 1.0 / 2.0; // this is true in addition to the standard arithmetic operations (+, -, *, /), javascript provides the arithmetic operators listed in the following table: arithmetic operators operator description example remainder (%) binary operator.
...And 7 more matches
Reading from Files - Archive of obsolete content
for instance, there are options to read a file as if it were text or a binary file.
...a binary stream would be used to read bytes or numbers encoded within the file.
...you can also specify to read from a binary file by using the flag 'binary' instead of 'text'.
...And 6 more matches
Creating a Language Pack
l10n binary repack for apps currently in development, you need to get the right strings for the build you use.
...there is a target to get those, too, another way to test it to repack the en-us binary.
... $ make wget-en-us en_us_binary_url=http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora if you're building on mac 64 bit, you'll need to change the command slightly: $ make wget-en-us en_us_binary_url=http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora moz_pkg_platform=mac at some point, you should see the following success message: downloaded http://ftp.mozilla.org/pub/mozilla.o....en-us.mac.dmg to /users/your_id/mozilla/vc/firefox/browser/locales/../../dist/firefox-3.6b5pre.en-us.mac.dmg the en-us binary has been downloaded.
...And 6 more matches
Index
on a technical level the set is a binary software module.
...nss prefers the binary presentation, but is often capable to use base64 or ascii presentations, especially when importing data from files.
... -r dumps all of the data in raw (binary) form.
...And 6 more matches
nsIWindowsRegKey
ex); unsigned long getvaluetype(in astring name); boolean haschanged(); boolean haschild(in astring name); boolean hasvalue(in astring name); boolean iswatching(); void open(in unsigned long rootkey, in astring relpath, in unsigned long mode); nsiwindowsregkey openchild(in astring relpath, in unsigned long mode); acstring readbinaryvalue(in astring name); unsigned long long readint64value(in astring name); unsigned long readintvalue(in astring name); astring readstringvalue(in astring name); void removechild(in astring relpath); void removevalue(in astring name); void startwatching(in boolean recurse); void stopwatching(); void writebinaryvalue(in astrin...
... constant value description type_none 0 reg_none type_string 1 reg_sz type_binary 3 reg_binary type_int 4 reg_dword type_int64 11 reg_qword methods close() this method closes the key.
...readbinaryvalue() this method reads the binary contents of the named value under this key.
...And 6 more matches
NSS Tools certutil
-c create a new binary certificate file from a binary certificate-request file.
... -o output-file specify the output file name for new certificates or binary certificate requests.
... -r display a certificate's binary der encoding when listing information about that certificate with the -l option.
...And 5 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
//c:/temp/test.txt'; var ioservice = components.classes['@mozilla.org/network/io-service;1'] .getservice(components.interfaces.nsiioservice); var filehandler = ioservice.getprotocolhandler('file') .queryinterface(components.interfaces.nsifileprotocolhandler); var file = filehandler.getfilefromurlspec(url); var path = file.path; alert(path); // "c:\temp\temp.txt" binary file i/o use streams, as in java, for file i/o in xpcom.
... opening binary files listing 13 shows how to get a files contents as a bytestring (where 1 byte = an array of 8 bits).
... listing 13: reading the contents of a binary file file.initwithpath('c:\\temp\\temp.txt'); var filestream = components.classes['@mozilla.org/network/file-input-stream;1'] .createinstance(components.interfaces.nsifileinputstream); filestream.init(file, 1, 0, false); var binarystream = components.classes['@mozilla.org/binaryinputstream;1'] .createinstance(components.interfaces.nsibinaryinputstream); binarystream.setinputstream(filestream); var array = binarystream.readbytearray(fi...
...And 4 more matches
Base64 - MDN Web Docs Glossary: Definitions of Web-related terms
base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ascii string format by translating it into a radix-64 representation.
... base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with ascii.
... one common application of base64 encoding on the web is to encode binary data so it can be included in a data: url.
...And 4 more matches
nsICryptoHash
if false, then the returned value is binary data.
...this can be either binary data or a base-64 encoded string.
...pen for reading istream.init(f, 0x01, 0444, 0); var ch = components.classes["@mozilla.org/security/hash;1"] .createinstance(components.interfaces.nsicryptohash); // we want to use the sha256 algorithm ch.init(ch.sha256); // this tells updatefromstream to read the entire file const pr_uint32_max = 0xffffffff; ch.updatefromstream(istream, pr_uint32_max); // pass false here to get binary data back var hash = ch.finish(false); // return the two-digit hexadecimal code for a byte function tohexstring(charcode) { return ("0" + charcode.tostring(16)).slice(-2); } // convert the binary hash data to a hex string.
...And 4 more matches
XPCOM
this article will show you how to use the available interfaces in several mozilla products.aggregating the in-memory datasourcealready_addrefedalready_addrefed in association with nscomptr allows you to assign in a pointer without addrefing it.binary compatibilityif mozilla decides to upgrade to a compiler that does not have the same abi as the current version, any built component may fail.
...effectively, it is a different platform.bundling multiple binary componentsbinary xpcom components are sometimes required to implement low-level features for extensions.
... since binary components are linked against a single gecko sdk, a dependency to a particular version of gecko is created.
...And 4 more matches
WebAssembly Concepts - WebAssembly
webassembly is a low-level assembly-like language with a compact binary format that runs with near-native performance and provides languages with low-level memory models such as c++ and rust with a compilation target so that they can run on the web.
... module: represents a webassembly binary that has been compiled by the browser into executable machine code.
... above we talked about the raw primitives that webassembly adds to the web platform: a binary format for code and apis for loading and running this binary code.
...And 4 more matches
Understanding WebAssembly text format - WebAssembly
to enable webassembly to be read and edited by humans, there is a textual representation of the wasm binary format.
... s-expressions in both the binary and textual formats, the fundamental unit of code in webassembly is a module.
... if we convert our module to binary now (see converting webassembly text format to wasm), we’ll see just the 8 byte module header described in the binary format: 0000000: 0061 736d ; wasm_binary_magic 0000004: 0100 0000 ; wasm_binary_version adding functionality to your module ok, that’s not very interesting, let’s add some executable code to this module.
...And 4 more matches
File I/O - Archive of obsolete content
createinstance(components.interfaces.nsifileinputstream); istream.init(file, 0x01, 0444, 0); istream.queryinterface(components.interfaces.nsilineinputstream); // read lines into array var line = {}, lines = [], hasmore; do { hasmore = istream.readline(line); lines.push(line.value); } while(hasmore); istream.close(); // do something with read data alert(lines); reading a binary file for instance, to get the data in a png file: var ios = components.classes["@mozilla.org/network/io-service;1"].
... createinstance(components.interfaces.nsifileinputstream); istream.init(pngfile, -1, -1, false); var bstream = components.classes["@mozilla.org/binaryinputstream;1"].
... createinstance(components.interfaces.nsibinaryinputstream); bstream.setinputstream(istream); var bytes = bstream.readbytes(bstream.available()); writing a file // file is nsifile, data is a string var fostream = components.classes["@mozilla.org/network/file-output-stream;1"].
...And 3 more matches
Actionscript Performance Tests - Archive of obsolete content
sunspider) $ ./runtests.py sunspider/*.as sunspider/as3/*.as test avm metric sunspider/access-binary-trees.as 584 time sunspider/access-fannkuch.as 364 time ...
...interp) $ ./runtests.py --vmargs="-dinterp" sunspider/*.as test avm metric sunspider/access-binary-trees.as 690 time sunspider/access-fannkuch.as 467 time ...
... # to measure memory $ ./runtests.py --memory sunspider/*.as test avm metric sunspider/access-binary-trees.as 2.4m memory sunspider/access-fannkuch.as 1.5m memory ...
...And 3 more matches
Writing to Files - Archive of obsolete content
this method has a number of options to specify text or binary writing, the character set, and whether to append to an existing file or create a new one.
...these flags should be included in addition to the 'text' or 'binary' flags when using the newoutputstream method.
...writing binary data in addition to text, binary values may be written to a file either as bytes or as numbers.
...And 3 more matches
NSS Certificate Download Specification
binary formats nss's certificate loader will recognize several binary formats.
... they are: der encoded certificate: this is a single binary der encoded certificate.
... text formats any of the above binary formats can also be imported in text form.
...And 3 more matches
XPCOM changes in Gecko 2.0
prior to gecko 2, during component registration, all binary and javascript component files were loaded and called, asking them to register themselves.
...*/ if (xpcomutils.generatensgetfactory) var nsgetfactory = xpcomutils.generatensgetfactory([mycomponent]); else var nsgetmodule = xpcomutils.generatensgetmodule([mycomponent]); binary components binary components must be listed explicitly in a manifest using a binary-component directive: binary-component components/mycomponent.dll c++ in the component must be changed: a binary component no longer exports a nsgetmodule() function.
...it is possible for a binary component to be compatible with mozilla 1.9.2 and mozilla 2.0 by using the extra macro ns_impl_mozilla192_nsgetmodule.
...And 3 more matches
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
nsbufferedinputstream @mozilla.org/network/buffered-input-stream;1 nsibufferedinputstream .init(stream, buffersize) binary read binary data from the underlying stream, in "big-endian" order.
... nsbinaryinputstream @mozilla.org/binaryinputstream;1 nsibinaryinputstream .setinputstream(stream) object read a nsisupports object from the underlying stream.
... nsbinaryinputstream @mozilla.org/binaryinputstream;1 nsiobjectinputstream (inherits from nsibinaryinputstream) converter convert unicode characters from an underlying stream.
...And 3 more matches
Introduction to the File and Directory Entries API - Web APIs
usefulness of the api the file and directory entries api is an important api for the following reasons: it lets apps have offline and storage features that involve large binary blobs.
... it lets users of your web app directly edit a binary file that's in their local file directory.
... blob stands for binary large object.
...And 3 more matches
WindowOrWorkerGlobalScope.btoa() - Web APIs
the windoworworkerglobalscope.btoa() method creates a base64-encoded ascii string from a binary string (i.e., a string object in which each character in the string is treated as a byte of binary data).
... syntax var encodeddata = scope.btoa(stringtoencode); parameters stringtoencode the binary string to encode.
... base64, by design, expects binary data as its input.
...And 3 more matches
Numbers and dates - JavaScript
this includes using numbers written in various bases including decimal, binary, and hexadecimal, as well as the use of the global math object to perform a wide variety of mathematical operations on numbers.
... numbers in javascript, numbers are implemented in double-precision 64-bit binary format ieee 754 (i.e., a number between ±2−1022 and ±2+1023, or about ±10−308 to ±10+308, with a numeric precision of 53 bits).
... you can use four types of number literals: decimal, binary, octal, and hexadecimal.
...And 3 more matches
Index - Archive of obsolete content
212 stringview as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
... 306 using dependent libraries in extension components add-ons, extensions extensions with binary components sometimes need to depend on other shared libraries (for example, libraries provided by a third party).
...xul, xbl, javascript, and css files are all in text format and can be edited in a standard text editor, while image files are in binary gif, jpg, or png format and must be edited with an image editing program.
...And 2 more matches
NSS_3.12_release_notes.html
nss 3.12 source and binary distributions are also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_rtm/src/.
... binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_rtm/.
...the tar.gz or zip file expands to an nss-3.12 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin - nss tools and test programs you also need to download the nspr 4.7.1 binary distributions to get the nspr 4.7.1 header files and shared libraries, which nss 3.12 requires.
...And 2 more matches
Using the Places annotation service
from c++ you must use the setter for the explicit data type being saved: setpageannotationstring(auri, aname, avalue, aflags, aexpiration); setpageannotationint32(auri, aname, avalue, aflags, aexpiration); setpageannotationint64(auri, aname, avalue, aflags, aexpiration); setpageannotationdouble(auri, aname, avalue, aflags, aexpiration); setpageannotationbinary(auri, aname, adata, adatalen, aflags, aexpiration); and likewise for items in the places database: setitemannotationstring(aitemid, aname, avalue, aflags, aexpiration); setitemannotationint32(aitemid, aname, avalue, aflags, aexpiration); setitemannotationint64(aitemid, aname, avalue, aflags, aexpiration); setitemannotationdouble(aitemid, aname, avalue, aflags, aexpiration); setitemannota...
...tionbinary(aitemid, aname, avalue, adatalen, aflags, aexpiration); from javascript there are two simple function to perform all of these operations: setpageannotation(auri, aname, avalue, aflags, aexpiration); setitemannotation(aitemid, aname, avalue, aflags, aexpiration); these annotations all take similar parameters: uri or itemid: this is the nsiuri of the page to annotate, or for items in the places database, the id of the item.
...i, "my_extension/some_annotation", "this is the annotation value", 0, 0); retrieving annotations there are corresponding getters for the setters above (see nsiannotationservice.idl for the exact declarations): from c++: getpageannotationstring(auri, aname); getpageannotationint32(auri, aname); getpageannotationint64(auri, aname); getpageannotationdouble(auri, aname); getpageannotationbinary(auri, aname, adata, adatalen, amimetype); getitemannotationstring(aitemid, aname); getitemannotationint32(aitemid, aname); getitemannotationint64(aitemid, aname); getitemannotationdouble(aitemid, aname); getitemannotationbinary(aitemid, aname, adata, adatalen, amimetype); from javascript: getpageannotation(auri, aname); getitemannotation(aitemid, aname); these functions will retur...
...And 2 more matches
nsIWebSocketListener
1.0 66 introduced gecko 8.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void onacknowledge(in nsisupports acontext, in pruint32 asize); void onbinarymessageavailable(in nsisupports acontext, in acstring amsg); void onmessageavailable(in nsisupports acontext, in autf8string amsg); void onserverclose(in nsisupports acontext, in unsigned short acode, in autf8string areason); void onstart(in nsisupports acontext); void onstop(in nsisupports acontext, in nsresult astatuscode); methods onacknowledge() called...
... to acknowledge a message sent via nsiwebsocketchannel.sendmsg() or nsiwebsocketchannel.sendbinarymsg().
... onbinarymessageavailable() called when a binary message has been received.
...And 2 more matches
XPCOM ABI
xpcom abi is the binary interface of xpcom components.
...often, compiled xpcom components are called 'binary' or 'native'.
... a binary xpcom component consists of an .xpt file which fits all platforms and a dll (.dll on windows, .so on unix) which is platform-specific and has a certain abi.
...And 2 more matches
SubtleCrypto.importKey() - Web APIs
der is a set of rules for encoding asn.1 structures into a binary form.
...pem format is a way to encode binary data in ascii.
... it consists of a header and a footer, and in between, the base64-encoded binary data.
...And 2 more matches
MIME types (IANA media types) - HTTP
discrete types the discrete types currently registered with the iana are: applicationlist at iana any kind of binary data that doesn't fall explicitly into one of the other types; either data that will be executed or interpreted in some way or binary data that requires a specific application or category of application to use.
... generic binary data (or binary data whose true type is unknown) is application/octet-stream.
...similarly, for binary documents without a specific or known subtype, application/octet-stream should be used.
...And 2 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
(note that the usage of an octal integer literal, while standard for handling permissions, is dangerous and deprecated; usage of use es5 strict mode to disable this and other foot-guns is recommended) if you need to read/manipulate binary data, a nsibinaryinputstream instance is what you'll use on that stream (e.g.
... if your file is not text or json, then you're going to want to read binary data.
... the solution to read arbitrary binary data, of various sizes, in an endian-safe way, is to use dataview.
...if you were using nsibinaryinputstream or anything similar, figuring out dataview will be fairly straightforward.
Migrating raw components to add-ons - Archive of obsolete content
add your js and binary components within that directory.
...javascript c-types some add-on authors create binary components not because they want to interact with firefox at the c++ level, but strictly so that they can make use of third party dlls.
... if this is the only reason you are using a binary component instead of javascript, take a look at the new javascript c-types support introduced in firefox 3.6.
... it allows javascript code to load functions from dlls on windows, and should allow you to eliminate your dependence on binary components entirely.
Mozilla release FAQ - Archive of obsolete content
the code has been continually available since then via cvs (see section 1.8), and occasional binary releases (first as milestones, and more recently as versioned releases) have been made.
...please send stats to me in the following format: cpu/mhz, architecture, ram, disk type, os version, compiler version, build type, tree date -- build time example: 21164/533, alpha, 512m edo, ultra2 scsi, linux kernel 2.2.11, gcc 2.95, non-debug, 19 august 1999 cvs -- 25 minutes how do i run the binary on unix?
...to launch other binaries from dist/bin with the correct environment, use run-mozilla.sh ./your_binary features, patches what platforms is mozilla available for?
...where can i get a binary?
Index - MDN Web Docs Glossary: Definitions of Web-related terms
27 base64 advanced, base64, javascript, typed arrays, uri, url, unicode problem, atob(), btoa() base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ascii string format by translating it into a radix-64 representation.
...packaging it in a binary format.
...although svn can also handle binary files, we do not recommend that you use it for such files.
...wasm) is an open binary programming format that can be run in modern web browsers in order to gain performance and/or provide new features for web pages.
Chrome registration
binary-component binary-component components/mycomponent.dll [flags] instructs mozilla to register and use a binary component.
... it should be combined with the abi flag, since binary components are abi-specific.
...this is particularly true for binary components.
...for example: binary-component component/mylib.dll abi=winnt_x86-msvc binary-component component/mylib.so abi=linux_x86-gcc3 see xpcom abi for more details.
Eclipse CDT
download "eclipse ide for c/c++ developers" (not eclipse ide for enterprise java developers) from the eclipse download page, install it, and add the directory containing the eclipse binary to your path (/applications/eclipse.app/contents/eclipse/ on mac).
... you can increase eclipse's memory limits using the eclipse.ini that lives alongside the eclipse binary.
...first, make sure that the directory of eclipse's eclipse binary (typically /applications/eclipse.app/contents/macos/ on macos) is in your path.
...in the window that opens enter the path to your firefox binary (something like {your-obj-dir}/dist/nightlydebug.app/contents/macos/firefox) and select "disable auto build".
Interface Compatibility
binary interfaces traditionally, mozilla has maintained a set of xpcom interfaces and functions with the @status frozen marking.
... using these interfaces, and using dynamic calls to queryinterface, it has been possible to write binary xpcom components which were compatible with multiple versions of firefox.
... beginning with mozilla 2 (firefox 4), this will no longer be supported: all @status markings have been removed, and extensions that use binary components will need to recompile for each major version they wish to support.
...you should strongly consider migrating existing code to use js-ctypes instead of binary components.
NSPR release procedure
source tarball binary distributions right now i use the mozilla/nsprpub/admin/repackage.sh script to generate the binary distributions published on ftp.mozilla.org.
... as the name of the shell script implies, repackage.sh merely repackages binary distributions in a different format.
... before you run repackage.sh, you need to have built the binary distributions using the "gmake release" makefile target.
... these binary distributions are jar files, which are really zip files, and they are published in the directory /share/builds/components.
NSS_3.11.10_release_notes.html
nss 3.11.10 source and binary distributions are also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_11_10_rtm/src/.
... binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_11_10_rtm/.
...the tar.gz or zip file expands to an nss-3.11.10 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin - nss tools and test programs you also need to download the nspr 4.7.1 binary distributions to get the nspr 4.7.1 header files and shared libraries, which nss 3.11.10 requires.
... nspr 4.7.1 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7.1/.
NSS_3.12.1_release_notes.html
nss 3.12.1 source and binary distributions are also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_1_rtm/src/.
... binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_1_rtm/.
...the tar.gz or zip file expands to an nss-3.12.1 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin - nss tools and test programs you also need to download the nspr 4.7.1 binary distributions to get the nspr 4.7.1 header files and shared libraries, which nss 3.12.1 requires.
... nspr 4.7.1 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7.1/.
NSS_3.12.2_release_notes.html
nss 3.12.2 source and binary distributions are also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_2_rtm/src/.
... binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_2_rtm/.
...the tar.gz or zip file expands to an nss-3.12.2 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin< - nss tools and test programs you also need to download the nspr 4.7.1 binary distributions to get the nspr 4.7.1 header files and shared libraries, which nss 3.12.2 requires.
... nspr 4.7.1 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7.1/.
NSS 3.12.6 release notes
nss 3.12.6 source and binary distributions are also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_6_rtm/src/.
... you also need to download the nspr 4.8.4 binary distributions to get the nspr 4.8.4 header files and shared libraries, which nss 3.12.6 requires.
... nspr 4.8.4 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8.4/.
... bug 542538: nss: add function for recording ocsp stapled replies bug 544191: use system zlib on mac os x bug 544584: segmentation fault when enumerating the nss database bug 544586: various nss-sys-init patches from fedora bug 545273: remove unused function sec_init bug 546389: nsssysinit binary built inside source tree documentation for a list of the primary nss documentation pages on mozilla.org, see nss documentation.
NSS tools : certutil
-c create a new binary certificate file from a binary certificate request file.
... --dump-ext-val oid for single cert, print binary der encoding of extension oid.
... -o output-file specify the output file name for new certificates or binary certificate requests.
...92v3, prime239v1, prime239v2, prime239v3, c2pnb163v1, c2pnb163v2, c2pnb163v3, c2pnb176v1, c2tnb191v1, c2tnb191v2, c2tnb191v3, c2pnb208w1, c2tnb239v1, c2tnb239v2, c2tnb239v3, c2pnb272w1, c2pnb304w1, c2tnb359w1, c2pnb368w1, c2tnb431r1, secp112r1, secp112r2, secp128r1, secp128r2, sect113r1, sect113r2 sect131r1, sect131r2 -r display a certificate's binary der encoding when listing information about that certificate with the -l option.
NSS_3.12.3_release_notes.html
nss 3.12.3 source and binary distributions are also available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_3_rtm/src/.
... binary distributions: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_12_3_rtm/.
...the tar.gz or zip file expands to an nss-3.12.3 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin - nss tools and test programs you also need to download the nspr 4.7.4 binary distributions to get the nspr 4.7.4 header files and shared libraries, which nss 3.12.3 requires.
... nspr 4.7.4 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.7.4/.
An Overview of XPCOM
they are usually contained in reusable binary libraries (a dll on windows, for example, or a dso on unix), which can include one or more components.
... when two or more related components are grouped together in a binary library, the library is referred to as a module.
...the type library is a binary representation of an interface or interfaces.
...when components are accessed from other languages, as they can be in xpcom, they use the binary type library to access the interface, learn what methods it supports, and call those methods.
Components.Constructor
for example: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1"); var bis = new binaryinputstream(); print(bis.tostring()); // "[xpconnect wrapped nsisupports]" try { // someinputstream is an existing nsiinputstream // throws because bis hasn't been qi'd to nsibinaryinputstream bis.setinputstream(someinputstream); } catch (e) { bis.queryinterface(components.interfaces.nsibinaryinp...
...utstream); bis.setinputstream(someinputstream); // succeeds now } if two arguments are given, the created instance will be nsisupports.queryinterface()'d to the xpcom interface whose name is the second argument: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1", "nsibinaryinputstream"); var bis = new binaryinputstream(); print(bis.tostring()); // "[xpconnect wrapped nsibinaryinputstream]" // someinputstream is an existing nsiinputstream bis.setinputstream(someinputstream); // succeeds if three arguments are given, then in addition to being nsisupports.queryinterface()'d, the instance will also have had an initialization method called on it.
... the arguments used with the initialization method are the arguments passed to the components.constructor()-created function when called: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1", "nsibinaryinputstream", "setinputstream"); try { // throws, because number of arguments isn't equal to the number of // arguments nsibinaryinputstream.setinputstream takes var bis = new binaryinputstream(); } catch (e) { // someinputstream is an existing nsiinputstream bis = new binaryinputstream(someinputstream); // succeeds var bytes = bis.readbytearray(somenumberofbytes); // succeeds } compare instance creation from base principles with instance creation using componen...
...ts.constructor(); the latter is much easier to read than the former (particularly if you're creating instances of a component in many different places): var bis = components.classes["@mozilla.org/binaryinputstream;1"] .createinstance(components.interfaces.nsibinaryinputstream); bis.setinputstream(someinputstream); // assumes binaryinputstream was initialized previously var bis = new binaryinputstream(someinputstream); components.constructor() is purely syntactic sugar (albeit speedy and pretty syntactic sugar) for actions that can be accomplished using other common methods.
nsIContentFrameMessageManager
atob() convert ascii base64 data to binary data.
... returns string: the decoded binary data.
... btoa() convert binary data to ascii base64 data .
... parameters name type description abase64data string binary data to encode as base64.
nsIFaviconService
adatalen output parameter where the size of the binary data will be placed.
... adata output parameter where the binary favicon data will be placed.
... adata binary contents of the favicon to save.
... adatalen optional from gecko 2.0 length of binary data.
nsIPushMessage
method overview domstring text(); jsval json(); void binary([optional] out uint32_t datalen, [array, retval, size_is(datalen)] out uint8_t data); methods text() extracts the message data as a utf-8 text string.
... binary() extracts the message data as a byte array.
... void binary( [optional] out uint32_t datalen, [array, retval, size_is(datalen)] out uint8_t data ); parameters datalen the data size.
...when called from javascript, nsipushmessage.binary() returns data.
nsIScriptableInputStream
however, it does not address the problem of reading arbitrary binary data from a stream.
... for binary input see nsibinaryinputstream.
... note: starting in gecko 2.0, you can use the netutils.jsm javascript code module and its readinputstreamtostring() method to read arbitrary binary data into a javascript string.
...var {classes: cc, interfaces: ci, results: cr, constructor: cc, utils: cu } = components; var scriptableinputstream = cc("@mozilla.org/scriptableinputstream;1", "nsiscriptableinputstream", "init"); let entry = this.getentry(name); let stream = new scriptableinputstream(this.getinputstream(name)); try { // use readbytes to get binary data, read to read a (null-terminated) string let contents = stream.readbytes(entry.realsize); } finally { stream.close(); } example usage in ondataavailable remember: the nsiscriptableinputstream has a contract where `init` should only be called once, and should always be closed.
nsIWebSocketChannel
e: var websocketchannel = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsiwebsocketchannel); method overview void asyncopen(in nsiuri auri, in acstring aorigin, in nsiwebsocketlistener alistener, in nsisupports acontext); void close(in unsigned short acode, in autf8string areason); void sendbinarymsg(in acstring amsg); void sendmsg(in autf8string amsg); attributes attribute type description extensions acstring sec-websocket-extensions response header value.
... 1003 close_unsupported the connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).
... sendbinarymsg() sends a binary message to the websocket peer.
... void sendbinarymsg( in acstring amsg ); parameters amsg the data to send.
Troubleshooting XPCOM components registration
there are several common reasons that registration can fail: a component that is a binary (shared library) fails to load a javascript component has parsing errors the shared library loaded correctly, but registration was not successful did registration succeed?
... load failure of binary components on the mozilla trunk (firefox 3, xulrunner 1.9), components that fail to load will print an error to the error console.
... if using firefox 4 / xulrunner 2.0, make sure that your extension is unpacked and you declared the binary component in your chrome.manifest.
... use dyld environment variables to trace binary component loading: dyld_print_apis=1 dyld_print_libraries=1 (see `man dyld` for details).
Grammar and types - JavaScript
numeric literals number and bigint types can be written in decimal (base 10), hexadecimal (base 16), octal (base 8) and binary (base 2).
...therefore: 0xa = 0xa = 10 and 0xf = 0xf = 15.) a leading 0b (or 0b) indicates a binary numeric literal.
... binary numerics can only include the digits 0 and 1.
... some examples of numeric literals are: 0, 117, -345, 123456789123456789n (decimal, base 10) 015, 0001, -0o77, 0o777777777777n (octal, base 8) 0x1123, 0x00111, -0xf1a7, 0x123456789abcdefn (hexadecimal, "hex" or base 16) 0b11, 0b0011, -0b11, 0b11101001010101010101n (binary, base 2) for more information, see numeric literals in the lexical grammar reference.
JavaScript typed arrays - JavaScript
javascript typed arrays are array-like objects that provide a mechanism for reading and writing raw binary data in memory buffers.
... however, as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data.
...each entry in a javascript typed array is a raw binary value in one of a number of supported formats, from 8-bit integers to 64-bit floating-point numbers.
... arraybuffer the arraybuffer is a data type that is used to represent a generic, fixed-length binary data buffer.
io/file - Archive of obsolete content
"b" opens the file in binary mode.
...if the file is opened in binary read-only mode, a bytereader is returned, and if binary write-only mode, a bytewriter is returned.
...if the string contains "b", the contents will be returned in binary mode.
Creating Reusable Modules - Archive of obsolete content
ce(ci.nsifileinputstream); // open for reading istream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); // this tells updatefromstream to read the entire file const pr_uint32_max = 0xffffffff; ch.updatefromstream(istream, pr_uint32_max); // pass false here to get binary data back var hash = ch.finish(false); // convert the binary hash data to a hex string.
...ce(ci.nsifileinputstream); // open for reading istream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); // this tells updatefromstream to read the entire file const pr_uint32_max = 0xffffffff; ch.updatefromstream(istream, pr_uint32_max); // pass false here to get binary data back var hash = ch.finish(false); // convert the binary hash data to a hex string.
...ce(ci.nsifileinputstream); // open for reading istream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); // this tells updatefromstream to read the entire file const pr_uint32_max = 0xffffffff; ch.updatefromstream(istream, pr_uint32_max); // pass false here to get binary data back var hash = ch.finish(false); // convert the binary hash data to a hex string.
Install Manifests - Archive of obsolete content
you do not need to set this flag if your add-on has a binary component, since add-ons with binary components are always subject to strict compatibility checking (because binary components need to be rebuilt for every major application release anyway).
...for extensions including binary (compiled) components, you should never use the os alone, but include the abi (s) that you compiled the components with.
...if an extension includes the following then it must request unpacking: binary xpcom components plugins search plugins dlls loaded with ctypes dictionaries window icons examples <description about="urn:mozilla:install-manifest"> <em:id>extension@mysite.com</em:id> <em:unpack>true</em:unpack> ...
Promises - Archive of obsolete content
ssword }) .then(response => { if (response.messages) return publish({ username: user, messages: response.messages }); }) .then(null, (e) => { self.reporterror("publication failed", e); }); file io file io in add-ons should be done via the os.file api, which provides a simple, but powerful, interface for reading, writing, and manipulating both text and binary files.
... let iter = new os.file.directoryiterator(dir); yield iter.foreach(entry => { if (!entry.isdir) files.push(entry.path); }); iter.close(); } // read the files as binary blobs and process them.
... let processor = new fileprocessor(); for (let file of files) { let data = yield os.file.read(file); processor.add(data); } // now write the processed files back out, as a binary blob.
How Mozilla finds its configuration files - Archive of obsolete content
how mozilla finds its configuration files mozilla looks into the binary %userprofile%\application data\mozilla\registry.dat file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (located at common/profiles/profilename/directory.
...the of the binary registry file is described here.
...usage: ./readmozprofile.pl < registry.dat >registry.xml a program to convert the xml file back into the binary registry.dat file.
Structure of an installable bundle - Archive of obsolete content
for example: binary-component components/windows/mycomponent.dll abi=winnt_x86-msvc binary-component components/mac/mycomponent.dylib abi=darwin_x86-gcc3 binary-component components/mac/mycomponent64.dylib abi=darwin_x86_64-gcc3 binary-component components/linux/mycomponent.so abi=linux_x86-gcc3 this also means you can no longer have platform-specific preference files in your bundle.
... in some cases a single extension or application may wish to include binary component or plugins for multiple platforms, or theme authors might want to include multiple platform-specific jar files.
..., and windows(of the form: /platform/win*/), it would provide the following files: /platform/linux_x86-gcc3/plugins/libmyplugin.so /platform/winnt_x86-msvc/plugins/myplugin.dll /platform/darwin_ppc-gcc3/plugins/libmyplugin.dylib because xpt files are not platform-specific, any associated xpt files would go in the generic components directory: /components/myplugin.xpt if an extension has non-binary platform-specific code (such as code which uses the windows registry from script), it can also use just the operating system identifier as a platform-subdirectory: /platform/winnt/components/registerdoctype.js when platform-specific jar files are used, each platform directory should have its own chrome.manifest file: chrome.manifest chrome/mytheme-base.jar platform/darwin/chrome.manifest plat...
Mac stub installer - Archive of obsolete content
build the mac installer (debug or non-debug target) using miw.mcp grab a nightly build, say from <http://ftp.mozilla.org/pub/mozilla/n...taller.sea.bin> drop in the installer binary next to the "mozilla installer" in the "mozilla installer" folder created by unstuffing the opt build.
... alternative to steps 3 and 4 copy the "installer modules" folder from the "mozilla installer" folder into the "macbuild" folder that contains the build debug or non-debug installer binary next to miw.mcp.
...to do this, in addition to the above steps to set up the mac installer to debug you will need to do the following: create a file named xpcom.xpi with the shared libraries in the structure described under the [xpcom] section in: <http://lxr.mozilla.org/seamonkey/sou...ackages-mac#33> note that if you are using the debug target of the installer binary all shared libraries are expected to have the name format <libname>debug.shlb now set a break point at xpi_init() in the mac installer code and step into xpistub and eventually the xpinstall engine will load including symbols so you can set a break point in the xpinstall engine itself.
Introduction to Public-Key Cryptography - Archive of obsolete content
certificate data formats certificate requests and certificates can be created, stored, and installed in multiple formats: binary and text.
...three examples of binary formats are der-encoded certificates, pkcs #7 certificate chains, and netscape certificate sequence.
... any of the binary formats can be imported in text form, which begins with the line: -----begin certificate----- following this line is the certificate data, which can be in any of the binary formats described.
PRNetAddr
therefore, the family field can be pr_af_inet only for default nspr, and can also be pr_af_inet6 if the binary supports ipv6.
... prnetaddr is binary-compatible with the socket address structures in the familiar berkeley socket interface, although this fact should not be relied upon.
... the raw member of the union is equivalent to struct sockaddr, the inet member is equivalent to struct sockaddr_in, and if the binary is built with ipv6 support, the ipv6 member is equivalent to struct sockaddr_in6.
Using JSS
MozillaProjectsNSSJSSUsing JSS
using jss newsgroup: mozilla.dev.tech.crypto if you have already built jss, or if you are planning to use a binary release of jss, here's how to get jss working with your code.
... jss dependencies core library name description binary release location nspr4 nspr os abstraction layer http://ftp.mozilla.org/pub/mozilla.org/nspr/releases plc4 nspr standard c library replacement functions plds4 nspr data structure types nss3 nss crypto, pkcs #11, and utilities http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases ssl3 ...
...if you are downloading binaries, get them from the binary release locations in the above table.
nss tech note6
any offer of binary support that may have been previously made to you by nss developers is null and void.
... it is released as part of the nss binary distributions.
... if your build process does not modify nss shared libraries, you can just use the .chk files in the nss binary distributions.
certutil
-c create a new binary certificate file from a binary certificate request file.
... -o output-file specify the output file name for new certificates or binary certificate requests.
... -r display a certificate's binary der encoding when listing information about that certificate with the -l option.
Bytecode Descriptions
format: jof_ic binary operators bitor, bitxor, bitand stack: lval, rval ⇒ (lval op rval) binary bitwise operations (|, ^, &).
...format: jof_ic add stack: lval, rval ⇒ (lval + rval) the binary + operator.
...format: jof_ic sub stack: lval, rval ⇒ (lval - rval) the binary - operator.
Introduction to the JavaScript shell
to get the spidermonkey javascript shell, see the spidermonkey build documentation or download a compiled binary for your platform from the nightly builds.
...from a bash console when using a pre-compiled binary, try <path to your firefox's run-mozilla.sh>/run-mozilla.sh ./js -- that worked for me] if you'd like to run the javascript code in the file foo.js, you can use this command: js foo.js to run foo.js then drop into the interactive shell, do this: js -f foo.js -i reference note: because the javascript shell is used as a test environment for the javascript engine, the available options a...
...if type is "binary" returns an uint8array, otherwise returns an utf-8 decoded string.
Parser API
interface binaryexpression <: expression { type: "binaryexpression"; operator: binaryoperator; left: expression; right: expression; } a binary operator expression.
... enum binaryoperator { "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in" | "instanceof" | ".." } a binary operator token.
... binaryexpression(op, left, right[, loc]) op: binaryoperator left: customexpression right: customexpression loc: sourcelocation returns: customexpression callback to produce a custom binary expression node.
Places utilities for JavaScript
the annotation objects returned or send from/to all these functions all are arrays of objects which have the properties: name the annotation name flags annotation flags expires annotation expiration mimetype mimetype of the annotation, usually only used for binary annotations type the type used for non-binary annotations value the value of the annotation getannotationsforuri() fetch all annotations for a uri, including all properties of each annotation which would be required to recreate it.
... aannotations array of objects, each containing the following properties: name, flags, expires, type, mimetype (only used for binary annotations) value.
... setannotationsforitem(int aitemid, array object aannos) parameters aitemid the identifier of the item for which annotations are to be set aannotations array of objects, each containing the following properties: name, flags, expires, type, mimetype (only used for binary annotations) value.
Accessing the Windows Registry Using XPCOM
the data types supported by this interface are defined as named constants on the interface as follows: type_none — probably not useful type_string — a unicode string value type_binarybinary data type_int — a 32 bit integer type_int64 — a 64 bit integer each of these types (except type_none) has a corresponding method to read the value data: readstringvalue() readbinaryvalue() readintvalue() readint64value() since javascript is a dynamically-typed language, you may wish to use the following code to handle all types of data.
... function readregistryvalue(wrk, value) { switch (wrk.getvaluetype(value)) { case wrk.type_string: return wrk.readstringvalue(value); case wrk.type_binary: return wrk.readbinaryvalue(value); case wrk.type_int: return wrk.readintvalue(value); case wrk.type_int64: return wrk.readint64value(value); } // unknown type return null; } writing registry values writing registry values is quite similar to reading.
...this example demonstrates a trivial registry value cache for one key: var cache = {}; function readregistryvaluenocache(wrk, value) { switch (wrk.getvaluetype(value)) { case wrk.type_string: return wrk.readstringvalue(value); case wrk.type_binary: return wrk.readbinaryvalue(value); case wrk.type_int: return wrk.readintvalue(value); case wrk.type_int64: return wrk.readint64value(value); } // unknown type return null; } function readregistryvalue(wrk, value) { if (wrk.haschanged()) { // wipe out the cache cache = {}; } if (value in cache) { return cache[value]; } cache[value] = readre...
Virtualenv
a python binary, as well as easy_install and pip are available in the bin/ subdirectory (or scripts on windows).
... > ls tmp/bin/ activate activate.fish easy_install pip python activate.csh activate_this.py easy_install-2.7 pip-2.7 using this python binary, or these scripts (which point to this python binary), you will correctly install python packages in the lib/python2.x/site-packages directory and they will be appropriately added to your import path (sys.path) via lib/python2.x/site.py.
... in order to get the virtualenv's python binary on your path, you should source the bin/activate script on unix or run activate.bat on windows.
WebIDL bindings
this is more efficient than using the same binaryname for both attributes, because it shares the binding glue code between them.
... [binaryname] [binaryname] can be specified on method or attribute to change the c++ function name that will be used for the method or attribute.
... for example, given this idl: interface interfacewithrenamedthings { [binaryname="renamedmethod"] void somemethod(); [binaryname="renamedattribute"] attribute long someattribute; }; the corresponding c++ would be: class interfacewithrenamedthings { public: void renamedmethod(); int32_t renamedattribute(); void setrenamedattribute(int32_t); }; [deprecated="tag"] when deprecating an interface or method, the [deprecated] annotation causes the webidl compiler to insert code that generates deprecation warnings.
Using files from web applications - Web APIs
ate(percentage); } }, false); xhr.upload.addeventlistener("load", function(e){ self.ctrl.update(100); const canvas = self.ctrl.ctx.canvas; canvas.parentnode.removechild(canvas); }, false); xhr.open("post", "http://demos.hacks.mozilla.org/paul/demos/resources/webservices/devnull.php"); xhr.overridemimetype('text/plain; charset=x-user-defined-binary'); reader.onload = function(evt) { xhr.send(evt.target.result); }; reader.readasbinarystring(file); } the fileupload() function shown above creates a throbber, which is used to display progress information, and then creates an xmlhttprequest to handle uploading the data.
... the filereader object is used to convert the file to a binary string.
...$_files['myfile']['name']); exit; } ?><!doctype html> <html> <head> <title>dnd binary upload</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <script type="application/javascript"> function sendfile(file) { const uri = "/index.php"; const xhr = new xmlhttprequest(); const fd = new formdata(); xhr.open("post", uri, true); xhr.onreadystatechange = function() { if (...
FileReaderSync - Web APIs
methods filereadersync.readasarraybuffer() this method converts a specified blob or a file into an arraybuffer representing the input data as a binary string.
... filereadersync.readasbinarystring() this method converts a specified blob or a file into a domstring representing the input data as a binary string.
... yeschrome android full support yesfirefox android full support 8opera android full support yessafari ios full support yessamsung internet android full support yesreadasbinarystringchrome full support yesedge full support 12firefox full support 8ie full support yesopera full support yessafari full support ...
WebSocket.send() - Web APIs
WebAPIWebSocketsend
arraybuffer you can send the underlying binary data used by a typed array object; its binary data contents are queued in the buffer, increasing the value of bufferedamount by the requisite number of bytes.
... blob specifying a blob enqueues the blob's raw data to be transmitted in a binary frame.
... arraybufferview you can send any javascript typed array object as a binary frame; its binary data contents are queued in the buffer, increasing the value of bufferedamount by the requisite number of bytes.
JavaScript data types and data structures - JavaScript
the number type is a double-precision 64-bit binary format ieee 754 value (numbers between -(253 − 1) and 253 − 1).
...however, you are able to notice this when you divide by zero: > 42 / +0 infinity > 42 / -0 -infinity although a number often represents only its value, javascript provides binary (bitwise) operators.
... typed arrays are new to javascript with ecmascript 2015, and present an array-like view of an underlying binary data buffer.
Indexed collections - JavaScript
foreach.call(arguments, function(item) { console.log(item); }); } array prototype methods can be used on strings as well, since they provide sequential access to their characters in a similar way to arrays: array.prototype.foreach.call('a string', function(chr) { console.log(chr) }) typed arrays javascript typed arrays are array-like objects and provide a mechanism for accessing raw binary data.
...however, as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily manipulate raw binary data in typed arrays.
... arraybuffer the arraybuffer is a data type that is used to represent a generic, fixed-length binary data buffer.
Unicode property escapes - JavaScript
a character is described by several properties which are either binary ("boolean-like") or non-binary.
... // non-binary values \p{unicodepropertyvalue} \p{unicodepropertyname=unicodepropertyvalue} // binary and non-binary values \p{unicodebinarypropertyname} // negation: \p is negated \p \p{unicodepropertyvalue} \p{unicodebinarypropertyname} general_category (gc) script (sc) script_extensions (scx) see also propertyvaluealiases.txt unicodebinarypropertyname the name of a binary property.
... unicodepropertyname the name of a non-binary property: unicodepropertyvalue one of the tokens listed in the values section, below.
Math.clz32() - JavaScript
the math.clz32() function returns the number of leading zero bits in the 32-bit binary representation of a number.
... return value the number of leading zero bits in the 32-bit binary representation of the given number.
... // let p be the number of leading zero bits in // the 32-bit binary representation of n.
Lexical grammar - JavaScript
ponential the decimal exponential literal is specified by the following format: ben; where b is a base number (integer or floating), followed by e char (which serves as separator or exponent indicator) and n, which is exponent or power number – a signed integer (as per 2019 ecma-262 specs): 0e-5 // => 0 0e+5 // => 0 5e1 // => 50 175e-2 // => 1.75 1e3 // => 1000 1e-3 // => 0.001 binary binary number syntax uses a leading zero followed by a lowercase or uppercase latin letter "b" (0b or 0b).
...if the digits after the 0b are not 0 or 1, the following syntaxerror is thrown: "missing binary digits after 0b".
... numeric separators to improve readability for numeric literals, underscores (_, u+005f) can be used as separators: // separators in decimal numbers 1_000_000_000_000 1_050.95 // separators in binary numbers 0b1010_0001_1000_0101 // separators in octal numbers 0o2_2_5_6 // separators in hex numbers 0xa0_b0_c0 // separators in bigints 1_000_000_000_000_000_000_000n note these limitations: // more than one underscore in a row is not allowed 100__000; // syntaxerror // not allowed at the end of numeric literals 100_; // syntaxerror // can not be used after leading 0 0_1; // syntaxerror ...
io/byte-streams - Archive of obsolete content
function readbinarydatafromfile (filename) { var fileio = require("sdk/io/file"); var data = null; if (fileio.exists(filename)) { var bytereader = fileio.open(filename, "rb"); if (!bytereader.closed) { data = bytereader.read(); bytereader.close(); } } return data; } function writebinarydatatofile(data, filename) { var fileio = require("sdk/io/file"); var bytewriter = fileio.open(filename, "wb"); if (!bytewriter.closed) { bytewriter.write(data); bytewriter.close(); } } globals constructors bytereader(inputstream) creates a binary input stream that reads bytes from a backing stream.
... bytewriter(outputstream) creates a binary output stream that writes bytes to a backing stream.
jpm-mobile - Archive of obsolete content
-b --binary binary use the package name of firefox specified in binary.
... -b --binary binary use the package name of firefox specified in binary.
Troubleshooting - Archive of obsolete content
in those cases you need to use jpm's --binary option.
... when you run jpm to test your add-on or run unit tests, it prints out the location of the firefox or xulrunner binary that it found, so you can check its output to be sure.
Downloading Files - Archive of obsolete content
downloading binary files with a progress listener to download a binary file with custom progress listener: components.utils.import("resource://gre/modules/privatebrowsingutils.jsm"); const webbrowserpersist = components.constructor("@mozilla.org/embedding/browser/nswebbrowserpersist;1", "nsiwebbrowserpersist"); var persist = webbrowserpersist(); var targetfile =...
...gefromurl(url) { var ioserv = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var channel = ioserv.newchannel(url, 0, null); var stream = channel.open(); if (channel instanceof components.interfaces.nsihttpchannel && channel.responsestatus != 200) { return ""; } var bstream = components.classes["@mozilla.org/binaryinputstream;1"] .createinstance(components.interfaces.nsibinaryinputstream); bstream.setinputstream(stream); var size = 0; var file_data = ""; while(size = bstream.available()) { file_data += bstream.readbytes(size); } return file_data; } see also nsidownloadprogresslistener saving an arbitrary url to a local file customizing the download progress bar appea...
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
in addition, binary components need to be recompiled for every major firefox release, which can be frustrating.
...secondly, it instructs the build system to create a new extension, rather than copying the components directly into firefox's binary directory.
Appendix: What you should know about open-source software licenses - Archive of obsolete content
redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1.
...redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
it was apparently supposed to increase the load of the binary for a feature not used by lots of individuals.
...binary distributions should now include support for autoconfig (pref extension!) but unfortunately not for ldap calls :-( (cf.
How Thunderbird and Firefox find their configuration files - Archive of obsolete content
how thunderbird and firefox find their configuration files thunderbird looks into the binary %appdata%\thunderbird\profiles.ini file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (usually located in %appdata%\thunderbird\profiles\profilename).
...unlike mozilla's binary registry.dat file, thunderbird's and firefox' profiles.ini file is a readable text file.
Making a Mozilla installation modifiable - Archive of obsolete content
xul, xbl, javascript, and css files are all in text format and can be edited in a standard text editor, while image files are in binary gif, jpg, or png format and must be edited with an image editing program.
...although jar archives are binary files, mozilla's ui is not compiled into machine code; mozilla instead builds its ui from the non-compiled files in the archive each time it starts up.
Mozilla Crypto FAQ - Archive of obsolete content
at that point both nss and psm will be completely buildable using the open source code available from the mozilla.org site, and nss and psm will be included in the mozilla binary releases distributed by mozilla.org.
...iplanet e-commerce solutions has released netscape-branded binary versions of personal security manager that incorporate the rsa bsafe library; the netscape psm software can be installed and used with binary mozilla versions.
open - Archive of obsolete content
valid file types are text, binary and unicode.
...binary indicates utf-8 files.
File object - Archive of obsolete content
currently "ascii" (ascii), "binary" (utf-8) or "unicode" (ucs-2).
...binary (utf-8) files and pipelines (including file.intput) do not support random access.
Running Tamarin performance tests - Archive of obsolete content
$ cd tamarin-redux/test/performance $ python runtests.py executing tests at 2008-07-22 13:56:54.820920 avm: c:/dev/tamarin-tracing/bld/shell/avmshell.exe test avm sunspider/access-binary-trees.as 82.0 sunspider/access-fannkuch.as 152.0 sunspider/access-nbody.as 173.0 sunspider/access-nsieve.as 65.0 sunspider/bitops-3bit-bits-in-byte.as 13.0 sunspider/bitops-bits-in-byte.as 36.0 $ export avm2=c:/dev/tamarin-tracing2/bld/shell/avmshell.exe $ pytho...
...n ./runtests.py executing tests at 2008-07-22 14:03:51.957381 avm: c:/dev/tamarin-tracing/bld/shell/avmshell.exe avm2: c:/dev/tamarin-tracing2/bld/shell/avmshell.exe test avm avm2 %sp sunspider/access-binary-trees.as 82.0 80.0 2.5 sunspider/access-fannkuch.as 153.0 155.0 -1.3 sunspider/access-nbody.as 176.0 178.0 -1.1 sunspider/access-nsieve.as 65.0 68.0 -4.4 sunspider/bitops-3bit-bits-in-byte.as 12.0 13.0 -7.7 sunspider/bitops-bits-in-byte.as 36.0 36.0 0.0 by default tests sunspider and sunspider-as3 (optimized for as3) and run.
TraceVis - Archive of obsolete content
cd js/src autoconf213 mkdir opt-tracevis cd opt-tracevis ../configure --enable-tracevis make -j2 the resulting binary will be at dist/bin/js relative to the current directory.
... running with tracevis to run a shell with tracevis: dist/bin/js -j -t /tmp/tracevis.log myprogram.js the tracevis log file is a binary file consisting of a sequence of 8-byte records.
Using XPInstall to Install Plugins - Archive of obsolete content
it can be a way to ensure a smooth user-experience when obtaining plugins, without obliging the user to exit the browsing environment to launch a binary installer (the classic setup.exe experience on windows) or obliging the user to restart their browser.
...from javascript, you can call xpinstall's execute method of the install object to execute the binary.
IO - Archive of obsolete content
ArchiveMozillaXULFileGuideIO
reading from a file for information about reading from text and binary files, see reading from files.
... writing to a file for information about writing to text and binary files, see writing to files.
Getting started with XULRunner - Archive of obsolete content
since we are not creating any binary xpcom components, we only need to download and install the xulrunner runtime package, not the sdk.
...therefore, either you need to compile xulrunner manually or download a binary release from mozilla's ftp server.
Mozrunner - Archive of obsolete content
command line usage the mozrunner command will launch the application (specified by --app) from a binary specified with -b or as located on the path.
...mozrunner also exposes two application specific classes, firefoxrunner and thunderbirdrunner which record the binary names necessary for the runner class to find them on the system.
Sending form data - Learn web development
files are binary data — or considered as such — whereas all other data is text data.
... because http is a text protocol, there are special requirements for handling binary data.
What is JavaScript? - Learn web development
the program is executed from a binary format, which was generated from the original program source code.
...from a technical standpoint, most modern javascript interpreters actually use a technique called just-in-time compiling to improve performance; the javascript source code gets compiled into a faster, binary format while the script is being used, so that it can be run as quickly as possible.
Makefile - variables
os_ variable description os_arch platform type os_target target binary type if building on an intermediate platform(building mobile binaries on gnu/linux).
... default=$(dist)/bin xpi_name if set final_target=$(dist)/xpi-stage/$(xpi_name) dist_subdir if set final_target will be $(dist)/bin/$(dist_subdir) [ metro build ] l10n.mk and localization variable description en_us_binary_url server url from which wget will ftp binaries.
Eclipse CDT Manual Setup
if you will not be using eclipse for debugging, select "c/c++ build > settings" on the left, select the "binary parsers" tab, and make sure that all the parsers are deselected.
...you should now add the folder containing your firefox binary (note on mac this is inside the .app - so "{your-obj-dir}/dist/nightlydebug.app/contents/macos/" - and since the ui will only allow you to select to the 'dist' folder, you'll need to type the end of the path in manually).
NSPR
legacy nspr content older nspr content is available in svn for browsing and/or migration to this site getting nspr nspr is available in various source and binary packages, depending on your platform: windows: build the source package, using the nspr build instructions.
... opensuse linux: install one or more of the following via yast or zypper : mozilla-nspr : binary libraries for your platform mozilla-nspr-32bit : binary libraries needed to run 32-bit programs on a 64-bit os mozilla-nspr-devel : files needed (in addition to the above libraries) to compile programs using nspr mozilla-nspr-debuginfo : debug information (including build symbols) for package mozilla-nspr mozilla-nspr-debuginfo-32bit : debug information (including build symbols) for package mozilla-nspr-32bit mozilla-nspr-debugsource : debug sources for all of the above community view mozill...
An overview of NSS Internals
on a technical level the set is a binary software module.
...nss prefers the binary presentation, but is often capable to use base64 or ascii presentations, especially when importing data from files.
NSS FAQ
MozillaProjectsNSSFAQ
the psm binary provides a client module that performs cryptographic operations on behalf of applications.
... binary builds of nss for several platforms including the command-line tools can be downloaded from http://ftp.mozilla.org/pub/mozilla.o...y/nss/releases/.
NSS 3.12.9 release notes
you also need to download the nspr 4.8.7 binary distributions to get the nspr 4.8.7 header files and shared libraries, which nss 3.12.9 requires.
... nspr 4.8.7 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8.7/.
NSS Sample Code Utilities_1
ame, prbool ascii) { secstatus rv = secsuccess; prfiledesc *infile = null; infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "failed to open file \"%s\" (%ld, %ld).\n", infilename, pr_geterror(), pr_getoserror()); rv = secfailure; goto cleanup; } if (ascii) { /* first convert ascii to binary */ secitem filedata; char *asc, *body; /* read in ascii data */ rv = filetoitem(&filedata, infile); asc = (char *)filedata.data; if (!asc) { pr_fprintf(pr_stderr, "unable to read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and remove them */ ...
... trailer = strstr(++body, "-----end"); if (trailer != null) { *trailer = '\0'; } else { pr_fprintf(pr_stderr, "input has header but no trailer\n"); port_free(filedata.data); rv = secfailure; goto cleanup; } } else { body = asc; } /* convert to binary */ rv = atob_convertasciitoitem(der, body); if (rv) { pr_fprintf(pr_stderr, "error converting ascii to binary %s\n", port_geterror()); port_free(filedata.data); rv = secfailure; goto cleanup; } port_free(filedata.data); } else { /* read in binary der */ rv = filetoitem(der,...
Utilities for nss samples
ame, prbool ascii) { secstatus rv = secsuccess; prfiledesc *infile = null; infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "failed to open file \"%s\" (%ld, %ld).\n", infilename, pr_geterror(), pr_getoserror()); rv = secfailure; goto cleanup; } if (ascii) { /* first convert ascii to binary */ secitem filedata; char *asc, *body; /* read in ascii data */ rv = filetoitem(&filedata, infile); asc = (char *)filedata.data; if (!asc) { pr_fprintf(pr_stderr, "unable to read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and remove them */ ...
... trailer = strstr(++body, "-----end"); if (trailer != null) { *trailer = '\0'; } else { pr_fprintf(pr_stderr, "input has header but no trailer\n"); port_free(filedata.data); rv = secfailure; goto cleanup; } } else { body = asc; } /* convert to binary */ rv = atob_convertasciitoitem(der, body); if (rv) { pr_fprintf(pr_stderr, "error converting ascii to binary %s\n", port_geterror()); port_free(filedata.data); rv = secfailure; goto cleanup; } port_free(filedata.data); } else { /* read in binary der */ rv = filetoitem(der,...
Python binding for NSS
a single code base supports both py2 (minimum version 2.7) and py3 when built for py2: text will be a unicode object binary data will be a str object ints will be python long object when built for py3: text will be a str object binary data will be a bytes object ints will be a python int object all pure python tests and examples have been ported to py3 syntax but should continue to run under py2.
... certattribute.format_lines certattribute.format nss.secitem.get_integer the following class properties were added: certificaterequest.attributes certattribute.type_oid certattribute.type_tag certattribute.type_str certattribute.values the following module functions were added: base64_to_binary the following files were added: test_cert_request release 0.14.1 release date 2013-10-28 scm tag pynss_release_0_14_1 source download https://ftp.mozilla.org/pub/mozilla.org/security/python-nss/releases/pynss_release_0_14_1/src/ change log release 0.14.1 contains only modifications t...
NSS tools : pk12util
-r dumps all of the data in raw (binary) form.
... iteration count: 1 (0x1) certificate: data: version: 3 (0x2) serial number: 13 (0xd) signature algorithm: pkcs #1 sha-1 with rsa encryption issuer: "e=personal-freemail@thawte.com,cn=thawte personal freemail c a,ou=certification services division,o=thawte consulting,l=cape t own,st=western cape,c=za" alternatively, the -r prints the certificates and then exports them into separate der binary files.
NSS tools : pk12util
-r dumps all of the data in raw (binary) form.
... alternatively, the -r prints the certificates and then exports them into separate der binary files.
Rhino license
* * redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer.
... * * - redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution.
Shell global objects
wasmtexttobinary(str) translates the given text wasm module into its binary encoding.
... wasmbinarytotext(bin) translates binary encoding to text format wasmextractcode(module) extracts generated machine code from webassembly.module.
Thread Sanitizer
the default way of symbolizing the traces is much slower than using llvm-symbolizer for that purpose: llvm ships with a symbolizer binary that tsan will readily use to immediately output symbolized traces much faster.
...to use it, either make sure the llvm-symbolizer binary is in your path or set the environment variable tsan_options="external_symbolizer_path=/path/to/llvm-symbolizer" before running the process.
Creating a Python XPCOM component
(note that some details may be missing.) preparation if a binary of pyxpcom is not available, you will need to build it - see building pyxpcom.
... tip: you can achieve a copy of binary of pyxpcom from pythonext; simply unpack xpi and take everything you need.
Component Internals
these type library files are at the core of xpcom scriptablity and the binary component architecture of xpcom.
...additionally, it relates the components to the type libraries in which the binary representations of the interfaces they support are defined.
Using XPCOM Components
the contractual arrangements that xpcom enforces open up the way to binary interoperability - to being able to access, use, and reuse xpcom components at runtime.
...it's divided into three subsections: one about actually finding all these binary components in mozilla and two others corresponding to the two main ways that clients typically access xpcom components: finding mozilla components this book attempts to provide reference information for xpcom components and their interfaces that are frozen as of the time of this writing.
mozIAsyncFavicons
adata binary contents of the favicon to save.
... adatalen length of binary data amimetype mime type of the data to store.
nsICryptoHMAC
if false, then the returned value is binary data.
...this can be either binary data or base 64 encoded.
nsITraceableChannel
/////// start - do not edit var {classes: cc, interfaces: ci, results: cr, constructor: cc, utils: cu} = components; cu.import('resource://gre/modules/services.jsm'); var binaryinputstream = cc('@mozilla.org/binaryinputstream;1', 'nsibinaryinputstream', 'setinputstream'); var binaryoutputstream = cc('@mozilla.org/binaryoutputstream;1', 'nsibinaryoutputstream', 'setoutputstream'); var storagestream = cc('@mozilla.org/storagestream;1', 'nsistoragestream', 'init'); function tracinglistener() { this.receivedchunks = []; // array for incoming data.
..., resolve: null, reject: null }; this.deferreddone.promise = new promise(function(resolve, reject) { this.resolve = resolve; this.reject = reject; }.bind(this.deferreddone)); object.freeze(this.deferreddone); this.promisedone = this.deferreddone.promise; } tracinglistener.prototype = { ondataavailable: function(arequest, acontext, ainputstream, aoffset, acount) { var istream = new binaryinputstream(ainputstream) // binaryainputstream var sstream = new storagestream(8192, acount, null); // storagestream // not sure why its 8192 but thats how eveyrone is doing it, we should ask why var ostream = new binaryoutputstream(sstream.getoutputstream(0)); // binaryoutputstream // copy received data as they come.
Address Book examples
as of thunderbird 7.0, implementing your own address book type can be done with either javascript or with a binary component.
...the best example of a binary implementation of an address book is the os x address book source code.
Memory Management
when binary code hands back a pointer/handle to allocated memory, the js code must make sure to free that memory with the correct allocator.
... it is usually best to expose a freeing function from the binary.
ABI
http://en.wikipedia.org/wiki/x86_calling_conventions abi abi stands for "application binary interface".
... http://en.wikipedia.org/wiki/application_binary_interface os specific windows https://msdn.microsoft.com/en-us/library/k2b2ssfy.aspx https://msdn.microsoft.com/en-us/library/9b372w95.aspx details with respect to js-ctypes this explains how to use it in the js-ctypes scope.
js-ctypes
unlike binary xpcom components, it allows developers to ship a single binary for use with multiple versions of firefox.
... mailing list newsgroup rss feed stackoverflow - jsctypes related topics xpcom in gecko 2 - binary components ...
Debugger.Source - Firefox Developer Tools
the text generation is disabled if the debugger has the allowwasmbinarysource property set, the "[wasm]" value will be returned in this case.
... binary if the instance refers to webassembly code and the debugger has the allowwasmbinarysource property set, a uint8array that contains the webassembly bytecode.
Blob.arrayBuffer() - Web APIs
WebAPIBlobarrayBuffer
the arraybuffer() method in the blob interface returns a promise that resolves with the contents of the blob as binary data contained in an arraybuffer.
... returns a promise that resolves with an arraybuffer that contains the blob's data in binary form.
Blob - Web APIs
WebAPIBlob
the blob object represents a blob, which is a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a readablestream so its methods can be used for processing the data.
... instance methods blob.prototype.arraybuffer() returns a promise that resolves with an arraybuffer containing the entire contents of the blob as binary data.
File.getAsText() - Web APIs
WebAPIFilegetAsText
example // fileinput is a htmlinputelement: <input type="file" id="myfileinput" multiple> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (similar to nodelist) var files = fileinput.files; // object for allowed media types var accept = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i < files.length; i++) { file = files[i]; // if file type could be detected if (file !== null) { if (accept.text.indexof(file.mediatype) > -1) { // file is of type text, which we accept // make sure it's encoded as utf-8 var data = file.g...
...etastext("utf-8"); // modify data with string methods } else if (accept.binary.indexof(file.mediatype) > -1) { // binary } } } specification not part of any specification.
FileReader.result - Web APIs
WebAPIFileReaderresult
method description readasarraybuffer() the result is a javascript arraybuffer containing binary data.
... readasbinarystring() the result contains the raw binary data from the file in a string.
Basic concepts - Web APIs
keys can be binary objects.
... a key can be one of the following types: string, date, float, a binary blob, and array.
RTCDataChannel.protocol - Web APIs
the ability for each channel to have a defined subprotocol lets your app, for example, use json objects as messages on one channel while another channel is plaintext and another is raw binary or even some other format.
... example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel", { protocol: "json" }); function handlechannelmessage(datachannel, msg) { switch(datachannel.protocol) { case "json": /* process json data */ break; case "raw": /* process raw binary data */ break; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.protocol' in that specification.
RTCDataChannel - Web APIs
propertiesalso inherits properties from: eventtargetbinarytype the property binarytype on the rtcdatachannel interface is a domstring which specifies the type of javascript object which should be used to represent binary data received on the rtcdatachannel.
... values allowed by the websocket.binarytype property are also permitted here: "blob" if blob objects are being used or "arraybuffer" if arraybuffer objects are being used.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
usually, your 3d geometry is already in a certain binary format, so you need to read the specification of that specific format to figure out the memory layout.
...then we could load the binary file and interpret it as an array buffer: const response = await fetch('assets/geometry.bin'); const buffer = await response.arraybuffer(); consume array buffer with webgl first, we create a new vertex buffer object (vbo) and supply it with our array buffer: //bind array buffer to a vertex buffer object const vbo = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, vbo); gl.bufferdata(gl.arra...
Writing WebSocket servers - Web APIs
the opcode field defines how to interpret the payload data: 0x0 for continuation, 0x1 for text (which is always encoded in utf-8), 0x2 for binary, and other so-called "control codes" that will be discussed later.
...if it's 0x2, the payload is binary data.
XMLHttpRequest.response - Web APIs
arraybuffer the response is a javascript arraybuffer containing binary data.
... blob the response is a blob object containing the binary data.
XMLHttpRequest.responseType - Web APIs
arraybuffer the response is a javascript arraybuffer containing binary data.
... blob the response is a blob object containing the binary data.
XMLHttpRequestResponseType - Web APIs
arraybuffer the response is a javascript arraybuffer containing binary data.
... blob the response is a blob object containing the binary data.
Ajax - Developer guides
WebGuideAJAX
this article will explain how to use some ajax techniques, like: analyzing and manipulating the response of the server monitoring the progress of a request submitting forms and upload binary files – in pure ajax, or using formdata objects using ajax within web workers fetch api the fetch api provides an interface for fetching resources.
... sending and receiving binary data the responsetype property of the xmlhttprequest object can be set to change the expected response type from the server.
Data URLs - HTTP
otherwise, you can specify base64 to embed base64-encoded binary data.
... encoding data into base64 format base64 is a group of binary-to-text encoding schemes that represent binary data in an ascii string format by translating it into a radix-64 representation.
Common MIME types - HTTP
a textual file should be human-readable and must not contain binary data.
...extension kind of document mime type .aac aac audio audio/aac .abw abiword document application/x-abiword .arc archive document (multiple files embedded) application/x-freearc .avi avi: audio video interleave video/x-msvideo .azw amazon kindle ebook format application/vnd.amazon.ebook .bin any kind of binary data application/octet-stream .bmp windows os/2 bitmap graphics image/bmp .bz bzip archive application/x-bzip .bz2 bzip2 archive application/x-bzip2 .csh c-shell script application/x-csh .css cascading style sheets (css) text/css .csv comma-separated values (csv) text/csv .doc microsoft word ...
HTTP Public Key Pinning (HPKP) - HTTP
openssl rsa -in my-rsa-key-file.key -outform der -pubout | openssl dgst -sha256 -binary | openssl enc -base64 openssl ec -in my-ecc-key-file.key -outform der -pubout | openssl dgst -sha256 -binary | openssl enc -base64 openssl req -in my-signing-request.csr -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 openssl x509 -in my-certificate.crt -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | open...
... openssl s_client -servername www.example.com -connect www.example.com:443 | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 example hpkp header public-key-pins: pin-sha256="cupctazwkaasuywhhnedttwpy3obake3h2+sozs7sws="; pin-sha256="m8hztczm3eluxkcjr2s5p4hhybnf6lhkmjahkhpgpwe="; max-age=5184000; includesubdomains; report-uri="https://www.example.org/hpkp-report" in this example, pin-sha256="cupctazwkaasuywhhnedttwpy3obake3h2+sozs7sws=" pins the server's public key used in production.
Regular expression syntax cheatsheet - JavaScript
for example, given a string like "some <foo> <bar> new </bar> </foo> thing": /<.*>/ will match "<foo> <bar> new </bar> </foo>" /<.*?>/ will match "<foo>" unicode property escapes if you are looking to contribute to this document, please also edit the original article // non-binary values \p{unicodepropertyvalue} \p{unicodepropertyname=unicodepropertyvalue} // binary and non-binary values \p{unicodebinarypropertyname} // negation: \p is negated \p \p{unicodepropertyvalue} \p{unicodebinarypropertyname} unicodebinarypropertyname the name of a binary property.
... unicodepropertyname the name of a non-binary property: general_category (gc) script (sc) script_extensions (scx) see also propertyvaluealiases.txt unicodepropertyvalue one of the tokens listed in the values section, below.
RangeError: radix must be an integer - JavaScript
the most common radixes: 2 for binary numbers, 8 for octal numbers, 10 for decimal numbers, 16 for hexadecimal numbers.
... examples invalid cases (42).tostring(0); (42).tostring(1); (42).tostring(37); (42).tostring(150); // you cannot use a string like this for formatting: (12071989).tostring('mm-dd-yyyy'); valid cases (42).tostring(2); // "101010" (binary) (13).tostring(8); // "15" (octal) (0x42).tostring(10); // "66" (decimal) (100000).tostring(16) // "186a0" (hexadecimal) ...
WebAssembly.Module() constructor - JavaScript
the webassembly.module() constructor function can be called to synchronously compile given webassembly binary code.
... new webassembly.module(buffersource); parameters buffersource a typed array or arraybuffer containing the binary code of the .wasm module you want to compile.
WebAssembly.compile() - JavaScript
the webassembly.compile() function compiles webassembly binary code into a webassembly.module object.
... syntax promise<webassembly.module> webassembly.compile(buffersource); parameters buffersource a typed array or arraybuffer containing the binary code of the .wasm module you want to compile.
WebAssembly.instantiate() - JavaScript
this function has two overloads: the primary overload takes the webassembly binary code, in the form of a typed array or arraybuffer, and performs both compilation and instantiation in one step.
... syntax primary overload — taking wasm binary code promise<resultobject> webassembly.instantiate(buffersource, importobject); parameters buffersource a typed array or arraybuffer containing the binary code of the .wasm module you want to compile.
WebAssembly.validate() - JavaScript
the webassembly.validate() function validates a given typed array of webassembly binary code, returning whether the bytes form a valid wasm module (true) or not (false).
... syntax webassembly.validate(buffersource); parameters buffersource a typed array or arraybuffer containing webassembly binary code to be validated.
WebAssembly - JavaScript
webassembly.compile() compiles a webassembly.module from webassembly binary code, leaving instantiation as a separate step.
... webassembly.validate() validates a given typed array of webassembly binary code, returning whether the bytes are valid webassembly code (true) or not (false).
Expressions and operators - JavaScript
binary bitwise operators bitwise operators treat their operands as a set of 32 bits (zeros and ones) and return standard javascript numerical values.
... binary logical operators logical operators are typically used with boolean (logical) values, and when they are, they return a boolean value.
Authoring MathML - MathML
binary programs may run faster than javascript programs and can be more sophisticated e.g.
... binary programs are not appropriate to integrate them in a mozilla extension or xul application.
WebAssembly
webassembly is a new type of code that can be run in modern web browsers — it is a low-level assembly-like language with a compact binary format that runs with near-native performance and provides languages such as c/c++, c# and rust with a compilation target so that they can run on the web.
... converting webassembly text format to wasm this article provides a guide on how to convert a webassembly module written in the text format into a .wasm binary.
base64 - Archive of obsolete content
var base64 = require("sdk/base64"); var encodeddata = base64.encode("hello, world"); var decodeddata = base64.decode(encodeddata); globals functions encode(data, charset) creates a base-64 encoded ascii string from a string of binary data.
ui - Archive of obsolete content
if it's standalone, it appears in the toolbar at the top right of the browser window: togglebutton a toggle button is a special kind of button that's for representing a binary on/off state, like a checkbox.
Miscellaneous - Archive of obsolete content
and here's how it's done postdata.queryinterface(ci.nsiseekablestream).seek(ci.nsiseekablestream.ns_seek_set, 0); var stream = cc["@mozilla.org/binaryinputstream;1"].createinstance(ci.nsibinaryinputstream); stream.setinputstream(postdata); var postbytes = stream.readbytearray(stream.available()); var poststr = string.fromcharcode.apply(null, postbytes); //do anything to your poststr alert(poststr); getting a string from the input stream is made somewhat simpler in firefox 4, by the addition of netutil.readinputstreamtostring() getting postd...
Developing add-ons - Archive of obsolete content
plugins information about how to create plugins, which are binary components that let mozilla based software display content they can't handle natively.
Intercepting Page Loads - Archive of obsolete content
in this case, your best bet is to use onstatechange, and filter to when the state flags indicate a document has begun being loaded: if ((astateflags & components.interfaces.nsiwebprogresslistener.state_start) && (astateflags & components.interfaces.nsiwebprogresslistener.state_is_document)) note the use of the binary mask & operator.
Introduction - Archive of obsolete content
xulrunner is available in binary form at the xulrunner page, and it is the base for several projects, such as songbird, miro and eudora.
Setting Up a Development Environment - Archive of obsolete content
these idl files are compiled into binary form and included in the extension as xpt files.
XPCOM Objects - Archive of obsolete content
if you are writing an extension and need to interact with 3rd-party binary code, the best way to do that is to use the system/child_process ipc layer from the addon sdk.
Overlay extensions - Archive of obsolete content
binary firefox extensions creating binary extensions for firefox.
Setting up an extension development environment - Archive of obsolete content
make a symbolic link (also referred to as a shortcut) to the firefox binary (firefox.exe on windows), then move the link to your desktop, or your preferred location.
Using Dependent Libraries In Extension Components - Archive of obsolete content
extensions with binary components sometimes need to depend on other shared libraries (for example, libraries provided by a third party).
Building TransforMiiX standalone - Archive of obsolete content
the binary transformiix(.exe) will be in extensions/transformiix/source and dist/bin/ (symbolic link).
Creating a hybrid CD - Archive of obsolete content
.zip raw 'sitx' 'zip ' "zip file" .gz raw 'sitx' 'zip ' "gzip file" .tgz raw 'sitx' 'zip ' "tar.gz gzip file" .tar raw 'sitx' 'tarf' "tar file" .tif raw '8bim' 'tiff' "photoshop tiff image" .doc raw 'mswd' 'wdbn' "word file" .mov raw 'tvod' 'moov' "quicktime movie" .bin raw 'sitx' 'bina' "mac binary" .h ascii 'cwie' 'text' "c/c++ header file" .c ascii 'cwie' 'text' "c source file" .cp ascii 'cwie' 'text' "c++ source file" .cpp ascii 'cwie' 'text' "c++ source file" .exp ascii 'cwie' 'text' "symbol export file" .mcp raw 'cwie' 'mmpr' "codewarrior project file" .r ascii 'mps ' 'text' "rez file" .html ascii ...
Downloading Nightly or Trunk Builds - Archive of obsolete content
for the trunk and the latest two branches, there are machines at mozilla and maybe elsewhere compiling builds as fast as they can make them for at least all three of firefox, thunderbird and seamonkey on all three of linux-i686, mac-universalbinary and win32.
Message Summary Database - Archive of obsolete content
if it were binary, there would be less complaints, and it would be smaller.
Mozilla Application Framework in Detail - Archive of obsolete content
other features of xpcom: xpidl, a language for defining interfaces in a language-neutral way and the xpidl compiler can create header files, binary type libraries, documentation, and even generate stub c++ code for your component implementations.
Prism - Archive of obsolete content
operating-system integration: binary components provided access to os-specific features like shortcut creation and dock/tray icons.
Rsyncing the CVS Repository - Archive of obsolete content
note that for using this copy, the nolocks line in cvsroot/config will need to be commented out, as it requires a modified cvs binary.
Standalone XPCOM - Archive of obsolete content
there is no binary difference between standalone xpcom and the xpcom that ships with the mozilla browser.
Actionscript Acceptance Tests - Archive of obsolete content
the underscore is necessary otherwise the buildbot system will delete the .abc before starting up a testrun (not an issue when running locally, but makes it easy to differentiate between binary-only abc files and generated abcs.
The new nsString class implementation (1999) - Archive of obsolete content
e features of the new nsstrimpl implementation are: intrinsic support for 1 and 2 byte character widths provides automatic conversion between strings with different character sizes inviolate base structure eliminates class fragility problem; safe across dll boundaries offers c-style function api to manipulate nsstrimpl offers simple memory allocator api for specialized memory policy shares binary format with bstring coming soon: a new xpcom (nsistring) interface non-templatized; this is a requirement for gecko very efficient buffer manipulation architecture the fundamental data type in the new architecture is struct nsstrimpl, given below: struct nsstrimpl { print32 mlength; void* mbuffer; print32 mcapacity; char mcharsize; char munused; // and now for the nsstrim...
Binding Implementations - Archive of obsolete content
the methods and properties of an implementation can be defined declaratively using method and property tags in xml, or an external implementation (e.g., a binary implementation) can be specified using the src attribute.
Unix stub installer - Archive of obsolete content
run the installer from the src2 directory by either using the mozilla-installer shell script or the mozilla-installer-bin binary with the appropriate flags.
Install Wizards (aka: Stub Installers) - Archive of obsolete content
it then proceeds to extract the xpinstall engine and feed it the downloaded software packages to install.) the stub installer code includes: the logic to display the install wizard widgets and dialogs the code that reads in the configuration file (config.ini) and dynamically installs from the net or from local xpi modules found next to the installer binary the code that processes user selections the code that calls the xpinstall engine through xpistub the libxpnet code that is statically linked in the stub installers are written in code native to the platform using native widget toolkits including the windows api for windows, the mac toolbox for the mac, and gtk for the unix version.
windowsShortcut - Archive of obsolete content
can be either .ico, .dll, .exe, or any other binary file that contains icons.
addFile - Archive of obsolete content
note: if you are installing binary files on a macintosh, be aware that the binary format for those files must be applesingle if the resource information is to be installed properly.
WinRegValue - Archive of obsolete content
the possible values are: winregvalue.reg_sz = 1 winregvalue.reg_expand_sz = 2 winregvalue.reg_binary = 3 winregvalue.reg_dword = 4 winregvalue.reg_dword_little_endian = 4 winregvalue.reg_dword_big_endian = 5 winregvalue.reg_link = 6 winregvalue.reg_multi_sz = 7 winregvalue.reg_resource_list = 8 winregvalue.reg_full_resource_descriptor = 9 winregvalue.reg_resource_requirements_l...
Index - Archive of obsolete content
ArchiveMozillaXULIndex
this method has a number of options to specify text or binary writing, the character set, and whether to append to an existing file or create a new one.
XULRunner 2.0 Release Notes - Archive of obsolete content
xulrunner 2.0 is a universal binary containing i386 and x86_64 architectures.
Building XULRunner - Archive of obsolete content
you can also check the user agent string in firefox help/about menu to get the mapping from a certain binary firefox version to the corresponding xulrunner version.
Debugging a XULRunner Application - Archive of obsolete content
troubleshooting x-jsd is not a registered protocol if the message "x-jsd is not a registered protocol" appears when trying to open *.js files in venkman, then add an empty file called .autoreg in the same directory as your xulrunner binary.
XUL Application Packaging - Archive of obsolete content
if there are binary components, minversion must equal the version of the libxul sdk which is used to build the application.
2006-09-30 - Archive of obsolete content
developers should use this sample instead: http://developer.mozilla.org/en/docs/xpcom_glue discussions dynamic load overlay a short discussion about the possibilities of loading and unloading xul overlay runtime reading binary data from file discusses about the code to read binary data from file how to build xpcom component on mac os x discusses about the make file code used to build xpcom components on mac os x successfully meetings none during this week.
2006-12-08 - Archive of obsolete content
saving binary data from nsixmlhttprequest a discussion on how to use nsixmlhttprequest object to query data from a url in an extension implemented in javascript meetings none during this week.
2006-12-01 - Archive of obsolete content
universal binary or mac intel version of sb/lightning?
Adobe Flash - Archive of obsolete content
on mac os x, there is an additional caveat: netscape gecko browsers such as camino (formerly chimera), the latest mozilla browsers, and future versions of netscape which are built using the mach-o binary format won't be able to use flash's scriptability features.
Using SSH to connect to CVS - Archive of obsolete content
setting up cvs to use ssh in your system's environment, make sure thatcvs_rsh is set to whatever your ssh binary is called; a full path is not necessary if ssh is already in your path.
ECMAScript 2015 support in Mozilla - Archive of obsolete content
functions rest parameters (firefox 15) default parameters (firefox 15) parameters without defaults after default parameters (firefox 26) destructured parameters with default value assignment (firefox 41) arrow functions (firefox 22) generator function (firefox 26) yield (firefox 26) yield* (firefox 27) arguments[@@iterator] (firefox 46) other features binary and octal numeric literals (firefox 25) template strings (firefox 34) object initializer: shorthand property names (firefox 33) object initializer: computed property names (firefox 34) object initializer: shorthand method names (firefox 34) ...
Implementation Status - Archive of obsolete content
5.2.7 xforms:card-number unsupported supported types: string, normalized string, token, language, boolean, gday, gmonth, gyear, gyearmonth, gmonthday, date, time, datetime, duration, integer, nonpositiveinteger, negativeinteger, positiveinteger, long, int, short, unsignedlong, unsignedint, unsignedshort, byte, unsignedbyte, float, decimal, anyuri, base64binary, hexbinary, qname 6.
XForms Input Element - Archive of obsolete content
mozilla extensions labelposition - only for boolean types: show the label before or after the checkbox (see below) type restrictions the input element can be bound to a node containing simple content of any data type except xsd:base64binary, xsd:hexbinray or any data type derived from these.
XForms Output Element - Archive of obsolete content
characteristics the bound instance node is of type xsd:anyuri, xsd:base64binary or a type derived from it either the mediatype attribute is present and contains the image's mimetype or the output element contains a mediatype element which specifies the image's mimetype (for example, image/*).
XForms Secret Element - Archive of obsolete content
type restrictions the secret element can be bound to a node containing simple content of any data type except xsd:base64binary, xsd:hexbinray or any data type derived from these.
XForms Upload Element - Archive of obsolete content
type restrictions the upload element can be bound to a node of type xsd:anyuri, xsd:base64binary or xsd:hexbinary or any type derived from one of these.
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
the main reason for this is that there is no guarantee of java compatibility on a binary level due to the jri/jni switch.
Archive of obsolete content
the main reason for this is that there is no guarantee of java compatibility on a binary level due to the jri/jni switch.
Introduction to game development for the Web - Game development
typed arrays javascript typed arrays give you access to raw binary data from within javascript; this lets you manipulate gl textures, game data, or anything else, even if it's not in a native javascript format.
WebRTC data channels - Game development
a webrtc data channel lets you send text or binary data over an active connection to a peer.
Techniques for game development - Game development
using webrtc peer-to-peer data channels in addition to providing support for audio and video communication, webrtc lets you set up peer-to-peer data channels to exchange text or binary data actively between your players.
Compile - MDN Web Docs Glossary: Definitions of Web-related terms
packaging it in a binary format.
Endianness - MDN Web Docs Glossary: Definitions of Web-related terms
big-endian is also often called "network byte order", because internet standards usually require data to be stored big-endian, starting at the standard unix socket level and going all the way up to standardized web binary data structures.
SVN - MDN Web Docs Glossary: Definitions of Web-related terms
although svn can also handle binary files, we do not recommend that you use it for such files.
WebAssembly - MDN Web Docs Glossary: Definitions of Web-related terms
wasm) is an open binary programming format that can be run in modern web browsers in order to gain performance and/or provide new features for web pages.
What are hyperlinks? - Learn web development
since then, the web has evolved to provide access to images, videos, and binary data, but these improvements have hardly changed the three pillars.
Video and audio content - Learn web development
each web browser supports an assortment of codecs, like vorbis or h.264, which are used to convert the compressed audio and video into binary data and back.
Fetching data from the server - Learn web development
in this case we want to return our response as an image file, and the data format we use for that is blob (the term is an abbreviation of "binary large object" and can basically be used to represent large file-like objects, such as images or video files).
Basic math in JavaScript — numbers and operators - Learn web development
decimal is base 10 (meaning it uses 0–9 in each column), but we also have things like: binary — the lowest level language of computers; 0s and 1s.
The "why" of web performance - Learn web development
building websites requires html, css, and javascript, typically including binary file types such as images and video.
Server-side web frameworks - Learn web development
it also has internal support for webassembly, which enables the compilation of binary code for use on the client-side.
Handling common JavaScript problems - Learn web development
typed arrays allow javascript code to access and manipulate raw binary data, which is necessary as browser apis for example start to manipulate streams of raw video and audio data.
Adding a new event
however, if implementing method isn't small and called from a lot of places, implementing it as inline causes to increase binary size.
Choosing the right memory allocator
use these if you link against xpcom or xpcom glue; this includes extensions with binary components.
Continuous Integration
taskcluster generate binary builds for firefox and firefox for android across a variety of operating sytems.
How Mozilla's build system works
this is where we take all the code in the tree and produce the firefox binary program file or the application you are creating.
ESLint
prior to firefox 55 the location for the eslint binary used to be tools/lint/eslint/node_modules/.bin, since bug 1305023, node_modules is now located in the top-level directory, and should need no special set-up.
Developer guide
interface compatibility guidelines for modifying scriptable and binary apis in mozilla.
Error codes returned by Mozilla APIs
0600011) ns_error_xpath_bracket_expected (0x80600012) ns_error_xpath_invalid_var_name (0x80600013) ns_error_xpath_unexpected_end (0x80600014) ns_error_xpath_operator_expected (0x80600015) ns_error_xpath_unclosed_literal (0x80600016) ns_error_xpath_bad_colon (0x80600017) ns_error_xpath_bad_bang (0x80600018) ns_error_xpath_illegal_char (0x80600019) ns_error_xpath_binary_expected (0x8060001a) ns_error_xpath_invalid_expression_evaluated (0x8060001c) ns_error_xpath_unbalanced_curly_brace (0x8060001d) xslt errors errors that can occur when using xslt.
Getting Started with Chat
the following are some other options available to you: windows mac linux colloquy â—Ź irssi â—Ź â—Ź â—Ź* xchat â—Ź â—‹ â—Ź key: â—Ź — binary or executable program available â—‹ — only available by downloading and compiling source code â—Ź* — binary or executable may be available.
How test harnesses work
he python runner: sets up the testing environment sets up environment variables (mozrunner, currently) creates a profile (mozprofile via mozrunner) sets appropriate test preferences inserts a shim extension in the profile (for non-marionette tests) gathers the tests (manifestdestiny) potentially sets up an http server for test data (mozhttpd) invokes the binary (mozrunner) it is the job of the shim extension to shut down the browser logging (mozlog, in theory) (run tests, accrue results) cleanup: shutdown the browser check for crashes (mozcrash) reporting (moztest) marionette tests list of testing extensions pageloader (talos) mochitest: //github.com/realityripple/uxp/blob/master/testing/mochitest/install.rdf (mochi...
How to get a stacktrace for a bug report
requirements you need a binary build of firefox from mozilla.org.
Application Translation with Mercurial
you can create translation patches, but creating language packs for the application, binary repacks of the application (changing the localization of the program), and compiling the application likely won't work.
Index
with that document, users can see immediately two localized files in their user interface by following closely and carefully the steps to create a language pack or a binary file that is ready for installation.
Localizing without a specialized tool
with that document, users can see immediately two localized files in their user interface by following closely and carefully the steps to create a language pack or a binary file that is ready for installation.
QA phase
you can either: create a langpack, which is installed on top of your mozilla application, or repack the application's binary (aka, a l10n repack), which allows you to install next to your existing mozilla application installation and use separately.
MathML In Action
π i - z ) θ ( - ( α k + 1 ) z ) ) π ( n ) = ∑ m = 2 n ⌊ ( ∑ k = 1 m - 1 ⌊ ( m / k ) / ⌈ m / k ⌉ ⌋ ) - 1 ⌋ ‖ Ď• ‖ w s k ( Ω g ) ≝ ( ∑ | α | ≦ k ∂ α Ď• ∂ ξ α l s ( Ω g ) s ) 1 / s for more examples, refer to links on the mathml project page, and if you are building your own mozilla binary, see the directory mozilla/layout/mathml/tests.
MathML Demo: <mo> - operator, fence, separator, or accent
binary operators and relations the following table contains instances of all operators found on the swp binary operations and binary relations panels.
Profiling with the Firefox Profiler
if you built firefox yourself, it will attempt to use some cleverness3 to grab the symbols from your binary.
Profiling with the Gecko Profiler and Local Symbols on Windows
generate the breakpad symbol files by running ./mach buildsymbols: https://developer.mozilla.org/en/building_firefox_with_debug_symbols#breakpad_symbol_files this will have created symbols under $objdir/dist/ , named after the binary name, architecture and version, so something like "firefox-40.0a1.en-us-win32.crashreporter-symbols.zip" point talos to this zipfile by passing its path to the --symbolspath flag.
TraceMalloc
the built mozilla application will support the following additional command-line options: --trace-malloc filename the application will log allocation and deallocation events with stack traces in a binary format to the given file.
NSS Code Coverage
file is not part of any binary or library used by test suite.
4.3.1 Release Notes
source tarballs are available from ftp://ftp.mozilla.org/pub/mozilla.or...-4.3.1.tar.bz2 binary releases are no longer available on mozilla.
4.3 Release Notes
source tarballs are available from https://archive.mozilla.org/pub/security/jss/releases/jss_4_3_rtm/src/jss-4.3.tar.bz2 binary releases are no longer available on mozilla.
Build instructions for JSS 4.3.x
if you're intention is to modify and build the jss source you need to apply for your own jce code-signing certificate if you made no changes and your goal is to build jss you can use the signed binary release of the jss4.jar from ftp.mozilla.org.
JSS Provider Notes
use the binary release of jss from mozilla.org.
Mozilla-JSS JCA Provider notes
use the binary release of jss from mozilla.org.
NSS 3.16.2 release notes
the certutil commands supports generic certificate extensions, by loading binary data from files, which have been prepared using external tools, or which have been extracted and dumped to file from other existing certificates: --dump-ext-val oid --extgeneric oid:critical-flag:filename[,oid:critical-flag:filename]...
NSS 3.28.3 release notes
this is a patch release to fix binary compatibility issues.
NSS 3.29.1 release notes
this is a patch release to fix binary compatibility issues.
NSS Sample Code Sample_1_Hashing
h_create(hashtype); if (hashcontext == null) { return secfailure; } do { hash_begin(hashcontext); /* incrementally hash the file contents */ while ((nb = pr_read(infile, ibuf, sizeof(ibuf))) > 0) { hash_update(hashcontext, ibuf, nb); } hash_end(hashcontext, digest, &len, 64); /* normally we would write it out in binary with * nb = pr_write(outfile, digest, len); * but for illustration let's print it in hex.
Hashing - sample 1
h_create(hashtype); if (hashcontext == null) { return secfailure; } do { hash_begin(hashcontext); /* incrementally hash the file contents */ while ((nb = pr_read(infile, ibuf, sizeof(ibuf))) > 0) { hash_update(hashcontext, ibuf, nb); } hash_end(hashcontext, digest, &len, 64); /* normally we would write it out in binary with * nb = pr_write(outfile, digest, len); * but for illustration let's print it in hex.
sample1
ype); if (hashcontext == null) { return secfailure; } do { hash_begin(hashcontext); /* incrementally hash the file contents */ while ((nb = pr_read(infile, ibuf, sizeof(ibuf))) > 0) { hash_update(hashcontext, ibuf, nb); } hash_end(hashcontext, digest, &len, 64); /* normally we would write it out in binary with * nb = pr_write(outfile, digest, len); * but for illustration let's print it in hex.
NSS sources building testing
for any functions that are listed in the .def files, nss promises that the binary function interface (abi) will remain stable.
nss tech note1
aming apis for these two decoders have an identical prototype : secstatus sec_asn1decodeitem(prarenapool *pool, void *dest, const sec_asn1template *t, secitem *item); secstatus sec_quickderdecodeitem(prarenapool* arena, void* dest, const sec_asn1template* templateentry, secitem* src); here is a description of the arguments : secitem* src† is a structure containing a pointer to the binary data to be decoded, as well as its size.
Build instructions
gmake is gnu make, usually your linux-distro-regular "make" binary file, unless maybe it is a bsd make.
Sample manual installation
after building nss with "gmake nss_build_all", the resulting build can be found in the nss source tree as follows: nss header files: mozilla/dist/public/nss nspr header files: mozilla/dist/<obj-dir>/include nspr/nss shared libs: mozilla/dist/<obj-dir>/lib nss binary executables: mozilla/dist/<obj-dir>/bin.
NSS tools : vfychain
-r following certfile is raw binary der (default) -t following cert is explicitly trusted (overrides db trust) -u usage 0=ssl client, 1=ssl server, 2=ssl stepup, 3=ssl ca, 4=email signer, 5=email recipient, 6=object signer, 9=protectedobjectsigner, 10=ocsp responder, 11=any ca -v verbose mode.
NSS Tools
currently, you must download the nss 3.1 source and build it to create binary files for the nss tools.
NSS Tools crlutil
feb 23 12:08:10 2005 entry (2): serial number: 42 (0x2a) revocation date: wed feb 23 12:08:40 2005 deleting crl from a database this example deletes crl from a database in the specified directory: crlutil -d -n nickname -d certdir importing crl into a database this example imports crl into a database: crlutil -i -i crl-file -d certdir file should has binary format of asn.1 encoded crl data.
NSS Tools ssltap
you use the tool to look at the plain text and binary data that are part of the handshake procedure, before the secure connection is established.
NSS tools : vfychain
-r following certfile is raw binary der (default) -t following cert is explicitly trusted (overrides db trust) -u usage 0=ssl client, 1=ssl server, 2=ssl stepup, 3=ssl ca, 4=email signer, 5=email recipient, 6=object signer, 9=protectedobjectsigner, 10=ocsp responder, 11=any ca -v verbose mode.
Necko
eventually we'd like to move to a binary distribution mechanism for the networking library so that you can build your application that uses this library without having to build mozilla.
Rhino downloads archive
you can download binary distributions of rhino from http://ftp.mozilla.org/pub/mozilla.org/js/.
Index
11 index index, mdn meta, spidermonkey found 550 pages: 12 introduction to the javascript shell spidermonkey to get the spidermonkey javascript shell, see the spidermonkey build documentation or download a compiled binary for your platform from the nightly builds.
JS_NewStringCopyN
you can use js_newstringcopyn to copy binary data or to copy only a certain portion of a c string into a javascript string.
SpiderMonkey 1.8.5
spidermonkey 1.8.5 is not binary-compatible with previous releases, nor is it source-code compatible.
SpiderMonkey 1.8.7
spidermonkey 1.8.7 is not binary-compatible with previous releases, nor is it source-code compatible.
SpiderMonkey 1.8.8
spidermonkey 1.8.8 is not binary-compatible with previous releases, nor is it source-code compatible.
SpiderMonkey 1.8
migrating to spidermonkey 1.8 spidermonkey 1.8 is not binary-compatible with previous releases.
SpiderMonkey 17
spidermonkey 17 is not binary-compatible with previous releases, nor is it source-code compatible.
SpiderMonkey 24
jaegermonkey has been removed and replaced by ionmonkey spidermonkey 24 is not binary-compatible with previous releases, nor is it source-code compatible.
SpiderMonkey 31
xxx list removed features here spidermonkey 31 is not binary-compatible with previous releases, nor is it source-code compatible.
SpiderMonkey 38
xxx list removed features here spidermonkey 38 is not binary-compatible with previous releases, nor is it source-code compatible.
SpiderMonkey 45
migrating to spidermonkey 45 spidermonkey 45 is not binary-compatible with previous releases, nor is it source-code compatible.
SpiderMonkey releases
our continuous integration system does produce a tarball that is built into a binary that runs our smoke tests, but we do not maintain it nor actively test its suitability for general embedding.
TPS Tests
s environment and want to keep your existing config (eg, the existing username and password), you should instead execute: python create_venv.py --keep-config %path% activate the environment source %path%/bin/activate run some tests note that the testfile is not a path, it should only be the filename from services/sync/tests/tps/ runtps --debug --testfile %test_file_name% --binary %firefox_binary_path% additionally, omitting a --testfile parameter will cause it to run all tps tests listed in services/sync/tests/tps/all_tests.json an example on osx, for running just the test_sync.js testfile against a locally built firefox (where the mozconfig set the objdir to obj-ff-artifact): runtps --debug --testfile test_sync.js --binary obj-ff-artifact/dist/night...
Secure Development Guidelines
most memory allocators use a linked list or binary tree bbv: off-by-one the array index starts at 0 not at 1 char array[1024]; array[0] = first element!
places.sqlite Database Troubleshooting
download the latest precompiled binary sqlite command-line shell from: https://www.sqlite.org/download.html extract sqlite3 executable into the work folder.
How to build an XPCOM component in JavaScript
compiling the typelib your interface definition must be compiled into a binary format (xpt) in order to be registered and used within mozilla applications.
Finishing the Component
when the component starts up, it populates a list of urls read in from a file stored next to the gecko binary on the local system.
Starting WebLock
once the interface has been described in the xpidl language, the interface file can be used to generate the header files needed for the implementation code, the binary type library files that let you use the interface of the weblock component from javascript, and even broken linkjavadoc style html documentation.
Detailed XPCOM hashtable guide
the mozilla codebase already contains hash functions for most key types, including narrow and wide strings, pointers, and most binary data: void* (or nsisupports*) cast using ns_ptr_to_int32 char* string nscrt::hashcode() prunichar* string nsastring hashstring() nsacstring nsid& nsidhashkey::hashkey() writing a good hash function is well beyond the scope of this document, and has been discussed extensively in computer-science circles for many years.
nsACString
that is, it may be used to store utf-8 characters, ascii characters, or any random binary data.
nsIClassInfo
flags pruint32 specifies various binary properties of this class.
nsIConsoleMessage
[binaryname(messagemoz)] read only.
nsIDirectoryServiceProvider
alert(currdir); see also nsdirectoryservice nsidirectoryservice additionally, see section 16.5.2 of the rapid application development with mozilla book for instructions on how to get the current working directory and the process binary directory, among other things.
nsIException
[binaryname(messagemoz)] read only.
nsIFactory
it exists primarily for binary compatibility with microsoft com's iclassfactory interface.
nsIOutputStream
c++ code may however pass any arbitrary binary data, including data with embedded null bytes.
nsIPushService
message.binary(); // returns a byte array.
nsIScriptableUnicodeConverter
this legacy api represents binary data using the lower haft of each 16-bit code unit in a javascript string.
nsIUpdate
toolkit/mozapps/update/nsiupdateservice.idlscriptable an interface that describes an object representing an available update to the current application - this update may have several available patches from which one must be selected to download and install, for example we might select a binary difference patch first and attempt to apply that, then if the application process fails fall back to downloading a complete file-replace patch.
nsIUpdatePatch
type astring the type of patch represented by the object: "partial" a binary difference between two application versions.
nsIWindowMediator
you may need to update your code or recompile binary components, if they use this method.
nsIXULRuntime
xpcomabi autf8string a string tag identifying the binary abi of the current processor and compiler vtable.
XPCOM Interface Reference
ncoutputstreamnsiasyncstreamcopiernsiasyncverifyredirectcallbacknsiauthinformationnsiauthmodulensiauthpromptnsiauthprompt2nsiauthpromptadapterfactorynsiauthpromptcallbacknsiauthpromptprovidernsiauthpromptwrappernsiautocompletecontrollernsiautocompleteinputnsiautocompleteitemnsiautocompletelistenernsiautocompleteobservernsiautocompleteresultnsiautocompletesearchnsibadcertlistener2nsibidikeyboardnsibinaryinputstreamnsibinaryoutputstreamnsiblocklistpromptnsiblocklistservicensiboxobjectnsibrowserboxobjectnsibrowserhistorynsibrowsersearchservicensicrlinfonsicrlmanagernsicachensicachedeviceinfonsicacheentrydescriptornsicacheentryinfonsicachelistenernsicachemetadatavisitornsicacheservicensicachesessionnsicachevisitornsicachingchannelnsicancelablensicategorymanagernsichannelnsichanneleventsinknsichannel...
XPCOM Interface Reference by grouping
tor nsidirectoryservice nsidirectoryserviceprovider nsidirectoryserviceprovider2 nsidirindex nsidirindexlistener nsidirindexparser nsifile nsilocalfile stream nsiasyncinputstream nsiasyncoutputstream nsiasyncstreamcopier nsibinaryinputstream nsibinaryoutputstream nsicontentsniffer nsiconverterinputstream nsifileinputstream nsifileoutputstream nsiinputstream nsiinputstreamcallback nsioutputstream nsioutputstreamcallback nsiscriptableinputstream nsistreamlistener url ...
Storage
return transaction.commit(); } collation (sorting) sqlite provides several collation methods (binary, nocase, and rtrim), but these are all very simple and have no support for various text encodings or the user's locale.
nsCOMPtr versus RefPtr
this design saves some space in the binary (or at least it used to).
XPIDL Syntax
MozillaTechXPIDLSyntax
status of this document this is a partial reverse-engineering of the libidl source code's parser, limited mostly to the subset of functionality that is supported by the mozilla xpidl binary.
Index
training data is global across all mail accounts within a profile training data is stored in a binary format, in a file named "training.dat".
Spam filtering
training data is stored in a binary format, in a file named "training.dat".
Mozilla
unlike binary xpcom components, it allows developers to ship a single binary for use with multiple versions of firefox.
Plug-in Basics - Plugins
however, primary working path with binary file was /usr/lib/mozilla/plugins for 32-bit and 64-bit linux distributions and looks still working.
Debugger - Firefox Developer Tools
allowwasmbinarysource a boolean value indicating whether webassembly sources will be available in binary form.
Network request list - Firefox Developer Tools
copy as curl the command may include the following options: -x [method] if the method is not get or post --data for url encoded request parameters --data-binary for multipart request parameters --http/version if the http version is not 1.1 -i if the method is head -h one for each request header.
CSSImageValue - Web APIs
examples we create an element <button>magic wand</button> we add some css, including a background image requesting a binary file: button { display: inline-block; min-height: 100px; min-width: 100px; background: no-repeat 5% center url(https://mdn.mozillademos.org/files/16793/magicwand.png) aqua; } we get the element's style map.
CloseEvent - Web APIs
1003 unsupported data the connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).
DedicatedWorkerGlobalScope - Web APIs
windowbase64.btoa() creates a base-64 encoded ascii string from a string of binary data.
FileReader.onload - Web APIs
WebAPIFileReaderonload
the filereader.onload property contains an event handler executed when the load event is fired, when content read with readasarraybuffer, readasbinarystring, readasdataurl or readastext is available.
FileReader - Web APIs
filereader.readasbinarystring() starts reading the contents of the specified blob, once finished, the result attribute contains the raw binary data from the file as a string.
FontFace.FontFace() - Web APIs
WebAPIFontFaceFontFace
this can be either: a url binary font data descriptors optional a set of optional descriptors passed as an object.
IDBCursor.key - Web APIs
WebAPIIDBCursorkey
yeschrome android full support yesfirefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support yesbinary keyschrome full support 58edge full support ≤79firefox full support 51ie ?
IDBCursor - Web APIs
WebAPIIDBCursor
recommendation added continueprimarykey() and support for binary keys, and the idbcursor.request property.
SharedWorkerGlobalScope - Web APIs
windowbase64.btoa() creates a base-64 encoded ascii string from a string of binary data.
Using readable streams - Web APIs
we have created an example called unpack chunks of a png (see it live also) that fetches an image as a stream, then pipes it through to a custom png transform stream that retrieves png chunks out of a binary data stream.
TextEncoder.prototype.encodeInto() - Web APIs
r patchedu8array = window.uint8array || array; var textencoderprototype = textencoder["prototype"]; var globaltextencoder = window["textencoder"]; var globaltextencoderprototype; var globaltextencoderinstance; ////////////////////////////////////////////////////////////////////////////////////// function encoderreplacer(nonasciichars){ // make the utf string into a binary utf-8 encoded string var point = nonasciichars.charcodeat(0)|0; if (0xd800 <= point && point <= 0xdbff) { var nextcode = nonasciichars.charcodeat(1)|0; // defaults to 0 when nan, causing null replacement character if (0xdc00 <= nextcode && nextcode <= 0xdfff) { //point = ((point - 0xd800)<<10) + nextcode - 0xdc00 + 0x10000|0; ...
WebGLRenderingContext.compileShader() - Web APIs
the webglrenderingcontext.compileshader() method of the webgl api compiles a glsl shader into binary data so that it can be used by a webglprogram.
WebRTC API - Web APIs
you can also use the connection between two peers to exchange arbitrary binary data using the rtcdatachannel interface.
WebSocket - Web APIs
WebAPIWebSocket
constants constant value websocket.connecting 0 websocket.open 1 websocket.closing 2 websocket.closed 3 properties websocket.binarytype the binary data type used by the connection.
Window - Web APIs
WebAPIWindow
windoworworkerglobalscope.btoa() creates a base-64 encoded ascii string from a string of binary data.
WindowOrWorkerGlobalScope.atob() - Web APIs
syntax var decodeddata = scope.atob(encodeddata); parameters encodeddata a binary string contains an base64 encoded data.
WindowOrWorkerGlobalScope - Web APIs
windoworworkerglobalscope.btoa() creates a base-64 encoded ascii string from a string of binary data.
WorkerGlobalScope - Web APIs
windoworworkerglobalscope.btoa() creates a base-64 encoded ascii string from a string of binary data.
WritableStreamDefaultWriter.ready - Web APIs
the first uses ready to ensure that the writablestream is done writing and thus able to receive data before sending a binary chunk.
WritableStreamDefaultWriter.write() - Web APIs
syntax var promise = writablestreamdefaultwriter.write(chunk); parameters chunk a block of binary data to pass to the writablestream.
XMLHttpRequest.send() - Web APIs
the best way to send binary content (e.g.
XMLHttpRequest - Web APIs
xmlhttprequest.sendasbinary() a variant of the send() method that sends binary data.
Variable fonts guide - CSS: Cascading Style Sheets
note that an axis can be a range or a binary choice.
Block-level elements - HTML: Hypertext Markup Language
in html5, this binary distinction is replaced with a more complex set of content categories.
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
indeterminate if the indeterminate attribute is present on the <input> element defining a checkbox, the checkbox's value is neither true nor false, but is instead indeterminate, meaning that it's state cannot be determined or stated in pure binary terms.
Evolution of HTTP - HTTP
the http/2 protocol has several prime differences from the http/1.1 version: it is a binary protocol rather than text.
Basics of HTTP - HTTP
frame and message structure in http/2 http/2 encapsulates and represents http/1.x messages in a binary frame.
HTTP Messages - HTTP
WebHTTPMessages
the http/2 binary framing mechanism has been designed to not require any alteration of the apis or config files applied: it is broadly transparent to the user.
POST - HTTP
WebHTTPMethodsPOST
non-alphanumeric characters in both keys and values are percent encoded: this is the reason why this type is not suitable to use with binary data (use multipart/form-data instead) multipart/form-data: each value is sent as a block of data ("body part"), with a user agent-defined delimiter ("boundary") separating each part.
An overview of HTTP - HTTP
WebHTTPOverview
in http/2, these messages are embedded into a binary structure, a frame, allowing optimizations like compression of headers and multiplexing.
HTTP range requests - HTTP
(binary content) the content-length header now indicates the size of the requested range (and not the full size of the image).
A re-introduction to JavaScript (JS tutorial) - JavaScript
if you want to convert a binary number to an integer, just change the base: parseint('11', 2); // 3 similarly, you can parse floating point numbers using the built-in parsefloat() function.
ArrayBuffer - JavaScript
the arraybuffer object is used to represent a generic, fixed-length raw binary data buffer.
BigInt.prototype.toString() - JavaScript
this is the case even if the radix is 2; the string returned is the positive binary representation of the bigintobj preceded by a - sign, not the two's complement of the bigintobj.
DataView() constructor - JavaScript
this means handling integer and float conversion, endianness, and other details of representing numbers in binary form.
DataView - JavaScript
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.
Intl.Locale.prototype.collation - JavaScript
direct binary code point order (used in hindi) ducet the default unicode collation element table order emoji recommended ordering for emoji characters eor european ordering rules gb2312 pinyin ordering for latin, gb2312han charset ordering for cjk characters (used in chinese) phonebk phonebook style ordering (such as in german) phonetic ph...
Math.fround() - JavaScript
var mantissa = math.round((leading - arg / powexp) * 0x800000); if (mantissa <= -0x800000) return sign * infinity; return sign * powexp * (leading - mantissa / 0x800000); }; examples using math.fround() the number 1.5 can be precisely represented in the binary numeral system, and is identical in 32-bit and 64-bit: math.fround(1.5); // 1.5 math.fround(1.5) === 1.5; // true however, the number 1.337 cannot be precisely represented in the binary numeral system, so it differs in 32-bit and 64-bit: math.fround(1.337); // 1.3370000123977661 math.fround(1.337) === 1.337; // false 21502^150 is too big for a 32-bit float, so infinity is returned: 2 ** 15...
Math.log1p() - JavaScript
instead, you will end up taking the logarithm of 1.00000000000000111022 (the roundoff is in binary so sometimes it gets ugly), so you get the answer 1.11022...e-15, with only 3 correct digits.
Number.prototype.toFixed() - JavaScript
warning: floating point numbers cannot represent all decimals precisely in binary.
Number.prototype.toString() - JavaScript
this is the case even if the radix is 2; the string returned is the positive binary representation of the numobj preceded by a - sign, not the two's complement of the numobj.
Number - JavaScript
the javascript number type is a double-precision 64-bit binary format ieee 754 value, like double in java or c#.
Object.defineProperty() - JavaScript
object.defineproperty(obj, 'key', withvalue('static')); // if freeze is available, prevents adding or // removing the object prototype properties // (value, get, set, enumerable, writable, configurable) (object.freeze || object)(object.prototype); examples if you want to see how to use the object.defineproperty method with a binary-flags-like syntax, see additional examples.
Object.prototype.toString() - JavaScript
by using radix you can also convert base 10 numbers (like 1,2,3,4,5,.........) to another base numbers, in example below we are converting base 10 number to a base 2 (binary) number let basetenint = 10; console.log(basetenint.tostring(2)); // expected output is "1010" and same for big integers let bignum = bigint(20); console.log(bignum.tostring(2)); // expected output is "10100" some common radix are 2 for binary numbers, 8 for octal numbers, 10 for decimal numbers, 16 for hexadecimal numbers.
RegExp() constructor - JavaScript
(see also binary strings).
SharedArrayBuffer() constructor - JavaScript
the sharedarraybuffer() constructor is used to create a sharedarraybuffer object representing a generic, fixed-length raw binary data buffer, similar to the arraybuffer object.
SharedArrayBuffer - JavaScript
the sharedarraybuffer object is used to represent a generic, fixed-length raw binary data buffer, similar to the arraybuffer object, but in a way that they can be used to create views on shared memory.
TypedArray - JavaScript
a typedarray object describes an array-like view of an underlying binary data buffer.
parseInt() - JavaScript
int(021, 8) parseint('015', 10) // but `parseint(015, 10)` will return 13 parseint(15.99, 10) parseint('15,123', 10) parseint('fxx123', 16) parseint('1111', 2) parseint('15 * 3', 10) parseint('15e2', 10) parseint('15px', 10) parseint('12', 13) the following examples all return nan: parseint('hello', 8) // not a number at all parseint('546', 2) // digits other than 0 or 1 are invalid for binary radix the following examples all return -15: parseint('-f', 16) parseint('-0f', 16) parseint('-0xf', 16) parseint(-15.1, 10) parseint('-17', 8) parseint('-15', 10) parseint('-1111', 2) parseint('-15e1', 10) parseint('-12', 13) the following examples all return 4.
Bitwise AND assignment (&=) - JavaScript
the bitwise and assignment operator (&=) uses the binary representation of both operands, does a bitwise and operation on them and assigns the result to the variable.
Bitwise OR assignment (|=) - JavaScript
the bitwise or assignment operator (|=) uses the binary representation of both operands, does a bitwise or operation on them and assigns the result to the variable.
Bitwise XOR assignment (^=) - JavaScript
the bitwise xor assignment operator (^=) uses the binary representation of both operands, does a bitwise xor operation on them and assigns the result to the variable.
JavaScript reference - JavaScript
arithmetic operators + - / * % ** relational operators in instanceof < > <= >= equality operators == != === !== bitwise shift operators << >> >>> binary bitwise operators& | ^ binary logical operators && || conditional (ternary) operator (condition ?
JavaScript
javascript typed arrays javascript typed arrays provide a mechanism for accessing raw binary data.
Subresource Integrity - Web security
tools for generating sri hashes you can generate sri hashes from the command-line with openssl using a command invocation such as this: cat filename.js | openssl dgst -sha384 -binary | openssl base64 -a or with shasum using a command invocation such as this: shasum -b -a 384 filename.js | awk '{ print $1 }' | xxd -r -p | base64 notes: the pipe-through-xxd step takes the hexadecimal output from shasum and converts it to binary.
Compiling a New C/C++ Module to WebAssembly - WebAssembly
at this point in your source directory you should have: the binary wasm module code (hello.wasm) a javascript file containing glue code to translate between the native c functions, and javascript/wasm (hello.js) an html file to load, compile, and instantiate your wasm code, and display its output in the browser (hello.html) running your example now all that remains is for you to load the resulting hello.html in a browser that supports webassembly.
Index - WebAssembly
found 12 pages: # page tags and summary 1 webassembly landing, webassembly, wasm webassembly is a new type of code that can be run in modern web browsers — it is a low-level assembly-like language with a compact binary format that runs with near-native performance and provides languages such as c/c++ with a compilation target so that they can run on the web.
Loading and running WebAssembly code - WebAssembly
the older webassembly.compile/webassembly.instantiate methods require you to create an arraybuffer containing your webassembly module binary after fetching the raw bytes, and then compile/instantiate it.
Converting WebAssembly text format to wasm - WebAssembly
converting the text .wat into a binary .wasm file let’s have a go at converting the above .wat text representation example into .wasm assembly format.