1,763 questions
3
votes
1
answer
764
views
Browser events default action - Is there a spec for it?
Some events has default action. For example - clicking on a checkbox will check/uncheck it. This can be prevented by the event.preventDefault() method.
While looking for the errorEvent default action, ...
0
votes
1
answer
81
views
By what is the suspended execution of context in the eventloop model?
Giving the code instanly:
setTimeout(() => console.log("next macro")); /// next macro
Promise.resolve().then(() => gen.next()) /// microtask inside, #2
const gen = (function*(){
console....
0
votes
1
answer
438
views
I am finding it difficult to create an .exe from python script using pyinstaller. My script executes perfectly but when i run the .exe i get traceback
My Python script executes perfectly in a virtual environment which has python 3.9.2 but when i create an exe using pyinstaller the exe doesn.t work, i get tracebacks of certain modules missing but ...
0
votes
0
answers
43
views
Use case specification include and extend relationships [duplicate]
I am writing out a use case specification for my use case diagrams and I am unsure whether include or extend relationships should be part of the use case specification or if it should stick to the ...
4
votes
1
answer
6k
views
Reset Redux store after each test with jest
I am using Jest to test my Redux actions, sometimes it happens that a test does something which conflicts with what other tests do.
For example, I test an action called add a user so it increases the ...
2
votes
2
answers
3k
views
How to a specify a property that is a function in Json Schema
I want to be able to define functions with parameters and return type for my JavaScript object specification. I am hoping to be able to do this using JSONSchema. But, I can't seem to figure out how to ...
2
votes
2
answers
311
views
Why doesn't undefined?.fun() throw an error?
I was very surprised to see the following behavior in Node 14.18.0:
> {}?.fun();
Uncaught TypeError: b?.fun is not a function
> undefined?.fun();
undefined
I understand why the first statement ...
0
votes
2
answers
2k
views
How to work with lists in JPA Specifications
I've been trying to wrap my head around working with JPA Specifications but I cannot figure out how to convert this query:
select employees.* from employees
left join qualification_assignments on ...
0
votes
1
answer
132
views
Unable to insert null checks when using HAVING clause while building Spring Data JPA Specifications
My code is currently working using the query below and I am converting the query to JPA Specification.
@Query("SELECT DISTINCT h, SUM(m.annualIncome) " +
"FROM Household h LEFT ...
0
votes
1
answer
2k
views
Spring data jpa avoid in memory pagination and n+1 using specification
I am trying to avoid in-memory pagination and N+1 while using Spring Data JPA Specification.
To be specific, I'm using the below method provided by the framework.
Page<T> findAll(@Nullable ...
4
votes
1
answer
5k
views
What is the Vulkan API version variant in VK_MAKE_API_VERSION?
I just realized while using VK_MAKE_VERSION that it has been deprecated. The deprecation message recommends using VK_MAKE_API_VERSION instead. The only difference between them is that the latter has ...
0
votes
1
answer
153
views
What for is equals sign after a type in specialization struct?
I faced such a code:
template <int = 42>
struct Foo{
int x; };
Does it have sense, or it's complete nonsense?
1
vote
1
answer
107
views
Textures using different data types for different components
The OpenGL 4.5 doc and spec mentions the existence of parameter names GL_TEXTURE_RED_TYPE, GL_TEXTURE_GREEN_TYPE, GL_TEXTURE_BLUE_TYPE, GL_TEXTURE_ALPHA_TYPE, GL_TEXTURE_DEPTH_TYPE for ...
2
votes
1
answer
281
views
When were javascript: URLs (pseudo-protocol) introduced into the HTML standard?
The javascript: in URLs has from my reading on the internet been around for a very long time while not being an actual standard. The protocol is currently part of the HTML spec. When was this ...
0
votes
1
answer
3k
views
How to use join when doing composition with Spring data JPA Specification
Let's say i have two static methods :
public static Specification<SomeEntity> isSomeValue() {
return (root, query, builder) -> {
Join<SomeEntity, JoinEntity> join = root....
-2
votes
1
answer
46
views
Can anybody help me resolve the syntax?
if anybody can explain how this api work or take the paramaters when u search for a product . how this product status ,category id reflects .
seproduct/api/products?status.equals=Published&...
0
votes
1
answer
108
views
Determing the color of uncovered GIF pixels
Here is a GIF containing just one image, 75 pixels wide.
The image has an Image Descriptor with an Image Left Position of 25.
So the leftmost 25 pixels of the image are not covered. Since the GIF ...
2
votes
1
answer
1k
views
CSS clip-path property: relative path ➰
I'm trying to use the css clip-path property with a path. But I'm failing to construct a path that's defined in a relative way, similar to for example clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 ...
1
vote
0
answers
41
views
May I consider values in JavaScript's WeakMap to be weakly reachable?
If I have two WeakMaps in javascript:
/**
* @type {WeakMap.<Function, Provider>}
*/
const providerFtn = new WeakMap();
/**
* @type {WeakMap.<Provider, Function>}
*/
const provider = ...
1
vote
1
answer
1k
views
How flex: 100% works in css?
As MDN web docs states : "flex property is a shorthand for the "flex-grow", "flex-shrink", "flex-basis".
One-value syntax: the value must be one of:
a <number>...
5
votes
2
answers
3k
views
OpenAPI specifications - how to specify an input parameter that accepts a range of values
Using OpenAPI 3.0.3, I am defining an API spec which accepts two input query parameters.
- name: land_area_llimit
in: query
description: Lower limit for land area comparison
required: false
...
0
votes
1
answer
525
views
Circular import error with some not familar error
/usr/local/bin/python3: Error while finding module specification for 'system.__main__' (ImportError: cannot import name 'LANG' from partially initialized module 'system' (most likely due to a circular ...
2
votes
3
answers
124
views
Are there any guarantees made by the C language specification that the size of a short will always be double the size of a char? [duplicate]
From my research, these were the only guarantees that I could find about these built-in integer data types:
char will not be smaller than 8 bits
short will not be smaller than 16 bits
short will not ...
4
votes
0
answers
995
views
Spring Data JPA Specification: Filtering complex data
I am trying to filter some data from the table shown below. I have successfully done that using native query. But some how the requirement got changed and now i want to do it using JPA Criteria ...
6
votes
2
answers
181
views
Is "--" a valid CSS3 identifier?
According the CSS Level 3 specification, for parsing the start of an identifier, you:
Check if three code points would start an identifier
Look at the first code point:
If the first character is -, ...