specifications

How to reproduce java compile/runtime error for generic interface type variables that may not be a subtype of two param interfaces at same time?

99封情书 提交于 2019-12-11 08:59:48
问题 I was reading the Java SE 6 specs and then found some confusing stuff that a I can't reproduce: A type variable may not at the same time be a subtype of two interface types which are different parameterizations of the same generic interface. I wrote the following code: interface Odd {} interface Even {} interface Strange extends Odd, Even {} interface InterfaceOne<O extends Odd, E extends Even> {} interface InterfaceTwo<O extends Odd, E extends Even> extends Odd, Even {} public class Test {

create spec from data

谁说我不能喝 提交于 2019-12-11 08:14:42
问题 I am trying to create spec just from data. I have very complex data structure - all nested map. {:contexts ({:importer.datamodel/global-id "01b4e69f86e5dd1d816e91da27edc08e", :importer.datamodel/type "province", :name "a1", :importer.datamodel/part-of "8cda1baed04b668a167d4ca28e3cef36"} {:importer.datamodel/global-id "8cda1baed04b668a167d4ca28e3cef36", :importer.datamodel/type "country", :name "AAA"} {:importer.datamodel/global-id "c78e5478e19f2d7c1b02088e53e8d8a4", :importer.datamodel/type

standardized conclusion required for rpm upgrade process

夙愿已清 提交于 2019-12-11 07:55:31
问题 The rpm command provides three main operations for upgrading and installing packages: Upgrade An upgrade operation means installing a new version of a package and removing all previous versions of the same package. If you have not installed a package previously, the upgrade operation will install the package. Freshen A freshen operation means to install a new version of a package only if you have already installed another version of the package. Install An install operation installs a package

How to tell under Linux which disk will be used by BIOS to boot?

╄→гoц情女王★ 提交于 2019-12-11 07:48:57
问题 How to print from CMOS which device will be used as boot device after reboot? Computer has several sata disk drives and several bootable USB-devices attached. The layout of CMOS memory is defined by version of BIOS used. I know that there are several different versions and manufacturers of BIOSes. I think it is possible to determine which one is used by examining BIOS memory. Somehow like in this question - How to check the BIOS version or name in Linux through a command prompt? My computer

How to distinguish between two Blank Nodes in RDF?

梦想与她 提交于 2019-12-11 07:12:57
问题 I am having difficulty understanding a passage from w3.org. The confusing passage may be an error, or I may just be confused. The following is Section 6.6 of the RDF Concepts Specification, 6.6 Blank Nodes The blank nodes in an RDF graph are drawn from an infinite set. This set of blank nodes, the set of all RDF URI references and the set of all literals are pairwise disjoint. Otherwise, this set of blank nodes is arbitrary. RDF makes no reference to any internal structure of blank nodes.

Spring Specification With Sum Function

一个人想着一个人 提交于 2019-12-11 05:35:54
问题 I am trying a sum function in spring specification as below: @Override public Predicate toPredicate(Root<Stock> root, CriteriaQuery<?> query, CriteriaBuilder builder) { Path expression = root.get("qty"); query.select(builder.sum(expression)); return null; } The query I want to execute is: SELECT SUM(o.qty) FROM Stock o; But Spring is not creating a sum function and is executing this: SELECT o.qty FROM Stock o I checked so many Stack Overflow question but there is no answer in Specification

Does the manifest.mf file show the version of the jar?

两盒软妹~` 提交于 2019-12-11 04:34:50
问题 Intro I have created a script that loops trough all installed applications on our application server, for each application finding the WEB-INF/lib-folder. Then, for all third party jar-files in the lib-folder I extract the manifest-file to find the Implementation-Version -key and its value based on the assumption that only one Implementation-Version pr. manifest.mf . So far so good, but...then some applications is dependent of XML in some way and therefore have in the lib folder jars like

Static analysis of exhaustive switch statements of enums [duplicate]

孤人 提交于 2019-12-11 04:15:26
问题 This question already has an answer here : “Missing return statement” after switch(enum) - Why? (1 answer) Closed last year . Consider the following code: enum MyEnum { A, B, C; } int foo(MyEnum e) { switch (e) { case A: return 1; case B: return 2; case C: return 3; } } ^ error: missing return statement The compiler does not like this. Contrast this example with: int bar() { if (...) { return 1; } else { return 2; } } The issue with the switch could be addressed with a default case, but you

Why can shapely/geos parse this 'invalid' Well Known Binary?

我只是一个虾纸丫 提交于 2019-12-11 03:54:15
问题 I am trying to parse Well Known Binary a binary encoding of geometry objects used in Geographic Information Systems (GIS). I am using this spec from ESRI (same results here from esri). I have input data from Osmosis a tool to parse OpenStreetMap data, specifically the pgsimp-dump format which gives the hex represenation of the binary. The ESRI docs say that there should only be 21 bytes for a Point , 1 byte for byte order, 4 for uint32 for typeid, and 8 for double x and 8 for double y. An

OpenCL: Additional directories for header files

可紊 提交于 2019-12-11 03:47:56
问题 The OpenCL specification writes in 5.6.3 Build Options : 5.6.3.1 Preprocessor options ... -I dir Add the directory dir to the list of directories to be searched for header files. Can someone please explain what that means? As far as I know you cannot inlcude header files into your OpenCL kernels. So what could this options be for? EDIT: Link to the OpenCL spec: http://www.khronos.org/registry/cl/specs/opencl-1.1.pdf EDIT2: I was under the wrong assumption that it is not allowed to include