standards

XSLT to process XML with very loose standards (EAD)

匆匆过客 提交于 2019-12-13 02:26:06
问题 I've been having a hell of a week trying to write XSLT code that can process XML documents that conform to the (very permissive) EAD standards. The useful information in an EAD document is hard to locate precisely. Different EAD documents can place the same bit of information in entirely different parts of the data tree. In addition, within a single EAD document, the same tag can be used numerous times in different locations for different information. For an example of this, please see this

Why fetch Body object can be read only once?

為{幸葍}努か 提交于 2019-12-12 16:27:08
问题 The fetch specification states that the readable stream Body contains the Body.bodyUsed flag which is initially set to false and then is set to true with a call of any parsing method. Here's an example: fetch('/some/path', (res) => { // res.body.bodyUsed === false res.json(); // res.body.bodyUsed === true }); If you try to call a method like res.json() or res.text() once again, an exception is thrown. The question is : why that behavior is used? Why not to allow parsing that readable stream

java: what are the best techniques for communicating with a batch server?

家住魔仙堡 提交于 2019-12-12 15:40:51
问题 I've a WEB application (with pure Java servlet) that have some heavy computational work, with database access, that can be done in asynchronous mode. I'm planning to use a dedicated server to execute such batch jobs and I'm wondering which tools/techniques/protocols to use for communication between servlets in the WEB server and batch jobs in the new dedicated server. I'm looking at JMS. Is it the right choice? There are industry standard and/or widely adopted techniques? I need also queue

Is this dubious use of a non-prototype function declaration valid?

爷,独闯天下 提交于 2019-12-12 13:33:37
问题 Is this valid C (C99) code? int f(); int g(int x) { if (x<0) return f(x); else return f(x,x); } Obviously the program has undefined behavior if g is ever called with a negative argument and f is not a function that takes a single int argument, or if g is ever called with a non-negative argument and f is not a function that takes two int arguments. But otherwise? Consider as an example this separate source file which calls g from the above and provides f : int g(); #ifdef FOO int f(int a, int

Are C preprocessor statements a part of the C language?

北战南征 提交于 2019-12-12 11:54:43
问题 I recall a claim made by one of my professors in an introductory C course. He stated that the #define preprocessor command enables a programmer to create a constant for use in later code, and that the command was a part of the C language . /* Is this truly C code? */ #define FOO 42 Since this was in an introductory programming class, I suspect that he was merely simplifying the relationship between the source file and the compiler, but nevertheless I wish to verify my understanding. Are

What does this ambiguous pronoun represent in the text of RFC 4880?

爷,独闯天下 提交于 2019-12-12 11:42:29
问题 What does RFC 4880 sec 5.1 mean by " this "? The value "m" in the above formulas is derived from the session key as follows. First, the session key is prefixed with a one-octet algorithm identifier that specifies the symmetric encryption algorithm used to encrypt the following Symmetrically Encrypted Data Packet. Then a two-octet checksum is appended, which is equal to the sum of the preceding session key octets, not including the algorithm identifier, modulo 65536. This value is then encoded

Does SQL standard allows whitespace between function names and parenthesis

霸气de小男生 提交于 2019-12-12 11:38:47
问题 Checking few RDBMS I find that things like SELECT COUNT (a), SUM (b) FROM TABLE are allowed (notice space between aggregate functions and parenthesis). Could anyone provide a pointer to SQL standard itself where this is defined (any version will do)? EDIT: The above works in postgres, mysql needs set sql_mode = "IGNORE_SPACE"; as defined here (for full list of functions that are influenced with this server mode see in this ref). MS SQL is reported to accept the above. Also, it seems that the

Is overflow defined for VHDL numeric_std signed/unsigned

♀尐吖头ヾ 提交于 2019-12-12 10:53:33
问题 If I have an unsigned(MAX downto 0) containing the value 2**MAX - 1 , do the VHDL (87|93|200X) standards define what happens when I increment it by one? (Or, similarly, when I decrement it by one from zero?) 回答1: Short answer: There is no overflow handling, the overflow carry is simply lost. Thus the result is simply the integer result of your operation modulo 2^MAX . Longer answer: The numeric_std package is a standard package but it is not is the Core the VHDL standards (87,93,200X). For

Displaying a message to Internet explorer 8 and Below Users

给你一囗甜甜゛ 提交于 2019-12-12 10:07:25
问题 So I have been working on a site (http://getcours.tk/), recently, It works fine in Chrome (So webkit) and Firefox (So Gecko) but I just tried it out in Internet explorer 8 and Since it doesn't seem to follow CSS3 standards, It is incapable of rendering it properly. I just want to display a message to users of internet explorer 8 and below (ie9 works) to say that the site will display incorrectly in their browser, and that if they wish to see it properly they should Use a Modern browser.

shorthand typedef pointer to a constant struct

谁说胖子不能爱 提交于 2019-12-12 09:49:33
问题 Declaring a struct with typedef typedef struct some_struct { int someValue; } *pSomeStruct; and then passing it as a parameter to some function with const declaration, implying 'const some_struct * var' void someFunction1( const pSomeStruct var ) turns out to become some_struct * const var This is also stated in Section 6.7.5.1 of the ISO C standard which states that 'const' in this case applies to the pointer and not to the data to which it points. So the question is - is there a way to