specifications

date command is giving erroneous output while using inside rpm spec file

℡╲_俬逩灬. 提交于 2021-02-20 05:00:52
问题 I have to perform some necessary steps before installing my package, such as taking back up of previous datastore snapshot. For that purpose I'm using a %pre script as follows. %pre #!/bin/sh -------- -------- stamp=`date +%Y%m%d%H%M%S` echo ${stamp} ------------- ------------- The output is as follows: 20161103123325OURCE It is printing some random characters along with date. "OURCE" is not present anywhere in my spec file. The same script works perfectly as standalone. The platform is

date command is giving erroneous output while using inside rpm spec file

我的梦境 提交于 2021-02-20 05:00:49
问题 I have to perform some necessary steps before installing my package, such as taking back up of previous datastore snapshot. For that purpose I'm using a %pre script as follows. %pre #!/bin/sh -------- -------- stamp=`date +%Y%m%d%H%M%S` echo ${stamp} ------------- ------------- The output is as follows: 20161103123325OURCE It is printing some random characters along with date. "OURCE" is not present anywhere in my spec file. The same script works perfectly as standalone. The platform is

Spec for handling of HTML entities in a[href]

北慕城南 提交于 2021-02-10 08:38:49
问题 I'm looking for a spec on handling HTML entities in the href attribute of <a> tags. So far, no luck (I might be searching for something too specific). In detail: The bug I'm trying to fix is part of the cheerio project. Some entities don't require a semicolon at the end. One of them is &curren . Anyway, this leads to problems when a source links to /test/example.jsp?item=123&currentSize=S&currentQty=1 . Browsers (at least Chrome) handle this nicely. I still haven't figured out why though. 回答1

Specification and correct use of (boolean) URI matrix parameters (and making them optional when using CXF/JAXB)?

℡╲_俬逩灬. 提交于 2021-02-09 11:52:09
问题 I was wondering if the "proper" use of URI/URL matrix parameters was ever defined in a specification, such as an RFC or a W3 recommendation? In particular, I just joined a project where we use matrix parameters and a Java framework to implement a REST service. One of the matrix parameters we have for our REST service is a boolean one, much like ;sortByDate=true What bugged me about this one is that the Java framework we use apparently insists that boolean parameters are always passed in (i.e.

StackOverflowException

偶尔善良 提交于 2021-02-07 14:24:17
问题 With the StackOverflowException are the conditions to be thrown hardcoded or dependent on the machine the code is running on? I am almost certain the latter but have failed in my searches and don't ask enough questions here. 回答1: From the documentation: ... is thrown when the execution stack overflows because it contains too many nested method calls. Since the size of the stack is architecture-dependent and can even be overridden on a machine, yes, this value is not hard-coded, though it is

What is a PRIMARY KEY

妖精的绣舞 提交于 2021-02-04 19:17:05
问题 In database code I see references to a PRIMARY KEY . What is a PRIMARY KEY, and what difference does it make if some of the columns in one of my tables form a PRIMARY KEY... or don't form a PRIMARY KEY. (Amazingly, this question does not seem to have been asked before on SO) 回答1: 1st Normal Form requires that you have a unique key for you to have a relation. If this requirement is not met (i.e. if you have no unique keys), then your table will be just a heap, not a relation. The primary key

What CSS properties can be applied to which HTML elements

我与影子孤独终老i 提交于 2021-02-04 18:36:13
问题 I'm looking for a source/spec that can tell me what CSS properties can applied to which HTML elements. For instance, the css property; "overflow". I know I can apply this to div, p, textarea but what other elements can I apply this too? Is there a spec somewhere I can reference? 回答1: See http://www.w3.org/TR/CSS2/ and http://www.w3.org/TR/CSS/. For example, regarding your question about the overflow property, see: http://www.w3.org/TR/CSS2/visufx.html#overflow-clipping, stating: 'overflow'

What are the differences between the hourCycle options in Date.prototype.toLocaleTimeString()

你。 提交于 2021-01-27 07:59:54
问题 MDN documentation for toLocaleTimeString() indicates that the hourCycle and hc options have four possible values: "h11" , "h12" , "h23" , & "h24" . Two of the possible values strike me as super obvious (i.e. "h12" and "h24" ), but the other two, I have no idea what they do and my duckduckfoo/googlefoo is failing me! What are the "h11" and "h23" values representing? My best guess is that they are some type of 0 vs 1 derivations of "h12" and "h24" , but the underlying date stamp is still the

What are the differences between the hourCycle options in Date.prototype.toLocaleTimeString()

喜夏-厌秋 提交于 2021-01-27 07:53:34
问题 MDN documentation for toLocaleTimeString() indicates that the hourCycle and hc options have four possible values: "h11" , "h12" , "h23" , & "h24" . Two of the possible values strike me as super obvious (i.e. "h12" and "h24" ), but the other two, I have no idea what they do and my duckduckfoo/googlefoo is failing me! What are the "h11" and "h23" values representing? My best guess is that they are some type of 0 vs 1 derivations of "h12" and "h24" , but the underlying date stamp is still the

How to mock a nativeElement.focus() in Angular 4 spec file

风格不统一 提交于 2021-01-27 07:10:56
问题 I have a method which uses an ElementRef which is defined below. @ViewChild('idNaicsRef') idNaicsRef: ElementRef; ElementRef then sets the focus using .nativeElement.focus() . The method fails while running the spec, saying 'undefined is an object' 回答1: this should work. this just creates a spy object and then you can populate it with whatever you want, so you could even check if it was called in your unit test. import createSpyObj = jasmine.createSpyObj; comp.idNaicsRef = createSpyObj(