Computing desk | ||
---|---|---|
< March 2 | << Feb | March | Apr >> | March 4 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Is it accurate to say that AJAX is called "XML HTTP-request object" (XHRO) because we request XML data in an HTTP-rquest object or "packet" ?
Or is the "object" is what we get in return (the XML data itself) ?
Thanks, 77.180.130.37 (talk) 01:21, 3 March 2017 (UTC)
There is a principle in security, cryptography, and information tech in general that a well-designed system will be secure even when all components of its operation are known. That is, no secrecy regarding the mechanics of a system's operation is required to make it secure. This principle is especially pronounced, it seems, in encryption technology.
My question: what is the name for this principle?
(First time I have used *the reference desk* this, please let me know of any procedures I forgot or violated. Thank you!) — Preceding unsigned comment added by 2601:98A:4000:693A:117F:F15C:2FF1:30E0 (talk) 03:43, 3 March 2017 (UTC)
A few more minutes of searching revealed the answer: Kerckhoffs's principle. Apologies for I do not know how to remove/archive/etc this question, but it is solved. — Preceding unsigned comment added by 2601:98A:4000:693A:117F:F15C:2FF1:30E0 (talk) 03:51, 3 March 2017 (UTC)
I've noticed a strange thing:
when I do this in gawk (simplified example):
#!/bin/gawk -f BEGIN{ cmd="seq 1 1e4|sort -gr | head -20" system(cmd) close(cmd) exit }
then sort prints
write failed: standard output: Broken pipe sort: write error
This doesn't happen when I run an identical command directly from the shell (bash and sh). I get the reason for the error: head reads its 20 lines, prints them, exits, sort sees a broken pipe and complains. Why doesn't that happen in bash or sh, though? Moreso as gawk internally uses the system(3) call which uses sh. Most importantly, how do I get rid of the message without completely discarding sort's stderr? Asmrulz (talk) 07:10, 3 March 2017 (UTC)
PS putting an explicit sh -c "..." in front of the command doesn't help and neither does adding an empty cat (I thought it might) Asmrulz (talk) 07:10, 3 March 2017 (UTC)
SIGPIPE
, andsystem()
is invoked from a process that is ignoring SIGPIPE
, the processes that it starts will produce "broken pipe" messages when they otherwise wouldn't.#include <signal.h> #include <stdlib.h> int main() { int r; system("yes A | sed 3q"); signal(SIGPIPE, SIG_IGN); /* Ignore SIGPIPE */ system("yes B | sed 3q"); signal(SIGPIPE, SIG_DFL); /* Default handling of SIGPIPE */ system("yes C | sed 3q"); return 0; }
A A A B B B yes: standard output: Broken pipe C C C
system()
cause this effect? I don't know. It doesn't happen on the UNIX system I have access to. How to stop it happening, within the code invoked by system()
? I don't know that either.cmd="seq 1 1e4|(trap '' PIPE ; sort -gr ) | head -20"
but this doesn't work either, because apparently according to POSIX, "Signals that were ignored on entry to a non-interactive shell cannot be trapped or reset". there really doesn't seem to be a way of getting rid of the message short of patching either gawk or sort, or writing a wrapper. oh well, at least it now makes sense. thanks again! Asmrulz (talk) 12:54, 3 March 2017 (UTC)
sort
. But as you explained, POSIX specifies that it won't be trapped, so that won't work. --76.71.6.254 (talk) 22:56, 3 March 2017 (UTC)Anyone know how to block Firefox from displaying infobars? As of the last update, my Firefox on Win10 is showing a nag to connect my phone to my Firefox account every time I start Firefox. This is actually spam rather than the useful messages which have appeared in the infobar up til now, and I'd quite like it to go away. A quick Google revealed a suggestion to flip a switch in about:config, but it doesn't seem to exist anymore. --87.18.123.67 (talk) 10:43, 3 March 2017 (UTC)