specifications

Is the at-sign (@) a valid HTML/XML tag character?

江枫思渺然 提交于 2019-11-28 07:12:42
问题 I'm doing some HTML stripping using regular expressions (yes, I know, never parse HTML with regexes, but I'm just stripping it, and I also unfortunately cannot use any external libraries). I'm using a regex from the Regular Expressions Cookbook, and it has worked great, except I just ran into this problem: In the string Bob Saget <bobs@aol.com> , my regex is matching the email as a tag. So my question is, is the @ sign a valid XML or HTML tag character? (I'm not asking whether or not it is

Multi column search using Specifications Spring Data Jpa within associated entity?

血红的双手。 提交于 2019-11-28 07:04:21
问题 I am taking this question Perform multi column search on Date, Integer and String Data type fields of Single Table? and This method must return a result of type Specification<Employee> in Java 8 further ahead. Actually I wanted to search within association entity as well as a part of global search. Will that be possible using JPA 2 Specifications API ? I've Employee and Department @OneToMany bi-directional relationship. Employee.java @Data @Builder @AllArgsConstructor @NoArgsConstructor

CSS *only* detection of text overflows in HTML?

狂风中的少年 提交于 2019-11-28 06:58:46
问题 I've seen suggestions on using JavaScript for detecting and acting on text that overflows an HTML element. But it's 2013, so I was wondering if maybe the CSS spec had a way to detect overflows itself. In other words if I have a fixed size div: <div class="smart-warning" style="width:200px; height:20px; overflow:hidden"> This is my very long text that would overflow the box. </div> I'd like to have a style that would do something if the text overflowed such as: <style> .smart-warning { border

Why is the slash an escapable character in JSON? [duplicate]

倾然丶 夕夏残阳落幕 提交于 2019-11-28 06:22:58
Possible Duplicate: JSON: why are forward slashes escaped? json.org states, that forward slashes (aka solidus, / ) can be escaped: "\/" However, unescaped slashes are valid, too: "/" What's the rational behind this? Does it come from the Javascript roots? (I.e., "</script>" is a problem in browser-based Javascript, see Douglas Crockford's comment ) Or has it any other reason? I've just published a review of this issue on my blog. I think you are right, that's the only reason. Also note that the slash is the only standard character allowed to be escaped. Usually JSON encoders do it wrong and

enum.values() - is an order of returned enums deterministic

穿精又带淫゛_ 提交于 2019-11-28 04:01:58
I have a enum SOME_ENUM : public enum SOME_ENUM { EN_ONE, EN_TWO, EN_THREE; } Will SOME_ENUM.values() always return the enums in the order of enum declarations: EN_ONE, EN_TWO, EN_THREE ? Is it a rule or it is not guaranteed to be not changed in the next JDK releases? GaryF The Java language specification uses this explicit language: @return an array containing the constants of this enum type, in the order they're declared [Source] So, yes, they will be returned in declaration order. It's worth noting that the order might change over time if someone changes the class so be very careful about

MP4 File Format Specification [closed]

丶灬走出姿态 提交于 2019-11-28 03:57:56
I am writing some code to parse MP4 files ... Is there a free source to get documentation on the MP4 File Format Specification. So far I have only found an ISO document which I would need to purchase ISO PDF . Is MP4 Not an open standard ? Here's the specification of the ISO base format , and here is the MP4 file format specification , both defined as part of the ISO/IEC 14496 standard. Also take a look at the QuickTime MP4 specification . It has a very clear explanation. Jaco " ISO 14496-1 Media Format " gives a detailed description of the MP4 layout: Akagi201 The latest ISO doc is ISO/IEC

Config spec in ClearCase

时光总嘲笑我的痴心妄想 提交于 2019-11-28 00:30:17
I have tiny question about ClearCase. Help me please! When does config spec start to work? When I click CHECK OUT or CHECK IN ? I have test.c and I have config spec element * CHECKEDOUT element * .../branch_1/LATEST element * /main/LATEST -mkbranch branch_1 then I modify test.c , then I change config spec: element * CHECKEDOUT element * .../branch_2/LATEST element * /main/LATEST -mkbranch branch_2 Then I Check in test.c and I have: created /main/branch_1/1 . BUT WHY??? VonC The config spec will apply the rules on each update and on checkout, and on checkin (but not as you think it would). On

Java: Rationale of the Object class not being declared abstract

时光总嘲笑我的痴心妄想 提交于 2019-11-27 22:46:44
Why wasn't the java.lang.Object class declared to be abstract ? Surely for an Object to be useful it needs added state or behaviour, an Object class is an abstraction, and as such it should have been declared abstract ... why did they choose not to ? Ande, I think you are approaching this -- pun NOT intended -- with an unnecessary degree of abstraction. I think this (IMHO) unnecessary level of abstraction is what is causing the "problem" here. You are perhaps approaching this from a mathematical theoretical approach, where many of us are approaching this from a "programmer trying to solve

JPA2 Criteria-API: select… in (select from where)

浪子不回头ぞ 提交于 2019-11-27 22:43:51
问题 I have the following database model: A aId AB aId bId B bId status In a Spring data Specification, I want to return the instances of A when B.status is 'X'. The JPQL code is the following: select a from A a where a in (select ab.id.a from AB ab where ab.id.b.status= :status) These are the model classes: @Entity public class A { private Long aId; @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, mappedBy = "id.a") private Set<AB> ab; } @Entity public class B { private Long bId;

Is there a specification of x86 I/O port assignment?

旧城冷巷雨未停 提交于 2019-11-27 22:19:57
I found some information on the web as follows, but incomplete. http://en.wikipedia.org/wiki/Input/output_base_address http://wiki.osdev.org/I/O_Ports Where to download the specification? A good source for current (and not from 1994) I/O port map is chipset documentation, e.g. Intel® 7 Series Chipset Family PCH Datasheet (see section 9.3, I/O Map). For example, here are some ports which are commonly used in modern PCs and are not mentioned in the old lists: 2E-2F,4E-4F: Low Pin Count (LPC) interface, usually connected to Super I/O 0CF8, 0CFC: PCI configuration space access B2: ACPI and SMI