Search completed in 2.01 seconds.
nsIPrintingPrompt
embedding/browser/webbrowser/nsi
printingprompt.idlscriptable this is the
printing prompt interface which can be used without knowlege of a parent window.
...see nsi
printingpromptservice for all documentation.
... this service enables embedders to implement their own
print and progress dialogs.
...And 26 more matches
NPFullPrint - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary substructure of np
print that contains platform-specific information used during full-page mode
printing.
... syntax typedef struct _npfull
print { npbool plugin
printed; /* true:
print fullscreen */ npbool
printone; /* true:
print one copy */ /* to default
printer */ void* platform
print; /* platform-specific */ } npfull
print; fields the data structure has the following fields: plugin
printed determines whether the plug-in
prints in full-page mode.
... values: true: plug-in takes complete control of the
printing process and
prints full-page.
...And 10 more matches
NPPrint - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary contains information the plug-in needs to
print itself in full-page or embedded mode.
... syntax typedef struct _np
print { uint16 mode; /* np_full or np_embed */ union { npfull
print full
print; /* if mode is np_full */ npembed
print embed
print; /* if mode is np_embed */ }
print; } np
print; fields the data structure has the following fields: mode determines whether plug-in
prints in full-page or embedded mode.
... values: np_full: pointer to npfull
print structure.
...And 10 more matches
Printing - Developer guides
there may be times in which your web site or application would like to improve the user's experience when
printing content.
... you want to adjust the user experience of
printing, such as presenting a specially-formatted version of your content before
printing begins.
... there may be other cases in which you want to manage the
printing process, but these are some of the most common scenarios.
...And 10 more matches
NPP_Print - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary requests a platform-specific
print operation for an embedded or full-screen plug-in.
... syntax #include <npapi.h> void npp_
print(npp instance, np
print*
printinfo); parameters the function has the following parameters: instance pointer to the current plug-in instance.
...
printinfo pointer to np
print structure.
...And 9 more matches
nsIPrinterEnumerator
widget/nsi
printoptions.idlscriptable please add a summary to this article.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void displaypropertiesdlg(in wstring a
printer, in nsi
printsettings a
printsettings); void enumerate
printers(out pruint32 acount,[retval, array, size_is(acount)] out wstring aresult); obsolete since gecko 1.9 void init
printsettingsfrom
printer(in wstring a
printername, in nsi
printsettings a
printsettings); attributes attribute type description default
printername wstring the name of the system default
printer.
... this name should also be present in
printernamelist.
...And 6 more matches
NPEmbedPrint - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary substructure of np
print that contains platform-specific information used during embedded mode
printing.
... syntax typedef struct _npembed
print { npwindow window; void* platform
print; /* platform-specific */ } npembed
print; fields the data structure has the following fields: window the npwindow the plug-in should use for
printing.
... platform
print additional platform-specific
printing information.
...And 5 more matches
WindowEventHandlers.onbeforeprint - Web APIs
the onbefore
print property of the windoweventhandlers mixin is the eventhandler for processing before
print events for the current window.
... these events are raised before the
print dialog window is opened.
... the before
print and after
print events allow pages to change their content before
printing starts (perhaps to remove a banner, for example) and then revert those changes after
printing has completed.
...And 5 more matches
WindowEventHandlers.onafterprint - Web APIs
the onafter
print property of the windoweventhandlers mixin is the eventhandler for processing after
print events for the current window.
... these events are raised after the user
prints, or if they abort the
print dialog.
... the before
print and after
print events allow pages to change their content before
printing starts (perhaps to remove a banner, for example) and then revert those changes after
printing has completed.
...And 4 more matches
PRIntervalTime
syntax #include <prinrval.h> typedef pruint32
printervaltime; #define pr_interval_min 1000ul #define pr_interval_max 100000ul #define pr_interval_no_wait 0ul #define pr_interval_no_timeout 0xfffffffful description the units of
printervaltime are platform-dependent.
... the increasing interval value represented by
printervaltime wraps.
...these constants bound both the period and the resolution of a
printervaltime object.
...And 3 more matches
NPPrintCallbackStruct - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary contains information required by the platform
print field of the npembed
print structure during embedded mode
printing on unix systems.
...syntax typedef struct { int32 type; file* fp; } np
printcallbackstruct; fields the data structure has the following fields: type always contains np_
print.
...the np
printcallbackstruct structure contains the file pointer to which the plug-in should write its postscript data.
...And 2 more matches
-webkit-print-color-adjust - CSS: Cascading Style Sheets
the -webkit-
print-color-adjust property is a non-standard css extension that can be used to force
printing of background colors and images in browsers based on the webkit engine.
... /* keyword values */ -webkit-
print-color-adjust: economy; -webkit-
print-color-adjust: exact; /* global values */ -webkit-
print-color-adjust: inherit; -webkit-
print-color-adjust: initial; -webkit-
print-color-adjust: unset; syntax the -webkit-
print-color-adjust property is specified as one of the keyword values listed below.
... background colors and images are only
printed if the user explicitly allows it in their browser's
print settings dialog.
...And 2 more matches
Window.print() - Web APIs
opens the
print dialog to
print the current document.
... in most browsers, this method will block while the
print dialog is open.
... syntax window.
print() specification specification status comment html living standardthe definition of '
print()' in that specification.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet
printchrome full support 1notes full support 1notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.edge full support 12firefox full support 1i...
Printing from a XUL App - Archive of obsolete content
this document will talk about
printutils, and the ways that xul applications can trigger
print-related behaviors.
...emes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome registration
printing in xul apps ...
Load the assets and print them on screen - Game development
loading the ball sprite loading images and
printing them on our canvas is a lot easier using phaser than using pure javascript.
... compare your code you can check the finished code for this lesson for yourself in the live demo below, and play with it to better understand how it works: next steps
printing out the ball was easy; next, we'll try moving the ball on screen.
PR_LogPrint
syntax #include <prlog.h> void pr_log
print(const char *fmt, ...); parameters the function has this parameter: fmt the string that is used as the formatting specification.
...for a description of formatting and format strings, see "formatted
printing".
Pretty-print a minified file - Firefox Developer Tools
to prettify a minified file, click the pretty
print source icon () at the bottom of the source pane.
... after you click the icon, the source code looks like this: the pretty
print source icon is available only if the source file is minified (i.e., not an original file), and is not already "prettified".
Window: afterprint event - Web APIs
the after
print event is fired after the associated document has started
printing or the
print preview has been closed.
... bubbles no cancelable no interface event event handler property onafter
print examples using addeventlistener(): window.addeventlistener('after
print', (event) => { console.log('after
print'); }); using the onafter
print event handler property: window.onafter
print = (event) => { console.log('after
print'); }; specifications specification status html living standard living standard ...
Window: beforeprint event - Web APIs
the before
print event is fired when the associated document is about to be
printed or previewed for
printing.
... bubbles no cancelable no interface event event handler property onbefore
print examples using addeventlistener(): window.addeventlistener('before
print', (event) => { console.log('before
print'); }); using the onbefore
print event handler property: window.onbefore
print = (event) => { console.log('before
print'); }; specifications specification status html living standard living standard ...
PRInt16
syntax #include <prtypes.h> typedefdefinition
print16; ...
PRInt32
syntax #include <prtypes.h> typedefdefinition
print32; description may be defined as an int or a long, depending on the platform.
PRInt64
syntax #include <prtypes.h> typedef definition
print64; description may be defined in several different ways, depending on the platform.
PRInt8
syntax #include <prtypes.h> typedef definition
print8; ...
PRIntn
syntax #include <prtypes.h> typedef int
printn; ...
Small Footprint
a few changes can be made to reduce the foot
print of rhino for embeddings where space is at a premium.
nsISupportsPRInt16
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data
print16 provides access to the native type represented by the object.
nsISupportsPRInt32
66 introduced gecko 1.0 inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data
print32 provides access to the native type represented by the object.
nsISupportsPRInt64
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data
print64 provides access to the native type represented by the object.
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
icate-----" /* sample 6 commands */ typedef enum { generate_csr, add_cert_to_db, save_cert_to_header, encrypt, decrypt, sign, verify, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4, pubkey = 5, lab = 6, certenc= 7, certvfy= 8, sig = 9 } headertype; /* *
print usage message and exit */ static void usage(const char *progname) { f
printf(stderr, "\nusage: %s %s %s %s %s %s %s %s %s %s\n\n", progname, " -<g|a|h|e|ds|v> -d <dbdirpath> ", "[-p <dbpwd> | -f <dbpwdfile>] [-z <noisefilename>] [-a <\"\">]", "-s <subject> -r <csr> | ", "-n <nickname> -t <trust> -c <cert> [ -r <csr> -u <is...
...suernickname> [-x <\"\">] -m <serialnumber> ] | ", "-n <nickname> -b <headerfilename> | ", "-b <headerfilename> -i <ipfilename> -e <encryptfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); f
printf(stderr, "commands:\n\n"); f
printf(stderr, "%s %s\n --for generating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <csr>"); f
printf(stderr, "%s %s\n --to input and store cert (for ca also)\n\n", progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ]"); f
printf(stderr, "%s %s\n --to put cert in header\n\n", ...
... progname, "-h -n <nickname> -b <headerfilename> [-v <\"\">]"); f
printf(stderr, "%s %s\n --to find public key from cert in header and encrypt\n\n", progname, "-e -b <headerfilename> -i <ipfilename> -e <encryptfilename> "); f
printf(stderr, "%s %s\n --decrypt using corresponding private key \n\n", progname, "-d -b <headerfilename> -e <encryptfilename> -o <opfilename>"); f
printf(stderr, "%s %s\n --sign using private key \n\n", progname, "-s -b <headerfilename> -i <infilename> "); f
printf(stderr, "%s %s\n --verify using public key \n\n", progname, "-v -b <headerfilename> -i <ipfilename> "); f
printf(stderr, "options:\n\n"); f
printf(stderr, "%-30s - db directory path\n\n", "-d <dbdirpath>")...
...And 62 more matches
sample2
*/ #ifndef port_errortostring #define port_errortostring(err) pr_errortostring((err), pr_language_i_default) #endif /* sample 6 commands */ typedef enum { generate_csr, add_cert_to_db, save_cert_to_header, encrypt, decrypt, sign, verify, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4, pubkey = 5, lab = 6, certenc= 7, certvfy= 8, sig = 9 } headertype; /* *
print usage message and exit */ static void usage(const char *progname) { f
printf(stderr, "\nusage: %s %s %s %s %s %s %s %s %s %s\n\n", progname, " -<g|a|h|e|ds|v> -d <dbdirpath> ", "[-p <dbpwd> | -f <dbpwdfile>] [-z <noisefilename>] [-a <\"\">]", "-s <subject> -r <csr> | ", "-n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ] | ", "-n <nickname> -b <header...
...filename> | ", "-b <headerfilename> -i <ipfilename> -e <encryptfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); f
printf(stderr, "commands:\n\n"); f
printf(stderr, "%s %s\n --for generating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <csr>"); f
printf(stderr, "%s %s\n --to input and store cert (for ca also)\n\n", progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ]"); f
printf(stderr, "%s %s\n --to put cert in header\n\n", progname, "-h -n <nickname> -b <headerfilename> [-v <\"\">]"); f
printf(stderr, "%s %s\n --to find public key from cert in header and encrypt\n\n", progname, "-e -b <headerfilename> -i <ipfil...
...ename> -e <encryptfilename> "); f
printf(stderr, "%s %s\n --decrypt using corresponding private key \n\n", progname, "-d -b <headerfilename> -e <encryptfilename> -o <opfilename>"); f
printf(stderr, "%s %s\n --sign using private key \n\n", progname, "-s -b <headerfilename> -i <infilename> "); f
printf(stderr, "%s %s\n --verify using public key \n\n", progname, "-v -b <headerfilename> -i <ipfilename> "); f
printf(stderr, "options:\n\n"); f
printf(stderr, "%-30s - db directory path\n\n", "-d <dbdirpath>"); f
printf(stderr, "%-30s - db password [optional]\n\n", "-p <dbpwd>"); f
printf(stderr, "%-30s - db password file [optional]\n\n", "-f <dbpwdfile>"); f
printf(stderr, "%-30s - noise file name [optional]\n\n", "-z <noisefilename>"); f
printf(stderr, "%-30s - input file name\n\n", "-i <ipfilename>"); f
print...
...And 52 more matches
Enc Dec MAC Output Public Key as CSR
*/ #ifndef port_errortostring #ifndef sec_error_base #define sec_error_base (-0x2000) #define port_errortostring(err) pr_errortostring((err), pr_language_i_default) #endif #endif /* *
print usage message and exit */ static void usage(const char *progname) { f
printf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -s -r -i -o \n\n", progname); f
printf(stderr, "%-20s specify 'g' for generating rsa keypair for wrapping\n\n", "g"); f
printf(stderr, "%-20s specify 'e' for encrypt operation\n\n", "e"); f
printf(stder...
...r, "%-20s specify 'd' for decrypt operation\n\n", "d"); f
printf(stderr, "%-20s specify db directory path\n\n", "-d "); f
printf(stderr, "%-20s specify db password [optional]\n\n", "-p "); f
printf(stderr, "%-20s specify db password file [optional]\n\n", "-f "); f
printf(stderr, "%-20s specify noise file name [optional]\n\n", "-z "); f
printf(stderr, "%-21s specify subject\n\n", "-s "); f
printf(stderr, "%-21s specify certficate request file name\n\n", "-r "); f
printf(stderr, "%-21s specify an input file name\n\n", "-i "); f
printf(stderr, "%-21s specify an output file name\n\n", "-o "); f
printf(stderr, "%-7s for encrypt, it takes as an input fi...
...le and produces\n", "note :"); f
printf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); f
printf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); f
printf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* map option letter enumerated commad type */ static commandtype option2command(const char* c) { switch (*c) { case 'g': return gen_csr; case 'e': return encrypt; case 'd': return decrypt; default: return unknown; } } /* * wrap the symkey using public key */ secstatus wrapkey(pk11symkey* key, seckeypublickey *pubkey, secitem **wrappedkey) { secstatus rv; secitem *data = (secitem *)port_zalloc(sizeof(secitem)); ...
...And 43 more matches
Encrypt Decrypt_MAC_Using Token
--end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* *
print usage message and exit.
... */ static void usage(const char *progname) { f
printf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -i -o \n\n", progname); f
printf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c "); f
printf(stderr, "%-20s specify 'b' for decrypt operation\n\n", " "); f
printf(stderr, "%-20s specify db directory path\n\n", "-d "); f
printf(stderr, "%-20s specify db password [optional]\n\n", "-p "); f
printf(stderr, "%-20s specify db password file [optional]\n\n", "-f "); f
printf(stderr, "%-20s specify noise file name [optional]\n\n", "-z "); f
printf(stderr, "%-21s specify an input file name\n\n", "-i "); f
printf(stderr, "%-21s specify an out...
...put file name\n\n", "-o "); f
printf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); f
printf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); f
printf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); f
printf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id.
...And 36 more matches
Creating localizable web applications
take advantage of
printf() (or equivalents) and use variables in the english strings.
...bad:
printf(_("%s mb>"), $size); snippet 2.
... good: function num_format($num, $decimals) { $locale_info = localeconv(); return number_format($num, $decimals, $locale_info['decimal_point'], $locale_info['thousands_sep']); }
printf(_("%s mb"), num_format($size, 1)); wrap as few html tags as possible when wrapping the localizable content with the gettext function calls, put all the code that irrelevant to localization outside the function call.
...And 32 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
-----end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /*
print a usage message and exit */ static void usage(const char *progname) { f
printf(stderr, "\nusage: %s -c <a|b> -d <dbdirpath> [-z <noisefilename>] " "[-p <dbpwd> | -f <dbpwdfile>] -i <ipfilename> -o <opfilename>\n\n", progname); f
printf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c <a|b>"); f
printf(stderr, "%-20s specify 'b' for decryp...
...t operation\n\n", " "); f
printf(stderr, "%-20s specify db directory path\n\n", "-d <dbdirpath>"); f
printf(stderr, "%-20s specify db password [optional]\n\n", "-p <dbpwd>"); f
printf(stderr, "%-20s specify db password file [optional]\n\n", "-f <dbpwdfile>"); f
printf(stderr, "%-20s specify noise file name [optional]\n\n", "-z <noisefilename>"); f
printf(stderr, "%-21s specify an input file name\n\n", "-i <ipfilename>"); f
printf(stderr, "%-21s specify an output file name\n\n", "-o <opfilename>"); f
printf(stderr, "%-7s for encrypt, it takes <ipfilename> as an input file and produces\n", "note :"); f
printf(stderr, "%-7s <ipfilename>.enc and <ipfilename>.header as ...
...intermediate output files.\n\n", ""); f
printf(stderr, "%-7s for decrypt, it takes <ipfilename>.enc and <ipfilename>.header\n", ""); f
printf(stderr, "%-7s as input files and produces <opfilename> as a final output file.\n\n", ""); exit(-1); } /* this source code form is subject to the terms of the mozilla public * license, v.
...And 31 more matches
Encrypt Decrypt MAC Keys As Session Objects
--end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* *
print usage message and exit */ static void usage(const char *progname) { f
printf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -i -o \n\n", progname); f
printf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c "); f
printf(stderr, "%-20s specify 'b' for decrypt operation\n\n", " "); f
printf(stderr, "%-20s specify db dir...
...ectory path\n\n", "-d "); f
printf(stderr, "%-20s specify db password [optional]\n\n", "-p "); f
printf(stderr, "%-20s specify db password file [optional]\n\n", "-f "); f
printf(stderr, "%-20s specify noise file name [optional]\n\n", "-z "); f
printf(stderr, "%-21s specify an input file name\n\n", "-i "); f
printf(stderr, "%-21s specify an output file name\n\n", "-o "); f
printf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); f
printf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); f
printf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); f
printf(stderr, "%-7s as input files and ...
...produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_f
printf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_f
printf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { ...
...And 30 more matches
Encrypt and decrypt MAC using token
--end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* *
print usage message and exit */ static void usage(const char *progname) { f
printf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -i -o \n\n", progname); f
printf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c "); f
printf(stderr, "%-20s specify 'b' for decrypt operation\n\n", " "); f
printf(stderr, "%-20s specify db dir...
...ectory path\n\n", "-d "); f
printf(stderr, "%-20s specify db password [optional]\n\n", "-p "); f
printf(stderr, "%-20s specify db password file [optional]\n\n", "-f "); f
printf(stderr, "%-20s specify noise file name [optional]\n\n", "-z "); f
printf(stderr, "%-21s specify an input file name\n\n", "-i "); f
printf(stderr, "%-21s specify an output file name\n\n", "-o "); f
printf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); f
printf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); f
printf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); f
printf(stderr, "%-7s as input files and ...
...produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_f
printf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_f
printf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { ...
...And 30 more matches
EncDecMAC using token object - sample 3
nd mackey ckaid-----" #define iv_header "-----begin iv-----" #define iv_trailer "-----end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* *
print usage message and exit */ static void usage(const char *progname) { f
printf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -i -o \n\n", progname); f
printf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c "); f
printf(stderr, "%-20s specify 'b' for decrypt operation\n\n", " "); f
printf(stderr, "%-20s specify db directory path\n\n", "-d "); f
printf(stderr, "%-20s specify db password [optio...
...nal]\n\n", "-p "); f
printf(stderr, "%-20s specify db password file [optional]\n\n", "-f "); f
printf(stderr, "%-20s specify noise file name [optional]\n\n", "-z "); f
printf(stderr, "%-21s specify an input file name\n\n", "-i "); f
printf(stderr, "%-21s specify an output file name\n\n", "-o "); f
printf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); f
printf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); f
printf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); f
printf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) {...
... pr_f
printf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_f
printf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_f
printf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_f
printf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11contex...
...And 25 more matches
Index
ooidtag(const char *hashname) { int i, nhashes = sizeof(hash_names); secoidtag hashtag = sec_oid_unknown; for (i = 0; i < nhashes; i++) { if (port_strcasecmp(hashname, hash_names[i].hashname) == 0) { hashtag = hash_names[i].oid; break; } } return hashtag; } /* newline */ static void newline(prfiledesc* out) { pr_f
printf(out, "\n"); } /*
printashex */ void
printashex(prfiledesc* out, unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned int level = 1; column = level; if (!len) { pr_f
printf(out, "(empty)\n"); return; } for (i = 0; i < len; i++) { if (i != len - 1) { pr_f
printf(o...
...ut, "%02x:", data[i]); column += 3; } else { pr_f
printf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } 188 sample2 no summary!
...the default is to return information in a pretty-
print ascii format, which displays the information about the certificates and public keys in the p12 file.
...And 21 more matches
nsINavBookmarksService
om createcontainer in gecko 1.9 obsolete since gecko 13.0 long long createfolder(in long long aparentfolder, in autf8string name, in long index); void endupdatebatch(); obsolete since gecko 1.9 void exportbookmarkshtml(in nsifile file); obsolete since gecko 1.9 nsiuri getbookmarkedurifor(in nsiuri auri); void getbookmarkfolderstarray(in nsiuri auri, in
print64array aresult); native code only!
... obsolete since gecko 1.9 void getbookmarkidsforuri(in nsiuri auri, [optional] out unsigned long count, [array, retval, size_is(count)] out long long bookmarks); note: renamed from getbookmarkfolders in gecko 1.9 void getbookmarkidsforuritarray(in nsiuri auri, in
print64array aresult); native code only!
... obsolete since gecko 2.0 nsiuri getbookmarkuri(in long long aitemid); long long getchildfolder(in long long afolder, in astring asubfolder); obsolete since gecko 2.0 long long getfolderidforitem(in long long aitemid); boolean getfolderreadonly(in long long aitemid); astring getfoldertitle(in
print64 folder); obsolete since gecko 1.9 nsiuri getfolderuri(in
print64 folder); obsolete since gecko 1.9 long long getidforitemat(in long long aparentid, in long aindex); prtime getitemdateadded(in long long aitemid); astring getitemguid(in long long aitemid); obsolete since gecko 14.0 long long getitemidforguid(in astring aguid); obsolete since gecko 14.0 long getitemindex(in long long aitemid); ...
...And 15 more matches
Utilities for nss samples
print data as hexadecimal.
...*/ typedef struct { enum { pw_none = 0, /* no password */ pw_fromfile = 1, /* password stored in a file */ pw_plaintext = 2 /* plain-text password passed in buffer */ /* pw_external = 3 */ } source; char *data; /* depending on source this can be the actual * password or the file to read it from */ } secupwdata; /* *
printasascii */ extern void
printasascii(prfiledesc* out, const unsigned char *data, unsigned int len); /* *
printashex */ extern void
printashex(prfiledesc* out, const unsigned char *data, unsigned int len); /* * getdigit */ extern int getdigit(char c); /* * hextobuf */ extern int hextobuf(unsigned char *instring, secitem *outbuf, prbool ishexdata); /* * filetoitem */ extern secstatus fil...
... */ /* * newline */ static void newline(prfiledesc* out) { pr_f
printf(out, "\n"); } /* *
printasascii */ void
printasascii(prfiledesc* out, const unsigned char *data, unsigned int len) { char *b64data = null; b64data = btoa_datatoascii(data, len); pr_f
printf(out, "%s", b64data); pr_f
printf(out, "\n"); if (b64data) { port_free(b64data); } } /* *
printashex */ void
printashex(prfiledesc* out, const unsigned char *data, unsigned...
...And 13 more matches
Drawing and Event Handling - Plugins
npp_
print: request a platform-specific
print operation for the instance.
...
printing the plug-in the browser calls the npp_
print method to ask the plug-in instance to
print itself.
... void npp_
print(npp instance, np
print *
printinfo); the instance parameter represents the current plug-in.
...And 13 more matches
Media - Progressive web apps (PWAs)
but you might also want to project it to a big screen for a large audience, or you might want to
print it.
...(in html5, this can be marked up with the <nav> element instead of <div> with an id attribute.) when
printing the document, the navigation area has no purpose.
... this css (below) removes the navigation area when
printing the document: @media
print { #nav-area {display: none;} } some common media types are: screen color device display
print printed paged media projection projected display all all media (the default) more details there are other ways to specify the media type for a set of rules.
...And 13 more matches
NSS Sample Code Utilities_1
this code shows the following: extract seed from noise file read der encoding from a file extract the password from a text file get the module password
print as ascii or hexadecimal sample code #include <prlog.h> #include <termios.h> #include <base64.h> #include <unistd.h> #include <sys/stat.h> #include <prprf.h> #include "util.h" /* * these utility functions are adapted from those found in * the sectool library used by the nss security tools and * other nss test applications.
... */ /* * newline */ static void newline(prfiledesc* out) { pr_f
printf(out, "\n"); } /* *
printasascii */ void
printasascii(prfiledesc* out, const unsigned char *data, unsigned int len) { char *b64data = null; b64data = btoa_datatoascii(data, len); pr_f
printf(out, "%s", b64data); pr_f
printf(out, "\n"); if (b64data) { port_free(b64data); } } /* *
printashex */ void
printashex(prfiledesc* out, const unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned int level = 1; column = level; if (!len) { pr_f
printf(out, "(empty)\n"); return; } for (i = 0; i < len; i++) { if (i != len - 1) { pr_f
printf(out, "%02x:", data[i]); column += ...
...3; } else { pr_f
printf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* * getdigit */ int getdigit(char c) { if (c == 0) { return -1; } if (c <= '9' && c >= '0') { return c - '0'; } if (c <= 'f' && c >= 'a') { return c - 'a' + 0xa; } if (c <= 'f' && c >= 'a') { return c - 'a' + 0xa; } return -1; } /* * hextobuf */ int hextobuf(unsigned char *instring, secitem *outbuf, prbool ishexdata) { int len = strlen(instring); int outlen = len+1/2; int truelen = 0; int...
...And 12 more matches
Hacking Tips
{ return 1; } js> dis(f); flags: loc op ----- -- main: 00000: one 00001: return 00002: stop source notes: ofs line pc delta desc args ---- ---- ----- ------ -------- ------ 0: 1 0 [ 0] newline 1: 2 0 [ 0] colspan 2 3: 2 2 [ 2] colspan 9 getting the bytecode of a function (from gdb) in jsopcode.cpp, a function named js::disassembleatpc can
print the bytecode of a script.
...
printing the js stack (from gdb) in jsobj.cpp, a function named js::dumpbacktrace
prints a backtrace à la gdb for the js stack.
...65a: mov 0x28(%rsp),%rax 0x7ffff7fb165f: mov %eax,%ecx 0x7ffff7fb1661: mov 0x30(%rsp),%rdx 0x7ffff7fb1666: mov %edx,%ebx (gdb) # replace the int3 by a nop (gdb) set *(unsigned char *) ($pc - 1) = 0x90 (gdb) x /1i $pc - 1 0x7ffff7fb1659: nop (gdb) # set a breakpoint at the previous location (gdb) b *0x7ffff7fb1659 breakpoint 2 at 0x7ffff7fb1659
printing ion generated assembly code (from gdb) if you want to look at the assembly code generated by ionmonkey, you can follow this procedure: place a breakpoint at codegenerator.cpp on the codegenerator::link method.
...And 12 more matches
nsCStringContainer (External)
endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare(const char*,
print32 (*) compare(const nsacstring&,
print32 (*) equals(const char*,
print32 (*) equals(const nsacstring&,
print32 (*) operator< operator<= operator== operator>= operator> operator!= equalsliteral find(const nsacstring&,
print32 (*) find(const nsacstring&, pruint32,
print32 (*) find(co...
...nst char*,
print32 (*) find(const char*, pruint32,
print32 (*) rfind(const nsacstring&,
print32 (*) rfind(const nsacstring&,
print32,
print32 (*) rfind(const char*,
print32 (*) rfind(const char*,
print32,
print32 (*) findchar rfindchar appendint tointeger base classes nsacstring data members no public members.
... trim void trim(const char*, prbool, prbool) - source parameters char aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const char*, const char*, pruint32) - source parameters char a char b pruint32 length compare(const char*,
print32 (*)
print32 compare(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char other
print32* c compare(const nsacstring&,
print32 (...
...And 12 more matches
nsDependentSubstring external
endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare(const prunichar*,
print32 (*) compare(const nsastring&,
print32 (*) equals(const prunichar*,
print32 (*) equals(const nsastring&,
print32 (*) operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find(const nsastring&,
print32 (*) find(const nsastring&, pruin...
...t32,
print32 (*) find rfind(const nsastring&,
print32 (*) rfind(const nsastring&,
print32,
print32 (*) rfind findchar rfindchar appendint tointeger base classes nsstringcontainer data members no public members.
... trim void trim(const char*, prbool, prbool) - source parameters char aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const prunichar*, const prunichar*, pruint32) - source parameters prunichar a prunichar b pruint32 length compare(const prunichar*,
print32 (*)
print32 compare(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar other
print32* c ...
...And 12 more matches
nsXPIDLCString
methods constructors void nsxpidlcstring() - source void nsxpidlcstring(const nsxpidlcstring&) - source parameters nsxpidlcstring& str operator const char* char* operator const char*() const - source operator[] char operator[](
print32) const - source parameters
print32 i char operator[](pruint32) const - source parameters pruint32 i operator= nsxpidlcstring& operator=(const nsxpidlcstring&) - source parameters nsxpidlcstring& str nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& opera...
...tor=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless...
...And 11 more matches
nsXPIDLString
methods constructors void nsxpidlstring() - source void nsxpidlstring(const nsxpidlstring&) - source parameters nsxpidlstring& str operator const prunichar* prunichar* operator const prunichar*() const - source operator[] prunichar operator[](
print32) const - source parameters
print32 i prunichar operator[](pruint32) const - source parameters pruint32 i operator= nsxpidlstring& operator=(const nsxpidlstring&) - source parameters nsxpidlstring& str nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal...
...& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const nsaflatstring&,
print32,
print32) const - source parameters nsaflatstring& astring
print32 aoffset
print32 acount
print32 find(const prunichar*,
print32,
print32) const - source parameters prunichar* astring
print32 aoffset
print32 acount...
...And 11 more matches
imgIContainer
obsolete since gecko 2.0 void appendframe(in
print32 ax, in
print32 ay, in
print32 awidth, in
print32 aheight, in gfximageformat aformat, [array, size_is(imagelength)] out pruint8 imagedata, out unsigned long imagelength); native code only!
... obsolete since gecko 2.0 void appendpalettedframe(in
print32 ax, in
print32 ay, in
print32 awidth, in
print32 aheight, in gfximageformat aformat, in pruint8 apalettedepth, [array, size_is(imagelength)] out pruint8 imagedata, out unsigned long imagelength, [array, size_is(palettelength)] out pruint32 palettedata, out unsigned long palettelength); native code only!
... void endframedecode(in unsigned long framenumber); obsolete since gecko 2.0 void ensurecleanframe(in unsigned long aframenum, in
print32 ax, in
print32 ay, in
print32 awidth, in
print32 aheight, in gfximageformat aformat, [array, size_is(imagelength)] out pruint8 imagedata, out unsigned long imagelength); native code only!
...And 11 more matches
nsITextInputProcessor
keycode: keyboardevent.dom_vk_return, // required if
printable key, but optional if non-
printable key.
... key_non_
printable_key 0x00000002 one of akeyflags.
... when you attempt to dispatch a non-
printable key's events, it's recommented this be specified.
...And 11 more matches
NS_ConvertASCIItoUTF16
char c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const nsaflatstring&,
print32,
print32) const - source parameters nsaflatstring& astring
print32 aoffset
print32 acount
print32 find(const prunichar*,
print32,
print32) const - source parameters prunichar* astring
print32 aoffset
print32 acount...
... rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 10 more matches
NS ConvertASCIItoUTF16 external
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const prunichar*, const prunichar*, pruint32) - source parameters prunichar* a prunichar* b pruint32 length compare
print32 compare(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c...
...
print32 compare(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c equals prbool equals(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c prbool equals(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c operator< prbool operator<(const nsastring&) const - source parameters ...
... parameters char* aasciistring find
print32 find(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
NS_ConvertUTF16toUTF8
meters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 rfind(const char*, prbool,
print32,
print32) const - source parameters char* acstring prbool aignorecase
print32 aoffset
print32 acount rfindchar
print32 rfindchar(prunichar,
print32,
print32) const - source parameters prunichar achar
print32 aoffset
print32 acount findcharinset
print32 findcharinset(const char*,
print32) const - source this method searches this string for the first character found in the given string.
...And 10 more matches
NS ConvertUTF16toUTF8 external
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const char*, const char*, pruint32) - source parameters char* a char* b pruint32 length compare
print32 compare(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c
print32 compare(const nsacstring...
...&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c equals prbool equals(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c prbool equals(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c operator< prbool operator<(const nsacstring&) const - source parameters nsacstring& other prbool operator<(const char*) const - source parameters char*...
... operator!= prbool operator!=(const nsacstring&) const - source parameters nsacstring& other prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find
print32 find(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
NS_ConvertUTF8toUTF16
char c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const nsaflatstring&,
print32,
print32) const - source parameters nsaflatstring& astring
print32 aoffset
print32 acount
print32 find(const prunichar*,
print32,
print32) const - source parameters prunichar* astring
print32 aoffset
print32 acount...
... rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 10 more matches
NS ConvertUTF8toUTF16 external
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const prunichar*, const prunichar*, pruint32) - source parameters prunichar* a prunichar* b pruint32 length compare
print32 compare(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c...
...
print32 compare(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c equals prbool equals(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c prbool equals(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c operator< prbool operator<(const nsastring&) const - source parameters ...
... parameters char* aasciistring find
print32 find(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
NS_LossyConvertUTF16toASCII
meters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 rfind(const char*, prbool,
print32,
print32) const - source parameters char* acstring prbool aignorecase
print32 aoffset
print32 acount rfindchar
print32 rfindchar(prunichar,
print32,
print32) const - source parameters prunichar achar
print32 aoffset
print32 acount findcharinset
print32 findcharinset(const char*,
print32) const - source this method searches this string for the first character found in the given string.
...And 10 more matches
NS LossyConvertUTF16toASCII external
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const char*, const char*, pruint32) - source parameters char* a char* b pruint32 length compare
print32 compare(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c
print32 compare(const nsacstring...
...&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c equals prbool equals(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c prbool equals(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c operator< prbool operator<(const nsacstring&) const - source parameters nsacstring& other prbool operator<(const char*) const - source parameters char*...
... operator!= prbool operator!=(const nsacstring&) const - source parameters nsacstring& other prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find
print32 find(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
PromiseFlatCString (External)
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const char*, const char*, pruint32) - source parameters char* a char* b pruint32 length compare
print32 compare(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c
print32 compare(const nsacstring...
...&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c equals prbool equals(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c prbool equals(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c operator< prbool operator<(const nsacstring&) const - source parameters nsacstring& other prbool operator<(const char*) const - source parameters char*...
... operator!= prbool operator!=(const nsacstring&) const - source parameters nsacstring& other prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find
print32 find(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
PromiseFlatString (External)
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const prunichar*, const prunichar*, pruint32) - source parameters prunichar* a prunichar* b pruint32 length compare
print32 compare(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c...
...
print32 compare(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c equals prbool equals(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c prbool equals(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c operator< prbool operator<(const nsastring&) const - source parameters ...
... parameters char* aasciistring find
print32 find(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
nsACString (External)
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const char*, const char*, pruint32) - source parameters char* a char* b pruint32 length compare
print32 compare(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c
print32 compare(const nsacstring...
...&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c equals prbool equals(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c prbool equals(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c operator< prbool operator<(const nsacstring&) const - source parameters nsacstring& other prbool operator<(const char*) const - source parameters char*...
... operator!= prbool operator!=(const nsacstring&) const - source parameters nsacstring& other prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find
print32 find(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
nsAString (External)
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const prunichar*, const prunichar*, pruint32) - source parameters prunichar* a prunichar* b pruint32 length compare
print32 compare(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c
print32 compare(const nsastring&,
print32 (*)(const prunichar*, con...
...st prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c equals prbool equals(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c prbool equals(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c operator< prbool operator<(const nsastring&) const - source parameters nsastring& other prbool operator<(const prunichar*) const - source parameters prunichar* other operator<= prbool operator<=(const nsastring&) const - source parameters nsastring& other prbool operator<=(const p...
...parameters char* aasciistring find
print32 find(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
nsAdoptingCString
acstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple operator const char* char* operator const char*() const - source operator[] char operator[](
print32) const - source parameters
print32 i char operator[](pruint32) const - source parameters pruint32 i get char* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 rfind(const char*, prbool,
print32,
print32) const - source parameters char* acstring prbool aignorecase
print32 aoffset
print32 acount rfindchar
print32 rfindchar(prunichar,
print32,
print32) const - source parameters prunichar achar
print32 aoffset
print32 acount findcharinset
print32 findcharinset(const char*,
print32) const - source this method searches this string for the first character found in the given string.
...And 10 more matches
nsAdoptingString
tor=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple operator const prunichar* prunichar* operator const prunichar*() const - source operator[] prunichar operator[](
print32) const - source parameters
print32 i prunichar operator[](pruint32) const - source parameters pruint32 i get prunichar* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const nsaflatstring&,
print32,
print32) const - source parameters nsaflatstring& astring
print32 aoffset
print32 acount
print32 find(const prunichar*,
print32,
print32) const - source parameters prunichar* astring
print32 aoffset
print32 acount...
... rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 10 more matches
nsAutoString
char c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const nsaflatstring&,
print32,
print32) const - source parameters nsaflatstring& astring
print32 aoffset
print32 acount
print32 find(const prunichar*,
print32,
print32) const - source parameters prunichar* astring
print32 aoffset
print32 acount...
... rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 10 more matches
nsAutoString (External)
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const prunichar*, const prunichar*, pruint32) - source parameters prunichar* a prunichar* b pruint32 length compare
print32 compare(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c...
...
print32 compare(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c equals prbool equals(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c prbool equals(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c operator< prbool operator<(const nsastring&) const - source parameters ...
... parameters char* aasciistring find
print32 find(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
nsCAutoString
g_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 rfind(const char*, prbool,
print32,
print32) const - source parameters char* acstring prbool aignorecase
print32 aoffset
print32 acount rfindchar
print32 rfindchar(prunichar,
print32,
print32) const - source parameters prunichar achar
print32 aoffset
print32 acount findcharinset
print32 findcharinset(const char*,
print32) const - source this method searches this string fo...
...And 10 more matches
nsCAutoString (External)
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const char*, const char*, pruint32) - source parameters char* a char* b pruint32 length compare
print32 compare(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c
print32 compare(const nsacstring...
...&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c equals prbool equals(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c prbool equals(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c operator< prbool operator<(const nsacstring&) const - source parameters nsacstring& other prbool operator<(const char*) const - source parameters char*...
... operator!= prbool operator!=(const nsacstring&) const - source parameters nsacstring& other prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find
print32 find(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
nsCString
meters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 rfind(const char*, prbool,
print32,
print32) const - source parameters char* acstring prbool aignorecase
print32 aoffset
print32 acount rfindchar
print32 rfindchar(prunichar,
print32,
print32) const - source parameters prunichar achar
print32 aoffset
print32 acount findcharinset
print32 findcharinset(const char*,
print32) const - source this method searches this string for the first character found in the given string.
...And 10 more matches
nsCString external
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const char*, const char*, pruint32) - source parameters char* a char* b pruint32 length compare
print32 compare(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c
print32 compare(const nsacstring...
...&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c equals prbool equals(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c prbool equals(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c operator< prbool operator<(const nsacstring&) const - source parameters nsacstring& other prbool operator<(const char*) const - source parameters char*...
... operator!= prbool operator!=(const nsacstring&) const - source parameters nsacstring& other prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find
print32 find(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
nsDependentCString
meters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 rfind(const char*, prbool,
print32,
print32) const - source parameters char* acstring prbool aignorecase
print32 aoffset
print32 acount rfindchar
print32 rfindchar(prunichar,
print32,
print32) const - source parameters prunichar achar
print32 aoffset
print32 acount findcharinset
print32 findcharinset(const char*,
print32) const - source this method searches this string for the first character found in the given string.
...And 10 more matches
nsDependentCString external
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const char*, const char*, pruint32) - source parameters char* a char* b pruint32 length compare
print32 compare(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c
print32 compare(const nsacstring...
...&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c equals prbool equals(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c prbool equals(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c operator< prbool operator<(const nsacstring&) const - source parameters nsacstring& other prbool operator<(const char*) const - source parameters char*...
... operator!= prbool operator!=(const nsacstring&) const - source parameters nsacstring& other prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find
print32 find(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
nsDependentCSubstring external
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const char*, const char*, pruint32) - source parameters char* a char* b pruint32 length compare
print32 compare(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c
print32 compare(const nsacstring...
...&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c equals prbool equals(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c prbool equals(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c operator< prbool operator<(const nsacstring&) const - source parameters nsacstring& other prbool operator<(const char*) const - source parameters char*...
... operator!= prbool operator!=(const nsacstring&) const - source parameters nsacstring& other prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find
print32 find(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
nsDependentString
char c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const nsaflatstring&,
print32,
print32) const - source parameters nsaflatstring& astring
print32 aoffset
print32 acount
print32 find(const prunichar*,
print32,
print32) const - source parameters prunichar* astring
print32 aoffset
print32 acount...
... rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 10 more matches
nsDependentString external
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const prunichar*, const prunichar*, pruint32) - source parameters prunichar* a prunichar* b pruint32 length compare
print32 compare(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c...
...
print32 compare(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c equals prbool equals(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c prbool equals(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c operator< prbool operator<(const nsastring&) const - source parameters ...
... parameters char* aasciistring find
print32 find(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
nsFixedCString
meters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 rfind(const char*, prbool,
print32,
print32) const - source parameters char* acstring prbool aignorecase
print32 aoffset
print32 acount rfindchar
print32 rfindchar(prunichar,
print32,
print32) const - source parameters prunichar achar
print32 aoffset
print32 acount findcharinset
print32 findcharinset(const char*,
print32) const - source this method searches this string for the first character found in the given string.
...And 10 more matches
nsFixedString
char c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const nsaflatstring&,
print32,
print32) const - source parameters nsaflatstring& astring
print32 aoffset
print32 acount
print32 find(const prunichar*,
print32,
print32) const - source parameters prunichar* astring
print32 aoffset
print32 acount...
... rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 10 more matches
nsLiteralCString (External)
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const char*, const char*, pruint32) - source parameters char* a char* b pruint32 length compare
print32 compare(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c
print32 compare(const nsacstring...
...&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c equals prbool equals(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c prbool equals(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c operator< prbool operator<(const nsacstring&) const - source parameters nsacstring& other prbool operator<(const char*) const - source parameters char*...
... operator!= prbool operator!=(const nsacstring&) const - source parameters nsacstring& other prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find
print32 find(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
nsLiteralString (External)
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const char*, const char*, pruint32) - source parameters char* a char* b pruint32 length compare
print32 compare(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c
print32 compare(const nsacstring...
...&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c equals prbool equals(const char*,
print32 (*)(const char*, const char*, pruint32)) const - source parameters char* other
print32 (*)(char*, char*, pruint32) c prbool equals(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source parameters nsacstring& other
print32 (*)(char*, char*, pruint32) c operator< prbool operator<(const nsacstring&) const - source parameters nsacstring& other prbool operator<(const char*) const - source parameters char*...
... operator!= prbool operator!=(const nsacstring&) const - source parameters nsacstring& other prbool operator!=(const char*) const - source parameters char* other equalsliteral prbool equalsliteral(const char*) const - source parameters char* other find
print32 find(const nsacstring&,
print32 (*)(const char*, const char*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
nsPromiseFlatCString
meters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless...
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 rfind(const char*, prbool,
print32,
print32) const - source parameters char* acstring prbool aignorecase
print32 aoffset
print32 acount rfindchar
print32 rfindchar(prunichar,
print32,
print32) const - source parameters prunichar achar
print32 aoffset
print32 acount findcharinset
print32 findcharinset(const char*,
print32) const - source this method searches this string for the first character found in the given string.
...And 10 more matches
nsPromiseFlatString
char c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const nsaflatstring&,
print32,
print32) const - source parameters nsaflatstring& astring
print32 aoffset
print32 acount
print32 find(const prunichar*,
print32,
print32) const - source parameters prunichar* astring
print32 aoffset
print32 acount...
... rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 10 more matches
nsString
char c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find
print32 find(const nscstring&, prbool,
print32,
print32) const - source search for the given substring within this string.
...@return offset in string, or knotfound parameters nscstring& astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const char*, prbool,
print32,
print32) const - source parameters char* astring prbool aignorecase
print32 aoffset
print32 acount
print32 find(const nsaflatstring&,
print32,
print32) const - source parameters nsaflatstring& astring
print32 aoffset
print32 acount
print32 find(const prunichar*,
print32,
print32) const - source parameters prunichar* astring
print32 aoffset
print32 acount...
... rfind
print32 rfind(const nscstring&, prbool,
print32,
print32) const - source this methods scans the string backwards, looking for the given string @param astring is substring to be sought in this @param aignorecase tells us whether or not to do caseless compare @param aoffset tells us where in this string to start searching.
...And 10 more matches
nsStringContainer (External)
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const prunichar*, const prunichar*, pruint32) - source parameters prunichar* a prunichar* b pruint32 length compare
print32 compare(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c...
...
print32 compare(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c equals prbool equals(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c prbool equals(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c operator< prbool operator<(const nsastring&) const - source parameters ...
... parameters char* aasciistring find
print32 find(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
nsString external
trim void trim(const char*, prbool, prbool) - source parameters char* aset prbool aleading prbool atrailing defaultcomparator
print32 defaultcomparator(const prunichar*, const prunichar*, pruint32) - source parameters prunichar* a prunichar* b pruint32 length compare
print32 compare(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c...
...
print32 compare(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c equals prbool equals(const prunichar*,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters prunichar* other
print32 (*)(prunichar*, prunichar*, pruint32) c prbool equals(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source parameters nsastring& other
print32 (*)(prunichar*, prunichar*, pruint32) c operator< prbool operator<(const nsastring&) const - source parameters ...
... parameters char* aasciistring find
print32 find(const nsastring&,
print32 (*)(const prunichar*, const prunichar*, pruint32)) const - source find the first occurrence of astr in this string.
...And 10 more matches
Index - Web APIs
1721 htmlimageelement.height api, html, html dom, htmlimageelement, image, property, reference, dimensions, height, size the height property of the htmlimageelement interface indicates the height at which the image is drawn, in css pixels if the image is being drawn or rendered to any visual medium such as the screen or a
printer; otherwise, it's the natural, pixel density corrected height of the image.
... 1735 htmlimageelement.width api, html, html dom, htmlimageelement, image, property, reference, size, width the width property of the htmlimageelement interface indicates the width at which the image is drawn, in css pixels if the image is being drawn or rendered to any visual medium such as the screen or a
printer; otherwise, it's the natural, pixel density corrected width of the image.
...this value is an estimate to help prevent its use for finger
printing—that is, identifying a device using an amalgamation of the values of seemingly innocuous properties.
...And 10 more matches
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
the breakdown: 1 master screen media file which imports 4 files: a base file (bulk of formatting) a file for finance/table formatting color file (override colors and background images for specific color scheme) temp file (used for styles associated with temporary features and ad-related pages) 1
print media file 1 aural media file 3 master alternate style sheets which import 1 file each the 3 imported files set alternate font sizes (small, large, larger) how much did the size of a typical wired news page shrink?
... how does the new design perform when the pages are
printed?
... we have one css file specifically set up to cover most of the content throughout our pages for
print media.
...And 9 more matches
Index
591 nsiexception interfaces, interfaces:scriptable, reference, xpcom, xpcom interface reference a generic formatter - make it suitable to
print, etc.
... 774 nsimsgmessageservice interfaces, interfaces:scriptable, needsmarkupwork, xpcom, xpcom interface reference, thunderbird objects that implements nsimsgmessageservice give the user top level routines related to messages like copying, displaying, attachment's manipulation,
printing, streaming the message content to eml format string, etc.
... 834 nsi
printerenumerator interfaces, interfaces:scriptable, needscontent, xpcom, xpcom interface reference returns an array of the names of all installed
printers.
...And 9 more matches
nsIVariant
nsresult getasid(out nsid retval); violates the xpcom interface guidelines
print16 getasint16(); native code only!
...
print32 getasint32(); native code only!
...
print64 getasint64(); native code only!
...And 9 more matches
sslfnc.html
syntax #include "ssl.h" secstatus ssl_optionsetdefault(
print32 option, prbool on); parameters this function has the following parameters: option one of the following values (except as noted, the factory setting is "off"): ssl_security enables use of security protocol.
... syntax #include "ssl.h" secstatus ssl_optiongetdefault(
print32 option, prbool *on) parameters this function has the parameters listed below.
... syntax #include "ssl.h" secstatus ssl_cipherprefsetdefault(
print32 cipher, prbool enabled); parameters this function has the following parameters: cipher one of the following values for ssl2 (factory settings for all are enabled): ssl_en_rc4_128_with_md5 ssl_en_rc4_128_export40_with_md5 ssl_en_rc2_128_cbc_with_md5 ssl_en_rc2_128_cbc_export40_with_md5 ssl_en_des_64_cbc_with_md5 ssl_en_des_192_ede...
...And 8 more matches
Embedding Tips
how do i
print a page?
... query the web browser object for nsiwebbrowser
print.
... call the nsiwebbrowser
print::
print() method supplying a
print settings object (e.g.
...And 7 more matches
nsINavBookmarkObserver
rits from: nsisupports last changed in gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) method overview void onbeforeitemremoved(in long long aitemid, in unsigned short aitemtype, in long long aparentid, in acstring aguid, in acstring aparentguid); obsolete since gecko 21.0 void onbeginupdatebatch(); void onendupdatebatch(); void onfolderadded(in
print64 folder, in
print64 parent, in
print32 index); obsolete since gecko 1.9 void onfolderchanged(in
print64 folder, in acstring property); obsolete since gecko 1.9 void onfoldermoved(in
print64 folder, in
print64 oldparent, in
print32 oldindex, in
print64 newparent, in
print32 newindex); obsolete since gecko 1.9 void onfolderremoved(in
print64 folder, in
print64 parent, in...
...
print32 index); obsolete since gecko 1.9 void onitemadded(in long long aitemid, in long long aparentid, in long aindex, in unsigned short aitemtype, in nsiuri auri, in autf8string atitle, in prtime adateadded, in acstring aguid, in acstring aparentguid); void onitemchanged(in long long aitemid, in acstring aproperty, in boolean aisannotationproperty, in autf8string anewvalue, in prtime alastmodified, in unsigned short aitemtype, in long long aparentid, in acstring aguid, in acstring aparentguid); void onitemmoved(in long long aitemid, in long long aoldparentid, in long aoldindex, in long long anewparentid, in long anewindex, in unsigned short aitemtype, in acstring aguid, in acstring aoldparentguid, in acstring anewparentguid); void onitemremoved(in long lo...
...ng aitemid, in long long aparentid, in long aindex, in unsigned short aitemtype, in nsiuri auri, in acstring aguid, in acstring aparentguid); void onitemreplaced(in
print64 folder, in nsiuri item, in nsiuri newitem); obsolete since gecko 1.9 void onitemvisited(in long long aitemid, in long long avisitid, in prtime atime, in unsigned long atransitiontype, in nsiuri auri, in long long aparentid, in acstring aguid, in acstring aparentguid); void onseparatoradded(in
print64 parent, in
print32 index); obsolete since gecko 1.9 void onseparatorremoved(in
print64 parent, in
print32 index); obsolete since gecko 1.9 methods onbeforeitemremoved() obsolete since gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) note: this met...
...And 7 more matches
Command line crash course - Learn web development
for example, the below command counts the number of lines outputted by the ls command (what it would normally
print to the terminal if run on its own) and outputs that count to the terminal instead: ls | wc -l since ls
prints each file or directory on its own line, that effectively gives us a directory and file count.
...a general philosophy of (unix) command line tools is that they
print text to the terminal (also referred to "
printing to standard output" or stdout).
...in this case, ls would normally
print its output to stdout, but instead ls’s output is being piped into wc, which takes that output as an input, counting the number of lines it contains, and
prints that count to stdout instead.
...And 6 more matches
NSS tools : ssltab
if a connection is ssl, the data display includes interpreted ssl records and handshaking options -v
print a version string for the tool.
... -h turn on hex/ascii
printing.
...non
printing characters are replaced by dots.
...And 6 more matches
NSS tools : ssltap
if a connection is ssl, the data display includes interpreted ssl records and handshaking options -v
print a version string for the tool.
... -h turn on hex/ascii
printing.
...non
printing characters are replaced by dots.
...And 6 more matches
NSS Tools ssltap
the options for the command are the following: -v
print a version string for the tool.
... -h turn on hex/ascii
printing.
...non
printing characters are replaced by dots.
...And 6 more matches
NSS tools : ssltap
if a connection is ssl, the data display includes interpreted ssl records and handshaking options -v
print a version string for the tool.
... -h turn on hex/ascii
printing.
...non
printing characters are replaced by dots.
...And 6 more matches
Tutorial: Embedding Rhino
in this document: runscript: a simple embedding entering a context initializing standard objects collecting the arguments evaluating a script
printing the result exiting the context expose java apis using java apis implementing interfaces adding java objects using javascript objects from java using javascript variables calling javascript functions javascript host objects defining host objects counter example counter's constructors class name dynamic properties defini...
...all it does it read a script from the command line, execute it, and
print a result.
...
printing the result the code system.out.
println(cx.tostring(result));
prints the result of evaluating the script (contained in the variable result).
...And 6 more matches
Shell global objects
console an object that has following property: log evaluate and
print expressions to stdout.
... this function is an alias of the
print() function.
...
print([exp ...]) evaluate and
print expressions to stdout.
...And 6 more matches
Mozilla internal string guide
for example: // when passing a string to a method, use const nsastring& nsfoo::
printstring(const nsastring &str); // when getting a string from a method, use nsastring& nsfoo::getstring(nsastring &result); the abstract classes are also sometimes used to store temporary references to objects.
... ns
printfcstring- derived from nscstring, this string behaves like an nsautocstring.
... the constructor takes parameters which allows it to construct a 8-bit string from a
printf-style format string and parameter list.
...And 6 more matches
nsISelectionPrivate
method overview void addselectionlistener(in nsiselectionlistener newlistener); void endbatchchanges(); void getcachedframeoffset(in nsiframe aframe, in
print32 inoffset, in nspointref apoint); native code only!
... void getrangesforinterval(in nsidomnode beginnode, in
print32 beginoffset, in nsidomnode endnode, in
print32 endoffset, in prbool allowadjacent, out pruint32 resultcount, [retval, array, size_is(resultcount)] out nsidomrange results); void getrangesforintervalarray(in nsinode beginnode, in
print32 beginoffset, in nsinode endnode, in
print32 endoffset, in boolean allowadjacent, in rangearray results); native code only!
... void getrangesforintervalcomarray(in nsidomnode beginnode, in
print32 beginoffset, in nsidomnode endnode, in
print32 endoffset, in prbool allowadjacent, in rangearray results); native code only!
...And 6 more matches
Window - Web APIs
window.
print() opens the
print dialog to
print the current document.
... event handlers implemented from elsewhere globaleventhandlers.onabort called when the loading of a resource has been aborted, such as by a user canceling the load while it is still in progress windoweventhandlers.onafter
print called when the
print dialog box is closed.
... see after
print event.
...And 6 more matches
Index - Archive of obsolete content
the tool enables mozilla.org to be immediately notified of changes to the code that prevent mozilla from compiling and running (or compromise performance and foot
print) so they can get someone to fix the problem or reverse the changes.
... 1344
printing from a xul app guide, needscontent, xul this document will talk about
printutils, and the ways that xul applications can trigger
print-related behaviors.
... 3623 npanycallbackstruct api, gecko, npapi, plugins, reference contains information required during embedded mode
printing.
...And 5 more matches
Secure Development Guidelines
ith databases code injection attack that is similar to xss but targeted at sql rather than html and javascript if input is mixed with sql, it could itself become an sql instruction and be used to: query data from the database (passwords) insert value into the database (a user account) change application logic based on results returned by the database sql injection: example sn
printf(str, sizeof(str), "select * from account where name ='%s'", name); sqlite3_exec(db, str, null, null, null); sql injection: prevention use parameterized queries insert a marker for every piece of dynamic content so data does not get mixed with sql instructions example: sqlite3_stmt *stmt; char *str = "select * from account where name='?'"; sqlite3_prepare_v2(db, str, strlen...
... bits maximum value that can be represented data type 8 28-1 255 char 16 216-1 65535 short 32 232-1 4294967295 int 64 264-1 18446744073709551615 long long integer overflows/underflows example of an integer overflow int main() { unsigned int foo = 0xffffffff;
printf(“foo: 0x%08x\r\n”, foo); foo++;
printf(“foo: 0x%08x\r\n”, foo); } integer overflows/underflows example of an integer underflow int main() { unsigned int foo = 0;
printf(“foo: 0x%08x\r\n”, foo); foo--;
printf(“foo: 0x%08x\r\n”, foo); } integer overflows/underflows real-life example (bug 303213) jsbool js_str_escape(jscontext *cx, jsobjec...
...zes, offsets, and indexes casting and truncation example: void vuln_funct() { u_int32_t size1 = 0xffffffff; u_int16_t size2 = size1; void *ptr = malloc(size2); if (!ptr) exit(exit_failure); memcpy(ptr, user_data, size1); } casting issues: sign extension example: int main() { int32_t new_size = 0; int8_t size = 0xff; new_size = size;
printf("0x%08x\r\n", new_size); } casting issues: sign extension prevention be careful with signed integers use unsigned integers for sizes, offsets, and indexes denial of service: divide by zero example: int main() { int a, b; if (argc != 3) return 1; a = atoi(argv[1]); b = atoi(argv[2]); return a/b; } denial of service: divide int_min by -1 example: ...
...And 5 more matches
Using media queries - CSS: Cascading Style Sheets
media queries are useful when you want to modify your site or app depending on a device's general type (such as
print vs.
...
print intended for paged material and documents viewed on a screen in
print preview mode.
...although websites are commonly designed with screens in mind, you may want to create styles that target special devices such as
printers or audio-based screenreaders.
...And 5 more matches
Dehydra Function Reference - Archive of obsolete content
builtin functions the following functions are provided by dehydra and may be called by the user:
print(msg)
print a string to stdout (or stderr if the compiler is piping output).
... if the current callback is associated with a particular location, the location will be
printed first.
... msg is a string to output to customize the location info
printed set this._loc before calling
print() include(file [, namespace]) include a javascript file into a namespace.
...And 4 more matches
Arrays - Learn web development
maybe we've got a series of product items and their prices stored in an array, and we want to loop through them all and
print them out on an invoice, while totaling all the prices together and
printing out the total price at the bottom.
... if we didn't have arrays, we'd have to store every item in a separate variable, then call the code that does the
printing and adding separately for each item.
... for each item,
print it out to the browser console with console.log().
...And 4 more matches
Eclipse CDT Manual Setup
if you want a column marker to mark the 80th column to help with formatting code to mozilla's 80 character line limit, tick "show
print margin" and set the value to 80.
...select the "builder settings" tab, untick "use default build command", set the build command to "just-
print-mozilla-build.py" or, if you're on mac, to "bash -l -c 'just-
print-mozilla-build.py'" (on mac eclipse doesn't seem to pick up the environment properly, so it's necessary to invoke just-
print-mozilla-build.py indirectly through bash).
... (just-
print-mozilla-build.py is a fast script that we'll download in the next section.) (append '--objdir /path/to/objdir' if your objdir lives outside your tree) set the build directory to "${projdirpath}/path/of/your/objdir/relative/to/the/root/of/your/source".
...And 4 more matches
Overview of Mozilla embedding APIs
contract-id: ns_webbrowser_contractid implemented interfaces: nsiwebbrowser nsiwebnavigation nsiwebbrowsersetup nsiwebbrowserpersist nsiwebbrowserfind nsiwebbrowser
print nsiwebbrowserfocus nsibasewindow requestor interfaces: nsidomwindow nsidomdocument nsiwebprogress nsiclipboardcommands nsiprompt related interfaces: nsiprompt nsiwebbrowserchrome nsiwebbrowsersitewindow nsiwebprogresslistener nsicontextmenulistener nsi
printoptions overview: most of gecko's functionality is exposed through the nswebbrowser component.
...
printing (not yet implemented)
printing the contents of a domwindow within a webbrowser is a two step process.
... first, the
printer and page options are collected via the nsi
printoptions interface.
...And 4 more matches
NSS 3.34 release notes
nss 3.34 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_34_rtm/src/ notable changes in nss 3.34 the following ca certificates were added: cn = gdca trustauth r5 root sha-256 finger
print: bf:ff:8f:d0:44:33:48:7d:6a:8a:a6:0c:1a:29:76:7a:9f:c2:bb:b0:5e:42:0f:71:3a:13:b9:92:89:1d:38:93 trust flags: websites cn = ssl.com root certification authority rsa sha-256 finger
print: 85:66:6a:56:2e:e0:be:5c:e9:25:c1:d8:89:0a:6f:76:a8:7e:c1:6d:4d:7d:5f:29:ea:74:19:cf:20:12:3b:69 trust flags: websites, email cn = ssl.com root certification authority ec...
...c sha-256 finger
print: 34:17:bb:06:cc:60:07:da:1b:96:1c:92:0b:8a:b4:ce:3f:ad:82:0e:4a:a3:0b:9a:cb:c4:a7:4e:bd:ce:bc:65 trust flags: websites, email cn = ssl.com ev root certification authority rsa r2 sha-256 finger
print: 2e:7b:f1:6c:c2:24:85:a7:bb:e2:aa:86:96:75:07:61:b0:ae:39:be:3b:2f:e9:d0:cc:6d:4e:f7:34:91:42:5c trust flags: websites cn = ssl.com ev root certification authority ecc sha-256 finger
print: 22:a2:c1:f7:bd:ed:70:4c:c1:e7:01:b5:f4:08:c3:10:88:0f:e9:56:b5:de:2a:4a:44:f9:9c:87:3a:25:a7:c8 trust flags: websites cn = trustcor rootcert ca-1 sha-256 finger
print: d4:0e:9c:86:cd:8f:e4:68:c1:77:69:59:f4:9e:a7:74:fa:54:86:84:b6:c4:06:f3:90:92:61:f4:dc:e2:57:5c trust flags: websites, email ...
... cn = trustcor rootcert ca-2 sha-256 finger
print: 07:53:e9:40:37:8c:1b:d5:e3:83:6e:39:5d:ae:a5:cb:83:9e:50:46:f1:bd:0e:ae:19:51:cf:10:fe:c7:c9:65 trust flags: websites, email cn = trustcor eca-1 sha-256 finger
print: 5a:88:5d:b1:9c:01:d9:12:c5:75:93:88:93:8c:af:bb:df:03:1a:b2:d4:8e:91:ee:15:58:9b:42:97:1d:03:9c trust flags: websites, email the following ca certificates were removed: cn = certum ca, o=unizeto sp.
...And 4 more matches
NSS Sample Code Sample_1_Hashing
secoidtag hashnametooidtag(const char *hashname) { int i, nhashes = sizeof(hash_names); secoidtag hashtag = sec_oid_unknown; for (i = 0; i < nhashes; i++) { if (port_strcasecmp(hashname, hash_names[i].hashname) == 0) { hashtag = hash_names[i].oid; break; } } return hashtag; } /* * newline */ static void newline(prfiledesc* out) { pr_f
printf(out, "\n"); } /* *
printashex */ void
printashex(prfiledesc* out, unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned int level = 1; column = level; if (!len) { pr_f
printf(out, "(empty)\n"); return; } for (i = 0; i < len; i++) { if (i != len - 1) { pr_f
printf(out, "%02x:", dat...
...a[i]); column += 3; } else { pr_f
printf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* *
prints a usage message and exits */ static void usage(const char *progname) { int htype; int hash_algtotal = sizeof(hash_names) / sizeof(hash_names[0]); f
printf(stderr, "usage: %s -t type [ < input ] [ > output ]\n", progname); f
printf(stderr, "%-20s specify the digest method (must be one of\n", "-t type"); f
printf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; htype++) { f
printf(s...
...tderr, hash_names[htype].hashname); if (htype == (hash_algtotal - 2)) f
printf(stderr, " or "); else if (htype != (hash_algtotal - 1)) f
printf(stderr, ", "); } f
printf(stderr, " (case ignored))\n"); f
printf(stderr, "%-20s define an input file to use (default is stdin)\n", "< input"); f
printf(stderr, "%-20s define an output file to use (default is stdout)\n", "> output"); exit(-1); } /* * check for the missing arguments */ static void
printmsgandexit(const char *progname, char opt) { f
printf(stderr, "%s: option -%c requires an argument\n", progname, opt); usage(progname); } #define require_arg(opt,value) if (!(value))
printmsgandexit(progname, opt) /* * digests a file according to the specified algor...
...And 4 more matches
NSS Sample Code Sample_2_Initialization of NSS
sample code 1 /* nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prprf.h> /* nss headers */ #include <nss.h> #include <pk11func.h> #include "util.h" /*
print a usage message and exit */ static void usage(const char *progname) { f
printf(stderr, "\nusage: %s -d <dbdirpath> [-p <plainpasswc>]" " [-f <passwdffile>]\n\n", progname); f
printf(stderr, "%-15s specify a db directory path\n\n", "-d <dbdirpath>"); f
printf(stderr, "%-15s specify a plaintext password\n\n", "-p <plainpasswc>"); f
printf(stderr, "%-15s specify a password file\n\n...
...char *p0 = null; char *p1 = null; secupwdata *pwdata = (secupwdata *) arg; if (pwdata->source == pw_fromfile) { return filepasswd(slot, retry, pwdata->data); } if (pwdata->source == pw_plaintext) { return pl_strdup(pwdata->data); } /* open terminal */ input = fopen("/dev/tty", "r"); if (input == null) { pr_f
printf(pr_stderr, "error opening input terminal for read\n"); return null; } /* we have no password, so initialize database with one */ pr_f
printf(pr_stderr, "enter a password which will be used to encrypt your keys.\n" "the password should be at least 8 characters long,\n" "and should contain at least one non-alphabetic character.\n\n"); output = fopen("/dev/t...
...ty", "w"); if (output == null) { pr_f
printf(pr_stderr, "error opening output terminal for write\n"); return null; } for (;;) { if (p0) port_free(p0); p0 = getpassword(input, output, "enter new password: ", checkpassword); if (p1) port_free(p1); p1 = getpassword(input, output, "re-enter password: ", checkpassword); if (p0 && p1 && !port_strcmp(p0, p1)) { break; } pr_f
printf(pr_stderr, "passwords do not match.
...And 4 more matches
Hashing - sample 1
idtag hashnametooidtag(const char *hashname) { int i, nhashes = sizeof(hash_names); secoidtag hashtag = sec_oid_unknown; for (i = 0; i < nhashes; i++) { if (port_strcasecmp(hashname, hash_names[i].hashname) == 0) { hashtag = hash_names[i].oid; break; } } return hashtag; } /* * newline */ static void newline(prfiledesc* out) { pr_f
printf(out, "\n"); } /* *
printashex */ void
printashex(prfiledesc* out, unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned int level = 1; column = level; if (!len) { pr_f
printf(out, "(empty)\n"); return; } for (i = 0; i < len; i++) { if (i != len - 1) { pr_f
printf(out, "%02x:", dat...
...a[i]); column += 3; } else { pr_f
printf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* *
prints a usage message and exits */ static void usage(const char *progname) { int htype; int hash_algtotal = sizeof(hash_names) / sizeof(hash_names[0]); f
printf(stderr, "usage: %s -t type [ < input ] [ > output ]\n", progname); f
printf(stderr, "%-20s specify the digest method (must be one of\n", "-t type"); f
printf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; htype++) { f
printf(...
...stderr, hash_names[htype].hashname); if (htype == (hash_algtotal - 2)) f
printf(stderr, " or "); else if (htype != (hash_algtotal - 1)) f
printf(stderr, ", "); } f
printf(stderr, " (case ignored))\n"); f
printf(stderr, "%-20s define an input file to use (default is stdin)\n", "< input"); f
printf(stderr, "%-20s define an output file to use (default is stdout)\n", "> output"); exit(-1); } /* * check for the missing arguments */ static void
printmsgandexit(const char *progname, char opt) { f
printf(stderr, "%s: option -%c requires an argument\n", progname, opt); usage(progname); } #define require_arg(opt,value) if (!(value))
printmsgandexit(progname, opt) /* * digests a file according to the specified algo...
...And 4 more matches
Initialize NSS database - sample 2
/* *
print a usage message and exit */ static void usage(const char *progname) { f
printf(stderr, "\nusage: %s -d [-p ]" " [-f ]\n\n", progname); f
printf(stderr, "%-15s specify a db directory path\n\n", "-d "); f
printf(stderr, "%-15s specify a plaintext password\n\n", "-p "); f
printf(stderr, "%-15s specify a password file\n\n", "-f "); exit(-1); } /* * initslotpassword */ char * initslotpassword(pk11slotinfo *slot, prbool retry, void *arg) { file *input; file *output; char *p0 = null; char *p1 = null; ...
... secupwdata *pwdata = (secupwdata *) arg; if (pwdata->source == pw_fromfile) { return filepasswd(slot, retry, pwdata->data); } if (pwdata->source == pw_plaintext) { return pl_strdup(pwdata->data); } /* open terminal */ input = fopen("/dev/tty", "r"); if (input == null) { pr_f
printf(pr_stderr, "error opening input terminal for read\n"); return null; } /* we have no password, so initialize database with one */ pr_f
printf(pr_stderr, "enter a password which will be used to encrypt your keys.\n" "the password should be at least 8 characters long,\n" "and should contain at least one non-alphabetic character.\n\n"); output = fopen("/dev/tty", "w"); if (output == null) { pr_f
printf(pr_stderr, "error o...
... port_free(p0); p0 = getpassword(input, output, "enter new password: ", checkpassword); if (p1) port_free(p1); p1 = getpassword(input, output, "re-enter password: ", checkpassword); if (p0 && p1 && !port_strcmp(p0, p1)) { break; } pr_f
printf(pr_stderr, "passwords do not match.
...And 4 more matches
sample1
ooidtag(const char *hashname) { int i, nhashes = sizeof(hash_names); secoidtag hashtag = sec_oid_unknown; for (i = 0; i < nhashes; i++) { if (port_strcasecmp(hashname, hash_names[i].hashname) == 0) { hashtag = hash_names[i].oid; break; } } return hashtag; } /* newline */ static void newline(prfiledesc* out) { pr_f
printf(out, "\n"); } /*
printashex */ void
printashex(prfiledesc* out, unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned int level = 1; column = level; if (!len) { pr_f
printf(out, "(empty)\n"); return; } for (i = 0; i < len; i++) { if (i != len - 1) { pr_f
printf(o...
...ut, "%02x:", data[i]); column += 3; } else { pr_f
printf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /*
prints a usage message and exits */ static void usage(const char *progname) { int htype; int hash_algtotal = sizeof(hash_names) / sizeof(hash_names[0]); f
printf(stderr, "usage: %s -t type [ < input ] [ > output ]\n", progname); f
printf(stderr, "%-20s specify the digest method (must be one of\n", "-t type"); f
printf(stderr, "%-20s ", ""); for (htype = 0; htype < h...
...ash_algtotal; htype++) { f
printf(stderr, hash_names[htype].hashname); if (htype == (hash_algtotal - 2)) f
printf(stderr, " or "); else if (htype != (hash_algtotal - 1)) f
printf(stderr, ", "); } f
printf(stderr, " (case ignored))\n"); f
printf(stderr, "%-20s define an input file to use (default is stdin)\n", "< input"); f
printf(stderr, "%-20s define an output file to use (default is stdout)\n", "> output"); exit(-1); } /* check for the missing arguments */ static void
printmsgandexit(const char *progname, char opt) { f
printf(stderr, "%s: option -%c requires an argument\n", progname, opt); usage(progname); } #define require_arg(opt,value) if (!(value))
printmsgandexit(progna...
...And 4 more matches
Python binding for NSS
all nss/nspr python objects can
print their current value by evaluting the python object in a string context or by using the python str() function.
... python-nss tries to be flexible when generating a
print representation of complex objects.
...most people will probablby just
print the string representation of the returned certverifylog object.
...And 4 more matches
NSS tools : certutil
-o
print the certificate chain.
... -u list all available modules or
print a single named module.
... --dump-ext-val oid for single cert,
print binary der encoding of extension oid.
...And 4 more matches
Scripting Java
using the javascript for..in construct, we can
print out all these values: js> for (i in f) {
print(i) } exists parentfile mkdir tostring wait [44 others] note that not only the methods of the file class are listed, but also the methods inherited from the base class java.lang.object (like wait).
...ic string f(int i) { return "f(int)"; } public string g(string s, int i) { return "g(string,int)"; } public string g(int i, string s) { return "g(int,string)"; } public static void main(string[] args) { overload o = new overload(); object[] a = new object[] { new integer(3), "hi", overload.class }; for (int i = 0; i != a.length; ++i) system.out.
println(o.f(a[i])); } } when we compile and execute the program, it produces the output f(object) f(object) f(object) however, if we write a similar script var o = new packages.overload(); var a = [ 3, "hi", packages.overload ]; for (var i = 0; i != a.length; ++i)
print(o.f(a[i])); and execute it, we get the output f(int) f(string) f(object) because rhino selects an overloaded method...
...we can use that syntax here in combination with a function expression to define a javascript object with a run method: js> obj = { run: function () {
print("\nrunning"); } } [object object] js> obj.run() running now we can create an object implementing the runnable interface by constructing a runnable: js> r = new java.lang.runnable(obj); [object javaobject] in java it is not possible to use the new operator on an interface because there is no implementation available.
...And 4 more matches
Rhino shell
help() executing the help function will
print usage and help messages.
...
print([expr ...]) evaluate and
print expressions.
... evaluates each expression, converts the result to a string, and
prints it.
...And 4 more matches
Using Performance Timeline - Web APIs
function log(s) { var o = document.getelementsbytagname("output")[0]; o.innerhtml += s + " <br>"; } function do_work (n) { for (var i=0 ; i < n; i++) { var m = math.random(); } } function
print_perf_entry(pe) { log("..name: " + pe.name + "; entrytype: " + pe.entrytype + "; starttime: " + pe.starttime + "; duration: " + pe.duration); } function
print_performanceentries() { if (performance.mark === undefined) { log("...
...ported"); return; } // create some performance entries via the mark() and measure() methods performance.mark("begin"); do_work(50000); performance.mark("end"); do_work(50000); performance.measure("measure1", "begin", "end"); // use getentries() to iterate all entries var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("all entry[" + i + "]");
print_perf_entry(p[i]); } // use getentries(name, entrytype) to get specific entries p = performance.getentries({name : "measure1", entrytype: "measure"}); for (var i=0; i < p.length; i++) { log("begin and measure [" + i + "]");
print_perf_entry(p[i]); } // use getentriesbytype() to get all "mark" entries p = performance.getentriesbytype("mark"); for (var i=0; i < p.length; i+...
...+) { log ("mark only [" + i + "]");
print_perf_entry(p[i]); } // use getentriesbyname() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (var i=0; i < p.length; i++) { log ("begin and mark [" + i + "]");
print_perf_entry(p[i]); } } performanceentry interface the performanceentry interface encapsulates a single performance entry i.e.
...And 4 more matches
Venkman Introduction - Archive of obsolete content
the toolbar contains icons for stop, continue, step over, step into, step out, profile, and pretty
print commands.
... the pretty
print button toggles pretty
print mode.
... while in pretty
print mode, the contents of the source view will contain the decompiled source text for the selected function.
...And 3 more matches
NPAPI plugin reference - Archive of obsolete content
npanycallbackstruct contains information required during embedded mode
printing.
... npembed
print substructure of np
print that contains platform-specific information used during embedded mode
printing.
... npfull
print substructure of np
print that contains platform-specific information used during full-page mode
printing.
...And 3 more matches
NSS 3.16.3 release notes
notable changes in nss 3.16.3 the following 1024-bit ca certificates were removed cn = entrust.net secure server certification authority sha1 finger
print: 99:a6:9b:e6:1a:fe:88:6b:4d:2b:82:00:7c:b8:54:fc:31:7e:15:39 cn = gte cybertrust global root sha1 finger
print: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74 ou = valicert class 1 policy validation authority sha1 finger
print: e5:df:74:3c:b6:01:c4:9b:98:43:dc:ab:8c:e8:6a:81:10:9f:e4:8e ou = valicert class 2 policy validation auth...
...ority sha1 finger
print: 31:7a:2a:d0:7f:2b:33:5e:f5:a1:c3:4e:4b:57:e8:b7:d8:f1:fc:a6 ou = valicert class 3 policy validation authority sha1 finger
print: 69:bd:8c:f4:9c:d3:00:fb:59:2e:17:93:ca:55:6a:f3:ec:aa:35:fb additionally, the following ca certificate was removed as requested by the ca ou = tdc internet root ca sha1 finger
print: 21:fc:bd:8e:7f:6c:af:05:1b:d1:b3:43:ec:a8:e7:61:47:f2:0f:8a the following ca certificates were added cn = certification authority of wosign sha1 finger
print: b9:42:94:bf:91:ea:8f:b6:4b:e6:10:97:c7:fb:00:13:59:b6:76:cb cn = ca 沃通根证书 sha1 finger
print: 16:32:47:8d:89:f9:21:3a:92:00:85:63:f5:a4:a7:d3:12:40:8a:d6 cn = digicert assured i...
...d root g2 sha1 finger
print: a1:4b:48:d9:43:ee:0a:0e:40:90:4f:3c:e0:a4:c0:91:93:51:5d:3f cn = digicert assured id root g3 sha1 finger
print: f5:17:a2:4f:9a:48:c6:c9:f8:a2:00:26:9f:dc:0f:48:2c:ab:30:89 cn = digicert global root g2 sha1 finger
print: df:3c:24:f9:bf:d6:66:76:1b:26:80:73:fe:06:d1:cc:8d:4f:82:a4 cn = digicert global root g3 sha1 finger
print: 7e:04:de:89:6a:3e:66:6d:00:e6:87:d3:3f:fa:d9:3b:e8:3d:34:9e cn = digicert trusted root g4 sha1 finger
print: dd:fb:16:cd:49:31:c9:73:a2:03:7d:3f:c8:3a:4d:7d:77:5d:05:e4 cn = quovadis root ca 1 g3 sha1 finger
print: 1b:8e:ea:57:96:29:1a:c9:39:ea:b8:0a:81:1a:73:73:c0:93:79:67 cn = quovadis root ca 2 g3 sha1 finge...
...And 3 more matches
NSS Sample Code sample2
* this code uses the simplest of the init functions, which does not * require a nss database to exist */ rv = nss_nodb_init("."); if (rv != secsuccess) { f
printf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); goto out; } /* choose mechanism: ckm_des_cbc_pad, ckm_des3_ecb, ckm_des3_cbc.....
...for * des ops, internal slot is typically the best slot */ if (slot == null) { f
printf(stderr, "unable to find security device (err %d)\n", pr_geterror()); goto out; } /* nss passes blobs around as secitems.
...we use pk11_originunwrap * to indicate the key was unwrapped - which is what should be done * normally anyway - using raw keys isn't a good idea */ symkey = pk11_importsymkey(slot, ciphermech, pk11_originunwrap, cka_encrypt, &keyitem, null); if (symkey == null) { f
printf(stderr, "failure to import key into nss (err %d)\n", pr_geterror()); goto out; } /* set up the pkcs11 encryption paramters.
...And 3 more matches
certutil
-o
print the certificate chain.
... -u list all available modules or
print a single named module.
... ssl,s/mime,jar/xpi ca administrator of instance pki-ca1's example domain id u,u,u tps administrator's example domain id u,u,u google internet authority ,, certificate authority - example domain ct,c,c using additional arguments with -l can return and
print the information for a single, specific certificate.
...And 3 more matches
How to embed the JavaScript engine
partment ac(cx, global); js_initstandardclasses(cx, global); const char *script = "'hello'+'world, it is '+new date()"; const char *filename = "noname"; int lineno = 1; bool ok = js_evaluatescript(cx, global, script, strlen(script), filename, lineno, rval.address()); if (!ok) return 1; } jsstring *str = rval.tostring();
printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_destroyruntime(rt); js_shutdown(); return 0; } spidermonkey 31 // following code might be needed in some case // #define __stdc_limit_macros // #include <stdint.h> #include "jsapi.h" /* the class of the global object.
...jsautocompartment ac(cx, global); js_initstandardclasses(cx, global); const char *script = "'hello'+'world, it is '+new date()"; const char *filename = "noname"; int lineno = 1; bool ok = js_evaluatescript(cx, global, script, strlen(script), filename, lineno, &rval); if (!ok) return 1; } jsstring *str = rval.tostring();
printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_destroyruntime(rt); js_shutdown(); return 0; } spidermonkey 38 // following code might be needed in some case // #define __stdc_limit_macros // #include <stdint.h> #include "jsapi.h" /* the class of the global object.
..., global); const char *script = "'hello'+'world, it is '+new date()"; const char *filename = "noname"; int lineno = 1; js::compileoptions opts(cx); opts.setfileandline(filename, lineno); bool ok = js::evaluate(cx, global, opts, script, strlen(script), &rval); if (!ok) return 1; } jsstring *str = rval.tostring();
printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_destroyruntime(rt); js_shutdown(); return 0; } spidermonkey 45 // following code might be needed in some case // #define __stdc_limit_macros // #include <stdint.h> #include "jsapi.h" #include "js/initialization.h" /* the class of the global object.
...And 3 more matches
Introduction to the JavaScript shell
it is the javascript equivalent of python's interactive prompt, the lisp read-eval-
print loop, or ruby's irb.
...
print([expression ...]) evaluates the expression(s) and displays the result(s) on stdout, separated by spaces (" ") and terminated by a newline ("\n").
...for example, if you want to display a message when line 6 of a function, dosomething() is executed, you can enter the following: trap(dosomething, line2pc(dosomething, 6), "
print('line 6!\n')"); note: when a trap is set, the corresponding bytecode in the program is replaced with a trap bytecode until you use untrap() to remove the trap.
...And 3 more matches
Redis Tips
stupid node script to show how this works: #!/usr/bin/env node var r = require('redis').createclient(); r.multi() .set("foo", 42) .set("bar", "ice cream") .set("baz", 6.28) .get("foo") .get("bar") .get("baz") .exec(function(err, resultlist) { console.log(json.stringify(resultlist, null, 2)); r.end(); // terminate the redis connection; node can quit }); when run, this
prints: [ "ok", "ok", "ok", "42", "ice cream", "6.28" ] the result list includes one value per each command executed.
... > var r = require('redis').createclient(); // and i'll define these utility functions just for this example > function now() { return (new date()).gettime() / 1000 } > function
print(err, results) { console.log(json.stringify(results, null, 2)) } whenever someone logs into my site, i record them in my 'last-login' zset.
... here's what the zset contains now: > r.zrange('last-login', 0, -1,
print); // remember, i defined '
print' above ["jparsons", "zcarter", "lloyd"] since this is a set, lloyd only appears once, with updated login timestamp.
...And 3 more matches
Observer Notifications
if bookmarks will be restored into a specific folder, observers will be passed an nsisupports
print64 through their subject parameters indicating the id of the folder.
...if bookmarks are restored into a specific folder, observers will be passed an nsisupports
print64 through their subject parameters indicating the id of the folder.
...if bookmarks were restored into a specific folder, observers will be passed an nsisupports
print64 through their subject parameters indicating the id of the folder.
...And 3 more matches
nsIDialogParamBlock
inherits from: nsisupports last changed in gecko 1.7 method overview
print32 getint( in
print32 inindex ); wstring getstring( in
print32 inindex ); void setint( in
print32 inindex, in
print32 inint ); void setnumberstrings( in
print32 innumstrings ); void setstring( in
print32 inindex, in wstring instring); attributes attribute type description objects nsimutablearray a place where you can store an nsimutablearray to pass nsisupports.
...
print32 getint( in
print32 inindex ); parameters inindex the index of the integer to get.
...wstring getstring( in
print32 inindex ); parameters inindex the index of the string to get.
...And 3 more matches
nsIZipWriter
to create an instance, use: var zipwriter = components.classes["@mozilla.org/zipwriter;1"] .createinstance(components.interfaces.nsizipwriter); method overview void addentrychannel(in autf8string azipentry, in prtime amodtime, in
print32 acompression, in nsichannel achannel, in boolean aqueue); void addentrydirectory(in autf8string azipentry, in prtime amodtime, in boolean aqueue); void addentryfile(in autf8string azipentry, in
print32 acompression, in nsifile afile, in boolean aqueue); void addentrystream(in autf8string azipentry, in prtime amodtime, in
print32 acompression, in nsiinputstream astream...
..., in boolean aqueue); void close(); nsizipentry getentry(in autf8string azipentry); boolean hasentry(in autf8string azipentry); void open(in nsifile afile, in
print32 aioflags); void processqueue(in nsirequestobserver aobserver, in nsisupports acontext); void removeentry(in autf8string azipentry, in boolean aqueue); attributes attribute type description comment acstring gets or sets the comment associated with the currently open zip file.
... void addentrychannel( in autf8string azipentry, in prtime amodtime, in
print32 acompression, in nsichannel achannel, in boolean aqueue ); parameters azipentry the path of the file entry to add to the zip file.
...And 3 more matches
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
here is a an example javascript function that
prints the security details of an xmlhttprequest sent over ssl.
...reateinstance(ci.nsidomdomerror); error.wrappedjsobject.init(errname); return error; // xxx: errtype goes unused } function dumpsecurityinfo(xhr, error) { let channel = xhr.channel; try { dump("connection status:\n"); if (!error) { dump("\tsucceeded\n"); } else { dump("\tfailed: " + error.name + "\n"); } let secinfo = channel.securityinfo; //
print general connection security state dump("security information:\n"); if (secinfo instanceof ci.nsitransportsecurityinfo) { secinfo.queryinterface(ci.nsitransportsecurityinfo); dump("\tsecurity state of connection: "); // check security state flags if ((secinfo.securitystate & ci.nsiwebprogresslistener.state_is_secure) == ci.nsiwebprogresslistener.state_i...
...state & ci.nsiwebprogresslistener.state_is_broken) == ci.nsiwebprogresslistener.state_is_broken) { dump("unknown\n"); dump("\tsecurity description: " + secinfo.shortsecuritydescription + "\n"); dump("\tsecurity error message: " + secinfo.errormessage + "\n"); } } else { dump("\tno security info available for this channel\n"); } //
print ssl certificate details if (secinfo instanceof ci.nsisslstatusprovider) { var cert = secinfo.queryinterface(ci.nsisslstatusprovider) .sslstatus.queryinterface(ci.nsisslstatus).servercert; dump("\tcommon name (cn) = " + cert.commonname + "\n"); dump("\tissuer = " + cert.issuerorganization + "\n"); dump("\torganisation = " + cert.orga...
...And 3 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
ector,gnomevfs,negotiateauth --enable-crypto --disable-composer --enable-single-profile --disable-profilesharing --with-system-jpeg --with-system-zlib --with-system-png --with-pthreads --disable-tests --disable-jsd --disable-installer '--enable-optimize=-os -g -pipe -m32 -march=i386 -mtune=pentium4' --enable-xft --enable-xinerama --enable-default-toolkit=gtk2 --enable-official-branding --disable-x
print --disable-strip --enable-pango autoconf.js [root@b008-02 /usr/lib/firefox-1.5.0.2] $tail -4 greprefs/autoconf.js // autoconfig jehan pref('general.config.obscure_value', 0); pref('general.config.filename', 'firefox.cfg'); firefox.cfg this file will set the browser home page to the labeleduri page defined in the user's ldap entry, hence it checks that both autoconfig + ldap work fine.
...-web-tux.cfg the way to call it is through autoconf.js file by adding at the end: $ tail -2 /usr/lib/mozilla-1.7-3/defaults/pref/autoconf.js pref("general.config.filename", "mci-mozilla-web-tux.cfg"); pref("general.config.vendor", "mci-mozilla-web-tux"); web base cgi javascript preferences generator file [root@corbeau /var/www/cgi-bin] $ cat mci-mozilla-glob-prefs-tux.cgi #!/usr/bin/perl -w
print("content-type: application/javascript-config\n\n"); $page = <<"eop"; try { var env_user = getenv("user"); var env_home = getenv("home"); var env_mozdebug= getenv("mozilla_debug"); function processldapvalues(values) { var uid = getldapvalue(values, "uid"); var cn = getldapvalue(values, "cn"); var mail = getldapvalue(values, "mail"); lockpref("mail.server.server1.name", mai...
...getldapattributes("ldap2.int-evry.fr", "ou=people,dc=int-evry,dc=fr", "uid=" +env_user, "uid,cn,mail"); } catch(e) { displayerror("lockedpref", e); } eop
print $page; windows peculiarities without web base cgi file, beware that in windows, the original (before encoding) mozilla.js file must start with: //begin ce prefs , if not you'll get "failed to read configuration file..." message, and mozilla won't start :-( in windows environment variables like user or home, are username and homepath, that's why we must create a different pair of configuration...
...And 2 more matches
Nanojit - Archive of obsolete content
compile(assm, f, *alloc verbose_only(, fragmento->labels)); if (assm->error() != none) { f
printf(stderr, "error compiling fragment\n"); return 1; }
printf("compilation successful.\n"); // call the compiled function.
... typedef js_fastcall int32_t (*addtwofn)(int32_t); addtwofn fn = reinterpret_cast<addtwofn>(f->code());
printf("2 + 5 = %d\n", fn(5)); return 0; } code explanation interesting part are the lines 46-50: // write a few lir instructions to the buffer: add the first parameter // to the constant 2.
... compile(assm, f, *alloc verbose_only(, fragmento->labels)); if (assm->error() != none) { f
printf(stderr, "error compiling fragment\n"); return 1; }
printf("compilation successful.\n"); // call the compiled function.
...And 2 more matches
NPAnyCallbackStruct - Archive of obsolete content
contains information required during embedded mode
printing.
... syntax typedef struct { int32 type; } npanycallbackstruct; fields the data structure has the following field: type always contains np_
print.
...the npanycallbackstruct structure contains information required by the platform
print field of the npembed
print structure during embedded mode
printing.
...And 2 more matches
Software accessibility: Where are we today?
here are some of the groups of people that have problems doing some of those tasks:
print disabled: blind, deaf-blind, low vision, obstructed vision, dyslexic, cognitively disabled and illiterate individuals.
...here's how non-
print readers use desktop software today: text-to-speech (tts) makes the computer talk to the user: those who can't read
print at all usually use talking programs (text-to-speech).
... talking programs are also useful for
print disabilities other than visual impairments, such as dyslexia.
...And 2 more matches
Gecko Logging
message - a
printf-style message to output.
... verbose 5 a message that will be
printed a lot, useful for debugging program flow and will probably impact performance.
... sync
print each log synchronously, this is useful to check behavior in real time or get logs immediately before crash.
...And 2 more matches
Optimizing Applications For NSPR
nspr functions returning floating point types and structs by value, including the derived types
print64, are declared <tt>__pascal</tt>.
... command line applications using the libc
printf() and related apis behave funny on windows 3.1.
... read the fine
print in the windows sdk for the grizzly details.
...And 2 more matches
NSS 3.21 release notes
used with sslpreliminarychannelinfo to indicate that all preliminary information has been set notable changes in nss 3.21 nss now builds with elliptic curve ciphers enabled by default (bug 1205688) nss now builds with warnings as errors (bug 1182667) the following ca certificates were removed cn = verisign class 4 public primary certification authority - g3 sha1 finger
print: c8:ec:8c:87:92:69:cb:4b:ab:39:e9:8d:7e:57:67:f3:14:95:73:9d cn = utn-userfirst-network applications sha1 finger
print: 5d:98:9c:db:15:96:11:36:51:65:64:1b:56:0f:db:ea:2a:c2:3e:f1 cn = tc trustcenter universal ca iii sha1 finger
print: 96:56:cd:7b:57:96:98:95:d0:e1:41:46:68:06:fb:b8:c6:11:06:87 cn = a-trust-nqual-03 sha-1 finger
print...
...: d3:c0:63:f2:19:ed:07:3e:34:ad:5d:75:0b:32:76:29:ff:d5:9a:f2 cn = usertrust legacy secure server ca sha-1 finger
print: 7c:2f:91:e2:bb:96:68:a9:c6:f6:bd:10:19:2c:6b:52:5a:1b:ba:48 friendly name: digital signature trust co.
... global ca 1 sha-1 finger
print: 81:96:8b:3a:ef:1c:dc:70:f5:fa:32:69:c2:92:a3:63:5b:d1:23:d3 friendly name: digital signature trust co.
...And 2 more matches
NSS 3.35 release notes
the following ca certificates were removed: ou = security communication ev rootca1 sha-256 finger
print: a2:2d:ba:68:1e:97:37:6e:2d:39:7d:72:8a:ae:3a:9b:62:96:b9:fd:ba:60:bc:2e:11:f6:47:f2:c6:75:fb:37 cn = ca disig root r1 sha-256 finger
print: f9:6f:23:f4:c3:e7:9c:07:7a:46:98:8d:5a:f5:90:06:76:a0:f0:39:cb:64:5d:d1:75:49:b2:16:c8:24:40:ce cn = dst aces ca x6 sha-256 finger
print: 76:7c:95:5a:76:41:2c:89:af:68:8e:90:a1:c7:0f:55:6c:fd:6b:60:25:db:ea:10:41:6d:...
...7e:b6:83:1f:8c:40 subject cn = verisign class 3 secure server ca - g2 sha-256 finger
print: 0a:41:51:d5:e5:8b:84:b8:ac:e5:3a:5c:12:12:2a:c9:59:cd:69:91:fb:b3:8e:99:b5:76:c0:ab:da:c3:58:14 this intermediate cert had been directly included to help with transition from 1024-bit roots per bug #1045189.
... the websites (tls/ssl) trust bit was turned off for the following ca certificates: cn = chambers of commerce root sha-256 finger
print: 0c:25:8a:12:a5:67:4a:ef:25:f2:8b:a7:dc:fa:ec:ee:a3:48:e5:41:e6:f5:cc:4e:e6:3b:71:b3:61:60:6a:c3 cn = global chambersign root sha-256 finger
print: ef:3c:b4:17:fc:8e:bf:6f:97:87:6c:9e:4e:ce:39:de:1e:a5:fe:64:91:41:d1:02:8b:7d:11:c0:b2:29:8c:ed significant changes to tls 1.3 were made, along with the update from draft -18 to draft -23: support for keyupdate was added.
...And 2 more matches
NSS Sample Code sample5
secitem der; secitem nickname; pk11slotinfo *slot = null; /* initialize nss * you need to explicitly authenticate to the internal token if you use * nss_init insteadf of nss_nodb_init * invoke this after getting the internal token handle * pk11_authenticate(slot, pr_false, null); */ rv = nss_nodb_init("."); if (rv != secsuccess) { f
printf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); goto cleanup; } /* get internal slot */ slot = pk11_getinternalkeyslot(); if (slot == null) { f
printf(stderr, "couldn't find slot (err %d)\n", pr_geterror()); goto cleanup; } rv = atob_convertasciitoitem(&der, pubkstr); if (rv!= secsuccess) { f
printf(stderr, "atob_convertasciitoitem fa...
...iled %d\n", pr_geterror()); goto cleanup; } spki = seckey_decodedersubjectpublickeyinfo(&der); secitem_freeitem(&der, pr_false); pubkey = seckey_extractpublickey(spki); if (pubkey == null) { f
printf(stderr, "couldn't extract public key (err %d)\n", pr_geterror()); goto cleanup; } modulus_len = seckey_publickeystrength(pubkey); f
printf(stderr, "public key modulus %d bytes\n", modulus_len); buf1 = (char *)malloc(modulus_len); buf2 = (char *)malloc(modulus_len); /* initialize buf1 */ for (i=0;i<modulus_len;i++) { buf1[i]= (i %26) + 'a'; } buf1[modulus_len-1] = '\0'; f
printf(stderr, "buffer being encrypted = \n%s\n", buf1); /* encrypt buf1, result will be in buf2 */ rv = pk11_pubencryptraw(pubkey, buf2, buf1, modulus_len, null); if (rv != ...
...secsuccess) { f
printf(stderr, "encrypt with public key failed (err %d)\n", pr_geterror()); goto cleanup; } nickname.type = sibuffer; nickname.data = "pvtkeynickname"; nickname.len = strlen("pvtkeynickname"); rv = atob_convertasciitoitem(&der, pvtkstr); if (rv!= secsuccess) { f
printf(stderr, "atob_convertasciitoitem failed %d\n", pr_geterror()); goto cleanup; } /* ku_all includes a lot of different key usages, ku_data_encipherment * is enough for just rsa encryption.
...And 2 more matches
Bytecode Descriptions
fine
print for environment chain instructions the following rules for jsop::{push,pop}lexicalenv also apply to jsop::pushvarenv and jsop::{enter,leave}with.
...see jsop::pushlexicalenv for the fine
print.
...see jsop::pushlexicalenv for the fine
print.
...And 2 more matches
SpiderMonkey Internals
an example, from perfect.js: function perfect(n) {
print("the perfect numbers up to " + n + " are:"); // we build sumofdivisors[i] to hold a string expression for // the sum of the divisors of i, excluding i itself.
... if (eval(sumofdivisors[divisor]) == divisor) {
print("" + divisor + " = " + sumofdivisors[divisor]); } } delete sumofdivisors;
print("that's all."); } the line number to pc and back mappings can be tested using the js program with the following script: load("perfect.js");
print(perfect); dis(perfect);
print(); for (var ln = 0; ln <= 40; ln++) { var pc = line2pc(perfect, ln); var ln2 = pc2line(perfect, pc);
print("\tline " + ...
... jsprf.* portable, buffer-overrun-resistant s
printf and friends.
...And 2 more matches
JS_SET_TRACING_DETAILS
syntax js_set_tracing_details(trc,
printer, arg, index) name type description trc jstracer * the tracer whose debugging hooks are to be set.
...
printer jstracename
printer a callback function, described below; or null.
... callback syntax typedef void (*jstracename
printer)(jstracer *trc, char *buf, size_t bufsize); name type description trc jstracer * the tracer.
...And 2 more matches
Starting WebLock
the code snippet below illustrates how to get the weblock service when the component is present: nscomptr<nsiservicemanager> servman; nsresult rv = ns_getservicemanager(getter_addrefs(servman)); if (ns_failed(rv)) {
printf("error: xpcom error [%x].\n", rv); return -1; } nscomptr<iweblock> weblock; rv = servman->getservicebycontractid("@dougt/weblock", ns_get_iid(iweblock), getter_addrefs(weblock)); if (ns_failed(rv)) {
printf("error: xpcom obtaining service [%x].\n", rv); return -1; } implementing the iweblock interface once the in...
... the following code loads the contents of the file referenced by the nsifile object thefile into the buffer buf: nscomptr<nsilocalfile> localfile = do_queryinterface(thefile); if (!localfile) return -1; prbool exists; rv = thefile->exists(&exists); if (ns_failed(rv)) return -1; char *buf = null; if (exists) { // determine file size: pruint32 fs, numread;
print64 filesize; rv = thefile->getfilesize(&filesize); if (ns_failed(rv)) return -1; // converting 64 bit value to unsigned int ll_l2ui(fs, filesize); file* openfile; rv = localfile->openansifiledesc("rw", &openfile); if (ns_failed(rv)) return -1; char *buf = (char *)malloc((fs+1) * sizeof(char)); if (!buf) return -1; numread = fread(buf, sizeof(char), fs, openfile)...
...the type of this variable is
print64, but this type is not represented as a primitive on all platforms.
...And 2 more matches
mozIStorageConnection
method overview void asyncclose([optional] in mozistoragecompletioncallback acallback); void begintransaction(); void begintransactionas(in
print32 transactiontype); mozistoragestatement clone([optional] in boolean areadonly); void close(); void committransaction(); void createaggregatefunction(in autf8string afunctionname, in long anumarguments, in mozistorageaggregatefunction afunction); mozistorageasyncstatement createasyncstatement(in autf8string asqlstatement); void createfunct...
...agestatementcallback acallback ); void executesimplesql(in autf8string asqlstatement); boolean indexexists(in autf8string aindexname); void preload(); obsolete since gecko 1.9 void removefunction(in autf8string afunctionname); mozistorageprogresshandler removeprogresshandler(); void rollbacktransaction(); void setgrowthincrement(in
print32 aincrement, in autf8string adatabasename); mozistorageprogresshandler setprogresshandler(in
print32 agranularity, in mozistorageprogresshandler ahandler); boolean tableexists(in autf8string atablename); attributes attribute type description connectionready boolean indicates if the connection is open and ready to use.
... void begintransactionas( in
print32 transactiontype ); parameters transactiontype one of the transaction constants (mozistorageconnection.transaction_deferred, mozistorageconnection.transaction_immediate, mozistorageconnection.transaction_exclusive) clone() clones a database connection, optionally making the new connection read only.
...And 2 more matches
nsIFile
diskspaceavailable
print64 the number of bytes available to non-superuser on the disk volume containing the nsifile.
... filesize
print64 the value of this attribute is the number of bytes corresponding to the data represented by the file.
... filesizeoflink
print64 this attribute exposes the size of the symbolic link referenced by this nsifile.
...And 2 more matches
nsIPropertyBag2
om: nsipropertybag last changed in gecko 1.0 method overview nsivariant get(in astring prop); acstring getpropertyasacstring(in astring prop); astring getpropertyasastring(in astring prop); autf8string getpropertyasautf8string(in astring prop); boolean getpropertyasbool(in astring prop); double getpropertyasdouble(in astring prop);
print32 getpropertyasint32(in astring prop);
print64 getpropertyasint64(in astring prop); void getpropertyasinterface(in astring prop, in nsiidref iid, [iid_is(iid), retval] out nsqiresult result); pruint32 getpropertyasuint32(in astring prop); pruint64 getpropertyasuint64(in astring prop); prbool haskey(in astring prop); methods get() this method ret...
...getpropertyasint32()
print32 getpropertyasint32( in astring prop ); parameters prop property to return the value of.
... return value the property value as a
print32.
...And 2 more matches
Structures - Plugins
structure summary npanycallbackstruct contains information required during embedded mode
printing.
... npembed
print substructure of np
print that contains platform-specific information used during embedded mode
printing.
... npfull
print substructure of np
print that contains platform-specific information used during full-page mode
printing.
...And 2 more matches
Examine and edit CSS - Firefox Developer Tools
you can: toggle pseudo-classes; toggle classes; add a new rule; change the display based on the color scheme preference (as of firefox 72, you must set devtools.inspector.color-scheme-simulation.enabled to true in the configuration editor to enable this feature); change the display based on
print media rules.
... this makes it easy to see which rule is overriding the declaration: view @media rules for
print you can toggle the display into a mode that emulates @media rules for
print.
... when on, any rules defined for
printing the page will be displayed similar to the "
print preview" mode that many word processing applications provide.
...And 2 more matches
HTMLCanvasElement - Web APIs
htmlcanvaselement.moz
printcallback is a function that is initially null.
... web content can set this to a javascript function that will be called when the canvas is to be redrawn while the page is being
printed.
... when called, the callback is passed a "
printstate" object that implements the mozcanvas
printstate interface.
...And 2 more matches
Key Values - Web APIs
gdk_key_powerdown (0x1008ff21) gdk_key_poweroff (0x1008ff2a) qt::key_powerdown (0x0100010b) qt::key_poweroff (0x010000b7) "
printscreen" the
printscreen or prtscr key.
...captures the screen and
prints it or saves it to disk.
... vk_snapshot (0x2c) gdk_key_3270_
printscreen (0xfd1d) gdk_key_
print (0xff61) gdk_key_sys_req (0xff15) qt::key_
print (0x01000009) qt::key_sysreq (0x0100000a) keycode_sysrq (120) "hibernate" [2] the hibernate key.
...And 2 more matches
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
this[sproperty] : this); }; myarray.mymethod(); //
prints "zero,one,two" myarray.mymethod(1); //
prints "one" the above works because when mymethod is called, its this is set to myarray by the call, so within the function, this[sproperty] is equivalent to myarray[sproperty].
... however, in the following: settimeout(myarray.mymethod, 1.0*1000); //
prints "[object window]" after 1 second settimeout(myarray.mymethod, 1.5*1000, '1'); //
prints "undefined" after 1.5 seconds the myarray.mymethod function is passed to settimeout, then when it's called, its this is not set so it defaults to the window object.
...timeout.call(myarray, myarray.mymethod, 2.0*1000); // error: "ns_error_xpc_bad_op_on_wn_proto: illegal operation on wrappednative prototype object" settimeout.call(myarray, myarray.mymethod, 2.5*1000, 2); // same error possible solutions a common way to solve the problem is to use a wrapper function that sets this to the required value: settimeout(function(){myarray.mymethod()}, 2.0*1000); //
prints "zero,one,two" after 2 seconds settimeout(function(){myarray.mymethod('1')}, 2.5*1000); //
prints "one" after 2.5 seconds arrow functions are a possible alternative, too: settimeout(() => {myarray.mymethod()}, 2.0*1000); //
prints "zero,one,two" after 2 seconds settimeout(() => {myarray.mymethod('1')}, 2.5*1000); //
prints "one" after 2.5 seconds another possible way to solve the "this" probl...
...And 2 more matches
@media - CSS: Cascading Style Sheets
print intended for paged material and documents viewed on a screen in
print preview mode.
... security because media queries provide insights into the capabilities—and by extension, the features and design—of the device the user is working with, there is the potential that they could be abused to construct a "finger
print" which identifies the device, or at least categorizes it to some degree of detail that may be undesirable to users.
...a browser might also offer additional measures in this area; for example, if firefox's "resist finger
printing" setting is enabled, many media queries report default values rather than values representing the actual device state.
...And 2 more matches
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
color, backgrounds, contrast, and
printing what looks good on screen may look very different on paper.
... in addition, ink can be expensive, and if a user is
printing your page, they don't necessarily need all the backgrounds and such using up their precious ink when all that matters is the text itself.
... most browsers, by default, remove background images when
printing documents.
...And 2 more matches
Treehydra Manual - Archive of obsolete content
example treehydra script: function process_cp_pre_genericize(fn) { // fn is a function_decl, decl_saved_tree(fn) is ast
print(fn); } gimple asts gimple asts are provided via the process_tree callback.
...example: function process_tree(fn) { // fn is a function_decl, decl_saved_tree(fn) is ast
print(fn); } gimple cfgs process_tree can also provide gimple cfgs.
...require({ after_gcc_pass: "cfg" }); include('gcc_util.js'); // for function_decl_cfg include('gcc_
print.js'); function process_tree(fn) {
print("function " + decl_name(fn)); // fn is a function_decl let cfg = function_decl_cfg(fn); for (let bb in cfg_bb_iterator(cfg)) {
print(" basic block " + bb_label(cfg, bb)); for (let isn in bb_isn_iterator(bb)) {
print(" " + isn_display(isn)); } } } post-inlining gimple cfgs treehydra can be po...
... for (let node = cgraph; node; node = node.next) { let fn = node.decl; if (decl_struct_function(fn)) { // fn has a body
print(fn); let cfg = function_decl_cfg(fn); } } gimple reference for a detailed description of gimple see gcc/tree.def and gcc/cp/operators.def see also treehydra.js, gcc_compat.js, gcc_util.js, and gcc_
print.js in the treehydra libs directory, which have many ports of gcc macros and other functions for conveniently accessing gimple data in javascript.
Keyboard Shortcuts - Archive of obsolete content
the key attribute can only be used for
printable characters.
... another attribute, keycode can be used for non-
printable characters.
... vk_cancel vk_back vk_tab vk_clear vk_return vk_enter vk_shift vk_control vk_alt vk_pause vk_caps_lock vk_escape vk_space vk_page_up vk_page_down vk_end vk_home vk_left vk_up vk_right vk_down vk_
printscreen vk_insert vk_delete vk_0 vk_1 vk_2 vk_3 vk_4 vk_5 vk_6 vk_7 vk_8 vk_9 vk_semicolon vk_equals vk_a vk_b vk_c vk_d vk_e vk_f vk_g vk_h vk_i vk_j vk_k vk_l vk_m vk_n vk_o vk_p vk_q vk_r vk_s vk_t vk_u vk_v vk_w vk_x vk_...
...the charcode is used for
printable characters and will hold the numeric unicode character code value for the key that was pressed.
Theme changes in Firefox 2 - Archive of obsolete content
-button:active #copy-button:active #cut-button:active #downloads-button:active #forward-button[buttondown="true"] #history-button:active #home-button:active #mail-button #mail-button:active #mail-button[disabled="true"] #mail-button[open="true"] #new-tab-button:active #new-tab-button[checked="true"] #new-window-button:active #new-window-button[checked="true"] #paste-button:active #
print-button:active #reload-button:active #stop-button:active .messagebutton .messageimage .messagetext browsermessage toolbar[iconsize="small"] #bookmarks-button:active toolbar[iconsize="small"] #copy-button:active toolbar[iconsize="small"] #cut-button:active toolbar[iconsize="small"] #downloads-button:active toolbar[iconsize="small"] #history-button:active toolbar[iconsize="small"] #home-...
...button:active toolbar[iconsize="small"] #mail-button toolbar[iconsize="small"] #mail-button:active toolbar[iconsize="small"] #mail-button[disabled="true"] toolbar[iconsize="small"] #mail-button[open="true"] toolbar[iconsize="small"] #new-tab-button:active toolbar[iconsize="small"] #new-window-button:active toolbar[iconsize="small"] #paste-button:active toolbar[iconsize="small"] #
print-button:active toolbar[iconsize="small"] #reload-button:active toolbar[iconsize="small"] #stop-button:active toolbar[mode="icons"] .toolbarbutton-text toolbar[mode="text"] .toolbarbutton-1 > .toolbarbutton-text toolbar[mode="text"] .toolbarbutton-1 > stack > toolbarbutton > .toolbarbutton-text toolbar[mode="text"] .toolbarbutton-icon the following styles need to be added to your theme to be compatib...
...bled="true"] .toolbarbutton-menubutton-dropmarker #go-button:hover #go-button[chromedir="rtl"] #history-button:hover:active #history-button:hover:active #history-button[checked="true"] #home-button:hover #home-button:hover:active #new-tab-button:hover #new-tab-button:hover:active #new-window-button:hover #new-window-button:hover:active #paste-button:hover #paste-button:hover:active #
print-button:hover #
print-button:hover:active #reload-button:hover #reload-button:hover:active #searchbar[empty="true"] .searchbar-textbox #stop-button:hover #stop-button:hover:active #urlbar-icons-spacer #urlbar-spacer #urlbar[level="high"] #lock-icon:active #urlbar[level="high"] #lock-icon:hover #urlbar[level="low"] #lock-icon:active #urlbar[level="low"] #lock-icon:hover .autocomplete-tr...
...oolbar[iconsize="small"] #home-button[disabled="true"] toolbar[iconsize="small"] #new-tab-button:hover toolbar[iconsize="small"] #new-tab-button:hover:active toolbar[iconsize="small"] #new-window-button:hover toolbar[iconsize="small"] #new-window-button:hover:active toolbar[iconsize="small"] #paste-button:hover toolbar[iconsize="small"] #paste-button:hover:active toolbar[iconsize="small"] #
print-button:hover toolbar[iconsize="small"] #
print-button:hover:active toolbar[iconsize="small"] #reload-button:hover toolbar[iconsize="small"] #reload-button:hover:active toolbar[iconsize="small"] #stop-button:hover toolbar[iconsize="small"] #stop-button:hover:active toolbarbutton.bookmark-item-microsummarized you may need to make changes to other styles as well.
Index - MDN Web Docs Glossary: Definitions of Web-related terms
71 character codingscripting, glossary, strings a character is either a symbol (letters, numbers, punctuation) or non-
printing "control" (e.g., carriage return or soft hyphen).
...class is a template definition of an object's properties and methods, the "blue
print" from which other more specific instances of the object are drawn.
...it is commonly in the form of a 128-bit "finger
print" or "message digest".
...pdf provides a digital image of a
printed document, and keeps the same appearance when
printed.
Looping code - Learn web development
in this exercise, we want you to
print out a simple launch countdown to the output box, from 10 down to blastoff.
... different iteration numbers require different text to be put in the paragraph for that iteration (you'll need a conditional statement and multiple para.textcontent = lines): if the number is 10,
print "countdown 10" to the paragraph.
... if the number is 0,
print "blast off!" to the paragraph.
... for any other number,
print just the number to the paragraph.
Function return values - Learn web development
let's return to a familiar example (from a previous article in this series): let mytext = 'the weather is cold'; let newstring = mytext.replace('cold', 'warm'); console.log(newstring); // should
print "the weather is warm" // the replace() string function takes a string, // replaces one substring with another, and returns // a new string with the replacement made the replace() function is invoked on the mytext string, and is passed two parameters: the substring to find ('cold').
... next, we're going to include a way to
print out information about the number entered into the text input.
...if the entered value is not a number, an error message is
printed to the paragraph.
...therefore, a sentence is
printed out inside the paragraph element that states the square, cube, and factorial values of the number.
Test your skills: Conditionals - Learn web development
response — begins uninitialized, but is later used to store a reponse that will be
printed to the output panel.
... response — begins uninitialized, but is later used to store a reponse that will be
printed to the output panel.
... machineresult — begins uninitialized, but is later used to store a reponse that will be
printed to the output panel, letting the user know whether the machine is switched on.
... pwdresult — begins uninitialized, but is later used to store a reponse that will be
printed to the output panel, letting the user know whether their login attempt was succcessful.
Localization and Plurals
an example of using this method: // load pluralform and for this example, assume english components.utils.import("resource://gre/modules/pluralform.jsm"); // pluralform.get expects a semi-colon separated list of words let downloads = "download;downloads"; // pretend this number came from somewhere else let num = 10; // display the correct plural form for 10 downloads: "you have 10 downloads.")
print("you have " + num + " " + pluralform.get(num, downloads) + "."); // try again with a different value: "you have 1 download." num = 1;
print("you have " + num + " " + pluralform.get(num, downloads) + ".") the above example works, but is still difficult to localize, because we're concatenating strings assuming a particular grammatical structure.
... the following would be better: components.utils.import("resource://gre/modules/pluralform.jsm"); let downloads = "you have one download.;you have #1 downloads."; let num = 10; // for english, this would display "you have 10 downloads."
print(pluralform.get(num, downloads).replace("#1", num); notice in the above example that the code can be written to support placeholders or not use placeholders in some forms of the string.
...d;seconds minutes=minute;minutes hours=hour;hours downloads.js: components.utils.import("resource://gre/modules/pluralform.jsm"); let getstr = function(string) document.getelementbyid("strings").getstring(string); // get the correct plural form for the title let numdownloads = 3; let title = pluralform.get(numdownloads, getstr("downloadstitlefiles")); // put in the correct number of downloads
print(title.replace("#1", numdownloads)); // get the correct plural form of seconds let timeleft = 55; let seconds = pluralform.get(timeleft, getstr("seconds")); //
print the localized string for "55 seconds"
print(getstr("timepair").replace("#1", timeleft).replace("#2", seconds)); method: makegetter if you're writing an extension, you'll want to use makegetter instead of pluralform.get() or pluralf...
...(int arulenum) here is an example usage of makegetter: components.utils.import("resource://gre/modules/pluralform.jsm"); // let's get irish (plural rule #11) let [get, numforms] = pluralform.makegetter(11); // make up some values to use with "get" let dummytext = "form 1;form 2;form 3;form 4;form 5"; let dummynum = 10; // in the case of irish, the value 10 uses plural form #4, so "form 4" is
printed
print(get(dummynum, dummytext)); in this example, the irish plural rule was hardcoded, but this could be a value specified in the .properties file.
gettext
consider the following code snippet: <?php $num = 1;
printf(ngettext("%d user likes this.", "%d users like this.", $num), $num); ?> depending on the value of the $num variable, this code will either use the singular ("user likes) or the plural ("users like") form of the string.
...the second time the $num variable is passed in the
printf() call, which at this point of interpretation looks something like
printf("%d user likes this.", $num);.
...
printf(n___("%d user likes this.", "%d users like this.", $num), $num); // l10n: this block comment will not be extracted by xgettext because it's two lines above the gettext function call.
... $num = 4;
printf(n___("%d user likes this.", "%d users like this.", $num, 'another unique context string'), $num); ?> this code produces the following output: a simple string.
Interval Timing
nspr defines a platform-dependent type,
printervaltime, for timing intervals of fewer than approximately 6 hours.
... this chapter describes
printervaltime and the functions that allow you to use it for timing purposes: interval time type and constants interval functions interval time type and constants all timed functions in nspr require a parameter that depicts the amount of time allowed to elapse before the operation is declared failed.
... the type of such arguments is
printervaltime.
...
printervaltime interval functions interval timing functions are divided into three groups: getting the current interval and ticks per second converting standard clock units to platform-dependent intervals converting platform-dependent intervals to standard clock units getting the current interval and ticks per second pr_intervalnow pr_tickspersecond converting standard clock units to pl...
NSS 3.18 release notes
use -c one, two or three times to
print information about the certificates received from a server, and information about the locally found and trusted issuer certificates, to diagnose server side configuration issues.
... the following ca certificates had the websites and code signing trust bits turned off ou = equifax secure certificate authority sha1 finger
print: d2:32:09:ad:23:d3:14:23:21:74:e4:0d:7f:9d:62:13:97:86:63:3a cn = equifax secure global ebusiness ca-1 sha1 finger
print: 7e:78:4a:10:1c:82:65:cc:2d:e1:f1:6d:47:b4:40:ca:d9:0a:19:45 cn = tc trustcenter class 3 ca ii sha1 finger
print: 80:25:ef:f4:6e:70:c8:d4:72:24:65:84:fe:40:3b:8a:8d:6a:db:f5 the following ca certificates were added ...
...cn = staat der nederlanden root ca - g3 sha1 finger
print: d8:eb:6b:41:51:92:59:e0:f3:e7:85:00:c0:3d:b6:88:97:c9:ee:fc cn = staat der nederlanden ev root ca sha1 finger
print: 76:e2:7e:c1:4f:db:82:c1:c0:a6:75:b5:05:be:3d:29:b4:ed:db:bb cn = identrust commercial root ca 1 sha1 finger
print: df:71:7e:aa:4a:d9:4e:c9:55:84:99:60:2d:48:de:5f:bc:f0:3a:25 cn = identrust public sector root ca 1 sha1 finger
print: ba:29:41:60:77:98:3f:f4:f3:ef:f2:31:05:3b:2e:ea:6d:4d:45:fd cn = s-trust universal root ca sha1 finger
print: 1b:3d:11:14:ea:7a:0f:95:58:54:41:95:bf:6b:25:82:ab:40:ce:9a cn = entrust root certification authority - g2 sha1 finger
print: 8c:f4:27:fd:79:0c:3a:d1:66:06:8d:e8:1e:57:ef:b...
...b:93:22:72:d4 cn = entrust root certification authority - ec1 sha1 finger
print: 20:d8:06:40:df:9b:25:f5:12:25:3a:11:ea:f7:59:8a:eb:14:b5:47 cn = cfca ev root sha1 finger
print: e2:b8:29:4b:55:84:ab:6b:58:c2:90:46:6c:ac:3f:b8:39:8f:84:83 the version number of the updated root ca list has been set to 2.3 bugs fixed in nss 3.18 this bugzilla query returns all the bugs fixed in nss 3.18: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.18 compatibility nss 3.18 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.23 release notes
the following ca certificates were removed cn = staat der nederlanden root ca sha-256 finger
print: d4:1d:82:9e:8c:16:59:82:2a:f9:3f:ce:62:bf:fc:de:26:4f:c8:4e:8b:95:0c:5f:f2:75:d0:52:35:46:95:a3 cn = netlock minositett kozjegyzoi (class qa) tanusitvanykiado sha-256 finger
print: e6:06:dd:ee:e2:ee:7f:5c:de:f5:d9:05:8f:f8:b7:d0:a9:f0:42:87:7f:6a:17:1e:d8:ff:69:60:e4:cc:5e:a5 cn = netlock kozjegyzoi (class a) tanusitvanykiado sha-256 finger
print: 7f:12:...
...cd:5f:7e:5e:29:0e:c7:d8:51:79:d5:b7:2c:20:a5:be:75:08:ff:db:5b:f8:1a:b9:68:4a:7f:c9:f6:67 cn = netlock uzleti (class b) tanusitvanykiado sha-256 finger
print: 39:df:7b:68:2b:7b:93:8f:84:71:54:81:cc:de:8d:60:d8:f2:2e:c5:98:87:7d:0a:aa:c1:2b:59:18:2b:03:12 cn = netlock expressz (class c) tanusitvanykiado sha-256 finger
print: 0b:5e:ed:4e:84:64:03:cf:55:e0:65:84:84:40:ed:2a:82:75:8b:f5:b9:aa:1f:25:3d:46:13:cf:a0:80:ff:3f friendly name: verisign class 1 public pca – g2 sha-256 finger
print: 34:1d:e9:8b:13:92:ab:f7:f4:ab:90:a9:60:cf:25:d4:bd:6e:c6:5b:9a:51:ce:6e:d0:67:d0:0e:c7:ce:9b:7f friendly name: verisign class 3 public pca sha-256 finger
print: a4:b6:b3:99:6f:c2:f3:06:b3:fd:86:81:bd:63:41:3d:8c:50:09:cc:4f:a3:...
...29:c2:cc:f0:e2:fa:1b:14:03:05 friendly name: verisign class 3 public pca – g2 sha-256 finger
print: 83:ce:3c:12:29:68:8a:59:3d:48:5f:81:97:3c:0f:91:95:43:1e:da:37:cc:5e:36:43:0e:79:c7:a8:88:63:8b cn = ca disig sha-256 finger
print: 92:bf:51:19:ab:ec:ca:d0:b1:33:2d:c4:e1:d0:5f:ba:75:b5:67:90:44:ee:0c:a2:6e:93:1f:74:4f:2f:33:cf the following ca certificates were added cn = szafir root ca2 sha-256 finger
print: a1:33:9d:33:28:1a:0b:56:e5:57:d3:d3:2b:1c:e7:f9:36:7e:b0:94:bd:5f:a7:2a:7e:50:04:c8:de:d7:ca:fe cn = certum trusted network ca 2 sha-256 finger
print: b6:76:f2:ed:da:e8:77:5c:d3:6c:b0:f6:3c:d1:d4:60:39:61:f4:9e:62:65:ba:01:3a:2f:03:07:b6:d0:b8:04 the following ca certificate had the...
... email trust bit turned on cn = actalis authentication root ca sha-256 finger
print: 55:92:60:84:ec:96:3a:64:b9:6e:2a:be:01:ce:0b:a8:6a:64:fb:fe:bc:c7:aa:b5:af:c1:55:b3:7f:d7:60:66 security fixes in nss 3.23 bug 1245528 / cve-2016-1950 - fixed a heap-based buffer overflow related to the parsing of certain asn.1 structures.
NSS 3.28.1 release notes
notable changes in nss 3.28.1 the following ca certificates were removed cn = buypass class 2 ca 1 sha-256 finger
print: 0f:4e:9c:dd:26:4b:02:55:50:d1:70:80:63:40:21:4f:e9:44:34:c9:b0:2f:69:7e:c7:10:fc:5f:ea:fb:5e:38 cn = root ca generalitat valenciana sha-256 finger
print: 8c:4e:df:d0:43:48:f3:22:96:9e:7e:29:a4:cd:4d:ca:00:46:55:06:1c:16:e1:b0:76:42:2e:f3:42:ad:63:0e ou = rsa security 2048 v3 sha-256 finger
print: af:8b:67:62:a1:e5:28:22:81:61:a9:5d:5c:55:9e:e2:66:27:8f:7...
...5:d7:9e:83:01:89:a5:03:50:6a:bd:6b:4c the following ca certificates were added ou = ac raiz fnmt-rcm sha-256 finger
print: eb:c5:57:0c:29:01:8c:4d:67:b1:aa:12:7b:af:12:f7:03:b4:61:1e:bc:17:b7:da:b5:57:38:94:17:9b:93:fa cn = amazon root ca 1 sha-256 finger
print: 8e:cd:e6:88:4f:3d:87:b1:12:5b:a3:1a:c3:fc:b1:3d:70:16:de:7f:57:cc:90:4f:e1:cb:97:c6:ae:98:19:6e cn = amazon root ca 2 sha-256 finger
print: 1b:a5:b2:aa:8c:65:40:1a:82:96:01:18:f8:0b:ec:4f:62:30:4d:83:ce:c4:71:3a:19:c3:9c:01:1e:a4:6d:b4 cn = amazon root ca 3 sha-256 finger
print: 18:ce:6c:fe:7b:f1:4e:60:b2:e3:47:b8:df:e8:68:cb:31:d0:2e:bb:3a:da:27:15:69:f5:03:43:b4:6d:b3:a4 cn = amazon root ca 4 sha-256 finger
print: e3:5d:28...
...:41:9e:d0:20:25:cf:a6:90:38:cd:62:39:62:45:8d:a5:c6:95:fb:de:a3:c2:2b:0b:fb:25:89:70:92 cn = luxtrust global root 2 sha-256 finger
print: 54:45:5f:71:29:c2:0b:14:47:c4:18:f9:97:16:8f:24:c5:8f:c5:02:3b:f5:da:5b:e2:eb:6e:1d:d8:90:2e:d5 cn = symantec class 1 public primary certification authority - g4 sha-256 finger
print: 36:3f:3c:84:9e:ab:03:b0:a2:a0:f6:36:d7:b8:6d:04:d3:ac:7f:cf:e2:6a:0a:91:21:ab:97:95:f6:e1:76:df cn = symantec class 1 public primary certification authority - g6 sha-256 finger
print: 9d:19:0b:2e:31:45:66:68:5b:e8:a8:89:e2:7a:a8:c7:d7:ae:1d:8a:ad:db:a3:c1:ec:f9:d2:48:63:cd:34:b9 cn = symantec class 2 public primary certification authority - g4 sha-256 finger
print: fe:86:3d:08:22:fe:7a:23:53:fa:4...
...8:4d:59:24:e8:75:65:6d:3d:c9:fb:58:77:1f:6f:61:6f:9d:57:1b:c5:92 cn = symantec class 2 public primary certification authority - g6 sha-256 finger
print: cb:62:7d:18:b5:8a:d5:6d:de:33:1a:30:45:6b:c6:5c:60:1a:4e:9b:18:de:dc:ea:08:e7:da:aa:07:81:5f:f0 the version number of the updated root ca list has been set to 2.11 a misleading assertion/alert has been removed, when nss tries to flush data to the peer but the connection was already reset.
NSS 3.32 release notes
cn = addtrust class 1 ca root sha-256 finger
print: 8c:72:09:27:9a:c0:4e:27:5e:16:d0:7f:d3:b7:75:e8:01:54:b5:96:80:46:e3:1f:52:dd:25:76:63:24:e9:a7 cn = swisscom root ca 2 sha-256 finger
print: f0:9b:12:2c:71:14:f4:a0:9b:d4:ea:4f:4a:99:d5:58:b4:6e:4c:25:cd:81:14:0d:29:c0:56:13:91:4c:38:41 the following ca certificates were removed: cn = addtrust public ca root sha-256 finger
print: 07:91:ca:07:49...
...:b2:07:82:aa:d3:c7:d7:bd:0c:df:c9:48:58:35:84:3e:b2:d7:99:60:09:ce:43:ab:6c:69:27 cn = addtrust qualified ca root sha-256 finger
print: 80:95:21:08:05:db:4b:bc:35:5e:44:28:d8:fd:6e:c2:cd:e3:ab:5f:b9:7a:99:42:98:8e:b8:f4:dc:d0:60:16 cn = china internet network information center ev certificates root sha-256 finger
print: 1c:01:c6:f4:db:b2:fe:fc:22:55:8b:2b:ca:32:56:3f:49:84:4a:cf:c3:2b:7b:e4:b0:ff:59:9f:9e:8c:7a:f7 cn = cnnic root sha-256 finger
print: e2:83:93:77:3d:a8:45:a6:79:f2:08:0c:c7:fb:44:a3:b7:a1:c3:79:2c:b7:eb:77:29:fd:cb:6a:8d:99:ae:a7 cn = comsign secured ca sha-256 finger
print: 50:79:41:c7:44:60:a0:b4:70:86:22:0d:4e:99:32:57:2a:b5:d1:b5:bb:cb:89:80:ab:1c:b1:76:51:a8:44:d2 cn = geotrust g...
...lobal ca 2 sha-256 finger
print: ca:2d:82:a0:86:77:07:2f:8a:b6:76:4f:f0:35:67:6c:fe:3e:5e:32:5e:01:21:72:df:3f:92:09:6d:b7:9b:85 cn = secure certificate services sha-256 finger
print: bd:81:ce:3b:4f:65:91:d1:1a:67:b5:fc:7a:47:fd:ef:25:52:1b:f9:aa:4e:18:b9:e3:df:2e:34:a7:80:3b:e8 cn = swisscom root ca 1 sha-256 finger
print: 21:db:20:12:36:60:bb:2e:d4:18:20:5d:a1:1e:e7:a8:5a:65:e2:bc:6e:55:b5:af:7e:78:99:c8:a2:66:d9:2e cn = swisscom root ev ca 2 sha-256 finger
print: d9:5f:ea:3c:a4:ee:dc:e7:4c:d7:6e:75:fc:6d:1f:f6:2c:44:1f:0f:a8:bc:77:f0:34:b1:9e:5d:b2:58:01:5d cn = trusted certificate services sha-256 finger
print: 3f:06:e5:56:81:d4:96:f5:be:16:9e:b5:38:9f:9f:2b:8f:f6:1e:17:08:df:68:81:72:48:49:cd:5d:27...
...:cb:69 cn = utn-userfirst-hardware sha-256 finger
print: 6e:a5:47:41:d0:04:66:7e:ed:1b:48:16:63:4a:a3:a7:9e:6e:4b:96:95:0f:82:79:da:fc:8d:9b:d8:81:21:37 cn = utn-userfirst-object sha-256 finger
print: 6f:ff:78:e4:00:a7:0c:11:01:1c:d8:59:77:c4:59:fb:5a:f9:6a:3d:f0:54:08:20:d0:f4:b8:60:78:75:e5:8f bugs fixed in nss 3.32 nss versions 3.28.x, 3.29.x.
NSS Sample Code sample3
sample code 3: hashing, mac /* * demonstration program for hashing and macs */ #include <iostream.h> #include "pk11pub.h" #include "nss.h" static void
printdigest(unsigned char *digest, unsigned int len) { int i; cout << "length: " << len << endl; for(i = 0;i < len;i++)
printf("%02x ", digest[i]); cout << endl; } /* * main */ int main(int argc, const char *argv[]) { int status = 0; pk11slotinfo *slot = 0; pk11symkey *key = 0; pk11context *context = 0; unsigned char data[80]; unsigned char digest[20]; /*is there a way to tell how large the output is?*/ unsigned int len; secstatus s; /* initialize nss * if your application code has already initialized nss, you can skip it * here.
...ndl; goto done; } s = pk11_digestbegin(context); if (s != secsuccess) { cout << "digestbegin failed" << endl; goto done; } s = pk11_digestop(context, data, sizeof data); if (s != secsuccess) { cout << "digestupdate failed" << endl; goto done; } s = pk11_digestfinal(context, digest, &len, sizeof digest); if (s != secsuccess) { cout << "digestfinal failed" << endl; goto done; } /*
print digest */
printdigest(digest, len); pk11_destroycontext(context, pr_true); context = 0; /* * part 2 - hashing with included secret key */ cout << "part 2 -- hashing with included secret key" << endl; /* initialize data */ memset(data, 0xbc, sizeof data); /* create a key */ key = pk11_keygen(slot, ckm_generic_secret_key_gen, 0, 128, 0); if (!key) { cout << "create ke...
...dl; goto done; } s = pk11_digestkey(context, key); if (s != secsuccess) { cout << "digestkey failed" << endl; goto done; } s = pk11_digestop(context, data, sizeof data); if (s != secsuccess) { cout << "digestupdate failed" << endl; goto done; } s = pk11_digestfinal(context, digest, &len, sizeof digest); if (s != secsuccess) { cout << "digestfinal failed" << endl; goto done; } /*
print digest */
printdigest(digest, len); pk11_destroycontext(context, pr_true); context = 0; /* * part 3 - mac (with secret key) */ cout << "part 3 -- mac (with secret key)" << endl; /* initialize data */ memset(data, 0xbc, sizeof data); context = pk11_createcontextbysymkey(ckm_md5_hmac, cka_sign, key, &noparams); if (!context) { cout << "createcontextbysymkey failed" << e...
...ndl; goto done; } s = pk11_digestbegin(context); if (s != secsuccess) { cout << "digestbegin failed" << endl; goto done; } s = pk11_digestop(context, data, sizeof data); if (s != secsuccess) { cout << "digestop failed" << endl; goto done; } s = pk11_digestfinal(context, digest, &len, sizeof digest); if (s != secsuccess) { cout << "digestfinal failed" << endl; goto done; } /*
print digest */
printdigest(digest, len); pk11_destroycontext(context, pr_true); context = 0; done: if (context) pk11_destroycontext(context, pr_true); /* freeit ??
NSS Sample Code sample6
*/ rv = nss_initreadwrite("."); if (rv != secsuccess) { f
printf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); exit(1); } /* generate a key with id 1.
... */ if (slot == null) { f
printf(stderr, "unable to find security device (err %d)\n", pr_geterror()); return; } keyid[0] = id; keyiditem.type = sibuffer; keyiditem.data = (void *)keyid; keyiditem.len = sizeof(keyid[0]); /* note: keysize must be 0 for fixed key-length algorithms like des.
... * since we're using aes in this example, we're specifying * one of the valid keysizes (16, 24, 32) */ key = pk11_tokenkeygen(slot, ciphermech, 0, 32 /*keysize*/, &keyiditem, pr_true, 0); if (key == null) { f
printf(stderr, "pk11_tokenkeygen failed (err %d)\n", pr_geterror()); pk11_freeslot(slot); return; } f
printf(stderr, "key length of generated key is %d\n", pk11_getkeylength(key)); f
printf(stderr, "mechanism of key is %d (asked for %d)\n", pk11_getmechanism(key), ciphermech); pk11_freesymkey(key); key = pk11_findfixedkey(slot, ciphermech, &keyiditem, 0); if (key == null) { f
printf(stderr, "pk11_findfixedkey failed (err %d)\n", pr_geterror()); pk11_freeslot(slo...
...t); return; } f
printf(stderr, "found key!\n"); f
printf(stderr, "key length of generated key is %d\n", pk11_getkeylength(key)); f
printf(stderr, "mechanism of key is %d (asked for %d)\n", pk11_getmechanism(key), ciphermech); pk11_freesymkey(key); pk11_freeslot(slot); } char *passwdcb(pk11slotinfo *info, prbool retry, void *arg) { if (!retry) return pl_strdup("test"); else return null; } ...
NSS tools : pk12util
the default is to return information in a pretty-
print ascii format, which displays the information about the certificates and public keys in the p12 file.
...the certificates and keys in the file can be
printed (listed) in a human-readable pretty-
print format that shows information for every certificate and any public keys in the .p12 file.
... pk12util -l p12file [-h tokenname] [-r] [-d [sql:]directory] [-p dbprefix] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] for example, this
prints the default ascii output: # pk12util -l certs.p12 enter password for pkcs12 file: key(shrouded): friendly name: thawte freemail member's thawte consulting (pty) ltd.
...rameters: salt: 45:2e:6a:a0:03:4d:7b:a1:63:3c:15:ea:67:37:62:1f 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
the default is to return information in a pretty-
print ascii format, which displays the information about the certificates and public keys in the p12 file.
...the certificates and keys in the file can be
printed (listed) in a human-readable pretty-
print format that shows information for every certificate and any public keys in the .p12 file.
... pk12util -l p12file [-h tokenname] [-r] [-d [sql:]directory] [-p dbprefix] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] for example, this
prints the default ascii output: # pk12util -l certs.p12 enter password for pkcs12 file: key(shrouded): friendly name: thawte freemail member's thawte consulting (pty) ltd.
... alternatively, the -r
prints the certificates and then exports them into separate der binary files.
Index
220 js_convertargumentsva jsapi reference, obsolete, spidermonkey js_convertargumentsva is to js_convertarguments as v
printf is to
printf.
... 269 js_fileescapedstring jsapi reference, reference, référence(2), spidermonkey js_fileescapedstring writes str into file fp escaping any non-
printable or non-ascii character.
... 429 js_putescapedstring jsapi reference, reference, référence(2), spidermonkey js_putescapedstring and js_putescapedstring write str into buffer escaping any non-
printable or non-ascii character using \escapes for js string literals.
...first it builds an error message from the given s
printf-style format string and any additional arguments passed after it.
XPCOM array guide
when the array can or should be modified, then use nsimutablearray: // array is read-only because it uses nsiarray void
printsize(nsiarray* elements) { pruint32 count; elements->getlength(&count);
printf("there are %d elements.\n", count); } // using nsimutablearray, so callee may modify void tweakarray(nsimutablearray* elements) { elements->removeelementat(0); elements->appendelement(newelement, pr_false); } while it is usually possible to call queryinterface on an nsiarray to get access to the nsimutablea...
... for (
print32 i = observers.count() - 1; i >= 0 ; i--) observers[i]->observe(); } be careful with this though, you could end up with a weak pointer if you're converting from non-nscomarray code.
... here is an example with a read-only and a writable array: // array is read-only because of const void
printsize(const nscomarray<nsielements>& elements) {
printf("there are %d elements.\n", elements.count()); } // no const, so we can modify the array void tweakarray(nscomarray<nsielement>& elements, nsielement* newelement) { elements.removeobjectat(0); elements.appendobject(newelement); } in-place enumeration the callback-based enumeration in nscomarray<t> is about as fast as, if not faster th...
... here is an example with a read-only and a writable array: // array is read-only because of const void
printsize(const nstarray<nselement>& elements) {
printf("there are %d elements.\n", elements.length()); } // no const, so we can modify the array void tweakarray(nstarray<nselement>& elements, const nselement& newelement) { elements.removeelementat(0); elements.appendelement(newelement); } in-place enumeration there are no enumerator objects that work on an nstarray<t>.
XPCShell Reference
for instance, assume that you have a file called test.js with the following contents: for (prop in arguments) {
print(prop + "=" + arguments[prop]); } entering the following at the command line should produce the following output: $ xpcshell test.js this is a test 0=this 1=is 2=a 3=test xpcshell extensions once you execute xpcshell without a script you'll be at the js> command line.
...
print(obj1, obj2, …)
print() is useful to
print something to the screen.
...an example
print(1, 2, 3) will
print 1 2 3<newline>.
... dump(object) dump() is almost like
print.
nsICategoryManager
examples
print out a list of all categories this snippet shows how to
print out a list of all categories in c++.
... nsresult
printallcategories() { nsresult rv; nscomptr<nsiservicemanager> svcmgr; rv = ns_getservicemanager(getter_addrefs(svcmgr)); if (ns_failed(rv)) return rv; nscomptr<nsicategorymanager> catmgr; rv = svcmgr->getservicebycontractid(ns_categorymanager_contractid, ns_get_iid(nsicategorymanager), getter_addrefs(catmgr)); if (ns_failed(rv)) return rv; nscomptr<nsisimpleenumerator> cats; rv = catmgr->enumeratecategories(getter_addrefs(cats)); if (ns_failed(rv)) return rv; prbool hasmore; while (ns_succeeded(cats->hasmoreelements(&hasmore) && hasmore) { nscomptr<nsisupports> elem; cats->getnext(getter_addrefs(elem)); nscomptr<nsisupportscstring> category = do_q...
...ueryinterface(elem, &rv); if (ns_failed(rv)) break; nsembedcstring categoryname; rv = category->getdata(categoryname); if (ns_failed(rv)) break;
printf("%s\n", categoryname.get()); } return ns_ok; } this snippet shows how to
print out a list of all categories in javascript.
...es.nsicategorymanager); var enumerator = categorymanager.enumeratecategories(); var categories = []; while (enumerator.hasmoreelements()) { var item = enumerator.getnext(); var category = item.queryinterface(components.interfaces.nsisupportscstring) categories.push(category.tostring()); } categories.sort(); var categoriesstring = categories.join("\n"); dump(categoriesstring + "\n");
print out a list of app-startup entries this example
prints out a list of entries of "app-startup" category.
nsIMsgMessageService
objects that implements nsimsgmessageservice give the user top level routines related to messages like copying, displaying, attachment's manipulation,
printing, streaming the message content to eml format string, etc.
...indow amsgwindow, in nsiurllistener aurllistener); void savemessagetodisk(in string amessageuri, in nsifilespec afile, in boolean ageneratedummyenvelope, in nsiurllistener aurllistener, out nsiuri aurl, in boolean canonicallineending, in nsimsgwindow amsgwindow); void geturlforuri(in string amessageuri, out nsiuri aurl, in nsimsgwindow amsgwindow); void displaymessagefor
printing(in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, out nsiuri aurl); void search(in nsimsgsearchsession asearchsession, in nsimsgwindow amsgwindow, in nsimsgfolder amsgfolder, in string asearchuri); nsiuri streammessage(in string amessageuri, in nsisupports aconsumer, in nsimsgwindow amsgwindow, in nsiurllistene...
... displaymessagefor
printing() when you want a message displayed in a format that is suitable for
printing.
... void displaymessagefor
printing(in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, out nsiuri aurl); parameters amessageuri a uri representing the message to display.
nsIPrincipal
certificateid string the finger
print id of this principal's certificate.
... finger
print autf8string the finger
print id of this principal's certificate.
...principals are considered equal if they are the same principal, they have the same origin, or have the same certificate finger
print id.
... id a semi-unique id relating to either the finger
print or the origin.
nsISupportsPrimitive
type_
print16 11 corresponding to nsisupports
print16.
... type_
print32 12 corresponding to nsisupports
print32.
... type_
print64 13 corresponding to nsisupports
print64.
...see also nsisupportscstring nsisupportschar nsisupportsdouble nsisupportsfloat nsisupportsid nsisupportsinterfacepointer nsisupportsprbool nsisupports
print16 nsisupports
print32 nsisupports
print64 nsisupportsprtime nsisupportspruint16 nsisupportspruint32 nsisupportspruint64 nsisupportspruint8 nsisupportsstring nsisupportsvoid ...
DOMHighResTimeStamp - Web APIs
also note the section below on reduced time precision controlled by browser preferences to avoid timing attacks and finger
printing.
... reduced time precision to offer protection against timing attacks and finger
printing, the precision of time stamps might get rounded depending on browser settings.
... // reduced time precision with `privacy.resistfinger
printing` enabled event.timestamp; // 1519129853500 // 1519129858900 // 1519129864400 // ...
... in firefox, you can also enable privacy.resistfinger
printing, the precision will be 100ms or the value of privacy.resistfinger
printing.reducetimerprecision.microseconds, whichever is larger.
HTMLBodyElement - Web APIs
windoweventhandlers.onafter
print is an eventhandler representing the code to be called when the after
print event is raised.
... windoweventhandlers.onbefore
print is an eventhandler representing the code to be called when the before
print event is raised.
... living standard technically, the event-related properties onafter
print, onbefore
print, onbeforeunload, onblur, onerror, onfocus, onhashchange, onlanguagechange, onload, onmessage, onoffline, ononline, onpopstate, onresize, onstorage, and onunload, have been moved to windoweventhandlers.
... the following properties have been added: onafter
print, onbefore
print, onbeforeunload, onblur, onerror, onfocus, onhashchange, onload, onmessage, onoffline, ononline, onpopstate, onresize, onstorage, and onunload.
KeyboardEvent: code values - Web APIs
"numpad4" "numpad4" 0x004c "numpad5" "numpad5" 0x004d "numpad6" "numpad6" 0x004e "numpadadd" "numpadadd" 0x004f "numpad1" "numpad1" 0x0050 "numpad2" "numpad2" 0x0051 "numpad3" "numpad3" 0x0052 "numpad0" "numpad0" 0x0053 "numpaddecimal" "numpaddecimal" 0x0054 (alt +
printscreen) "
printscreen" "" 0x0055 "unidentified" "" 0x0056 "intlbackslash" "intlbackslash" 0x0057 "f11" "f11" 0x0058 "f12" "f12" 0x0059 "numpadequal" "" 0x005a "unidentified" "" 0x005b "unidentified" "f13" 0x005c "unidentified" "f14" ...
... "unidentified" "" 0xe030 "audiovolumeup" "volumeup" (was "volumeup" until chrome 50) 0xe031 "unidentified" "" 0xe032 "browserhome" "browserhome" 0xe033, 0xe034 "unidentified" "" 0xe035 "numpaddivide" "numpaddivide" 0xe036 "unidentified" "" 0xe037 "
printscreen" "
printscreen" 0xe038 "altright" "altright" 0xe039, 0xe03a "unidentified" "" 0xe03b "unidentified" "help" 0xe03c~ 0xe044 "unidentified" "" 0xe045 "numlock" "numlock" 0xe046 (ctrl + pause) "pause" "pause" 0xe047 "home" "home" 0xe048 "arrowup" ...
...ro" 0x0062, 0x0063 "unidentified" "" 0x0064 "convert" "convert" 0x0065 "kanamode" "kanamode" 0x0066 "nonconvert" "nonconvert" 0x0067 "unidentified" "" 0x0068 "numpadenter" "numpadenter" 0x0069 "controlright" "controlright" 0x006a "numpaddivide" "numpaddivide" 0x006b "
printscreen" "
printscreen" 0x006c "altright" "altright" 0x006d "unidentified" "" 0x006e "home" "home" 0x006f "arrowup" "arrowup" 0x0070 "pageup" "pageup" 0x0071 "arrowleft" "arrowleft" 0x0072 "arrowright" "arrowright" 0x0073 "end" "end" 0x0074 "arrowdown" "arrowdown"...
..."intlbackslash" 0x0057 "f11" 0x0058 "f12" 0x0059 "intlro" 0x005a, 0x005b "unidentified" 0x005c "convert" 0x005d "kanamode" 0x005e "nonconvert" 0x005f "unidentified" 0x0060 "numpadenter" 0x0061 "controlright" 0x0062 "numpaddivide" 0x0063 "
printscreen" 0x0064 "altright" 0x0065 "unidentified" 0x0066 "home" 0x0067 "arrowup" 0x0068 "pageup" 0x0069 "arrowleft" 0x006a "arrowright" 0x006b "end" 0x006c "arrowdown" 0x006d "pagedown" 0x006e "insert" 0x006f "delete" 0x0070 "uniden...
constructor - JavaScript
if your class is a base class, the default constructor is empty: constructor() {} if your class is a derived class, the default constructor calls the parent constructor, passing along any arguments that were provided: constructor(...args) { super(...args); } that enables code like this to work: class validationerror extends error {
printcustomermessage() { return `validation failed :-( (details: ${this.message})`; } } try { throw new validationerror("not a valid phone number"); } catch (error) { if (error instanceof validationerror) { console.log(error.name); // this is error instead of validationerror!
... console.log(error.
printcustomermessage()); } else { console.log('unknown error', error); throw error; } } the validationerror class doesn't need an explicit constructor, because it doesn't need to do any custom initialization.
...for example: class validationerror extends error { constructor(message) { super(message); // call parent class constructor this.name = 'validationerror'; this.code = '42'; }
printcustomermessage() { return `validation failed :-( (details: ${this.message}, code: ${this.code})`; } } try { throw new validationerror("not a valid phone number"); } catch (error) { if (error instanceof validationerror) { console.log(error.name); // now this is validationerror!
... console.log(error.
printcustomermessage()); } else { console.log('unknown error', error); throw error; } } there can be only one special method with the name "constructor" in a class.
Privacy, permissions, and information security
personal and private information <what kind of information is private or personal?> privacy risks <what are ways personal information can be gotten by third parties?> finger
printing finger
printing is a technique used to gather a variety of information that's made available by a user's browser and collating it until it becomes possible to uniquely identify that user's browser.
... even seemingly innocuous information can in principle be used in the finger
printing process, though the more unique the information is to the particular device the better.
... modern browsers take steps to help prevent finger
printing-based attacks by either not allowing information to be accessed or, where the information must be made available, by introducing variations that prevent it from being used for identification purposes.
... for example, if a web site queries a user's browser for the elapsed time, a comparison of that time to the time as reported by the server might be useful as a factor in finger
printing.
Understanding WebAssembly text format - WebAssembly
to create an equivalent value using javascript, you'd use the webassembly.global() constructor: const global = new webassembly.global({value: "i32", mutable: true}, 0); webassembly memory the above example is a pretty terrible logging function: it only
prints a single integer!
... our import statement is written as follows: (import "js" "mem" (memory 1)) the 1 indicates that the imported memory must have at least 1 page of memory (webassembly defines a page to be 64kb.) so let's see a complete module that
prints the string “hi”.
...this results in "hi" being
printed to the console: var memory = new webassembly.memory({initial:1}); var importobject = { console: { log: consolelogstring }, js: { mem: memory } }; webassembly.instantiatestreaming(fetch('logger2.wasm'), importobject) .then(obj => { obj.instance.exports.writehi(); }); note: you can find the full source on github as logger2.html (also see it live).
...code: var importobj = { js: { memory : new webassembly.memory({ initial: 1 }), table : new webassembly.table({ initial: 1, element: "funcref" }) } }; promise.all([ webassembly.instantiatestreaming(fetch('shared0.wasm'), importobj), webassembly.instantiatestreaming(fetch('shared1.wasm'), importobj) ]).then(function(results) { console.log(results[1].instance.exports.doit()); //
prints 42 }); each of the modules that is being compiled can import the same memory and table objects and thus share the same linear memory and table "address space".
lang/functional - Archive of obsolete content
let { defer } = require("sdk/lang/functional"); let fn = defer(function myevent (event, value) { console.log(event + " : " + value); }); fn("click", "#home"); console.log("done"); // this will
print 'done' before 'click : #home' since // we deferred the execution of the wrapped `myevent` // function, making it non-blocking and executing on the // next event loop parameters fn : function the function to be deferred.
... let { delay } = require("sdk/lang/functional"); delay(
printadd, 2000, 5, 10); //
prints "5+10=15" in two seconds (2000ms) function
printadd (a, b) { console.log(a + "+" + b + "=" + (a+b)); } parameters fn : function a function to be delayed.
... let { once } = require("sdk/lang/functional"); let setup = once(function (env) { // initializing important things console.log("successfully initialized " + env); return 1; // assume success and return 1 }); setup('dev'); // returns 1 //
prints "successfully initialized dev" // future attempts to call this function just return the cached // value that was returned previously setup('production'); // returns 1 // no
print message is displayed since the function isn't executed parameters fn : function the function that will be executed only once inside the once wrapper.
Using Dehydra - Archive of obsolete content
example:
printing the location of type declarations save the following c++ code dumptypes.cc: typedef int myint; struct foo { int i; char *c; }; save the following analysis script dumptypes.js: function process_type(t) {
print("type found: " + t.name + " location: " + t.loc); } function input_end() {
print("hello, world!"); } compile using the following command: $ g++ -fplugin=~/dehydra/gcc_dehydra.so -fplugin-arg=~/dumptypes.js -o/dev/null -c dumptypes.cc note:for g++4.5 and up use -fplugin-arg-gcc_dehydra-script= rather than -fplugin-arg it should
print the following results: type fou...
... see documentation for: process_type, input_end,
print, .loc property example: using attributes to mark a class as "final" save the following code as final.cc: // this class should not be subclassed!
...== 'user' && a.value == 'final') return true; return false; } function process_type(t) { if (t.bases) for each (let base in t.bases) if (isfinal(base.type)) error("class " + t.name + " extends final class " + base.type.name, t.loc); } compile using the following command: $ g++ -fplugin=~/dehydra/gcc_dehydra.so -fplugin-arg=~/final.js -o/dev/null -c final.cc it should
print the following results and return with an error code: final.cc:8: error: class subclass extends final class myclass see documentation for: process_type, error, .bases property, .attributes property ...
Layout System Overview - Archive of obsolete content
additionally, layout must support a paginated presentation, where the width of the presentation is constrained by the dimensions of the
printed output (paper) and the height of each page is fixed.
...in other words, the same html or xml document could be viewed as a normal galley presentation in a browser window, while simultaneously being presented in a paged presentation to a
printer, or even an aural presentation to a speech-synthesizer.
... to date the only real use of this multiple presentation ability is seen in
printing, where multiple presentations are managed, all connected to the same content model.
Code snippets - Archive of obsolete content
components.utils.import("resource://services-sync/main.js"); weave.service._freshstart(); // if you want to do it without wiping the server (which will cause corruption!): weave.service.generatenewsymmetrickeys();
print out a list of large bookmark records // change '1000' as appropriate.
...; components.utils.import("resource://services-sync/engines/bookmarks.js"); let bme = weave.service.enginemanager.get("bookmarks"); let ids = object.keys(bme._store.getallids()); for each (let id in ids) { let record = bme._store.createrecord(id, "bookmarks"); let len = record.tostring().length; if (len > 1000) { console.log("id: " + id + ", len = " + len + ", " + record.title); } }
print an alphabetically sorted list of members of a collection components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); let ids = json.parse(new resource(weave.service.storageurl + "bookmarks").get()); for each (let id in ids.sort()) { console.log(" " + id); } get a count of the number of members of a collection on the server let...
...s.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/record.js"); let recordtype = weave.engines.get(collection)._recordobj; let coll = new collection(weave.service.storageurl + collection, recordtype); coll.full = true; coll.recordhandler = function(item) { item.collection = collection; item.decrypt(); console.log(item.cleartext); }; coll.get();
print an individual record let collection = "history"; let id = "guid_goes_here"; components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/record.js"); let recordtype = weave.engines.get(collection)._recordobj; let coll = new collection(weave.service.storageurl + collection, recordtype); coll.full = true; coll.ids = [id]; coll.recordhandler = func...
Space Manager Detailed Design - Archive of obsolete content
a particular frame struct frameinfo { nsiframe* const mframe; nsrect mrect; // rectangular region frameinfo* mnext; frameinfo(nsiframe* aframe, const nsrect& arect); #ifdef ns_build_refcnt_logging ~frameinfo(); #endif }; // doubly linked list of band rects struct bandrect : prcliststr { nscoord mleft, mtop; nscoord mright, mbottom;
printn mnumframes; // number of frames occupying this rect union { nsiframe* mframe; // single frame occupying the space nsvoidarray* mframes; // list of frames occupying the space }; bandrect(nscoord aleft, nscoord atop, nscoord aright, nscoord abottom, nsiframe*); bandrect(nscoord aleft, nscoord atop, nscoord aright, nsco...
...ct being allocated and returned for the // right part // // does not insert the new band rect into the linked list bandrect* splithorizontally(nscoord aright); // accessor functions prbool isoccupiedby(const nsiframe*) const; void addframe(const nsiframe*); void removeframe(const nsiframe*); prbool hassameframelist(const bandrect* abandrect) const;
print32 length() const; }; // circular linked list of band rects struct bandlist : bandrect { bandlist(); // accessors prbool isempty() const {return pr_clist_is_empty((prcliststr*)this);} bandrect* head() const {return (bandrect*)pr_list_head(this);} bandrect* tail() const {return (bandrect*)pr_list_tail(this);} // operations void append(bandrect* abandrect...
...ize, nsbanddata& aavailablespace) const; nsiframe* const mframe; // frame associated with the space manager nscoord mx, my; // translation from local to global coordinate space bandlist mbandlist; // header/sentinel for circular linked list of band rects frameinfo* mframeinfomap; nsintervalset mfloatdamage; static
print32 scachedspacemanagercount; static void* scachedspacemanagers[ns_space_manager_cache_size]; nsspacemanager(const nsspacemanager&); // no implementation void operator=(const nsspacemanager&); // no implementation }; public api life cycle the constructor requires a presentation shell, used for arena allocations mostly, and a frame that this space manager is rooted on.
The new nsString class implementation (1999) - Archive of obsolete content
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 nsstrimpl api...
... static void ensurecapacity(nsstrimpl& astring,pruint32 anewlength); static void growcapacity(nsstrimpl& astring,pruint32 anewlength); static void append(nsstrimpl& adest,const nsstrimpl& asource,pruint32 anoffset,
print32 acount); static void appendcstring(nsstrimpl& adest,const char* asource,pruint32 anoffset,
print32 acount); static void assign(nsstrimpl& adest,const nsstrimpl& asource,pruint32 anoffset,
print32 acount); static void assigncstring(nsstrimpl& adest,const char* asource,pruint32 anoffset,
print32 acount); // assign a char or a substring into the existing string...
... static void insert(nsstrimpl& adest,pruint32 adestoffset, const nsstrimpl& asource,pruint32 asrcoffset,
print32 acount); static void insertcstring(nsstrimpl& adest,pruint32 adestoffset, const char* asource,pruint32 asrcoffset,
print32 acount); static void insertchar(nsstrimpl& adest,pruint32 adestoffset,char thechar); static void insertchar(nsstrimpl& adest,pruint32 adestoffset,prunichar theunichar); static void insertchar(nsstrimpl& adest,pruint32 adestoffset,
print32 thequadchar); static void delete(nsstrimpl& adest,pruint32 adestoffset,pruint32 acount); static void truncate(nsstrimpl& adest,pruint32 adestoffset); static
print32 compare(const nsstrimpl& adest,const nsstrimpl& asource,
print32 acount,pr...
XUL Questions and Answers - Archive of obsolete content
possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close,
print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network.
... too specific questions or unclear answers how do i remove the file location header included in the default
printing setting?
...change this line var settings =
printutils.get
printsettings(); to this var settings =
printutils.get
printsettings().clone(); settings.docurl = " "; // suppress url on
printout other options you can modify are documented here: http://www.xulplanet.com/references/...tsettings.html how can i send xml/xul document fragment to the server instead of using get or post variables?
XUL accessibility guidelines - Archive of obsolete content
(firefox's "
print preview" window uses this fallback technique.) this should only be used as a last resort, and it should be consistent throughout a window (that is either all toolbar buttons are tabbable or none of them are).
... <dialog id="
print_dialog" title="
print" ...> <window id="mywindow" title="my application" ...> <wizard id="reg_window" title="register your software" ...> form labels labels are not automatically associated to form elements.
...do this by changing system display settings to an accessible theme (such as the high-contrast theme on windows, available via left-alt + left-shift +
printscreen).
Old Proxy API - Archive of obsolete content
var p = proxy.create({get: function(receiver, name) {
print(receiver); // looks for receiver's tostring method.
... receiver turns out to be the proxy, so calling
print results in calling the get trap.
... return "something"; } }); var q = p.azerty; // infinite loop the receiver argument in 'get' and 'set' traps may not be the proxy itself: var proxy; var handler = { has: function (name) { return name == 'foo'; }, get: function (rcvr, name) { if (name != 'foo') return undefined;
print(proxy !== rcvr); return "bye"; }, }; proxy = proxy.create(handler); var c = object.create(proxy);
print(c.foo); //
prints: 'true' (from "proxy !== rcvr") and 'bye' (from "c.foo").
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
"jdbc:mysql://localhost/rhino", "urhino", "prhino" ); // create a statement handle var stmt = conn.createstatement(); // get a resultset var rs = stmt.executequery( "select * from employee" ); // get the metadata from the resultset var meta = rs.getmetadata(); // loop over the records, dump out column names and values while( rs.next() ) { for( var i = 1; i <= meta.getcolumncount(); i++ ) {
print( meta.getcolumnname( i ) + ": " + rs.getobject( i ) + "\n" ); }
print( "----------\n" ); } // cleanup rs.close(); stmt.close(); conn.close(); this code starts off by using a rhino function named importpackage which is just like using the import statement in java.
...the sql statement is prepared, executed, and
printed with the help of the metadata obtained from the resultset.
...kip if( l != "" ) { str = str + l + "\n"; } } // define the namespaces, first the default, // then additional namespaces default xml namespace = "http://purl.org/rss/1.0/"; var dc = new namespace( "http://purl.org/dc/elements/1.1/" ); var rdf = new namespace( "http://www.w3.org/1999/02/22-rdf-syntax-ns#" ); // use e4x to process the feed var x = new xml( str ); for each( var i in x..item ) {
print( "title: " + i.title + "\n" );
print( "about: " + i.@rdf::about + "\n" );
print( "link: " + i.link + "\n" );
print( "date: " + i.dc::date + "\n" ); } the first half of this script is standard java code used to retrieve the feed data.
Index - Game development
let's explore how to create a group of bricks and
print them on screen using a loop.
... 51 load the assets and
print them on screen 2d, beginner, canvas, games, javascript, phaser, sprites, tutorial our game will feature a ball rolling around the screen, bouncing off a paddle, and destroying bricks to earn points — familiar, huh?
... 52 move the ball 2d, beginner, canvas, games, javascript, phaser, tutorial, moving we have our blue ball
printed on screen, but it's doing nothing — it would be cool to make it move somehow.
Create the Canvas and draw on it - Game development
let's see an example piece of code that
prints a red square on the canvas.
... we're not limited to rectangles — here's a piece of code for
printing out a green circle.
...try adding this code to your javascript too: ctx.beginpath(); ctx.rect(160, 10, 100, 40); ctx.strokestyle = "rgba(0, 0, 255, 0.5)"; ctx.stroke(); ctx.closepath(); the code above
prints a blue-stroked empty rectangle.
Beginner's guide to media queries - Learn web development
print, or screen).
... media types the possible types of media you can specify are: all
print screen speech the following media query will only set the body to 12pt if the page is
printed.
... @media
print { body { font-size: 12pt; } } note: the media type here is different from the so-called mime type.
CSS performance optimization - Learn web development
the browser blocks rendering until it parses all of these styles but will not block rendering on styles it knows it will not use, such the
print stylesheets.
...to create a non-blocking css link, move the not-immediately used styles, such as
print styles, into separate file, add a <link> to the html mark up, and add a media query, in this case stating it's a
print stylesheet.
... <link rel="stylesheet" href="styles.css"> <!-- blocking --> <link rel="stylesheet" href="
print.css" media="
print"> <!-- not blocking --> <link rel="stylesheet" href="mobile.css" media="screen and (max-width: 480px)"> <!-- not blocking on large screens --> by default the browser assumes that each specified style sheet is render blocking.
Command line options
print the list of all available command line options.
... -v or -version
print application version.
... other options need to be documented -
print-xpcom-dir -
print-xpcom-dirlist -kill -killall -f -ftimeout -fwait -unsetdefaultmail gtk options -no-deelevate (running windows as administrator with launcher process enabled causes drag and drop errors - how to fix) references chrome: command line test documentation for command-line features (mozilla.org) toolkit/xre/nsapprunner.cpp browser/components/nsbrowsercontenthandler.js ...
Patching a Localization
these modifications are
printed to stdout (standard output).
... alternatively, you can select specific files for diff to evaluate and
print (see below).
... the command will only
print the differences found in the selected files.
Mozilla DOM Hacking Guide
static nsresult registerclassname(
print32 adomclassinfoid): help me!
... static nsresult registerclassprotos(
print32 adomclassinfoid): help me!
... static
print32 getarrayindexfromid(jscontext *cx, jsval id, prbool *aisnumber = nsnull): if the js value is an integer, then *aisnumber is true, and the integer is returned.
TimerFirings logging
timerfirings logging is a feature built into gecko that
prints a line of data for every timer fired.
... nspr_log_modules=timerfirings:4 output once enabled, timerfirings will
print one line of logging output per timer fired.
...if the output is redirected to a file called out, then the following command will pull out the timer-related lines, count how many times each unique line appears, and then
print them with the most common ones first.
NSPR Poll Method
the prototype of the poll method is
print16 poll_method(prfiledesc *fd,
print16 in_flags,
print16 *out_flags); the purpose of the poll method is to allow a layer to modify that flags that will ultimately be used in the call to the underlying network transport's select (or equivalent) function, and to indicate that a layer is already able to make progress in the manner suggested by the polling flags.
...declare two
print16 variables to receive the return value and the out_flags output argument of the poll method.
...
print16 new_flags, out_flags; if you are going to call pr_recv, pass pr_poll_read as the in_flags argument.
Logging
nspr provides a set of logging functions that conditionally write
printf() style strings to the console or to a log file.
... log types and variables two types supporting nspr logging are exposed in the api: prlogmoduleinfo prlogmodulelevel two environment variables control the behavior of logging at execution time: nspr_log_modules nspr_log_file logging functions and macros the functions and macros for logging are: pr_newlogmodule pr_setlogfile pr_setlogbuffering pr_log
print pr_logflush pr_log_test pr_log pr_assert pr_assert pr_static_assert (new in nspr 4.6.6xxx this hasn't been released yet; the number is a logical guess) pr_not_reached use example the following sample code fragment demonstrates use of the logging and debugging aids.
... before running the compiled program, set the environment variable nspr_log_modules to userstuff:5 static void userlogstuff( void ) { prlogmoduleinfo *mylm;
printn i; pr_static_assert(5 > 4); /* nspr 4.6.6 or newer */ mylm = pr_newlogmodule( "userstuff" ); pr_assert( mylm ); pr_log( mylm, pr_log_notice, ("log a notice %d\n", 999 )); for (i = 0; i < 10 ; i++ ) { pr_log( mylm, pr_log_debug, ("log debug number: %d\n", i)); pr_sleep( 500 ); } pr_log( mylm, pr_log_notice, "that's all folks\n"); } /* end userlogstuff() */ see also nspr logging reference ...
NSPR Types
rootfunction, ...); algebraic types nspr provides the following type definitions with unambiguous bit widths for algebraic operations: 8-, 16-, and 32-bit integer types 64-bit integer types floating-point number type for convenience, nspr also provides type definitions with platform-dependent bit widths: native os integer types 8-, 16-, and 32-bit integer types signed integers
print8
print16
print32 unsigned integers pruint8 pruint16 pruint32 64-bit integer types different platforms treat 64-bit numeric fields in different ways.
...
print64 pruint64 floating-point number type the nspr floating-point type is always 64 bits.
...
printn pruintn miscellaneous types size type pointer difference types boolean types status type for return values size type prsize pointer difference types types for pointer difference.
PRLinger
structure used with the pr_sockopt_linger socket option to specify the time interval (in
printervaltime units) to linger on closing a socket if any data remain in the socket send buffer.
... syntax #include <prio.h> typedef struct prlinger { prbool polarity;
printervaltime linger; } prlinger; fields the structure has the following fields: polarity polarity of the option's setting: pr_false means the option is off, in which case the value of linger is ignored.
...linger time (in
printervaltime units) to linger before closing if any data remain in the socket send buffer.
PR_TicksPerSecond
returns the number of ticks per second currently used to determine the value of
printervaltime.
... syntax #include <prinrval.h> pruint32 pr_tickspersecond(void); returns an integer between 1000 and 100000 indicating the number of ticks per second counted by
printervaltime on the current platform.
... the relationship between a
printervaltime tick and standard clock units is platform-dependent.
NSS_3.12_release_notes.html
bug 354403: nsslist_createiterator returns pointer to a freed memory if the function fails to allocate a lock bug 399236: pkix wrapper must
print debug output into stderr bug 399300: pkix error results not freed after use.
... considers mozilla/security/nss/cmd/pk11util/scripts/pkey a binary file bug 385151: remove the link time dependency from nss to softoken bug 387892: add entrust root ca certificate(s) to nss bug 433386: when system clock is off by more than two days, oscp check fails, can result in crash if user tries to view certificate [[@ secitem_compareitem_util] [[@ memcmp] bug 396256: certutil and pp do not
print all the generalnames in a crldp extension bug 398019: correct confusing and erroneous comments in der_asciitotime bug 422866: vfychain -pp command crashes in nss_shutdown bug 345779: useless assignment statements in ec_gf2m_pt_mul_mont bug 349011: please stop exporting these crmf_ symbols bug 397178: crash when entering chrome://pippki/content/resetpassword.xul in url bar bug 403822: pkix_pl_ocsp...
...chain usage option should be improved and documented bug 323570: make dbck debug mode work with softoken bug 371470: vfychain needs option to verify for specific date bug 387621: certutil's random noise generator isn't very efficient bug 390185: signtool error message wrongly uses the term database bug 391651: need config.mk file for windows vista bug 396322: fix secutil's code and nss tools that
print public keys bug 417641: miscellaneous minor nss bugs bug 334914: hopefully useless null check of out it in jar_find_next bug 95323: ckfw should support cipher operations.
NSS 3.17.3 release notes
the following ca certificates were removed cn = gte cybertrust global root sha1 finger
print: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74 cn = thawte server ca sha1 finger
print: 23:e5:94:94:51:95:f2:41:48:03:b4:d5:64:d2:a3:a3:f5:d8:8b:8c cn = thawte premium server ca sha1 finger
print: 62:7f:8d:78:27:65:63:99:d2:7d:7f:90:44:c9:fe:b3:f3:3e:fa:9a cn = america online root certification authority 1 sha-1 fingerp...
...rint: 39:21:c1:15:c1:5d:0e:ca:5c:cb:5b:c4:f0:7d:21:d8:05:0b:56:6a cn = america online root certification authority 2 sha-1 finger
print: 85:b5:ff:67:9b:0c:79:96:1f:c8:6e:44:22:00:46:13:db:17:92:84 the following ca certificates had the websites and code signing trust bits turned off ou = class 3 public primary certification authority - g2 sha1 finger
print: 85:37:1c:a6:e5:50:14:3d:ce:28:03:47:1b:de:3a:09:e8:f8:77:0f cn = equifax secure ebusiness ca-1 sha1 finger
print: da:40:18:8b:91:89:a3:ed:ee:ae:da:97:fe:2f:9d:f5:b7:d1:8a:41 the following ca certificates were added cn = comodo rsa certification authority sha1 finger
print: af:e5:d2:44:a8:d1:19:42:30:ff:47:9f:e2:f8:97:bb:cd:7a:8c:b4 ...
... cn = usertrust rsa certification authority sha1 finger
print: 2b:8f:1b:57:33:0d:bb:a2:d0:7a:6c:51:f7:0e:e9:0d:da:b9:ad:8e cn = usertrust ecc certification authority sha1 finger
print: d1:cb:ca:5d:b2:d5:2a:7f:69:3b:67:4d:e5:f0:5a:1d:0c:95:7d:f0 cn = globalsign ecc root ca - r4 sha1 finger
print: 69:69:56:2e:40:80:f4:24:a1:e7:19:9f:14:ba:f3:ee:58:ab:6a:bb cn = globalsign ecc root ca - r5 sha1 finger
print: 1f:24:c6:30:cd:a4:18:ef:20:69:ff:ad:4f:dd:5f:46:3a:1b:69:aa the version number of the updated root ca list has been set to 2.2 bugs fixed in nss 3.17.3 this bugzilla query returns all the bugs fixed in nss 3.17.3: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&quer...
NSS 3.18.1 release notes
ou = equifax secure certificate authority sha1 finger
print: d2:32:09:ad:23:d3:14:23:21:74:e4:0d:7f:9d:62:13:97:86:63:3a the following ca certificate was removed after discussion about it in the mozilla.dev.security.policy forum.
... cn = e-guven kok elektronik sertifika hizmet saglayicisi sha1 finger
print: dd:e1:d2:a9:01:80:2e:1d:87:5e:84:b3:80:7e:4b:b1:fd:99:41:34 the following intermediate ca certificate has been added as actively distrusted because it was misused to issue certificates for domain names the holder did not own or control.
... cn=mcsholding test, o=mcsholding, c=eg sha1 finger
print: e1:f3:59:1e:76:98:65:c4:e4:47:ac:c3:7e:af:c9:e2:bf:e4:c5:76 the version number of the updated root ca list has been set to 2.4 bugs fixed in nss 3.18.1 this bugzilla query returns all the bugs fixed in nss 3.18.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.18.1 compatibility nss 3.18.1 shared libraries are backward compatible with all older nss 3.18 shared libraries.
NSS 3.19.3 release notes
notable changes in nss 3.19.3 the following ca certificates were removed cn = buypass class 3 ca 1 sha1 finger
print: 61:57:3a:11:df:0e:d8:7e:d5:92:65:22:ea:d0:56:d7:44:b3:23:71 cn = tÜrktrust elektronik sertifika hizmet sağlayıcısı sha1 finger
print: 79:98:a3:08:e1:4d:65:85:e6:c2:1e:15:3a:71:9f:ba:5a:d3:4a:d9 cn = sg trust services racine sha1 finger
print: 0c:62:8f:5c:55:70:b1:c9:57:fa:fd:38:3f:b0:3d:7b:7d:d7:b9:c6 cn = tc trustcenter universal ca i ...
... sha-1 finger
print: 6b:2f:34:ad:89:58:be:62:fd:b0:6b:5c:ce:bb:9d:d9:4f:4e:39:f3 cn = tc trustcenter class 2 ca ii sha-1 finger
print: ae:50:83:ed:7c:f4:5c:bc:8f:61:c6:21:fe:68:5d:79:42:21:15:6e the following ca certificate had the websites trust bit turned off cn = comsign secured ca sha1 finger
print: f9:cd:0e:2c:da:76:24:c1:8f:bd:f0:f0:ab:b6:45:b8:f7:fe:d5:7a the following ca certificates were added cn = tÜrktrust elektronik sertifika hizmet sağlayıcısı h5 sha1 finger
print: c4:18:f6:4d:46:d1:df:00:3d:27:30:13:72:43:a9:12:11:c6:75:fb cn = tÜrktrust elektronik sertifika hizmet sağlayıcısı h6 sha1 finger
print: 8a:5c:8c:ee:a5:03:e6:05:56:ba:d8:1b:d4:f6:c9:b0:ed:e5:2f:e0 ...
... cn = certinomis - root ca sha1 finger
print: 9d:70:bb:01:a5:a4:a0:18:11:2e:f7:1c:01:b9:32:c5:34:e7:88:a8 the version number of the updated root ca list has been set to 2.5 bugs fixed in nss 3.19.3 this bugzilla query returns all the bugs fixed in nss 3.19.3: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.19.3 compatibility nss 3.19.3 shared libraries are backward compatible with all older nss 3.19 shared libraries.
NSS 3.25 release notes
the following ca certificate was removed cn = sonera class1 ca sha-256 finger
print: cd:80:82:84:cf:74:6f:f2:fd:6e:b5:8a:a1:d5:9c:4a:d4:b3:ca:56:fd:c6:27:4a:89:26:a7:83:5f:32:31:3d the following ca certificates were added cn = hellenic academic and research institutions rootca 2015 sha-256 finger
print: a0:40:92:9a:02:ce:53:b4:ac:f4:f2:ff:c6:98:1c:e4:49:6f:75:5e:6d:45:fe:0b:2a:69:2b:cd:52:52:3f:36 cn = hellenic academic and research inst...
...itutions ecc rootca 2015 sha-256 finger
print: 44:b5:45:aa:8a:25:e6:5a:73:ca:15:dc:27:fc:36:d2:4c:1c:b9:95:3a:06:65:39:b1:15:82:dc:48:7b:48:33 cn = certplus root ca g1 sha-256 finger
print: 15:2a:40:2b:fc:df:2c:d5:48:05:4d:22:75:b3:9c:7f:ca:3e:c0:97:80:78:b0:f0:ea:76:e5:61:a6:c7:43:3e cn = certplus root ca g2 sha-256 finger
print: 6c:c0:50:41:e6:44:5e:74:69:6c:4c:fb:c9:f8:0f:54:3b:7e:ab:bb:44:b4:ce:6f:78:7c:6a:99:71:c4:2f:17 cn = opentrust root ca g1 sha-256 finger
print: 56:c7:71:28:d9:8c:18:d9:1b:4c:fd:ff:bc:25:ee:91:03:d4:75:8e:a2:ab:ad:82:6a:90:f3:45:7d:46:0e:b4 cn = opentrust root ca g2 sha-256 finger
print: 27:99:58:29:fe:6a:75:15:c1:bf:e8:48:f9:c4:76:1d:b1:6c:22:59:29:25:7b:f4:0d:08:94:f2:9e:a8:b...
...a:f2 cn = opentrust root ca g3 sha-256 finger
print: b7:c3:62:31:70:6e:81:07:8c:36:7c:b8:96:19:8f:1e:32:08:dd:92:69:49:dd:8f:57:09:a4:10:f7:5b:62:92 bugs fixed in nss 3.25 this bugzilla query returns all the bugs fixed in nss 3.25: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.25 compatibility nss 3.25 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.27 release notes
the following ca certificates were removed cn = igc/a, o = pm/sgdn, ou = dcssi sha256 finger
print: b9:be:a7:86:0a:96:2e:a3:61:1d:ab:97:ab:6d:a3:e2:1c:10:68:b9:7d:55:57:5e:d0:e1:12:79:c1:1c:89:32 cn = juur-sk, o = as sertifitseerimiskeskus sha256 finger
print: ec:c3:e9:c3:40:75:03:be:e0:91:aa:95:2f:41:34:8f:f8:8b:aa:86:3b:22:64:be:fa:c8:07:90:15:74:e9:39 cn = ebg elektronik sertifika hizmet sağlayıcısı sha-256 finger
print: 35:ae:5b:dd:d8:f7:ae:63:...
...5c:ff:ba:56:82:a8:f0:0b:95:f4:84:62:c7:10:8e:e9:a0:e5:29:2b:07:4a:af:b2 cn = s-trust authentication and encryption root ca 2005:pn sha-256 finger
print: 37:d8:dc:8a:f7:86:78:45:da:33:44:a6:b1:ba:de:44:8d:8a:80:e4:7b:55:79:f9:6b:f6:31:76:8f:9f:30:f6 o = verisign, inc., ou = class 1 public primary certification authority sha-256 finger
print: 51:84:7c:8c:bd:2e:9a:72:c9:1e:29:2d:2a:e2:47:d7:de:1e:3f:d2:70:54:7a:20:ef:7d:61:0f:38:b8:84:2c o = verisign, inc., ou = class 2 public primary certification authority - g2 sha-256 finger
print: 3a:43:e2:20:fe:7f:3e:a9:65:3d:1e:21:74:2e:ac:2b:75:c2:0f:d8:98:03:05:bc:50:2c:af:8c:2d:9b:41:a1 o = verisign, inc., ou = class 3 public primary certification authority sha-256 finger...
...
print: e7:68:56:34:ef:ac:f6:9a:ce:93:9a:6b:25:5b:7b:4f:ab:ef:42:93:5b:50:a2:65:ac:b5:cb:60:27:e4:4e:70 o = equifax, ou = equifax secure certificate authority sha-256 finger
print: 08:29:7a:40:47:db:a2:36:80:c7:31:db:6e:31:76:53:ca:78:48:e1:be:bd:3a:0b:01:79:a7:07:f9:2c:f1:78 cn = equifax secure ebusiness ca-1 sha-256 finger
print: cf:56:ff:46:a4:a1:86:10:9d:d9:65:84:b5:ee:b5:8a:51:0c:42:75:b0:e5:f9:4f:40:bb:ae:86:5e:19:f6:73 cn = equifax secure global ebusiness ca-1 sha-256 finger
print: 5f:0b:62:ea:b5:e3:53:ea:65:21:65:16:58:fb:b6:53:59:f4:43:28:0a:4a:fb:d1:04:d7:7d:10:f9:f0:4c:07 bugs fixed in nss 3.27 this bugzilla query returns all the bugs fixed in nss 3.27: https://bugzilla.mozilla.org/buglist.cgi?resolution=...
NSS 3.41 release notes
bug 1493215 - enabled the following ciphersuites by default: tls_ecdhe_ecdsa_with_aes_256_gcm_sha384 tls_ecdhe_rsa_with_aes_256_gcm_sha384 tls_dhe_rsa_with_aes_256_gcm_sha384 tls_rsa_with_aes_256_gcm_sha384 new functions none notable changes in nss 3.41 the following ca certificates were added: cn = certigna root ca sha-256 finger
print: d48d3d23eedb50a459e55197601c27774b9d7b18c94d5a059511a10250b93168 cn = gts root r1 sha-256 finger
print: 2a575471e31340bc21581cbd2cf13e158463203ece94bcf9d3cc196bf09a5472 cn = gts root r2 sha-256 finger
print: c45d7bb08e6d67e62e4235110b564e5f78fd92ef058c840aea4e6455d7585c60 cn = gts root r3 sha-256 finger
print: 15d5b8774619ea7d54ce1ca6d0b0c403e037a917f131e8a...
...04e1e6b7a71babce5 cn = gts root r4 sha-256 finger
print: 71cca5391f9e794b04802530b363e121da8a3043bb26662fea4dca7fc951a4bd cn = uca global g2 root sha-256 finger
print: 9bea11c976fe014764c1be56a6f914b5a560317abd9988393382e5161aa0493c cn = uca extended validation root sha-256 finger
print: d43af9b35473755c9684fc06d7d8cb70ee5c28e773fb294eb41ee71722924d24 the following ca certificates were removed: cn = ac raíz certicámara s.a.
... sha-256 finger
print: a6c51e0da5ca0a9309d2e4c0e40c2af9107aae8203857fe198e3e769e343085c cn = certplus root ca g1 sha-256 finger
print: 152a402bfcdf2cd548054d2275b39c7fca3ec0978078b0f0ea76e561a6c7433e cn = certplus root ca g2 sha-256 finger
print: 6cc05041e6445e74696c4cfbc9f80f543b7eabbb44b4ce6f787c6a9971c42f17 cn = opentrust root ca g1 sha-256 finger
print: 56c77128d98c18d91b4cfdffbc25ee9103d4758ea2abad826a90f3457d460eb4 cn = opentrust root ca g2 sha-256 finger
print: 27995829fe6a7515c1bfe848f9c4761db16c225929257bf40d0894f29ea8baf2 cn = opentrust root ca g3 sha-256 finger
print: b7c36231706e81078c367cb896198f1e3208dd926949dd8f5709a410f75b6292 bugs fixed in nss 3.41 bug 1412829, reject empty supported_signatur...
NSS 3.46 release notes
notable changes in nss 3.46 certificate authority changes the following ca certificates were removed: bug 1574670 - remove expired class 2 primary root certificate sha-256 finger
print: 0f993c8aef97baaf5687140ed59ad1821bb4afacf0aa9a58b5d57a338a3afbcb bug 1574670 - remove expired utn-userfirst-client root certificate sha-256 finger
print: 43f257412d440d627476974f877da8f1fc2444565a367ae60eddc27a412531ae bug 1574670 - remove expired deutsche telekom root ca 2 root certificate sha-256 finger
print: b6191a50d0c3977f7da99bcdaac86a227daeb9679e...
...c70ba3b0c9d92271c170d3 bug 1566569 - remove swisscom root ca 2 root certificate sha-256 finger
print: f09b122c7114f4a09bd4ea4f4a99d558b46e4c25cd81140d29c05613914c3841 upcoming changes to default tls configuration the next nss team plans to make two changes to the default tls configuration in nss 3.47, which will be released in october: tls 1.3 will be the default maximum tls version.
...ster tools, ssl tests bug 1561591 - remove -wmaybe-uninitialized warning in tstclnt.c bug 1561587 - remove -wmaybe-uninitialized warning in lgattr.c bug 1561558 - remove -wmaybe-uninitialized warning in httpserv.c bug 1561556 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1561332 - ec.c:28 warning: comparison of integers of different signs: 'int' and 'unsigned long' bug 1564714 -
print certutil commands during setup bug 1565013 - hacl image builder times out while fetching gpg key bug 1563786 - update hacl-star docker image to pull specific commit bug 1559012 - improve gcm perfomance using pmull2 bug 1528666 - correct resumption validation checks bug 1568803 - more tests for client certificate authentication bug 1564284 - support profile mobility across windows and linux ...
NSS 3.54 release notes
certificate authority changes the following ca certificates were added: bug 1645186 - certsign root ca g2 sha-256 finger
print: 657cfe2fa73faa38462571f332a2363a46fce7020951710702cdfbb6eeda3305 bug 1645174 - e-szigno root ca 2017 sha-256 finger
print: beb00b30839b9bc32c32e4447905950641f26421b15ed089198b518ae2ea1b99 bug 1641716 - microsoft ecc root certificate authority 2017 sha-256 finger
print: 358df39d764af9e1b766e9c972df352ee15cfac227af6ad1d70e8e4a6edcba02 bug 16417...
...16 - microsoft rsa root certificate authority 2017 sha-256 finger
print: c741f70f4b2a8d88bf2e71c14122ef53ef10eba0cfa5e64cfa20f418853073e0 the following ca certificates were removed: bug 1645199 - addtrust class 1 ca root sha-256 finger
print: 8c7209279ac04e275e16d07fd3b775e80154b5968046e31f52dd25766324e9a7 bug 1645199 - addtrust external ca root sha-256 finger
print: 687fa451382278fff0c8b11f8d43d576671c6eb2bceab413fb83d965d06d2ff2 bug 1641718 - luxtrust global root 2 sha-256 finger
print: 54455f7129c20b1447c418f997168f24c58fc5023bf5da5be2eb6e1dd8902ed5 bug 1639987 - staat der nederlanden root ca - g2 sha-256 finger
print: 668c83947da63b724bece1743c31a0e6aed0db8ec5b31be377bb784f91b67...
...16f bug 1618402 - symantec class 2 public primary certification authority - g4 sha-256 finger
print: fe863d0822fe7a2353fa484d5924e875656d3dc9fb58771f6f616f9d571bc592 bug 1618402 - symantec class 1 public primary certification authority - g4 sha-256 finger
print: 363f3c849eab03b0a2a0f636d7b86d04d3ac7fcfe26a0a9121ab9795f6e176df bug 1618402 - verisign class 3 public primary certification authority - g3 sha-256 finger
print: eb04cf5eb1f39afa762f2bb120f296cba520c1b97db1589565b81cb9a17b7244 a number of certificates had their email trust bit disabled.
NSS Sample Code sample4
*arg); int main(int argc, char **argv) { secstatus rv; certcertificate *cert = null; seckeypublickey *pubkey = null; seckeyprivatekey *pvtkey = null; int modulus_len, i, outlen; char *buf1 = null; char *buf2 = null; /* initialize nss */ pk11_setpasswordfunc(passwdcb); rv = nss_init("."); if (rv != secsuccess) { f
printf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); goto cleanup; } cert = pk11_findcertfromnickname("testca", null); if (cert == null) { f
printf(stderr, "couldn't find cert testca in nss db (err %d)\n", pr_geterror()); goto cleanup; } pubkey = cert_extractpublickey(cert); if (pubkey == null) { f
printf(stderr, "couldn't extrac...
...t public key from cert testca (err %d)\n", pr_geterror()); goto cleanup; } modulus_len = seckey_publickeystrength(pubkey); f
printf(stderr, "public key modulus %d bytes\n", modulus_len); buf1 = (char *)malloc(modulus_len); buf2 = (char *)malloc(modulus_len); /* initialize buf1 */ for (i=0;i<modulus_len;i++) { buf1[i]= (i %26) + 'a'; } buf1[modulus_len-1] = '\0'; f
printf(stderr, "buffer being encrypted = \n%s\n", buf1); /* encrypt buf1, result will be in buf2 */ rv = pk11_pubencryptraw(pubkey, buf2, buf1, modulus_len, null); if (rv != secsuccess) { f
printf(stderr, "encrypt with public key failed (err %d)\n", pr_geterror()); goto cleanup; } pvtkey = pk11_findkeybyanycert(cert, null); if (pvtkey == null) { f
printf...
...(stderr, "couldn't find private key for cert testca (err %d)\n", pr_geterror()); goto cleanup; } /* clear buf1 */ for (i=0;i<modulus_len;i++) { buf1[i]= '\0'; } /* decrypt buf2, result will be in buf1 */ rv = pk11_pubdecryptraw(pvtkey, buf1, &outlen, modulus_len, buf2, modulus_len); if (rv != secsuccess) { f
printf(stderr, "decrypt with private key failed (err %d)\n", pr_geterror()); goto cleanup; } f
printf(stderr, "result of decryption, outlen = %d\n", outlen); f
printf(stderr, "result of decryption, buf = \n%s\n", buf1); exit(0); cleanup: if (cert) cert_destroycertificate(cert); if (pubkey) seckey_destroypublickey(pubkey); if (pvtkey) seckey_destroyprivatekey(pvtkey); if (buf1) ...
NSPR functions
pr_now interval time the nspr socket i/o functions pr_recv and pr_send (used by the nss ssl functions) take a
printervaltime timeout parameter.
...
printervaltime has an abstract, platform-dependent time unit.
... call pr_secondstointerval or pr_millisecondstointerval to convert a time interval in seconds or milliseconds to
printervaltime.
SpiderMonkey Build Documentation
when invoked with the --cflags option, js-config
prints the flags that you should pass to the c compiler when compiling files that use the spidermonkey api.
... $ ./js-config --cflags # example output: -i/usr/local/include/js -i/usr/include/nspr when invoked with the --libs option, js-config
prints the flags that you should pass to the c compiler when linking an executable or shared library that uses spidermonkey.
... $ ./js-config --libs # example output: -l/usr/local/lib -lmozjs -l/usr/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl -ldl -lm -lm -ldl testing spidermonkey run ${builddir}/dist/bin/js y.js and check if appropriate output is
printed.
JSAPI User Guide
void reporterror(jscontext *cx, const char *message, jserrorreport *report) { f
printf(stderr, "%s:%u:%s\n", report->filename ?
...simply call js_reporterror, with
printf-style arguments, and return false.
...c); const char *entexit; const char *namestr; /* build a c string for the function's name */ if (!name) { namestr = "unnamed function"; } else { namestr = js_encodestring(cx, name); } /* build a string for whether we're entering or exiting */ if (entering) { entexit = "entering"; } else { entexit = "exiting"; } /* output information about the trace */
printf("%s javascript function: %s at time: %ld", entexit, namestr, clock()); } void enabletracing(jscontext *cx) { js_setfunctioncallback(cx, functransition); } void disabletracing(jscontext *cx) { js_setfunctioncallback(cx, nullptr); } ...
JSClass
the javascript engine never touches the private data; it is for the application's use only.) void
printer_finalize(jscontext *cx, jsobject *obj) { my
printer *p = (my
printer *) js_getprivate(cx, obj); delete p; } static jsclass
printer_class = { "
printer", jsclass_has_private, null, null, null, null, null, null, null,
printer_finalize }; /* spidermonkey 31 or older * static jsclass
printer_class = { * "
printer", * jsclass_has_private, * js_propertystub, js_p...
...ropertystub, js_propertystub, js_strictpropertystub, * js_enumeratestub, js_resolvestub, js_convertstub,
printer_finalize, * jsclass_no_optional_members * }; */ bool
printer_construct(jscontext *cx, unsigned argc, jsval *vp) { js::callargs args = js::callargsfromvp(argc, vp); jsobject *obj = js_newobjectforconstructor(cx, &
printer_class, args); /* spidermonkey 31 or older * jsobject *obj = js_newobjectforconstructor(cx, &
printer_class, vp); */ if (!obj) return false; my
printer *p = new my
printer; if (p == null) { js_reportoutofmemory(cx); return false; } js_setprivate(cx, obj, p); args.rval().setobject(*obj); /* spidermonkey 31 or older * js_set_rval(cx, vp, object_to_jsval(obj)); */ return tr...
...ue; } { js_initclass(cx, global, js::null(), &
printer_class,
printer_construct, 1, null, null, null, null); } see also mxr id search for jsclass jsclass.flags js_getclass js_initclass js_newobject js_newobjectforconstructor js_instanceof bug 638291 - added trace bug 702507 - removed jsclass_construct_prototype bug 726944 - removed xdrobject, reserved0 and reserved1 bug 886829 - made finalize optional bug 957688 - removed checkaccess bug 1103368 - made most of members optional bug 1097267 - removed jsclass_new_enumerate bug 1054756 - removed convert bug 1261723 - class ops are moved to a sub-structure jsclassops ...
An Overview of XPCOM
we've all used interfaces since our first "helloworld" program, where the interface was between the code we actually wrote -- the application code -- and the
printing code.
... the application code used an interface from a library, stdio, to
print the "hello world" string out to the screen.
... the difference here is that a "helloworld" application in xpcom finds this screen-
printing functionality at runtime and never has to know about stdio when it's compiled.
Component Internals
there is a slight foot
print penalty to linking directly, but this gives your component freedom to work in any recent environment.
... if foot
print is a big issue in your component or application, you can trim out the pieces you don't need.
...most components and embedding applications need to link to some string class or other in order to utilize certain gecko apis, but the string code that mozilla uses is highly complex and even more expensive than the glue code in terms of foot
print (~100k).
Using XPCOM Utilities to Make Things Easier
in a debugging environment, this string will be
printed to the screen when the component library is loaded or unloaded.
... linking the full string library (.lib or .a) into a component may raise its foot
print by more than 100k (on windows), which in many cases is an unacceptable gain (see the xpcom string guide).
... for weblock, where the string classes need to be only wrappers around already existing string data, trading advanced functionality for a much smaller foot
print is the right way to go.
nsACString_internal
isterminated prbool isterminated() const - source charat char charat(pruint32) const - source parameters pruint32 i operator[] char operator[](pruint32) const - source parameters pruint32 i first char first() const - source last char last() const - source countchar pruint32 countchar(char) const - source parameters char <anonymous> findchar
print32 findchar(char, pruint32) const - source parameters char <anonymous> pruint32 offset equals prbool equals(const nsacstring_internal&) const - source equality parameters nsacstring_internal& <anonymous> prbool equals(const nsacstring_internal&, const nscstringcomparator&) const - source parameters nsacstring_internal& <anonymous> nscstringcomparator& <anonymous> prbool equal...
... @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char,
print32) - source this method is used to remove all occurrences of achar from this string.
... @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters char achar
print32 aoffset ...
nsAString_internal
rminated() const - source charat prunichar charat(pruint32) const - source parameters pruint32 i operator[] prunichar operator[](pruint32) const - source parameters pruint32 i first prunichar first() const - source last prunichar last() const - source countchar pruint32 countchar(prunichar) const - source parameters prunichar <anonymous> findchar
print32 findchar(prunichar, pruint32) const - source parameters prunichar <anonymous> pruint32 offset equals prbool equals(const nsastring_internal&) const - source equality parameters nsastring_internal& <anonymous> prbool equals(const nsastring_internal&, const nsstringcomparator&) const - source parameters nsastring_internal& <anonymous> nsstringcomparator& <anonymous> prbool e...
... @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar,
print32) - source this method is used to remove all occurrences of achar from this string.
... @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters prunichar achar
print32 aoffset ...
nsDependentCSubstring
isterminated prbool isterminated() const - source charat char charat(pruint32) const - source parameters pruint32 i operator[] char operator[](pruint32) const - source parameters pruint32 i first char first() const - source last char last() const - source countchar pruint32 countchar(char) const - source parameters char <anonymous> findchar
print32 findchar(char, pruint32) const - source parameters char <anonymous> pruint32 offset equals prbool equals(const nsacstring_internal&) const - source equality parameters nsacstring_internal& <anonymous> prbool equals(const nsacstring_internal&, const nscstringcomparator&) const - source parameters nsacstring_internal& <anonymous> nscstringcomparator& <anonymous> prbool equal...
... @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(char,
print32) - source this method is used to remove all occurrences of achar from this string.
... @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters char achar
print32 aoffset ...
nsDependentSubstring
rminated() const - source charat prunichar charat(pruint32) const - source parameters pruint32 i operator[] prunichar operator[](pruint32) const - source parameters pruint32 i first prunichar first() const - source last prunichar last() const - source countchar pruint32 countchar(prunichar) const - source parameters prunichar <anonymous> findchar
print32 findchar(prunichar, pruint32) const - source parameters prunichar <anonymous> pruint32 offset equals prbool equals(const nsastring_internal&) const - source equality parameters nsastring_internal& <anonymous> prbool equals(const nsastring_internal&, const nsstringcomparator&) const - source parameters nsastring_internal& <anonymous> nsstringcomparator& <anonymous> prbool e...
... @see nstsubstring::isvoid parameters prbool <anonymous> stripchar void stripchar(prunichar,
print32) - source this method is used to remove all occurrences of achar from this string.
... @param achar -- char to be stripped @param aoffset -- where in this string to start stripping chars parameters prunichar achar
print32 aoffset ...
nsIContentViewer
[noscript,notxpcom,nostdcall] void setnavigationtiming(in nsdomnavigationtimingptr atiming); void setpagemode(in boolean apagemode, in nsi
printsettings a
printsettings); void show(); void stop(); void unload(); obsolete since gecko 1.8 attributes attribute type description container nsisupports domdocument nsidomdocument enablerendering boolean obsolete since gecko 2.0 historyentry nsishentry get the history entry that this vie...
... note: if the document is currently being
printed, it will not be saved in session history.
...[noscript,notxpcom,nostdcall] void setnavigationtiming( in nsdomnavigationtimingptr atiming ); parameters atiming missing description return value missing description setpagemode() void setpagemode( in boolean apagemode, in nsi
printsettings a
printsettings ); parameters apagemode missing description a
printsettings missing description show() void show(); parameters none.
nsICookie2
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsicookie attributes attribute type description creationtime
print64 the creation time of the cookie, in microseconds since midnight (00:00:00), january 1, 1970 utc.
... expiry
print64 the actual expiry time of the cookie, in seconds since midnight (00:00:00), january 1, 1970 utc.
... lastaccessed
print64 the last time the cookie was accessed, in microseconds since midnight (00:00:00) on january 1, 1970 utc.
nsIMemoryReporter
attributes attribute type description amount
print64 the numeric value reported by the memory reporter, specified in the units indicated by the units attribute.
... kind
print32 the memory kind, one of the memory reporter kind constants below.
... units
print32 the units used by the amount attribute; this will be one of the unit type constants.
nsIPermissionManager
last changed in gecko 16 (firefox 16 / thunderbird 16 / seamonkey 2.13) inherits from: nsisupports method overview void add(in nsiuri uri, in string type, in pruint32 permission, [optional] in pruint32 expiretype, [optional] in
print64 expiretime); void addfromprincipal(in nsiprincipal principal, in string type, in pruint32 permission, [optional] in pruint32 expiretype, [optional] in
print64 expiretime); void remove(in autf8string host, in string type); void removefromprincipal(in nsiprincipal principal, in string type); void removepermission(in nsipermission perm); ...
... void add( in nsiuri uri, in string type, in pruint32 permission, [optional] in pruint32 expiretype, [optional] in
print64 expiretime ); parameters uri the uri to add the permission for.
... void addfromprincipal( in nsiprincipal principal, in string type, in pruint32 permission, [optional] in pruint32 expiretype, [optional] in
print64 expiretime ); parameters principal the principal to add the permission for.
nsIPlacesImportExportService
-service;1"] .getservice(components.interfaces.nsiplacesimportexportservice); method overview void backupbookmarksfile(); void exporthtmltofile(in nsilocalfile afile); void importhtmlfromfile(in nsilocalfile afile, in boolean aisinitialimport); obsolete since gecko 14.0 void importhtmlfromfiletofolder(in nsilocalfile afile, in
print64 afolder, in boolean aisinitialimport); obsolete since gecko 14.0 void importhtmlfromuri(in nsiuri auri, in boolean aisinitialimport); obsolete since gecko 14.0 methods backupbookmarksfile() backs up the bookmarks.html file.
...the observer subject will be an nsisupports
print64 whose value is afolder.
... void importhtmlfromfiletofolder( in nsilocalfile afile, in
print64 afolder, in boolean aisinitialimport ); parameters afile the file to import.
nsISelection2
method overview void getrangesforinterval(in nsidomnode beginnode, in
print32 beginoffset, in nsidomnode endnode, in
print32 endoffset, in prbool allowadjacent, out pruint32 resultcount, [retval, array, size_is(resultcount)] out nsidomrange results); void getrangesforintervalcomarray(in nsidomnode beginnode, in
print32 beginoffset, in nsidomnode endnode, in
print32 endoffset, in prbool allowadjacent, in rangearray results); native code only!
... void getrangesforinterval( in nsidomnode beginnode, in
print32 beginoffset, in nsidomnode endnode, in
print32 endoffset, in prbool allowadjacent, out pruint32 resultcount, [retval, array, size_is(resultcount)] out nsidomrange results ); parameters beginnode beginoffset endnode endoffset these four parameters represent the range to compare against the selection.
... native code only!getrangesforintervalcomarray void getrangesforintervalcomarray( in nsidomnode beginnode, in
print32 beginoffset, in nsidomnode endnode, in
print32 endoffset, in prbool allowadjacent, in rangearray results ); parameters beginnode beginoffset endnode endoffset these four parameters represent the range to compare against the selection.
nsIWritablePropertyBag2
setpropertyasacstring(in astring prop, in acstring value); void setpropertyasastring(in astring prop, in astring value); void setpropertyasautf8string(in astring prop, in autf8string value); void setpropertyasbool(in astring prop, in boolean value); void setpropertyasdouble(in astring prop, in double value); void setpropertyasint32(in astring prop, in
print32 value); void setpropertyasint64(in astring prop, in
print64 value); void setpropertyasinterface(in astring prop, in nsisupports value); void setpropertyasuint32(in astring prop, in pruint32 value); void setpropertyasuint64(in astring prop, in pruint64 value); methods setpropertyasacstring() void setpropertyasacstring( in astring prop, in acstring va...
... setpropertyasint32() void setpropertyasint32( in astring prop, in
print32 value ); parameters prop property to set the value of.
... setpropertyasint64() void setpropertyasint64( in astring prop, in
print64 value ); parameters prop property to set the value of.
nsIXmlRpcClient
constants constant type description int unsigned long nsisupports
print32 boolean unsigned long nsisupportsprbool string unsigned long nsisupportscstring double unsigned long nsisupportsdouble datetime unsigned long nsisupportsprtime array readonly unsigned long nsisupportsarray struct readonly unsigned long nsisupportsdictionary methods init() set server url.
...supported arguments are: nsisupportspruint8, nsisupportspruint16, nsisupports
print16, nsisupports
print32: i4, nsisupportsprbool: boolean, nsisupportschar, nsisupportscstring: string, nsisupportsfloat, nsisupportsdouble: double, nsisupportsprtime: datetime.iso8601, nsiinputstream: base64, nsisupportsarray: array, nsidictionary: struct note that both nsisupportsarray and nsidictionary can only hold any of the supported input types.
... return value will be converted as follows: i4 or int: nsisupports
print32 boolean: nsisupportsprbool string: nsisupportscstring double: nsisupportsdouble datetime.iso8601: nsisupportsprtime base64: nsisupportscstring array: nsisupportsarray struct: nsidictionary faults (server side errors) are indicated by returning ns_error_failure.
Gecko Plugin API Reference - Plugins
ng carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and destruction initialization instance creation instance destruction shutdown initialize and shutdown example drawing and event handling the npwindow structure drawing plug-ins
printing the plug-in setting the window getting information windowed plug-ins mac os windows unix event handling for windowed plug-ins windowless plug-ins specifying that a plug-in is windowless invalidating the drawing area forcing a paint message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event h...
... npp_destroy npp_destroystream npp_getvalue np_getvalue npp_handleevent np_initialize npp_new npp_newstream npp_
print npp_setvalue npp_setwindow np_shutdown npp_streamasfile npp_urlnotify npp_write npp_writeready browser side plug-in api this chapter describes methods in the plug-in api that are available from the browser.
...omidentifier npn_intfromidentifier npobject npn_createobject npn_retainobject npn_releaseobject npn_invoke npn_invokedefault npn_evaluate npn_getproperty npn_setproperty npn_removeproperty npn_hasproperty npn_hasmethod npn_setexception npclass structures npanycallbackstruct npbyterange npembed
print npevent npfull
print npp np_port np
print np
printcallbackstruct nprect npregion npsaveddata npsetwindowcallbackstruct npstream npwindow constants error codes result codes plug-in version constants version feature constants external resources external projects and articles for plugin creation original document information copyright information: netscape communication ...
Index - Firefox Developer Tools
125 open the debugger there are three ways to open the debugger: 126 pretty-
print a minified file javascript to prettify a minified file, click the pretty
print source icon () at the bottom of the source pane.
...logpoints
print a message to the console panel instead of pausing code execution.
... 149 rich output when the web console
prints objects, it includes a richer set of information than just the object's name.
Animation.currentTime - Web APIs
rrenttime to half her keyframeeffect's duration: alicechange.currenttime = alicechange.effect.timing.duration / 2; a more generic means of seeking to the 50% mark of an animation would be: animation.currenttime = animation.effect.getcomputedtiming().delay + animation.effect.getcomputedtiming().activeduration / 2; reduced time precision to offer protection against timing attacks and finger
printing, the precision of animation.currenttime might get rounded depending on browser settings.
... // reduced time precision with `privacy.resistfinger
printing` enabled animation.currenttime; // 49.8 // 50.6 // 51.7 // ...
... in firefox, you can also enabled privacy.resistfinger
printing, the precision will be 100ms or the value of privacy.resistfinger
printing.reducetimerprecision.microseconds, whichever is larger.
Animation.startTime - Web APIs
waapicats.appendchild(newcat); } reduced time precision to offer protection against timing attacks and finger
printing, the precision of animation.starttime might get rounded depending on browser settings.
... // reduced time precision with `privacy.resistfinger
printing` enabled animation.starttime; // 49.8 // 50.6 // 51.7 // ...
... in firefox, you can also enabled privacy.resistfinger
printing, the precision will be 100ms or the value of privacy.resistfinger
printing.reducetimerprecision.microseconds, whichever is larger.
AnimationPlaybackEvent.currentTime - Web APIs
reduced time precision to offer protection against timing attacks and finger
printing, the precision of playbackevent.currenttime might get rounded depending on browser settings.
... // reduced time precision with `privacy.resistfinger
printing` enabled playbackevent.currenttime; // 49.8 // 50.6 // 51.7 // ...
... in firefox, you can also enabled privacy.resistfinger
printing, the precision will be 100ms or the value of privacy.resistfinger
printing.reducetimerprecision.microseconds, whichever is larger.
AnimationTimeline.currentTime - Web APIs
reduced time precision to offer protection against timing attacks and finger
printing, the precision of animationtimeline.currenttime might get rounded depending on browser settings.
... // reduced time precision with `privacy.resistfinger
printing` enabled animationtimeline.currenttime; // 49.8 // 50.6 // 51.7 // ...
... in firefox, you can also enable privacy.resistfinger
printing; the precision will be 100ms or the value of privacy.resistfinger
printing.reducetimerprecision.microseconds, whichever is larger.
BaseAudioContext.currentTime - Web APIs
console.log(audioctx.currenttime); reduced time precision to offer protection against timing attacks and finger
printing, the precision of audioctx.currenttime might get rounded depending on browser settings.
... // reduced time precision with `privacy.resistfinger
printing` enabled audioctx.currenttime; // 49.8 // 50.6 // 51.7 // ...
... in firefox, you can also enabled privacy.resistfinger
printing, the precision will be 100ms or the value of privacy.resistfinger
printing.reducetimerprecision.microseconds, whichever is larger.
Event.timeStamp - Web APIs
</p> <p>timestamp: <span id="time">-</span></p> javascript function gettime(event) { var time = document.getelementbyid("time"); time.firstchild.nodevalue = event.timestamp; } document.body.addeventlistener("keypress", gettime); result reduced time precision to offer protection against timing attacks and finger
printing, the precision of event.timestamp might get rounded depending on browser settings.
... // reduced time precision with `privacy.resistfinger
printing` enabled event.timestamp; // 1519129853500 // 1519129858900 // 1519129864400 // ...
... in firefox, if you also enable privacy.resistfinger
printing, the precision will be 100ms or the value of privacy.resistfinger
printing.reducetimerprecision.microseconds, whichever is larger.
File.lastModified - Web APIs
const filewithdate = new file([], 'file.bin', { lastmodified: new date(2017, 1, 1), }); console.log(filewithdate.lastmodified); //returns 1485903600000 const filewithoutdate = new file([], 'file.bin'); console.log(filewithoutdate.lastmodified); //returns current time reduced time precision to offer protection against timing attacks and finger
printing, the precision of somefile.lastmodified might get rounded depending on browser settings.
... // reduced time precision with `privacy.resistfinger
printing` enabled somefile.lastmodified; // 1519129853500 // 1519129858900 // 1519129864400 // ...
... in firefox, you can also enabled privacy.resistfinger
printing, the precision will be 100ms or the value of privacy.resistfinger
printing.reducetimerprecision.microseconds, whichever is larger.
File.lastModifiedDate - Web APIs
lement: <input type="file" multiple id="myfileinput"> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (simliar to nodelist) var files = fileinput.files; for (var i = 0; i < files.length; i++) { alert(files[i].name + " has a last modified date of " + files[i].lastmodifieddate); } reduced time precision to offer protection against timing attacks and finger
printing, the precision of somefile.lastmodifieddate.gettime() might get rounded depending on browser settings.
... // reduced time precision with `privacy.resistfinger
printing` enabled somefile.lastmodifieddate.gettime(); // 1519129853500 // 1519129858900 // 1519129864400 // ...
... in firefox, you can also enable privacy.resistfinger
printing, the precision will be 100ms or the value of privacy.resistfinger
printing.reducetimerprecision.microseconds, whichever is larger.
KeyboardEvent - Web APIs
if the key corresponds to a
printable character, this value is a non-empty unicode string containing that character.
... if the key doesn't have a
printable representation, this is an empty string.
...in firefox 26 this returns codes for
printable characters.
performance.now() - Web APIs
reduced time precision to offer protection against timing attacks and finger
printing, the precision of performance.now() might get rounded depending on browser settings.
... // reduced time precision with `privacy.resistfinger
printing` enabled performance.now(); // 8865400 // 8866200 // 8866700 // ...
... in firefox, you can also enable privacy.resistfinger
printing — this changes the precision to 100ms or the value of privacy.resistfinger
printing.reducetimerprecision.microseconds, whichever is larger.
RTCDtlsTransport.state - Web APIs
connecting dtls is in the process of negotiating a secure connection and verifying the remote finger
print.
... connected dtls has completed negotiation of a secure connection and verified the remote finger
print.
... failed the transport has failed as the result of an error (such as receipt of an error alert or failure to validate the remote finger
print).
Using Web Workers - Web APIs
first we need to have the methods to handle the two simple operations: var queryablefunctions = { getdifference: function(a, b) { reply('
printstuff', a - b); }, waitsometime: function() { settimeout(function() { reply('doalert', 3, 'seconds'); }, 3000); } } function reply() { if (arguments.length < 1) { throw new typeerror('reply - takes at least one argument'); return; } postmessage({ querymethodlistener: arguments[0], querymethodarguments: array.proto...
...ent.data.hasownproperty('querymethodarguments')) { listeners[event.data.querymethodlistener].apply(instance, event.data.querymethodarguments); } else { this.defaultlistener.call(instance, event.data); } } } // your custom "queryable" worker var mytask = new queryableworker('my_task.js'); // your custom "listeners" mytask.addlistener('
printstuff', function (result) { document.getelementbyid('firstlink').parentnode.appendchild(document.createtextnode('the difference is ' + result + '!')); }); mytask.addlistener('doalert', function (time, unit) { alert('worker waited for ' + time + ' ' + unit + ' :-)'); }); </script> </head> <body> <ul> <li><a id="firstlink" href="javascript:mytask.sendquery('getdifferen...
...erence between 5 and 3?</a></li> <li><a href="javascript:mytask.sendquery('waitsometime');">wait 3 seconds</a></li> <li><a href="javascript:mytask.terminate();">terminate() the worker</a></li> </ul> </body> </html> my_task.js (the worker): var queryablefunctions = { // example #1: get the difference between two numbers: getdifference: function(nminuend, nsubtrahend) { reply('
printstuff', nminuend - nsubtrahend); }, // example #2: wait three seconds waitsometime: function() { settimeout(function() { reply('doalert', 3, 'seconds'); }, 3000); } }; // system functions function defaultreply(message) { // your default public function executed only when main page calls the queryableworker.postmessage() method directly // do something } function reply() { if...
XSL Transformations in Mozilla FAQ - Web APIs
<xsl:if xmlns:msxsl="urn:schemas-microsoft-com:xslt" test="system-property('msxsl:version')=3"> <!-- msxml3 specific markup --> </xsl:if> what about media="
print"?
... when
printing a document, mozilla tries to render the page on paper as closely to what you see as possible.
...this is achieved by
printing the current dom tree.
:first - CSS: Cascading Style Sheets
the :first css pseudo-class, used with the @page at-rule, represents the first page of a
printed document.
... (see :first-child for general first element of a node.) /* selects the first page when
printing */ @page :first { margin-left: 50%; margin-top: 50%; } note: you can't change all css properties with this pseudo-class.
... syntax :first examples html <p>first page.</p> <p>second page.</p> <button>
print!</button> css @page :first { margin-left: 50%; margin-top: 50%; } p { page-break-after: always; } javascript document.queryselector("button").addeventlistener('click', () => { window.
print(); }); result press the "
print!" button to
print the example.
size - CSS: Cascading Style Sheets
most of the time, this size corresponds to the target size of the
printed page if applicable.
...(most frequently used dimensions for personal
printing.) a3 this matches the standard, iso dimensions: 297mm x 420mm.
... formal definition related at-rule@pageinitial valueautocomputed valueas specified, but with relative lengths converted into absolute lengths formal syntax <length>{1,2} | auto | [ <page-size> | [ portrait | landscape ] ] examples specifying size and orientation @page { size: 4in 6in landscape; } nesting inside a @media rule @media
print { @page { size: 50mm 150mm; } } specifications specification status comment css paged media module level 3the definition of 'size' in that specification.
color-adjust - CSS: Cascading Style Sheets
for example, when
printing, a browser might opt to leave out all background images and to adjust text colors to be sure the contrast is optimized for reading on white paper.
... if the output device is a
printer, and to save ink, dark or extremely dense background images might be removed.
... when
printing a page, the browser might want to replace light-colored text on a dark background with dark text on a white background.
<length> - CSS: Cascading Style Sheets
absolute length units absolute length units represent a physical measurement when the physical properties of the output medium are known, such as for
print layout.
...the anchor is done differently for low-resolution devices, such as screens, versus high-resolution devices, such as
printers.
...however, for
printers and high-resolution screens, one css pixel implies multiple device pixels.
Event reference
form events event name fired when reset the reset button is pressed submit the submit button is pressed
printing events event name fired when before
print the
print dialog is opened after
print the
print dialog is closed text composition events event name fired when compositionstart the composition of a passage of text is prepared (similar to keydown for a keyboard input, but works with other inputs such as speech recognition)...
... after
print event html5 the associated document has started
printing or the
print preview has been closed.
... before
print event html5 the associated document is about to be
printed or previewed for
printing.
Challenge solutions - Developer guides
solution the following rule puts borders around only <td> elements that are inside the <tbody> element of the table with id=demo-table: #demo-table tbody td { border:1px solid #7a7; } media separate
print style file challenge move the
print-specific style rules to a separate css file and import them into your style4.css stylesheet.
... solution cut and paste the lines between /*
print only */ and /* end
print only */ into a file named style4_
print.css.
... in style4.css, add the following line at the beginning of the file: @import url("style4_
print.css")
print; heading hover color challenge make the headings turn blue when the mouse pointer is over them.
<input type="file"> - HTML: Hypertext Markup Language
if so,
print a message into the preview <div> stating that no files have been selected.
... if files have been selected, we loop through each one,
printing information about it into the preview <div>.
... if it is, we:
print out its name and file size into a list item inside the previous <div> (obtained from file.name and file.size).
<link>: The External Resource Link element - HTML: Hypertext Markup Language
for example: <link href="
print.css" rel="stylesheet" media="
print"> <link href="mobile.css" rel="stylesheet" media="screen and (max-width: 600px)"> some interesting new performance and security features have been added to the <link> element too.
... notes: in html 4, this can only be a simple white-space-separated list of media description literals, i.e., media types and groups, where defined and allowed as values for this attribute, such as
print, screen, aural, braille.
...for example: <link href="
print.css" rel="stylesheet" media="
print"> <link href="mobile.css" rel="stylesheet" media="all"> <link href="desktop.css" rel="stylesheet" media="screen and (min-width: 600px)"> <link href="highres.css" rel="stylesheet" media="screen and (min-resolution: 300dpi)"> stylesheet load events you can determine when a style sheet has been loaded by watching for a load event to fire on it; similarly, you ca...
Content negotiation - HTTP
the information by the client is quite verbose (http/2 header compression mitigates this problem) and a privacy risk (http finger
printing) as several representations of a given resource are sent, shared caches are less efficient and server implementations are more complex.
... due to the configuration-based entropy increase, a modified value can be used to finger
print the user, it is not recommended to change it and a web site cannot trust this value to reflect the actual wish of the user.
...the more precise headers are sent, the more entropy is sent, allowing for more http finger
printing and corresponding privacy concern.
Indexed collections - JavaScript
let a = [10, 20, 30] let total = a.reduce(function(accumulator, currentvalue) { return accumulator + currentvalue }, 0) console.log(total) //
prints 60 reduceright(callback[, initialvalue]) works like reduce(), but starts with the last element.
... function
printarguments() { arguments.foreach(function(item) { // typeerror: arguments.foreach is not a function console.log(item); }); } but you can call them indirectly using function.prototype.call().
... function
printarguments() { array.prototype.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.
Date.prototype.getTime() - JavaScript
reduced time precision to offer protection against timing attacks and finger
printing, the precision of new date().gettime() might get rounded depending on browser settings.
... // reduced time precision with `privacy.resistfinger
printing` enabled new date().gettime(); // 1519129853500 // 1519129858900 // 1519129864400 // ...
... in firefox, you can also enable privacy.resistfinger
printing, the precision will be 100ms or the value of privacy.resistfinger
printing.reducetimerprecision.microseconds, whichever is larger.
Date.now() - JavaScript
engines which have not been updated to support this method can work around the absence of this method using the following shim: if (!date.now) { date.now = function now() { return new date().gettime(); }; } examples reduced time precision to offer protection against timing attacks and finger
printing, the precision of date.now() might get rounded depending on browser settings.
... // reduced time precision with `privacy.resistfinger
printing` enabled date.now(); // 1519129853500 // 1519129858900 // 1519129864400 // ...
... in firefox, you can also enable privacy.resistfinger
printing, the precision will be 100ms or the value of privacy.resistfinger
printing.reducetimerprecision.microseconds, whichever is larger.
Compiling a New C/C++ Module to WebAssembly - WebAssembly
take a copy of the following simple c example, and save it in a file called hello.c in a new directory on your local drive: #include <stdio.h> int main(int argc, char ** argv) {
printf("hello world\n"); } now, using the terminal window you used to enter the emscripten compiler environment, navigate to the same directory as your hello.c file, and run the following command: emcc hello.c -s wasm=1 -o hello.html the options we’ve passed in with the command are as follows: -s wasm=1 — specifies that we want wasm output.
... first of all, save the following c code in a file called hello2.c, in a new directory: #include <stdio.h> int main(int argc, char ** argv) {
printf("hello world\n"); } search for the file shell_minimal.html in your emsdk repo.
... to start with, save the following code as hello3.c in a new directory: #include <stdio.h> #include <emscripten/emscripten.h> int main(int argc, char ** argv) {
printf("hello world\n"); } #ifdef __cplusplus extern "c" { #endif void emscripten_keepalive myfunction(int argc, char ** argv) {
printf("myfunction called\n"); } #ifdef __cplusplus } #endif by default, emscripten-generated code always just calls the main() function, and other functions are eliminated as dead code.
util/deprecate - Archive of obsolete content
globals functions deprecatefunction(fun, msg) dump to the console the error message given in the second argument, prefixed with "deprecated:", and
print the stacktrace; then execute the function passed as first argument and returns its value.
... parameters fun : function the function to execute after the error message msg : string the error message to display returns * : the returned value from fun deprecateusage(msg) dump to the console the error message given, prefixed with "deprecated:", and
print the stacktrace.
cfx - Archive of obsolete content
--no-run with this option cfx will not execute the command, but will
print out the command that it would have used to execute the command.
... --no-run with this option cfx will not execute the command, but will
print out the command that it would have used to execute the command.
jpm - Archive of obsolete content
jpm usage is: jpm [command] [options] jpm supports the following global options: -h, --help - show a help message and exit -v, --version -
print the jpm version number --addon-dir - directory for your source code, defaulting to the current directory installation jpm is distributed with the node package manager npm.
...specify --stop-on-error to stop running tests after the first failure: jpm test --stop-on-error --tbpl
print test output in treeherder format --times number run tests number of times: jpm test --times 2 -v --verbose verbose operation.
CSS3 - Archive of obsolete content
media queries recommendation since june 19th, 2012 extends the former media type (
print, screen, … ) to a full language allowing queries on the device media capabilities like only screen and (color) .
... filter effects module level 1 working draft css generated content for paged media module working draft adds the ability to tailor
printed version of a document by allowing to control header, footer but also references tables like indexes or tables of content.
Index of archived content - Archive of obsolete content
ces for plugin creation logging multi-process plugins monitoring plugins multi-process plugin architecture npapi plugin developer guide npapi plugin reference browser-side plug-in api npapi plug-in side api npanycallbackstruct npbyterange npclass npembed
print npevent npfull
print npidentifier npn newstream npnvariable npn_createobject npn_destroystream npn_enumerate npn_evaluate npn_forceredraw npn_getauthenticationinfo npn_getintidentifier npn_getproperty npn_getstringidentifier ...
...setvalue npn_setvalueforurl npn_status npn_utf8fromidentifier npn_useragent npn_version npn_write npobject npp nppvariable npp_destroy npp_destroystream npp_getvalue npp_handleevent npp_new npp_newstream npp_
print npp_setvalue npp_setwindow npp_streamasfile npp_urlnotify npp_write npp_writeready np
print np
printcallbackstruct nprect npregion npsaveddata npsetwindowcallbackstruct npstream npstring nputf8 npvariant ...
MMgc - Archive of obsolete content
(the second switch will slow your application down a lot more than the first switch, so you could try the first, then the second.) when a missing write barrier is detected, mmgc will assert and drop you into the debugger, and will
print out a message telling you which object contained the missing write barrier, the address of the member variable that needs it, and what object didn't get marked due to the missing write barrier.
...leak detection (for unmanaged memory) when the application is exiting, mmgc will detect memory leaks in its unmanaged memory allocators and
print out the addresses and sizes of the leaked objects, and stack traces if stack traces are enabled.
Mozilla Crypto FAQ - Archive of obsolete content
the government also claimed that publication of cryptographic software in electronic form made such functional use easier than publication in
printed form, and that that was sufficient to justify treating the two forms differently in the regulations.
...1, category 5, part 2, entry 5d002 (note on "functional capacity") and 15 cfr part 734, paragraphs 734.3(b)(2) and (b)(3) and accompanying note (
printed form vs.
Porting NSPR to Unix Platforms - Archive of obsolete content
i usually
print out every element in the <tt>jmp_buf</tt> and see which one is the closest to the address of a local variable (local variables are allocated on the stack).
...some of them respond to the <tt>-h</tt> command line option and
print a usage message.
PyDOM - Archive of obsolete content
an event handler like: <button onclick="
print foo"/> should be able to reference 'foo' via globals as shown.
...for example, let's say you have xul similar to pyxultest: top-level script code says something like: button = document.getelementbyid("some-button") button.foo = 0 and the button itself might look like: <button id="some-button" label="click here" onclick="event.target.foo += 1;
print 'foo is now', event.target.foo"/> note that (a) we have stuck an arbitrary attribute on a dom element and (b) in all cases (e.g., event handler and top-level script), the dom node needs to be explicitly specified - the globals are the window itself.
Tamarin build documentation - Archive of obsolete content
$ cd tamarin-central $ echo '
print("hello, world")' > hello.as $ java -jar ./utils/asc.jar -import ./core/builtin.abc hello.as hello.abc, 86 bytes written use the avmplus standalone executable (avmshell) built previously to run the application: $ avmshell hello.abc hello, world use the -help options of asc.jar and avmshell for more details.
...irectory export avm=release/ceremoteshell.exe, the ceremoteshell.exe behaves as a proxy copying and running abc files on the windows mobile device build a windows mobile tamarin shell, copy the shell to the windows mobile device in \program files\shell\avmshell.exe (optional) can sanity check the windows mobile shell is functioning by running $avm hello.abc (where hello.abc is a simple abc to
print a string, or can substitute with any test abc) now any acceptance or performance tests can be run as on desktop using test/acceptance/runtests.py or tests/performance/runtests.py tamarin buildbot adobe maintains a continuous build and test system for tamarin redux, similar to tinderbox.
List of commands - Archive of obsolete content
p://lxr.mozilla.org/seamonkey/sou...rksoverlay.xul http://lxr.mozilla.org/seamonkey/sou...okmarkstree.js list of commands (listed alphabetically) browser:addbookmark browser:addbookmarkas browser:addgroupmarkas browser:back browser:editpage browser:find browser:findagain browser:findprev browser:forward browser:home browser:managebookmark browser:open browser:openfile browser:
print browser:
printpreview browser:savepage browser:searchinternet browser:sendpage browser:uploadfile cmd_bm_copy cmd_bm_cut cmd_bm_delete cmd_bm_expandfolder cmd_bm_export cmd_bm_find cmd_bm_import cmd_bm_managefolder cmd_bm_movebookmark cmd_bm_newbookmark cmd_bm_newfolder cmd_bm_newseparator cmd_bm_open cmd_bm_openinnewtab cmd_bm_openinnewwindow cmd_bm_paste cmd_bm_properties ...
...bs cmd_closewindow cmd_copy cmd_copyimage cmd_copylink cmd_cut cmd_delete cmd_editpage cmd_findtypelinks cmd_findtypetext cmd_gotoline cmd_handlebackspace cmd_handleshiftbackspace cmd_minimizewindow cmd_neweditor cmd_neweditordraft cmd_neweditortemplate cmd_newnavigator cmd_newnavigatortab cmd_newtabwithtarget cmd_openhelp cmd_paste - paste a selection from the clipboard cmd_
printsetup cmd_quit cmd_redo cmd_savepage cmd_scrollpagedown cmd_scrollpageup cmd_selectall cmd_switchdocumentdirection cmd_switchtextdirection cmd_textzoomenlarge cmd_textzoomreduce cmd_textzoomreset cmd_undo cmd_viewcomponentbar cmd_viewlinktoolbar cmd_viewlinktoolbar_false cmd_viewlinktoolbar_maybe cmd_viewlinktoolbar_true cmd_viewnavbar cmd_viewpersonaltoolbar cmd_viewtaskbar c...
XUL Parser in Python/source - Archive of obsolete content
import sys, glob, xmllib import os, re el_list = {} w = open('res.html', 'w') # unfortunately, i had to put this hack in here to suppress the
printing out of the resolved namespace: # "xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul window", etc.
..._starttag(self, t, a): name = strip(t) if name not in el_list: el_list[name] = {} for attr,val in a.items(): el_list[name][strip(attr)] = strip(val) def syntax_error(self, message): pass p = xulparser() cmd = 'dir /s /b *.xul' chrome_dir = 'c:\program files\netscape\netscape 6\chrome' os.chdir(chrome_dir) files = os.popen(cmd).readlines() for file in files: file = file.strip()
print '** ' + file + ' **' data = open(file).read() p.feed(data) w.write('<html><h3>periodic table of xul elements</h3>') w.write('<table><style>.head {font-weight: bold; background-color: lightgrey;}</style>') elements = el_list.keys() elements.sort() for item in elements: w.write('<tr><td class="head">' + item + '</td></tr>\n') for a in el_list[item]: w.write('<tr><td class="at">' + a + '</td...
2006-10-13 - Archive of obsolete content
firefox browser problem: width:30ex does not respect font discussion about a font rendering problem with firefox
print on the firefox context menu user would like discussion about why the bug https://bugzilla.mozilla.org/show_bug.cgi?id=204519 is a wontfix.
... (user feels
print belongs on the context menu along with back, reload, etc.) questions about programming for firefox a student questions how to create an extension that changes fonts, and how to capture website content before it is displayed.
SAX - Archive of obsolete content
an example implementation of the most commonly used content handler: function
print(s) { dump(s + "\n"); } xmlreader.contenthandler = { // nsisaxcontenthandler startdocument: function() {
print("startdocument"); }, enddocument: function() {
print("enddocument"); }, startelement: function(uri, localname, qname, /*nsisaxattributes*/ attributes) { var attrs = []; for(var i=0; i<attributes.length; i++) { attrs.push(attributes.getqname(i) + "='"...
... + attributes.getvalue(i) + "'"); }
print("startelement: namespace='" + uri + "', localname='" + localname + "', qname='" + qname + "', attributes={" + attrs.join(",") + "}"); }, endelement: function(uri, localname, qname) {
print("endelement: namespace='" + uri + "', localname='" + localname + "', qname='" + qname + "'"); }, characters: function(value) {
print("characters: " + value); }, processinginstruction: function(target, data) {
print("processinginstruction: target='" + target + "', data='" + data + "'"); }, ignorablewhitespace: function(whitespace) { // don't care }, startprefixmapping: function(prefix, uri) { // don't care }, endprefixmapping: function(prefix) { // do...
forEach - Archive of obsolete content
[1].foreach(function(value, index, array){
print(value); //break?
... if (value>1){ return false;//we could have some way to break when we return false } }); //woulld
print 1 2 --porfirio 11:17, 22-06-2008 another option would be to throw stopiteration and catch it within foreach().
Explaining basic 3D theory - Game development
those fragments — which are 3d projections of the 2d pixels — are aligned to the pixel grid, so eventually they can be
printed out as pixels on a 2d screen display during the output merging stage.
... output merging during the output manipulation stage all the fragments of the primitives from the 3d space are transformed into a 2d grid of pixels that are then
printed out on the screen display.
Build the brick field - Game development
let's explore how to create a group of bricks and
print them on screen using a loop.
...y = (r*(brickinfo.height+brickinfo.padding))+brickinfo.offset.top; newbrick = game.add.sprite(brickx, bricky, 'brick'); game.physics.enable(newbrick, phaser.physics.arcade); newbrick.body.immovable = true; newbrick.anchor.set(0.5); bricks.add(newbrick); } } } if you reload index.html at this point, you should see the bricks
printed on screen, at an even distance from one another.
2D maze game with device orientation - Game development
showlevel
prints the level data on the screen.
...we have this
printed out on the screen, but it would be good to update the values every second: this.time.events.loop(phaser.timer.second, this.updatecounter, this); this loop, also in the create function, will execute the updatecounter function every single second from the beginning of the game, so we can apply the changes accordingly.
Media (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
typically, this is a screen—but it may also be a
printer, a speech synthesizer, braille display, or another type of device.
... css offers several features that allow you to tweak your document's styles—or even offer different styles—according to the media type (such as screen or
print, to name two) or media capabilities (such as width, resolution, or other values) of the viewer's device.
Recursion - MDN Web Docs Glossary: Definitions of Web-related terms
examples recursive function calls itself until condition met the following python code defines a function that takes a number,
prints it, and then calls itself again with the number's value -1.
... def recurse(x): if x > 0:
print(x) recurse(x - 1) recurse(10) the output will look like this: 10 9 8 7 6 5 4 3 2 1 0 learn more general knowledge recursion (computer science) on wikipedia more details about recursion in javascript ...
Loop - MDN Web Docs Glossary: Definitions of Web-related terms
example: for(var i = 0; i < 10; i++){ console.log(i) } //this loop will
print numbers 0-9, will stop when condition is met (i = 10) for the above example, the syntax is as follows: statement 1 sets the variable for the loop (var i = 0).
... example: var i = 0; while(i < 5){ console.log(i) i++ } //this loop will
print number 0-4, will stop when condition becomes false (i >=5) for the above example, the syntax is as follows: the code block will continue to run as long as the variable (i) is less than 5.
What is CSS? - Learn web development
browsers, like firefox, chrome, or edge , are designed to present documents visually, for example, on a computer screen, projector or
printer.
...there are other user agents available — such as those which convert html and css documents into pdfs to be
printed.
Functions — reusable blocks of code - Learn web development
this works fine, as the output() function is being called inside the other functions — in the same scope as the variables it is
printing are defined in, in each case.
... try updating your code like this: function a() { let y = 2; output(z); } function b() { let z = 3; output(y); } save and reload again, and try this again in your javascript console: a(); b(); this time the a() and b() calls will both return an annoying referenceerror: variable name is not defined error — this is because the output() calls and the variables they are trying to
print are not in the same function scopes — the variables are effectively invisible to those function calls.
Test your skills: Functions - Learn web development
functions 1 for the first task, you have to create a simple function — choosename() — that
prints a random name from the provided array (names) to the provided paragraph (para), and then run it once.
...
print the returned result into the paragraph (para)'s textcontent.
Useful string methods - Learn web development
for example, we may have a list of web addresses and only want to
print out the ones that contain "mozilla".
...) structure, to test each string and only
print it in the list if it is a christmas message.
Web performance resources - Learn web development
to load css asynchronously one can simpy set the media type to
print and then change to all once loaded.
... <link rel="stylesheet" href="/path/to/my.css" media="
print" onload="this.media='all'"> <noscript><link rel="stylesheet" href="/path/to/my.css"></noscript> the downside with this approach is the flash of unstyled text (fout.) the simplist way to address this is by inlining css that is required for any content that is rendered above the fold, or what you see in the browser viewport before scrolling.
Properly configuring server MIME types - Learn web development
for perl cgi, you should have the line
print "content-type: text/html\n\n"; before any other output lines.
... if you're using the cgi module, you can use the line
print $cgi->header('text/html'); instead, where $cgi is your reference to the cgi instance.
Getting started with Svelte - Learn web development
this is a much smaller foot
print than compiled bundles from other frameworks.
... using the svelte repl a repl (read–eval–
print loop) is an interactive environment that allows you to enter commands and immediately see the results — many programming languages provide a repl.
Creating our first Vue component - Learn web development
{{}} is a special template syntax in vue, which lets us
print the result of javascript expressions defined in our class, inside our template, including values and methods.
...in this case, we’re
printing the value of the label prop.
Handling common JavaScript problems - Learn web development
it has a number of features available, but the main one you'll use often is console.log(), which
prints a custom message to the console.
...let superheroes = request.response; populateheader(superheroes); showheroes(superheroes); to the following: request.onload = function() { let superheroes = request.response; populateheader(superheroes); showheroes(superheroes); } to summarize, anytime something is not working and a value does not appear to be what it is meant to be at some point in your code, you can use console.log() to
print it out and see what is happening.
Setting up your own test automation environment - Learn web development
check that your new paths are in the path variable by entering the following into your terminal: echo $path you should see it
printed out in the terminal.
...is not empty) by using getattribute() to retrieve it's value attribute value, and
print a message to the console if it is not empty.
Package management basics - Learn web development
in your terminal, run the following command: parcel index.html you should see something like this
printed to your terminal: server running at http://localhost:1234 ✨ built in 193ms.
...the javascript bundle my-project.fb76efcf.js is a whopping 195k — very large, given that all it does is
print a line of text.
Debugging JavaScript
dump() the dump() function allows you to
print text on the native console.
...in extensions you can
print the callstack using components.stack like this: function getstackdump() { var lines = []; for (var frame = components.stack; frame; frame = frame.caller) { lines.push(frame.filename + " (" + frame.linenumber + ")"); } return lines.join("\n"); } see also debugging mozilla with gdb setting up an extension development environment (particularly development preferences and developme...
Debugging on Windows
console debugging when
printing to stdout from a content process, the console message will not appear on windows.
... for example, to
print curent javascript stack to stdout, evaluate this in quickwatch window: {,,xul}dumpjsstack() note: visual c++ will show you something in the quick watch window, but not the stack, you have to look in the os console for the output.
mach
mach will
print timings with each line of output from the build.
...here is a minimal mach command module: from __future__ import
print_function, unicode_literals from mach.decorators import ( commandargument, commandprovider, command, ) @commandprovider class machcommands(object): @command('doit', description='run it!') @commandargument('--debug', '-d', action='store_true', help='do it in debug mode.') def doit(self, debug=false):
print('i did it!') from mach.decorators we import some p...
Performance
not only does that increase memory foot
print but the deserialization also has to be executed seperately for each tab, thus requiring more cpu time.
...it does not provide the same memory foot
print reductions but it improves application startup.
BloatView
xpcom_mem_bloat_log if set, this causes a bloat log to be
printed on program exit, and each time nstracerefcnt::dumpstatistics is called.
...the more memory in general, the worse the performance and foot
print.
Leak-hunting strategies and tips
these roots are
printed on shutdown in debug builds, and the name of the root should give the type of object it is associated with.
... if you really need to debug leaks that involve js objects closely, you can get detailed
printouts of the paths js uses to mark objects when it is determining the set of live objects by using the functions added in bug 378261 and bug 378255.
Profiling with the Firefox Profiler
description of all available environment variables may be
printed by starting firefox with moz_profiler_help=1 set.
...*/ ); ' -f ./run.js -e ' var profileobj = profiler.getprofiledata();
print(json.stringify(profileobj)); ' | tail -n 1 > run.cleo the xpcshell output all benchmark information and on its last line it output the result of the profiling, you can filter it with tail -n 1 and redirect it to a file to prevent
printing it in your shell.
tools/power/rapl
tools/power/rapl (or rapl for short) is a command-line utility in the mozilla tree that periodically reads and
prints all available intel rapl power estimates.
... if the processor does not support gpu or ram estimates then " n/a " will be
printed in the relevant column instead of a number, and it will contribute zero to the total.
Performance
bloatview bloatview
prints per-class statistics on allocations and refcounts, and provides gross numbers on the amount of memory being leaked broken down by class.
... timerfirings logging (all platforms) timerfirings logging is a built-in logging mechanism that
prints data on every time fired.
Debugging out-of-memory problems
out-of-memory exceptions from js setting memory.dump_reports_on_oom in about:config to true will cause the browser to automatically write about:memory dumps to a temp file
printed to the browser console (note: not web console) when an oom crash is encountered.
... firefox android on firefox android, an about:memory dump may be triggered from a connect desktop machine with the command: adb shell am broadcast -a org.mozilla.gecko.memory_dump the location of the dump file will be
printed to the android log (viewed with adb logcat | grep geckoconsole) and can be retrieved via adb pull.
PR_Accept
syntax #include <prio.h> prfiledesc* pr_accept( prfiledesc *fd, prnetaddr *addr,
printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing the rendezvous socket on which the caller is willing to accept new connections.
... timeout a value of type
printervaltime specifying the time limit for completion of the accept operation.
PR_CWait
syntax #include <prcmon.h> prstatus pr_cwait( void *address,
printervaltime timeout); parameters the function has the following parameters: address the address of the protected object--the same address previously passed to pr_centermonitor.
... timeout the amount of time (in
printervaltime units) that the thread is willing to wait for an explicit notification before being rescheduled.
PR_Connect
syntax #include <prio.h> prstatus pr_connect( prfiledesc *fd, const prnetaddr *addr,
printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket.
... timeout a value of type
printervaltime specifying the time limit for completion of the connect operation.
PR_IntervalNow
syntax #include <prinrval.h>
printervaltime pr_intervalnow(void); returns a
printervaltime object.
... prstatus rv;
printervaltime epoch = pr_intervalnow(); pr_lock(data->mutex); while (!evaluatedata(data)) /* wait until condition is met */ { pruint32 delta = pr_intervaltomilliseconds(pr_intervalnow() - epoch); if (delta > interval) break; /* timeout */ rv = pr_wait(data->condition, pr_millisecondstointerval(interval - delta)); if (pr_failure == rv) break; /* likely an interrupt */ } pr_u...
PR_LOG
possible values are: pr_log_none = 0 pr_log_always = 1 pr_log_error = 2 pr_log_warning = 3 pr_log_debug = 4 pr_log_notice = pr_log_debug pr_log_warn = pr_log_warning pr_log_min = pr_log_debug pr_log_max = pr_log_debug _args a variable length argument list, as if to
printf.
...for a description of formatting and format strings, see "formatted
printing".
PR_Poll
syntax #include <prio.h>
print32 pr_poll( prpolldesc *pds,
printn npds,
printervaltime timeout); parameters the function has the following parameters: pds a pointer to the first element of an array of prpolldesc structures.
... the prpolldesc structure is defined as follows: struct prpolldesc { prfiledesc* fd;
print16 in_flags;
print16 out_flags; }; typedef struct prpolldesc prpolldesc; the structure has the following fields: fd a pointer to a prfiledesc object representing a socket or a pollable event.
PR_QueueJob_Timer
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_timer( prthreadpool *tpool,
printervaltime timeout, prjobfn fn, void * arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
... timeout a value, expressed as a
printervaltime, to wait before queuing the job.
PR_Recv
syntax #include <prio.h>
print32 pr_recv( prfiledesc *fd, void *buf,
print32 amount,
printn flags,
printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket.
... timeout a value of type
printervaltime specifying the time limit for completion of the receive operation.
PR_RecvFrom
syntax #include <prio.h>
print32 pr_recvfrom( prfiledesc *fd, void *buf,
print32 amount,
printn flags, prnetaddr *addr,
printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket.
... timeout a value of type
printervaltime specifying the time limit for completion of the receive operation.
PR_Send
syntax #include <prio.h>
print32 pr_send( prfiledesc *fd, const void *buf,
print32 amount,
printn flags,
printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket.
... timeout a value of type
printervaltime specifying the time limit for completion of the receive operation.
PR_SendTo
syntax #include <prio.h>
print32 pr_sendto( prfiledesc *fd, const void *buf,
print32 amount,
printn flags, const prnetaddr *addr,
printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket.
... timeout a value of type
printervaltime specifying the time limit for completion of the receive operation.
PR_Wait
syntax #include <prmon.h> prstatus pr_wait( prmonitor *mon,
printervaltime ticks); parameters the function has the following parameter: mon a reference to an existing structure of type prmonitor.
... ticks the amount of time (in
printervaltime units) that the thread is willing to wait for an explicit notification before being rescheduled.
PR_Writev
syntax #include <prio.h>
print32 pr_writev( prfiledesc *fd, priovec *iov,
print32 size,
printervaltime timeout); #define pr_max_iovector_size 16 parameters the function has the following parameters: fd a pointer to a prfiledesc object for a socket.
... timeout a value of type
printervaltime describing the time limit for completion of the entire write operation.
NSPR API Reference
nd constants interval functions date and time types and constants time parameter callback functions functions memory management operations memory allocation functions memory allocation macros string operations pl_strlen pl_strcpy pl_strdup pl_strfree floating point number to string conversion pr_strtod pr_dtoa pr_cnvtf long long (64-bit) integers bitmaps formatted
printing linked lists linked list types prclist linked list macros pr_init_clist pr_init_static_clist pr_append_link pr_insert_link pr_next_link pr_prev_link pr_remove_link pr_remove_and_init_link pr_insert_before pr_insert_after dynamic library linking library linking types prlibrary prstaticlinktable library linking functions...
...ng the attributes of a new process creating and managing processes multiwait receive system information and environment variables logging conditional compilation and execution log types and variables prlogmoduleinfo prlogmodulelevel nspr_log_modules nspr_log_file logging functions and macros pr_newlogmodule pr_setlogfile pr_setlogbuffering pr_log
print pr_logflush pr_log_test pr_log pr_assert pr_assert pr_not_reached use example instrumentation counters named shared memory shared memory protocol named shared memory functions anonymous shared memory anonymous memory protocol anonymous shared memory functions ipc semaphores ipc semaphore functions thread pools thread pool types thread pool functions...
NSS 3.28.5 release notes
notable changes in nss 3.28.5 the following ca certificates were removed: o = japanese government, ou = applicationca sha-256 finger
print: 2d:47:43:7d:e1:79:51:21:5a:12:f3:c5:8e:51:c7:29:a5:80:26:ef:1f:cc:0a:5f:b3:d9:dc:01:2f:60:0d:19 cn = wellssecure public root certificate authority sha-256 finger
print: a7:12:72:ae:aa:a3:cf:e8:72:7f:7f:b3:9f:0f:b3:d1:e5:42:6e:90:60:b0:6e:e6:f1:3e:9a:3c:58:33:cd:43 cn=tÜrktrust elektronik sertifika hizmet sağlayıcısı h6 sha-256 finger
print: 8d:e7:86...
...:55:e1:be:7f:78:47:80:0b:93:f6:94:d2:1d:36:8c:c0:6e:03:3e:7f:ab:04:bb:5e:b9:9d:a6:b7:00 cn=microsec e-szigno root sha-256 finger
print: 32:7a:3d:76:1a:ba:de:a0:34:eb:99:84:06:27:5c:b1:a4:77:6e:fd:ae:2f:df:6d:01:68:ea:1c:4f:55:67:d0 the following ca certificates were added: cn = d-trust root ca 3 2013 sha-256 finger
print: a1:a8:6d:04:12:1e:b8:7f:02:7c:66:f5:33:03:c2:8e:57:39:f9:43:fc:84:b3:8a:d6:af:00:90:35:dd:94:57 trust flags: email cn = tubitak kamu sm ssl kok sertifikasi - surum 1 sha-256 finger
print: 46:ed:c3:68:90:46:d5:3a:45:3f:b3:10:4a:b8:0d:ca:ec:65:8b:26:60:ea:16:29:dd:7e:86:79:90:64:87:16 trust flags: websites technically constrained to: gov.tr, k12.tr, pol.tr, mil.tr, tsk.tr, kep.tr, bel.tr, edu.
NSS 3.30.2 release notes
notable changes in nss 3.30.2 the following ca certificates were removed: o = japanese government, ou = applicationca sha-256 finger
print: 2d:47:43:7d:e1:79:51:21:5a:12:f3:c5:8e:51:c7:29:a5:80:26:ef:1f:cc:0a:5f:b3:d9:dc:01:2f:60:0d:19 cn = wellssecure public root certificate authority sha-256 finger
print: a7:12:72:ae:aa:a3:cf:e8:72:7f:7f:b3:9f:0f:b3:d1:e5:42:6e:90:60:b0:6e:e6:f1:3e:9a:3c:58:33:cd:43 cn=tÜrktrust elektronik sertifika hizmet sağlayıcısı h6 sha-256 finger
print: 8d:e7:86...
...:55:e1:be:7f:78:47:80:0b:93:f6:94:d2:1d:36:8c:c0:6e:03:3e:7f:ab:04:bb:5e:b9:9d:a6:b7:00 cn=microsec e-szigno root sha-256 finger
print: 32:7a:3d:76:1a:ba:de:a0:34:eb:99:84:06:27:5c:b1:a4:77:6e:fd:ae:2f:df:6d:01:68:ea:1c:4f:55:67:d0 the following ca certificates were added: cn = d-trust root ca 3 2013 sha-256 finger
print: a1:a8:6d:04:12:1e:b8:7f:02:7c:66:f5:33:03:c2:8e:57:39:f9:43:fc:84:b3:8a:d6:af:00:90:35:dd:94:57 trust flags: email cn = tubitak kamu sm ssl kok sertifikasi - surum 1 sha-256 finger
print: 46:ed:c3:68:90:46:d5:3a:45:3f:b3:10:4a:b8:0d:ca:ec:65:8b:26:60:ea:16:29:dd:7e:86:79:90:64:87:16 trust flags: websites technically constrained to: gov.tr, k12.tr, pol.tr, mil.tr, tsk.tr, kep.tr, bel.tr, edu.
NSS 3.39 release notes
the following ca certificates were added: ou = globalsign root ca - r6 sha-256 finger
print: 2cabeafe37d06ca22aba7391c0033d25982952c453647349763a3ab5ad6ccf69 cn = oiste wisekey global root gc ca sha-256 finger
print: 8560f91c3624daba9570b5fea0dbe36ff11a8323be9486854fb3f34a5571198d the following ca certificate was removed: cn = comsign sha-256 finger
print: ae4457b40d9eda96677b0d3c92d57b5177abd7ac1037958356d1e094518be5f2 t...
...he following ca certificates had the websites trust bit disabled: cn = certplus root ca g1 sha-256 finger
print: 152a402bfcdf2cd548054d2275b39c7fca3ec0978078b0f0ea76e561a6c7433e cn = certplus root ca g2 sha-256 finger
print: 6cc05041e6445e74696c4cfbc9f80f543b7eabbb44b4ce6f787c6a9971c42f17 cn = opentrust root ca g1 sha-256 finger
print: 56c77128d98c18d91b4cfdffbc25ee9103d4758ea2abad826a90f3457d460eb4 cn = opentrust root ca g2 sha-256 finger
print: 27995829fe6a7515c1bfe848f9c4761db16c225929257bf40d0894f29ea8baf2 cn = opentrust root ca g3 sha-256 finger
print: b7c36231706e81078c367cb896198f1e3208dd926949dd8f5709a410f75b6292 bugs fixed in nss 3.39 bug 1483128 - nss responded to an s...
NSS 3.43 release notes
note that while the mechanism is present, post-handshake authentication is currently not tls 1.3 compliant due to bug 1532312 notable changes in nss 3.43 the following ca certificates were added: cn = emsign root ca - g1 sha-256 finger
print: 40f6af0346a99aa1cd1d555a4e9cce62c7f9634603ee406615833dc8c8d00367 cn = emsign ecc root ca - g3 sha-256 finger
print: 86a1ecba089c4a8d3bbe2734c612ba341d813e043cf9e8a862cd5c57a36bbe6b cn = emsign root ca - c1 sha-256 finger
print: 125609aa301da0a249b97a8239cb6a34216f44dcac9f3954b14292f2e8c8608f cn = emsign ecc root ca - c3 sha-256 finger
print: bc4d809b15189d7...
...8db3e1d8cf4f9726a795da1643ca5f1358e1ddb0edc0d7eb3 cn = hongkong post root ca 3 sha-256 finger
print: 5a2fc03f0c83b090bbfa40604b0988446c7636183df9846e17101a447fb8efd6 the following ca certificates were removed: none bugs fixed in nss 3.43 bug 1528669 and bug 1529308 - improve gyp build system handling bug 1529950 and bug 1521174 - improve nss s/mime tests for thunderbird bug 1530134 - if docker isn't installed, try running a local clang-format as a fallback bug 1531267 - enable fips mode automatically if the system fips mode flag is set bug 1528262 - add a -j option to the strsclnt command to specify sigschemes bug 1513909 - add manual for nss-policy-check bug 1531074 - fix a deref after a null check in seckey_setpublicvalue bug 1517714 - properly hand...
NSS Sample Code Sample1
// utility function to
print hex data static void
printbuffer(unsigned char *digest, unsigned int len) { int i; cout << "length: " << len << endl; for(i = 0;i < len;i++)
printf("%02x ", digest[i]); cout << endl; } // xxx data protection // - takes an input buffer, applies the encryption // and mac, and generates a buffer with the result.
...so that it can // be sent to server 1 rv = server2->exportpublickey(&pubkeydata); if (rv) { cout << "exportpublickey failed" << endl; goto trans_done; } // send the public key to server 1 and get back the // wrapped key values rv = server1->exportkeys(pubkeydata, &wrappedenckey, &wrappedmackey); if (rv) { cout << "exportkeys failed" << endl; goto trans_done; } //
print - for information cout << "wrapped encryption key" << endl;
printbuffer(wrappedenckey->data, wrappedenckey->len); cout << "wrapped mac key" << endl;
printbuffer(wrappedmackey->data, wrappedmackey->len); // import the keys into server 2 - this just puts the wrapped // values into the "files" rv = server2->importkeys(wrappedenckey, wrappedmackey); if (rv) { cout << ...
FC_GetInfo
examples note the use of the %.32s format string to
print the manufacturerid and librarydescription members of the ck_info structure.
... /* invoke fc_getinfo as pfunctionlist->c_getinfo */ crv = pfunctionlist->c_getinfo(&info); assert(crv == ckr_ok);
printf("general information about the pkcs #11 library:\n");
printf(" pkcs #11 version: %d.%d\n", (int)info.cryptokiversion.major, (int)info.cryptokiversion.minor);
printf(" manufacturer id: %.32s\n", info.manufacturerid);
printf(" flags: 0x%08lx\n", info.flags);
printf(" library description: %.32s\n", info.librarydescription);
printf(" library version: %d.%d\n", (int)info.libraryversion.major, (int)info.libraryversion.minor);
printf("\n"); see also nsc_getinfo ...
NSS tools : signver
signver -v -s signature_file -i signed_file -d sql:/home/my/sharednssdb signaturevalid=yes
printing signature data the -a option
prints all of the information contained in a signature file.
... using the -o option
prints the signature file information to the given output file rather than stdout.
Rhino JavaScript compiler
note that the top-level functions available to the shell (such as
print) are not available to compiled scripts when they are run outside the shell.
... examples $ cat test.js java.lang.system.out.
println("hi, mom!"); $ java org.mozilla.javascript.tools.jsc.main test.js $ ls *.class test.class $ java test hi, mom!
Rhino serialization
however, you can run into problems with serialization of compiled functions and scripts: $ cat test.jsfunction f() { return 3; } serialize(f, "f.ser"); g = deserialize("f.ser");
print(g()); $ java org.mozilla.javascript.tools.shell.main -opt -1test.js 3 $ java org.mozilla.javascript.tools.shell.main test.js js: uncaught javascript exception: java.lang.classnotfoundexception:c1 the problem is that java serialization has no built-in way to serialize java classes themselves.
...the java bytecodes in an array and then load the class upon deserialization, but at best that would eat up a lot of memory for just this feature.) one way around this is to compile the functions using the jsc tool: $ cat f.js function f() { return 3; } $ java -classpath js.jarorg.mozilla.javascript.tools.jsc.main f.js $ cat test2.js loadclass("f"); serialize(f, "f.ser"); g = deserialize("f.ser");
print(g()); $ java -classpath 'js.jar;.'org.mozilla.javascript.tools.shell.main test2.js 3 now the function f is compiled to a java class, but that class is then made available in the classpath so serialization works.
JS_ReportError
format const char * format string to convert into an error message using js_vsm
printf.
...first it builds an error message from the given s
printf-style format string and any additional arguments passed after it.
JSAPI reference
ey 1.8 obsolete since jsapi 26 js_call_tracer added in spidermonkey 1.8 obsolete since jsapi 23 js_call_value_tracer added in spidermonkey 1.8 obsolete since jsapi 23 js_call_object_tracer added in spidermonkey 1.8 obsolete since jsapi 23 js_call_string_tracer added in spidermonkey 1.8 obsolete since jsapi 23 js_call_double_tracer added in spidermonkey 1.8 obsolete since javascript 1.8.5 js_
printtracethinginfo (debug-only) added in spidermonkey 1.8 obsolete since jsapi 16 miscellaneous gc apis: js_updatemalloccounter added in spidermonkey 17 js::setlargeallocationfailurecallback added in spidermonkey 31 js::setoutofmemorycallback added in spidermonkey 31 js_enumeratediagnosticmemoryregions added in spidermonkey 17 jsval_lock obsolete since jsapi 18 jsval_unlock obsolete since...
... - used by js_setobjectprincipalsfinder obsolete since javascript 1.8 jsprincipalstranscoder - used by js_setprincipalstranscoder obsolete since javascript 1.8 jsstringfinalizeop - used by js_addexternalstringfinalizer obsolete since jsapi 13 jstracecallback - used by js_tracer_init obsolete since jsapi 12 jstracedataop - used by js_setextragcroots obsolete since jsapi 25 jstracename
printer - used by js_set_tracing_details obsolete since jsapi 26 see also classes, above.
Toolkit API
these services include: profile management chrome registration browsing history extension and theme management application update service safe mode
printing official references structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xu...
...lrunner applications chrome registration
printing in xul apps see also the following developer pages contain examples and discussions of particular topics: xul xul overlays developing extensions xulrunner developing themes dom rdf storage ...
Creating a Python XPCOM component
def __del__(self): if verbose:
print "pysimple: __del__ method called - object is destructing" def write(self):
print self.yourname def change(self, newname): self.yourname = newname then register your component; the procedure is the same for any component, but will not work if python components weren't enabled.
...testing it to see this work, you will have to start firefox from the command line, since that'll be where the stuff will be
printed out.
Generating GUIDs
shrc file: uuidgen-c++() { local uuid=$(uuidgen) echo "// $uuid" echo "#define ns__iid \\" echo "{ 0x${uuid:0:8}, 0x${uuid:9:4}, 0x${uuid:14:4}, \\" echo -n " { 0x${uuid:19:2}, 0x${uuid:21:2}, 0x${uuid:24:2}, " echo -n "0x${uuid:26:2}, 0x${uuid:28:2}, 0x${uuid:30:2}, " echo "0x${uuid:32:2}, 0x${uuid:34:2} } }" } perl #!/usr/bin/perl $uuid = `uuidgen`; chomp $uuid;
print $uuid, "\n"; @parts = ($uuid =~ /^(.{8})-(.{4})-(.{4})-(..)(..)-(..)(..)(..)(..)(..)(..)$/);
print "{ 0x$parts[0], 0x$parts[1], 0x$parts[2], \\", "\n", " { "; for (3 ..
... 9) {
print "0x$parts[$_], "; }
print "0x$parts[10] } }", "\n"; ...
Finishing the Component
in the weblock component, the shouldload method looks like this: ns_imethodimp weblock::shouldload(
print32 contenttype, nsiuri *contentlocation, nsisupports *ctxt, nsidomwindow *window, prbool *_retval) uniform resource locators the method passes in an interface pointer of type nsiuri, which is based on the uniform resource identifier, or uri.
... here is the complete implementation of the shouldload() method: ns_imethodimp weblock::shouldload(
print32 contenttype, nsiuri *contentlocation, nsisupports *ctxt, nsidomwindow *window, prbool *_retval) { if (!contentlocation) return ns_error_failure; nsembedcstring scheme; contentlocation->getscheme(scheme); if (strcmp("http", scheme.get()) != 0 && strcmp("https", scheme.get()) != 0 && strcmp...
Setting up the Gecko SDK
application name description of functionality regxpcom.exe registers or unregisters components with xpcom xpidl.exe generates typelib and c++ headers from xpidl xpt_dump.exe
prints out information about a given typelib xpt_link.exe combines multiple typelibs into a single typelib library name description of functionality xpcomglue.lib xpcom glue library to be used by xpcom components.
...(l"default name"); } cspecialthing::~cspecialthing() { /* destructor code */ } /* attribute astring name; */ ns_imethodimp cspecialthing::getname(nsastring & aname) { aname.assign(mname); return ns_ok; } ns_imethodimp cspecialthing::setname(const nsastring & aname) { mname.assign(aname); return ns_ok; } /* long add (in long a, in long b); */ ns_imethodimp cspecialthing::add(
print32 a,
print32 b,
print32 *_retval) { *_retval = a + b; return ns_ok; } this is generally your code.
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.nsibinaryinputstream); bis.setinputstream(someinputstream); // succeeds now } if two arguments are given, the created inst...
...ance 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.
amIInstallCallback
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void oninstallended(in astring aurl, in
print32 astatus); methods oninstallended() called when an install completes or fails.
... void oninstallended( in astring aurl, in
print32 astatus ); parameters aurl the url of the add-on being installed.
amIInstallTrigger
supports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean enabled(); boolean install(in nsivariant aargs, [optional] in amiinstallcallback acallback); boolean installchrome(in pruint32 atype, in astring aurl, in astring askin); deprecated since gecko 2.0 boolean startsoftwareupdate(in astring aurl, [optional] in
print32 aflags); deprecated since gecko 2.0 boolean updateenabled(); deprecated since gecko 2.0 constants retained for backwards compatibility.
... boolean startsoftwareupdate( in astring aurl, in
print32 aflags optional ); parameters aurl the url of the add-on.
mozIStorageAggregateFunction
class standarddeviationfunc : public mozistorageaggregatefunction { public: ns_imethod onstep(mozistoragevaluearray *aarguments) {
print32 value; nsresult rv = aarguments->getint32(&value); ns_ensure_success(rv, rv); mnumbers.appendelement(value); } ns_imethod onfinal(nsivariant **_result) {
print64 total = 0; for (pruint32 i = 0; i < mnumbers.length(); i++) total += mnumbers[i];
print32 mean = total / mnumbers.length(); nstarray<
print64> data(mnumbers); for (pruint32 i = 0; i < data.
...length(); i++) {
print32 value = data[i] - mean; data[i] = value * value; } total = 0; for (pruint32 i = 0; i < data.length(); i++) total += data[i]; nscomptr<nsiwritablevariant> result = do_createinstance("@mozilla.org/variant;1"); ns_ensure_true(result, ns_error_out_of_memory); rv = result->setasdouble(sqrt(double(total) / double(data.length()))); ns_ensure_success(rv, rv); ns_addref(*_result = result); return ns_ok; } private: nstarray<
print32> mnumbers; }; // now, register our function with the database connection.
nsIAbCard
inherits from: nsisupports method overview astring getcardvalue(in string name) void setcardvalue(in string attrname, in astring value) void copy(in nsiabcard srccard) boolean equals(in nsiabcard card) string converttobase64encodedxml() astring converttoxml
printdata() string converttoescapedvcard() astring generatename(in long agenerateformat,[optional] in nsistringbundle abundle) astring generatephoneticname(in boolean alastnamefirst) attributes attribute type description firstname astring lastname astring phoneticfirstname astring phoneticlastn...
... converttobase64encodedxml() string converttobase64encodedxml() return value converttoxml
printdata() astring converttoxml
printdata() return value converttoescapedvcard() string converttoescapedvcard() return value generatename() generate a name from the card for display purposes.
nsIAnnotationService
ary(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
print32 aflags, out unsigned short aexpiration, out autf8string amimetype, out unsigned short atype); void getitemannotationinfo(in long long aitemid, in autf8string aname, out long aflags, out unsigned short aexpiration, out autf8string amimetype, out unsigned short atype); pruint16 getpageannotationtype(in nsiuri auri, in autf8string aname); pruint16 getitemannotationtype(i...
... void getpageannotationinfo( in nsiuri auri, in autf8string aname, out
print32 aflags, out unsigned short aexpiration, out autf8string amimetype, out unsigned short atype ); parameters auri the uri on which the annotation is set.
nsICookieManager2
to create an object implementing this interface: components.utils.import("resource://gre/modules/services.jsm"); var cookieservice = services.cookies; method overview void add(in autf8string ahost, in autf8string apath, in acstring aname, in acstring avalue, in boolean aissecure, in boolean aishttponly, in boolean aissession, in
print64 aexpiry); boolean cookieexists(in nsicookie2 acookie); unsigned long countcookiesfromhost(in autf8string ahost); boolean findmatchingcookie(in nsicookie2 acookie, out unsigned long acountfromhost); obsolete since gecko 1.9 nsisimpleenumerator getcookiesfromhost(in autf8string ahost); void importcookies(in nsifile acookiefile); methods add...
... void add( in autf8string ahost, in autf8string apath, in acstring aname, in acstring avalue, in boolean aissecure, in boolean aishttponly, in boolean aissession, in
print64 aexpiry ); parameters ahost the host or domain for which the cookie is set.
nsICookiePermission
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview nscookieaccess canaccess(in nsiuri auri, in nsichannel achannel); boolean cansetcookie(in nsiuri auri, in nsichannel achannel, in nsicookie2 acookie, inout boolean aissession, inout
print64 aexpiry); nsiuri getoriginatinguri(in nsichannel achannel); void setaccess(in nsiuri auri, in nscookieaccess aaccess); constants constant value description access_default 0 nscookieaccess's access default value access_allow 1 nscookieaccess's access allow value access_deny 2 nscookieaccess's access deny value access_session 8 additional values for nscookieaccess, which are no...
...boolean cansetcookie( in nsiuri auri, in nsichannel achannel, in nsicookie2 acookie, inout boolean aissession, inout
print64 aexpiry ); parameters auri the uri trying to set the cookie.
nsIDOMWindowUtils
sitionstring, in long afirstclauselength, in unsigned long afirstclauseattr, in long asecondclauselength, in unsigned long asecondclauseattr, in long athirdclauselength, in unsigned long athirdclauseattr, in long acaretstart, in long acaretlength); obsolete since gecko 26 boolean sendtouchevent(in astring atype, [array, size_is(count)] in pruint32 aidentifiers, [array, size_is(count)] in
print32 axs, [array, size_is(count)] in
print32 ays, [array, size_is(count)] in pruint32 arxs, [array, size_is(count)] in pruint32 arys, [array, size_is(count)] in float arotationangles, [array, size_is(count)] in float aforces, in pruint32 count, in long amodifiers, [optional] in boolean aignorerootscrollframe); void setcssviewport(in float awidthpx, in float aheightpx); void setdi...
... boolean sendtouchevent( in astring atype, [array, size_is(count)] in pruint32 aidentifiers, [array, size_is(count)] in
print32 axs, [array, size_is(count)] in
print32 ays, [array, size_is(count)] in pruint32 arxs, [array, size_is(count)] in pruint32 arys, [array, size_is(count)] in float arotationangles, [array, size_is(count)] in float aforces, in pruint32 count, in long amodifiers, [optional] in boolean aignorerootscrollframe ); parameters atype the touch event type to dispatch to the window.
getFile
ns_win_controls_dir "cntls" ns_win_
printers_dir "prnts" ns_win_personal_dir "pers" ns_win_favorites_dir "favs" ns_win_startup_dir "strt" ns_win_recent_dir "rcnt" ns_win_send_to_dir "sndto" ns_win_bitbucket_dir "buckt" ns_win_startmenu_dir "strt" same thing as ns_os_desktop_dir ns_win_desktop_directory ...
...r "fnts" ns_win_templates_dir "tmpls" ns_win_common_startmenu_dir "cmstrt" ns_win_common_programs_dir "cmprgs" ns_win_common_startup_dir "cmstrt" ns_win_common_desktop_directory "cmdeskp" ns_win_appdata_dir "appdata" ns_win_local_appdata_dir "localappdata" ns_win_
printhood "prnthd" ns_win_cookies_dir "cookd" available on unix only these locations are supported only on unix builds of firefox os.
nsIDocShell
parentcharsetsource
print32 indicates the source from which the character set being used was obtained.
...
printpreview nsiwebbrowser
print if the current content viewer is not initialized for
print preview, it is replaced with one which is and to which an about:blank document is loaded.
nsIGlobalHistory3
method overview void adddocumentredirect(in nsichannel aoldchannel, in nsichannel anewchannel, in
print32 aflags, in boolean atoplevel); unsigned long geturigeckoflags(in nsiuri auri); void seturigeckoflags(in nsiuri auri, in unsigned long aflags); methods adddocumentredirect() notifies the history system that the page loading via aoldchannel redirected to anewchannel.
...void adddocumentredirect( in nsichannel aoldchannel, in nsichannel anewchannel, in
print32 aflags, in boolean atoplevel ); parameters aoldchannel anewchannel aflags flags to add.
nsIHttpChannelInternal
localport
print32 the local port number to which the channel is bound.
... remoteport
print32 the remote port number to which the channel is bound.
nsILocalFile
void reveal(); void setrelativedescriptor(in nsilocalfile fromfile, in acstring relativedesc); attributes attribute type description diskspaceavailable
print64 the number of bytes available to non-superuser on the disk volume containing the nsilocalfile.
... nsresult readlocalfile(nsilocalfile *alocalfile) { prfiledesc *fd; nsresult rv = alocalfile->opennsprfiledesc(pr_rdonly, 0, &fd); if (ns_failed(rv)) return rv; char buf[512];
print32 n; while ((n = pr_read(fd, buf, sizeof(buf))) > 0) { // do something with n-byte block of data from file...
nsIMemoryMultiReporterCallback
1.0 66 introduced gecko 7.0 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) method overview void callback(in acstring process, in autf8string path, in
print32 kind, in
print32 units, in
print64 amount, in autf8string description, in nsisupports closure); methods callback() called to provide information from a multi-reporter.
...void callback( in acstring process, in autf8string path, in
print32 kind, in
print32 units, in
print64 amount, in autf8string description, in nsisupports closure ); parameters process the value of the process attribute for the memory reporter.
nsIMemoryReporterManager
void registermultireporter(in nsimemorymultireporter reporter); void registerreporter(in nsimemoryreporter reporter); void unregistermultireporter(in nsimemorymultireporter reporter); void unregisterreporter(in nsimemoryreporter reporter); attributes attribute type description explicit
print64 gets the total size of explicit memory allocations, both at the operating system level (for example, via mmap, virtualalloc) and at the heap level (for example, via malloc(), calloc(), operator new).
... resident
print64 gets the resident size (that is rss, physical memory used).
nsIPromptService
ext); void alertcheck(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, in wstring acheckmsg, inout boolean acheckstate); boolean confirm(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext); boolean confirmcheck(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, in wstring acheckmsg, inout boolean acheckstate);
print32 confirmex(in nsidomwindow aparent,in wstring adialogtitle,in wstring atext, in unsigned long abuttonflags,in wstring abutton0title, in wstring abutton1title,in wstring abutton2title,in wstring acheckmsg, inout boolean acheckstate); boolean prompt(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, inout wstring avalue, in wstring acheckmsg, inout boolean acheckstate); ...
...bug 345067
print32 confirmex( in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, in unsigned long abuttonflags, in wstring abutton0title, in wstring abutton1title, in wstring abutton2title, in wstring acheckmsg, inout boolean acheckstate ); parameters aparent the parent window for the dialog.
nsISSLErrorListener
method overview boolean notifysslerror(in nsiinterfacerequestor socketinfo, in
print32 error, in autf8string targetsite); methods notifysslerror() called in case of an ssl error.
... boolean notifysslerror( in nsiinterfacerequestor socketinfo, in
print32 error, in autf8string targetsite ); parameters socketinfo a network communication context that can be used to obtain more information about the active connection.
nsIStackFrame
linenumber
print32 valid line numbers begin at '1'.
... example to output the stack at a particular location: var s = components.stack; while(s) { console.log(s.name); s = s.caller; } methods tostring() a generic formatter - make it suitable to
print, and so forth.
nsIStringBundle
this uses nstextformatter::sm
printf.
...this uses nstextformatter::sm
printf to do the dirty work.
nsISupports proxies
it has two entry points: ns_imethod getproxyforobject(nsieventqueue *destqueue, const nsiid & iid, nsisupports *object,
print32 proxytype, void * *result); ns_imethod getproxy(nsieventqueue *destqueue, const nsiid & cid, nsisupports *aouter, const nsiid & iid,
print32 proxytype, void * *result); the two apis are essentially the same.
... bar(
print32 *x) { ...
nsIXPConnect
nsistackframe createstackframelocation(in pruint32 alanguage, in string afilename, in string afunctionname, in
print32 alinenumber, in nsistackframe acaller); void debugdump(in short depth); void debugdumpevalinjsstackframe(in pruint32 aframenumber, in string asourcetext); void debugdumpjsstack(in prbool showargs, in prbool showlocals, in prbool showthisprops); void debugdumpobject(in nsisupports acomobj, in short depth); [noscript,notxpcom] prbool definedomquickstub...
... return value missing description exceptions thrown missing exception missing description createstackframelocation() nsistackframe createstackframelocation( in pruint32 alanguage, in string afilename, in string afunctionname, in
print32 alinenumber, in nsistackframe acaller ); parameters alanguage missing description afilename missing description afunctionname missing description alinenumber missing description acaller missing description return value missing description exceptions thrown missing exception missing description debugdump() void debugdump( in short depth ); parameters depth miss...
nsIXULTemplateQueryProcessor
method overview void addbinding(in nsidomnode arulenode, in nsiatom avar, in nsiatom aref, in astring aexpr);
print32 compareresults(in nsixultemplateresult aleft, in nsixultemplateresult aright, in nsiatom avar, in unsigned long asorthints); nsisupports compilequery(in nsixultemplatebuilder abuilder, in nsidomnode aquery, in nsiatom arefvariable, in nsiatom amembervariable); void done(); nsisimpleenumerator generateresults(in nsisupports adatasource, in nsixultemplateresult aref, in nsisupports aquery);...
...
print32 compareresults( in nsixultemplateresult aleft, in nsixultemplateresult aright, in nsiatom avar, in unsigned long asorthints ); parameters aleft the left result to compare.
nsIXULWindow
void assumechromeflagsarefrozen(); void center(in nsixulwindow arelative, in boolean ascreen, in boolean aalert); nsixulwindow createnewwindow(in
print32 achromeflags, in nsiappshell aappshell); nsidocshelltreeitem getcontentshellbyid(in wstring id); void removechildwindow(in nsixulwindow achild); void showmodal(); attributes attribute type description chromeflags pruint32 chromeflags are from nsiwebbrowserchrome.
... nsixulwindow createnewwindow( in
print32 achromeflags, in nsiappshell aappshell ); parameters achromeflags see nsiwebbrowserchrome.
nsIXmlRpcFault
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void init(in
print32 faultcode, in string faultsring); string tostring(); attributes attribute type description faultcode
print32 read only.
... methods init() void getdata( in
print32 faultcode, in string faultstring ); parameters faultcode tostring() string tostring(); ...
XPCOM Interface Reference
iewobservernsinavhistoryresultviewernsinavhistoryservicensinavhistoryvisitresultnodensinetworklinkservicensiobservernsiobserverservicensioutputstreamnsioutputstreamcallbacknsiparentalcontrolsservicensiparserutilsnsipasswordnsipasswordmanagernsipermissionnsipermissionmanagernsipipensiplacesimportexportservicensiplacesviewnsipluginhostnsiprefbranch2nsipreflocalizedstringnsiprefservicensiprincipalnsi
printerenumeratornsi
printingpromptnsiprivatebrowsingservicensiprocessnsiprocess2nsiprocessscriptloadernsiprofilensiprofilelocknsiprofileunlockernsiprogramminglanguagensiprogresseventsinknsipromptnsipromptservicensipropertiesnsipropertynsipropertybagnsipropertybag2nsipropertyelementnsiprotocolhandlernsiprotocolproxycallbacknsiprotocolproxyfilternsiprotocolproxyservicensiproxyinfonsipushmessagensipushser...
...icensisoundnsispeculativeconnectnsistackframensistandardurlnsistreamconverternsistreamlistenernsistringbundlensistringbundleoverridensistringbundleservicensistringenumeratornsistructuredclonecontainernsistylesheetservicensisupportsnsisupports proxiesnsisupportsarraynsisupportscstringnsisupportscharnsisupportsdoublensisupportsfloatnsisupportsidnsisupportsinterfacepointernsisupportsprboolnsisupports
print16nsisupports
print32nsisupports
print64nsisupportsprtimensisupportspruint8nsisupportspruint16nsisupportspruint32nsisupportspruint64nsisupportsprimitivensisupportsprioritynsisupportsstringnsisupportsvoidnsisupportsweakreferencensisyncjpakensisyncmessagesendernsitxttohtmlconvnsitaggingservicensitaskbarpreviewnsitaskbarpreviewbuttonnsitaskbarpreviewcontrollernsitaskbarprogressnsitaskbartabpreviewnsita...
XPCOM primitive
a.org/supports-prtime;1 [scriptable, uuid(e2563630-4a1c-11d3-9890-006008962422)] interface nsisupportsprtime : nsisupportsprimitive { attribute prtime data; string tostring(); }; char nsisupportschar @mozilla.org/supports-char;1 [scriptable, uuid(e2b05e40-4a1c-11d3-9890-006008962422)] interface nsisupportschar : nsisupportsprimitive { attribute char data; string tostring(); };
print16 nsisupports
print16 @mozilla.org/supports-
print16;1 [scriptable, uuid(e30d94b0-4a1c-11d3-9890-006008962422)] interface nsisupports
print16 : nsisupportsprimitive { attribute
print16 data; string tostring(); };
print32 nsisupports
print32 @mozilla.org/supports-
print32;1 [scriptable, uuid(e36c5250-4a1c-11d3-9890-006008962422)] interface nsisupports
print32 : nsisupportsprimitive { attri...
...bute
print32 data; string tostring(); };
print64 nsisupports
print64 @mozilla.org/supports-
print64;1 [scriptable, uuid(e3cb0ff0-4a1c-11d3-9890-006008962422)] interface nsisupports
print64 : nsisupportsprimitive { attribute
print64 data; string tostring(); }; float nsisupportsfloat @mozilla.org/supports-float;1 [scriptable, uuid(abeaa390-4ac0-11d3-baea-00805f8a5dd7)] interface nsisupportsfloat : nsisupportsprimitive { attribute float data; string tostring(); }; double nsisupportsdouble @mozilla.org/supports-double;1 [scriptable, uuid(b32523a0-4ac0-11d3-baea-00805f8a5dd7)] interface nsisupportsdouble : nsisupportsprimitive { attribute double data; string tostring(); }; voidptr nsisupportsvoid @mozilla.org/supports-void;1 [scriptable, uuid(464484f0-568d-11d3-baf8-...
Storage
after you create and bind a statement, your javascript should look something like this to execute a statement asynchronously: statement.executeasync({ handleresult: function(aresultset) { for (let row = aresultset.getnextrow(); row; row = aresultset.getnextrow()) { let value = row.getresultbyname("column_name"); } }, handleerror: function(aerror) {
print("error: " + aerror.message); }, handlecompletion: function(areason) { if (areason != components.interfaces.mozistoragestatementcallback.reason_finished)
print("query canceled or aborted!"); } }); the call to executeasync takes an object that implements mozistoragestatementcallback.
... in c++, the code would look something like this: bool hasmoredata; while (ns_succeeded(statement->executestep(&hasmoredata)) && hasmoredata) {
print32 value; rv = statement->getint32(0, &value); ns_ensure_success(rv, rv); } you can obtain other types of data by using the various methods available on mozistoragevaluearray.
Troubleshooting XPCOM components registration
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.
... use dyld environment variables to trace binary component loading: dyld_
print_apis=1 dyld_
print_libraries=1 (see `man dyld` for details).
Frequently Asked Questions
ns_precondition "you can't dereference a null nscomptr with operator->()" ns_precondition "you can't dereference a null nscomptr with operator*()" other issues
printf("%x\n", mynscomptr); can cause the program to crash on sigill (illegal instruction), and not on the line with the
printf, which can make it tricky to figure out.
... for debugging purposes you can write
printf("%x\n", mynscomptr.get()); how do i...
Address book sync client design
this method is * called only once, at the beginning of a sync transaction * */ void onstartoperation(in
print32 atransactionid, in pruint32 amsgsize); /** * notify the observer that progress as occurred for the ab sync operation */ void onprogress(in
print32 atransactionid, in pruint32 aprogress, in pruint32 aprogressmax); /** * notify the observer with a status message for sync operation */ void onstatus(in
print32 atransactionid, in wstring amsg); /** ...
... */ void onstopoperation(in
print32 atransactionid, in nsresult astatus, in wstring amsg); }; ...
Demo Addon
let inbox; let
print = function (indent, folder) { let isinbox = folder.getflag(ci.nsmsgfolderflags.inbox); if (isinbox) inbox = folder; str += indent + folder.prettiestname + (isinbox ?
... " *" : "") + "\n"; if (folder.hassubfolders) for each (let folder in fixiterator(folder.subfolders, ci.nsimsgfolder))
print(indent + " ", folder); };
print(" ", folder); as in the previous example, we get the incomingserver of the account in question.
Debugging Tips
printing cdata and ctype currently console.log doesn't show type information of cdata.
...32_t(10); console.log(i.tosource()); let point = ctypes.structtype("point", [{ x: ctypes.int32_t }, { y: ctypes.int32_t }]) let p = point(10, 20); console.log(p.tosource()); let pp = p.address(); console.log(pp.tosource()); the result will be : ctypes.int32_t(10) point(10, 20) point.ptr(ctypes.uint64("0x15fdafb08")) to see the complete type information, you can use .constructor.tosource(), to
print the source of ctype.
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
var rootchildren = new map; function childmapfor(site) { if (!site) return rootchildren; let parentmap = childmapfor(site.parent); if (parentmap.has(site)) return parentmap.get(site); var m = new map; parentmap.set(site, m); return m; } for (let [site, total] of totals) { childmapfor(site); } //
print the allocation count for |site|.
...
print // |children|'s entries as |site|'s child nodes.
Web Console Helpers - Firefox Developer Tools
for example, if you type "2+2 <enter>", then "$_ <enter>", the console will
print 4.
... p
print() obsolete since gecko 74 formats the specified value in a readable way; this is useful for dumping the contents of objects and arrays.
The JavaScript input interpreter - Firefox Developer Tools
for example, if you type "2+2 <enter>", then "$_ <enter>", the console will
print 4.
... p
print() obsolete since gecko 74 formats the specified value in a readable way; this is useful for dumping the contents of objects and arrays.
DataTransfer.items - Web APIs
nt to add to its tree ev.datatransfer.setdata("text/plain", ev.target.id); ev.datatransfer.effectallowed = "move"; } function drop_handler(ev) { console.log("drop: target.id = " + ev.target.id); ev.preventdefault(); // get the id of the target and add the moved element to the target's dom var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); //
print each format type if (ev.datatransfer.types != null) { for (var i=0; i < ev.datatransfer.types.length; i++) { console.log("...
... types[" + i + "] = " + ev.datatransfer.types[i]); } } //
print each item's "kind" and "type" if (ev.datatransfer.items != null) { for (var i=0; i < ev.datatransfer.items.length; i++) { console.log("...
DataTransfer.types - Web APIs
nt to add to its tree ev.datatransfer.setdata("text/plain", ev.target.id); ev.datatransfer.effectallowed = "move"; } function drop_handler(ev) { console.log("drop: target.id = " + ev.target.id); ev.preventdefault(); // get the id of the target and add the moved element to the target's dom var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); //
print each format type if (ev.datatransfer.types != null) { for (var i=0; i < ev.datatransfer.types.length; i++) { console.log("...
... types[" + i + "] = " + ev.datatransfer.types[i]); } } //
print each item's "kind" and "type" if (ev.datatransfer.items != null) { for (var i=0; i < ev.datatransfer.items.length; i++) { console.log("...
Events and the DOM - Web APIs
eventtarget.addeventlistener // assuming mybutton is a button element mybutton.addeventlistener('click', greet, false) function greet(event){ //
print and have a look at the event object // always
print arguments in case of overlooking any other arguments console.log('greet:', arguments) alert('hello world') } this is the method you should use in modern web pages.
... function
print(evt) { // the evt parameter is automatically assigned the event object // take care of the differences between console.log & alert console.log('
print:', evt) alert(evt) } // any function should have an appropriate name, that's what called semantic table_el.onclick =
print ...
Using the Gamepad API - Web APIs
this helps prevent gamepads being used for finger
printing the user.
...when one is connected, we grab the gamepad using navigator.getgamepads()[0],
print information about the gamepad into our gamepad info div, and fire the gameloop() function that starts the whole ball movement process up.
HTMLFrameSetElement - Web APIs
windoweventhandlers.onafter
print is an eventhandler representing the code to be called when the after
print event is raised.
... windoweventhandlers.onbefore
print is an eventhandler representing the code to be called when the before
print event is raised.
HTMLImageElement.height - Web APIs
the height property of the htmlimageelement interface indicates the height at which the image is drawn, in css pixels if the image is being drawn or rendered to any visual medium such as the screen or a
printer; otherwise, it's the natural, pixel density corrected height of the image.
... if the image is being rendered to a visual medium such as a screen or
printer, the height is expressed in css pixels.
HTMLImageElement.width - Web APIs
the width property of the htmlimageelement interface indicates the width at which the image is drawn, in css pixels if the image is being drawn or rendered to any visual medium such as the screen or a
printer; otherwise, it's the natural, pixel density corrected width of the image.
... if the image is being rendered to a visual medium such as a screen or
printer, the width is expressed in css pixels.
KeyboardEvent.keyCode - Web APIs
web developers shouldn't use the keycode attribute for
printable characters when handling keydown and keyup events.
... as described above, the keycode attribute is not useful for
printable characters, especially those input with the shift or alt key pressed.
PerformanceObserverEntryList.getEntries() - Web APIs
example function
print_perf_entry(pe) { console.log("name: " + pe.name + "; entrytype: " + pe.entrytype + "; starttime: " + pe.starttime + "; duration: " + pe.duration); } // create observer for all performance event types var observe_all = new performanceobserver(function(list, obs) { var perfentries; //
print all entries perfentries = list.getentries();...
... for (var i=0; i < perfentries.length; i++) {
print_perf_entry(perfentries[i]); } //
print entries named "begin" with type "mark" perfentries = list.getentriesbyname("begin", "mark"); for (var i=0; i < perfentries.length; i++) {
print_perf_entry(perfentries[i]); } //
print entries with type "mark" perfentries = list.getentriesbytype("mark"); for (var i=0; i < perfentries.length; i++) {
print_perf_entry(perfentries[i]); } }); // subscribe to all performance event types observe_all.observe({entrytypes: ['frame', 'mark', 'measure', 'navigation', 'resource', 'server']}); var observe_frame = new performanceobserver(function(list, obs) { var perfentries = list.getentries(); // should only have 'frame' entries for (var i=0; i < perfentries.length; i++) { pr...
PerformanceObserverEntryList.getEntriesByName() - Web APIs
example function
print_perf_entry(pe) { console.log("name: " + pe.name + "; entrytype: " + pe.entrytype + "; starttime: " + pe.starttime + "; duration: " + pe.duration); } // create observer for all performance event types var observe_all = new performanceobserver(function(list, obs) { var perfentries; //
print all entries perfentries = list.getentries();...
... for (var i=0; i < perfentries.length; i++) {
print_perf_entry(perfentries[i]); } //
print entries named "begin" with type "mark" perfentries = list.getentriesbyname("begin", "mark"); for (var i=0; i < perfentries.length; i++) {
print_perf_entry(perfentries[i]); } //
print entries with type "mark" perfentries = list.getentriesbytype("mark"); for (var i=0; i < perfentries.length; i++) {
print_perf_entry(perfentries[i]); } }); // subscribe to all performance event types observe_all.observe({entrytypes: ['frame', 'mark', 'measure', 'navigation', 'resource', 'server']}); var observe_frame = new performanceobserver(function(list, obs) { var perfentries = list.getentries(); // should only have 'frame' entries for (var i=0; i < perfentries.length; i++) { pr...
PerformanceObserverEntryList.getEntriesByType() - Web APIs
example function
print_perf_entry(pe) { console.log("name: " + pe.name + "; entrytype: " + pe.entrytype + "; starttime: " + pe.starttime + "; duration: " + pe.duration); } // create observer for all performance event types var observe_all = new performanceobserver(function(list, obs) { var perfentries; //
print all entries perfentries = list.getentries();...
... for (var i=0; i < perfentries.length; i++) {
print_perf_entry(perfentries[i]); } //
print entries named "begin" with type "mark" perfentries = list.getentriesbyname("begin", "mark"); for (var i=0; i < perfentries.length; i++) {
print_perf_entry(perfentries[i]); } //
print entries with type "mark" perfentries = list.getentriesbytype("mark"); for (var i=0; i < perfentries.length; i++) {
print_perf_entry(perfentries[i]); } }); // subscribe to all performance event types observe_all.observe({entrytypes: ['frame', 'mark', 'measure', 'navigation', 'resource', 'server']}); var observe_frame = new performanceobserver(function(list, obs) { var perfentries = list.getentries(); // should only have 'frame' entries for (var i=0; i < perfentries.length; i++) { pr...
Using the Performance API - Web APIs
in the following example, json serialization for the performance, performance.timing and performance.navigation objects is
printed in the object element.
... function
print_json() { var json; var o = document.getelementsbytagname("output")[0]; if (window.performance.tojson === undefined) { json = "window.performance.tojson() is not supported"; o.innerhtml += json + "<br>"; } else { var s; json = window.performance.tojson(); //
print the performance object s = json.stringify(json); o.innerhtml = "<p>performance = " + s + "</p>"; //
print the performance.timing and performance.navigation objects var perf = json.parse(s); var timing = perf.timing; o.innerhtml += "<p>peformance.timing = " + json.stringify(timing) + "</p>"; var navigation = perf.navigation; o.innerhtml += "<p>peformance.navigation = " + json.stringify(navigation) + "</p>"; } } specifications the interfaces described ...
Using the Resource Timing API - Web APIs
function display_size_data(){ // check for support of the performanceresourcetiming.*size properties and
print their values // if supported.
... function clear_resource_timings() { if (performance === undefined) { console.log("= performance.clearresourcetimings(): peformance not supported"); return; } // check if performance.clearresourcetiming() is supported console.log ("=
print performance.clearresourcetimings()"); var supported = typeof performance.clearresourcetimings == "function"; if (supported) { console.log("...
Using writable streams - Web APIs
the close() method is called automatically when writing has finished — it
prints the entire decoded result to the ui in one string.
... the abort() method simply
prints an error to the console if the stream is aborted.
StyleSheet.media - Web APIs
example <!doctype html> <html> <head> <link rel="stylesheet" href="document.css" type="text/css" media="screen" /> <style rel="stylesheet" type="text/css" media="screen,
print"> body { background-color: snow; } </style> </head> <body> <script> for (var isheetindex = 0; isheetindex < document.stylesheets.length; isheetindex++) { console.log('document.stylesheets[' + string(isheetindex) + '].media: ' + json.stringify(document.stylesheets[isheetindex].media)); if (isheetindex === 0) document.stylesheets[isheetindex].media.appendmedium('handheld'); if (ishe...
...etindex === 1) document.stylesheets[isheetindex].media.deletemedium('
print'); console.log('document.stylesheets[' + string(isheetindex) + '].media: ' + json.stringify(document.stylesheets[isheetindex].media)); } /* will log: document.stylesheets[0].media: {"0":"screen"} document.stylesheets[0].media: {"0":"screen","1":"handheld"} document.stylesheets[1].media: {"0":"screen","1":"
print"} document.stylesheets[1].media: {"0":"screen"} */ </script> </body> </html> specifications specification status comment css object model (cssom)the definition of 'stylesheet: media' in that specification.
TouchEvent.changedTouches - Web APIs
in following code snippet, the touchmove event handler iterates through the changedtouches list and
prints the identifier of each touch point that changed since the last event.
... someelement.addeventlistener('touchmove', function(e) { // iterate through the list of touch points that changed // since the last event and
print each touch point's identifier.
Geometry and reference spaces in WebXR - Web APIs
const radians_per_degree = math.pi / 180.0; let degreestoradians = (deg) => deg * radians_per_degree; let radianstodegrees = (rad) => rad / radians_per_degree; times and durations note that for security reasons, domhighrestimestamp usually introduces a small amount of imprecision to the clock in order to prevent it from being used in finger
printing and timing-based attacks.
...if the estimated floor level is non-zero, the browser is expected to round it such a way as to avoid finger
printing (likely to the nearest centimeter).
Lighting a WebXR setting - Web APIs
spherical harmonics precision browsers can mitigate the risk of finger
printing by reducing the precision of spherical harmonics.
... decoupling orientation from lighting in an ar application that uses geolocation to determine orientation and potentially position information, avoiding having that information directly correlate to the state of the lighting is another way browsers can protect users from finger
printing attacks.
WindowEventHandlers - Web APIs
windoweventhandlers.onafter
print is an eventhandler representing the code to be called when the after
print event is raised.
... windoweventhandlers.onbefore
print is an eventhandler representing the code to be called when the before
print event is raised.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
this[sproperty] : this); }; myarray.mymethod(); //
prints "zero,one,two" myarray.mymethod(1); //
prints "one" settimeout(myarray.mymethod, 1000); //
prints "[object window]" after 1 second settimeout(myarray.mymethod, 1500, "1"); //
prints "undefined" after 1,5 seconds // passing the 'this' object with .call won't work // because this will change the value of this inside settimeout itself // while we want to change the value of this inside myarray.myme...
...settimeout.call(myarray, myarray.mymethod, 2000); //
prints "zero,one,two" after 2 seconds settimeout.call(myarray, myarray.mymethod, 2500, 2); //
prints "two" after 2,5 seconds another, more complex, solution for the this problem is the following framework.
Using XMLHttpRequest - Web APIs
e="description" cols="50" rows="8"></textarea> </p> <p> <input type="submit" value="submit" /> </p> </fieldset> </form> </body> </html> to test this, create a page named register.php (which is the action attribute of these sample forms), and put the following minimalistic content: <?php /* register.php */ header("content-type: text/plain"); /* note: you should never use `
print_r()` in production scripts, or otherwise output client-submitted data without sanitizing it first.
...*/ echo ":: data received via get ::\n\n";
print_r($_get); echo "\n\n:: data received via post ::\n\n";
print_r($_post); echo "\n\n:: data received as \"raw\" (text/plain encoding) ::\n\n"; if (isset($http_raw_post_data)) { echo $http_raw_post_data; } echo "\n\n:: files received ::\n\n";
print_r($_files); the syntax to activate this script is simply: ajaxsubmit(myform); note: this framework uses the filereader api to transmit file uploads.
:left - CSS: Cascading Style Sheets
the :left css pseudo-class, used with the @page at-rule, represents all left-hand pages of a
printed document.
... /* selects any left-hand pages when
printing */ @page :left { margin: 2in 3in; } whether a given page is "left" or "right" is determined by the major writing direction of the document.
:right - CSS: Cascading Style Sheets
the :right css pseudo-class, used with the @page at-rule, represents all right-hand pages of a
printed document.
... /* selects any right-hand pages when
printing */ @page :right { margin: 2in 3in; } whether a given page is "left" or "right" is determined by the major writing direction of the document.
Variable fonts guide - CSS: Cascading Style Sheets
while this was originally done to compensate for the ink and paper
printing process (very thin lines at small sizes often didn’t
print, giving the letterforms a broken appearance), it translates well to digital displays when compensating for screen quality and physical size rendering.
...the practice of designing different grades of a typeface was often done in reaction to intended use and
printing technique.
Paged media - CSS: Cascading Style Sheets
paged media properties control the presentation of content for
print or any other media that splits content into discrete pages.
... it allows you to set page breaks, control
printable area, style left and right pages differently, and control breaks inside elements.
CSS Tutorials - CSS: Cascading Style Sheets
media queries the size of the screens, or the kind of devices like touchscreens or
printed sheets vary greatly nowadays.
...though multi-column text is not that common on devices like screens, this is particularly useful on
printed pages, or for indexes.
<resolution> - CSS: Cascading Style Sheets
screens typically contains 72 or 96 dots per inch, but the dpi for
printed documents is usually much greater.
... examples use in a media query @media
print and (min-resolution: 300dpi) { ...
Rich-Text Editing in Mozilla - Developer guides
ourcetext"; opre.contenteditable = true; opre.appendchild(ocontent); odoc.appendchild(opre); } else { if (document.all) { odoc.innerhtml = odoc.innertext; } else { ocontent = document.createrange(); ocontent.selectnodecontents(odoc.firstchild); odoc.innerhtml = ocontent.tostring(); } odoc.contenteditable = true; } odoc.focus(); } function
printdoc() { if (!validatemode()) { return; } var oprntwin = window.open("","_blank","width=450,height=470,left=400,top=100,menubar=yes,toolbar=no,location=no,scrollbars=yes"); oprntwin.document.open(); oprntwin.document.write("<!doctype html><html><head><title>
print<\/title><\/head><body onload=\"
print();\">" + odoc.innerhtml + "<\/body><\/html>"); oprntwin.document.close(); } </script> <sty...
...src="data:image/gif;base64,r0lgodlhfgawaiqbad04ktrlyzfrjlldzl9vj1dusy14wyodhpwibbsvfy6o7ioxw5qbms+wubcztca0ccs4kddqjdtltmrl1o3yitha7opcsd/f4pfvrvdv8pv5xv///////////////////yh5baekab8alaaaaaawabyaaav84ceozgmeakqubmteyzk547qobcfwtm/jgshq4rhmloxfiehqqsawr+z4iayaj0kegtfolizlwre4ocqwrxototaihmcz0tvgmbqkzhayyfewev14eq8iflhnehmfdqkaiskqci2pdc4qbg+oajc0ewadncogo6anqkkoiqa7" /> <img class="intlink" title="
print" onclick="
printdoc();" src="data:image/png;base64,ivborw0kggoaaaansuheugaaabyaaaawcayaaadetgw7aaaabgdbtueaalgpc/xhbqaaaazis0deap8a/wd/ol2nkwaaaalwsflzaaalewaacxmbajqcgaaaaad0su1fb9oebxczfmgboiwaaaaidevydenvbw1lbnqa9sywvwaaaufjrefuomvtlutsjfeux//n3nn0ydpbh1abrpt4lfqtqkc3jrkkneisiiribbehjjpklivo4m1rrmkkjqirmjruqudkpt71qpipirkpaqdf55tv5vvuszjqtjolseukd3xu/3dpzusc/22wtu2wrn+jg5so/ocdh8ycmjdflehmlkjkv...
Making content editable - Developer guides
ntent); odoc.appendchild(opre); document.execcommand("defaultparagraphseparator", false, "div"); } else { if (document.all) { odoc.innerhtml = odoc.innertext; } else { ocontent = document.createrange(); ocontent.selectnodecontents(odoc.firstchild); odoc.innerhtml = ocontent.tostring(); } odoc.contenteditable = true; } odoc.focus(); } function
printdoc() { if (!validatemode()) { return; } var oprntwin = window.open("","_blank","width=450,height=470,left=400,top=100,menubar=yes,toolbar=no,location=no,scrollbars=yes"); oprntwin.document.open(); oprntwin.document.write("<!doctype html><html><head><title>
print<\/title><\/head><body onload=\"
print();\">" + odoc.innerhtml + "<\/body><\/html>"); oprntwin.document.close(); } </script> <sty...
...src="data:image/gif;base64,r0lgodlhfgawaiqbad04ktrlyzfrjlldzl9vj1dusy14wyodhpwibbsvfy6o7ioxw5qbms+wubcztca0ccs4kddqjdtltmrl1o3yitha7opcsd/f4pfvrvdv8pv5xv///////////////////yh5baekab8alaaaaaawabyaaav84ceozgmeakqubmteyzk547qobcfwtm/jgshq4rhmloxfiehqqsawr+z4iayaj0kegtfolizlwre4ocqwrxototaihmcz0tvgmbqkzhayyfewev14eq8iflhnehmfdqkaiskqci2pdc4qbg+oajc0ewadncogo6anqkkoiqa7" /> <img class="intlink" title="
print" onclick="
printdoc();" src="data:image/png;base64,ivborw0kggoaaaansuheugaaabyaaaawcayaaadetgw7aaaabgdbtueaalgpc/xhbqaaaazis0deap8a/wd/ol2nkwaaaalwsflzaaalewaacxmbajqcgaaaaad0su1fb9oebxczfmgboiwaaaaidevydenvbw1lbnqa9sywvwaaaufjrefuomvtlutsjfeux//n3nn0ydpbh1abrpt4lfqtqkc3jrkkneisiiribbehjjpklivo4m1rrmkkjqirmjruqudkpt71qpipirkpaqdf55tv5vvuszjqtjolseukd3xu/3dpzusc/22wtu2wrn+jg5so/ocdh8ycmjdflehmlkjkv...
<tbody>: The Table Body element - HTML: Hypertext Markup Language
the <tbody> element, along with its cousins <thead> and <tfoot>, provide useful semantic information that can be used when rendering for either screen or
printer as well as for accessibility purposes.
... when
printing a document, the <thead> and <tfoot> elements specify information that may be the same—or at least very similar—on every page of a multi-page table, while the <tbody> element's contents generally will differ from page to page.
HTML documentation index - HTML: Hypertext Markup Language
the attribute value must consist of a single
printable character (which includes accented and other characters that can be generated by the keyboard).
... 192 <small>: the side comment element element, html, html text-level semantics, reference, web, font-size the html <small> element represents side-comments and small
print, like copyright and legal text, independent of its styled presentation.
Index - HTTP
browsers usually don't set this header as the default value for each content type is usually correct and transmitting it would allow easier finger
printing.
...browsers set adequate values for this header according to their user interface language and even if a user can change it, this happens rarely (and is frowned upon as it leads to finger
printing).
HTTP Public Key Pinning (HPKP) - HTTP
when the client visits the server again, it expects at least one certificate in the certificate chain to contain a public key whose finger
print is already known via hpkp.
... enabling hpkp to enable this feature for your site, you need to return the public-key-pins http header when your site is accessed over https: public-key-pins: pin-sha256="base64=="; max-age=expiretime [; includesubdomains][; report-uri="reporturi"] pin-sha256 the quoted string is the base64 encoded subject public key information (spki) finger
print.
Inheritance and the prototype chain - JavaScript
--> a ---> object.prototype ---> null var d = object.create(null); // d ---> null console.log(d.hasownproperty); // undefined, because d doesn't inherit from object.prototype delete operator with object.create and new operator using object.create of another object demonstrates prototypical inheritance with the delete operation: var a = {a: 1}; var b = object.create(a); console.log(a.a); //
print 1 console.log(b.a); //
print 1 b.a=5; console.log(a.a); //
print 1 console.log(b.a); //
print 5 delete b.a; console.log(a.a); //
print 1 console.log(b.a); //
print 1(b.a value 5 is deleted but it showing value from its prototype chain) delete a.a; console.log(a.a); //
print undefined console.log(b.a); //
print undefined the new operator has a shorter chain in this example: function graph() { ...
...this.vertices = [4,4]; } var g = new graph(); console.log(g.vertices); //
print [4,4] g.vertices = 25; console.log(g.vertices); //
print 25 delete g.vertices; console.log(g.vertices); //
print undefined with the class keyword ecmascript 2015 introduced a new set of keywords implementing classes.
Warning: JavaScript 1.6's for-each-in loops are deprecated - JavaScript
deprecated syntax function func(array) { for each (var x in array) { console.log(x); } } func([10, 20]); // 10 // 20 func(null); //
prints nothing func(undefined); //
prints nothing alternative standard syntax to rewrite for each...in statements so that values can be null or undefined with for...of as well, you need to guard around for...of.
... function func(array) { if (array) { for (var x of array) { console.log(x); } } } func([10, 20]); // 10 // 20 func(null); //
prints nothing func(undefined); //
prints nothing iterating over an object's key-value pair deprecated syntax there's a deprecated idiom to iterate over the specified object's key-value pairs using for each...in and the deprecated iterator object.
Function.prototype.call() - JavaScript
the main purpose of the anonymous function here is to add a
print function to every object, which is able to
print the correct index of the object in the array.
... const animals = [ { species: 'lion', name: 'king' }, { species: 'whale', name: 'fail' } ]; for (let i = 0; i < animals.length; i++) { (function(i) { this.
print = function() { console.log('#' + i + ' ' + this.species + ': ' + this.name); } this.
print(); }).call(animals[i], i); } using call to invoke a function and specifying the context for 'this' in the example below, when we call greet, the value of this will be bound to object obj.
Intl.Locale.prototype.baseName - JavaScript
examples basic example let myloc = new intl.locale("fr-latn-ca"); // sets locale to canadian french console.log(myloc.tostring()); //
prints out "fr-latn-ca-u-ca-gregory" console.log(myloc.basename); //
prints out "fr-latn-ca" example with options in the input string // sets language to japanese, region to japan, // calendar to gregorian, hour cycle to 24 hours let japan = new intl.locale("ja-jp-u-ca-gregory-hc-24"); console.log(japan.tostring()); //
prints out "ja-jp-u-ca-gregory-hc-h24" console.log(japan.basename); //
prints out...
... "ja-jp" example with options that override input string // input string indicates language as dutch and region as belgium, // but options object overrides the region and sets it to the netherlands let dutch = new intl.locale("nl-latn-be", {region: "nl"}); console.log(dutch.basename); //
prints out "nl-latn-nl" specifications specification ecmascript internationalization api (ecma-402) ...
Intl.Locale.prototype.calendar - JavaScript
let frbuddhist = new intl.locale("fr-fr-u-ca-buddhist"); console.log(frbuddhist.calendar); //
prints "buddhist" adding a calendar with a configuration object the intl.locale constructor has an optional configuration object argument, which can contain any of several extension types, including calendars.
... let frbuddhist = new intl.locale("fr-fr", {calendar: "buddhist"}); console.log(frbuddhist.calendar); //
prints "buddhist" specifications specification ecmascript internationalization api (ecma-402) ...
Intl.Locale.prototype.caseFirst - JavaScript
let casefirststr = new intl.locale("fr-latn-fr-u-kf-upper"); console.log(casefirststr.casefirst); //
prints "upper" setting the casefirst value via the configuration object argument the intl.locale constructor has an optional configuration object argument, which can be used to pass extension types.
... let casefirstobj= new intl.locale("en-latn-us", {casefirst: "lower"}); console.log(us12hour.casefirst); //
prints "lower" specifications specification ecmascript internationalization api (ecma-402) ...
Intl.Locale.prototype.collation - JavaScript
let stringcoll = new intl.locale("en-latn-us-u-co-emoji"); console.log(stringcoll.collation); //
prints "emoji" adding a collation type via the configuration object argument the intl.locale constructor has an optional configuration object argument, which can contain any of several extension types, including collation types.
... let configcoll = new intl.locale("en-latn-us", {collation: "emoji"}); console.log(configcoll.collation); //
prints "emoji" specifications specification ecmascript internationalization api (ecma-402) ...
Intl.Locale.prototype.hourCycle - JavaScript
let fr24hour = new intl.locale("fr-fr-u-hc-h23"); console.log(fr24hour.hourcycle); //
prints "h23" adding an hour cycle via the configuration object argument the intl.locale constructor has an optional configuration object argument, which can contain any of several extension types, including hour cycle types.
... let us12hour = new intl.locale("en-us", {hourcycle: "h12"}); console.log(us12hour.hourcycle); //
prints "h12" specifications specification ecmascript internationalization api (ecma-402) ...
Intl.Locale.prototype.language - JavaScript
let langstr = new intl.locale("en-latn-us"); console.log(langstr.language); //
prints "en" overriding language via the configuration object while the language subtag must be specified, the locale constructor takes a configuration object, which can override the language subtag.
... let langobj = new intl.locale("en-latn-us", {language: "es"}); console.log(langobj.language); //
prints "es" specifications specification ecmascript internationalization api (ecma-402) ...
Intl.Locale.prototype.maximize() - JavaScript
examples using maximize let mylocale = new intl.locale("fr", {hourcycle: "h24", calendar: "gregory"}); console.log(mylocale.basename); //
prints "fr" console.log(mylocale.tostring()); //
prints "fr-u-ca-gregory-hc-h24" let mylocmaximized = mylocale.maximize(); //
prints "fr-latn-fr".
...console.log(mylocmaximized.basename); //
prints "fr-latn-fr-u-ca-gregory-hc-h24".
Intl.Locale.prototype.minimize() - JavaScript
examples using minimize let mylocale = new intl.locale("fr-latn-fr", {hourcycle: "h24", calendar: "gregory"}); console.log(mylocale.basename); //
prints "fr-latn-fr" console.log(mylocale.tostring()); //
prints "fr-latn-fr-u-ca-gregory-hc-h24" let mylocminimized = mylocale.minimize(); //
prints "fr", since french is only written in the latin script // and is most likely to be spoken in france.
... console.log(mylocminimized.basename); //
prints "fr-u-ca-gregory-hc-h24".
Intl.Locale.prototype.numberingSystem - JavaScript
let numberingsystemviastr = new intl.locale("fr-latn-fr-u-nu-mong"); console.log(numberingsystemstr.numberingsystem); //
prints "mong" setting the numberingsystem value via the configuration object argument the intl.locale constructor has an optional configuration object argument, which can be used to pass extension types.
... let numberingsystemviaobj= new intl.locale("en-latn-us", {numberingsystem: "latn"}); console.log(us12hour.numberingsystem); //
prints "latn" specifications specification ecmascript internationalization api (ecma-402) ...
Intl.Locale.prototype.numeric - JavaScript
let numericviastr = new intl.locale("fr-latn-fr-u-kn-false"); console.log(numericstr.numeric); //
prints "false" setting the numeric value via the configuration object argument the intl.locale constructor has an optional configuration object argument, which can be used to pass extension types.
... let numericviaobj= new intl.locale("en-latn-us", {numeric: true}); console.log(us12hour.numeric); //
prints "true" specifications specification ecmascript internationalization api (ecma-402) ...
Intl.Locale.prototype.region - JavaScript
the region is a mandatory part of a let regionstr = new intl.locale("en-latn-us"); console.log(regionstr.region); //
prints "us" setting the region via the configuration object the locale constructor takes a configuration object, which can be used to set the region subtag and property.
... let regionobj = new intl.locale("fr-latn", {region: "fr"}); console.log(regionobj.region); //
prints "fr" specifications specification ecmascript internationalization api (ecma-402) ...
Intl.Locale.prototype.script - JavaScript
let scriptstr = new intl.locale("en-latn-us"); console.log(scriptstr.script); //
prints "latn" setting the script via the configuration object the locale constructor takes a configuration object, which can be used to set the script subtag and property.
... let scriptobj = new intl.locale("fr-fr", {script: "latn"}); console.log(scriptobj.script); //
prints "latn" specifications specification ecmascript internationalization api (ecma-402) ...
Object.prototype.toLocaleString() - JavaScript
objects overriding tolocalestring array: array.prototype.tolocalestring() number: number.prototype.tolocalestring() date: date.prototype.tolocalestring() typedarray: typedarray.prototype.tolocalestring() bigint: bigint.prototype.tolocalestring() examples array tolocalestring() override on array objects, tolocalestring() can be used to
print array values as a string, optionally with locale-specific identifiers (such as currency symbols) appended to them: for example: const testarray = [4, 7, 10]; let europrices = testarray.tolocalestring('fr', { style: 'currency', currency: 'eur'}); // "4,00 €,7,00 €,10,00 €" date tolocalestring() override on date objects, tolocalestring() is used to
print out date displays more suitable f...
...or specific locales: for example: const testdate = new date(date.now()); // "date fri may 29 2020 18:04:24 gmt+0100 (british summer time)" let dedate = testdate.tolocalestring('de'); // "29.5.2020, 18:04:24" var frdate = testdate.tolocalestring('fr'); //"29/05/2020 à 18:04:24" number tolocalestring() override on number objects, tolocalestring() is used to
print out number displays more suitable for specific locales, e.g.
Promise.prototype.then() - JavaScript
receive "foobar", register a callback function to work on that string // and
print it to the console, but not before returning the unworked on // string to the next then .then(function(string) { settimeout(function() { string += 'baz'; console.log(string); // foobarbaz }, 1) return string; }) // 3.
...
print helpful messages about how the code in this section will be run // before the string is actually processed by the mocked asynchronous code in the // previous then block.
WebAssembly.Table.prototype.set() - JavaScript
we then
print out the table length and contents of the two indexes (retrieved via table.prototype.get()) to show that the length is two, and the indexes currently contain no function references (they currently return null).
...ect that contains a reference to the table: var importobj = { js: { tbl:tbl } }; finally, we load and instantiate a wasm module (table2.wasm) using the webassembly.instantiatestreaming(), log the table length, and invoke the two referenced functions that are now stored in the table (the table2.wasm module (see text representation) adds two function references to the table, both of which
print out a simple value): webassembly.instantiatestreaming(fetch('table2.wasm'), importobject) .then(function(obj) { console.log(tbl.length); console.log(tbl.get(0)()); console.log(tbl.get(1)()); }); note how you've got to include a second function invocation operator at the end of the accessor to actually invoke the referenced function and log the value stored inside it (e.g.
async function expression - JavaScript
examples simple example function resolveafter2seconds(x) { return new promise(resolve => { settimeout(() => { resolve(x); }, 2000); }); }; const add = async function(x) { // async function expression assigned to a variable let a = await resolveafter2seconds(20); let b = await resolveafter2seconds(30); return x + a + b; }; add(10).then(v => { console.log(v); //
prints 60 after 4 seconds.
... }); (async function(x) { // async function expression used as an iife let p_a = resolveafter2seconds(20); let p_b = resolveafter2seconds(30); return x + await p_a + await p_b; })(10).then(v => { console.log(v); //
prints 60 after 2 seconds.
Image file type and format guide - Web media technologies
these include cmyk, ycbcr, and others, making tiff a good choice for storing images intended for
print, film, or television media.
...as such, tiff files are not useful within the context of web content, but it's common to provide downloadable tiff files when distributing photos and other artwork intended for precision editing or
printing.
PerformanceResourceTiming.connectEnd - Web APIs
function
print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) {
print_start_and_end_properties(p[i]); } } function
print_start_and_end_properties(perfentry) { //
print timestamps of the *start and *end properties properties = ["connectstart", "connectend", "domai...
PerformanceResourceTiming.connectStart - Web APIs
function
print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) {
print_start_and_end_properties(p[i]); } } function
print_start_and_end_properties(perfentry) { //
print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", ...
PerformanceResourceTiming.domainLookupEnd - Web APIs
function
print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) {
print_start_and_end_properties(p[i]); } } function
print_start_and_end_properties(perfentry) { //
print timestamps of the *start and *end properties properties = ["connectstart", "connectend", "domai...
PerformanceResourceTiming.domainLookupStart - Web APIs
function
print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) {
print_start_and_end_properties(p[i]); } } function
print_start_and_end_properties(perfentry) { //
print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", ...
PerformanceResourceTiming.fetchStart - Web APIs
function
print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) {
print_start_and_end_properties(p[i]); } } function
print_start_and_end_properties(perfentry) { //
print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", ...
PerformanceResourceTiming.initiatorType - Web APIs
example function
print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) {
print_initiatortype(p[i]); } } function
print_initiatortype(perfentry) { //
print this performance entry object's initiatortype value var value = "initiatortype" in perfentry; if (value) console.log("...
PerformanceResourceTiming.nextHopProtocol - Web APIs
function
print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) {
print_nexthopprotocol(p[i]); } } function
print_nexthopprotocol(perfentry) { var value = "nexthopprotocol" in perfentry; if (value) console.log("nexthopprotocol = " + perfentry.nexthopprotocol); else conso...
PerformanceResourceTiming.redirectEnd - Web APIs
function
print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) {
print_start_and_end_properties(p[i]); } } function
print_start_and_end_properties(perfentry) { //
print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", ...
PerformanceResourceTiming.redirectStart - Web APIs
function
print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) {
print_start_and_end_properties(p[i]); } } function
print_start_and_end_properties(perfentry) { //
print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", ...
PerformanceResourceTiming.requestStart - Web APIs
function
print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) {
print_start_and_end_properties(p[i]); } } function
print_start_and_end_properties(perfentry) { //
print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", ...
PerformanceResourceTiming.responseEnd - Web APIs
function
print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) {
print_start_and_end_properties(p[i]); } } function
print_start_and_end_properties(perfentry) { //
print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", ...
PerformanceResourceTiming.responseStart - Web APIs
function
print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) {
print_start_and_end_properties(p[i]); } } function
print_start_and_end_properties(perfentry) { //
print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", ...
PerformanceResourceTiming.secureConnectionStart - Web APIs
function
print_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) {
print_start_and_end_properties(p[i]); } } function
print_start_and_end_properties(perfentry) { //
print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", ...