Questions tagged [standards]
Standards are officially published or well agreed upon formats, procedures, or protocols. They allow individuals or organizations to collaborate by setting ground rules or boundaries. Standards often come with a set of preconditions or assumptions, which allow collaborators to take those conditions or assumptions as ground truth.
3,207
questions
1
vote
1answer
29 views
Does label need an input to go with (web standards)?
This is a bit of a technicality, best practices / standards question. Everything I read about the <label> tag talks about using it along with an <input> tag (https://developer.mozilla.org/...
0
votes
0answers
10 views
How to describe content of a CSV file in a tabular way using DCAT standards?
I have an RDFa file containing metadata of a CSV dataset using DCAT standards. I would like to include information about the columns and the labels inside each column. Is there a way of doing this ...
0
votes
0answers
7 views
SOLR - Standard Query Parser
I have customized surround query parser and it is working perfectly.
Now I want to customize standard query parser for forward proximity searches.
Can I customized standard query parser? where I can ...
0
votes
0answers
13 views
as.POSIXct sometimes could not convert
Please see the following example: some values could not be translated by as.POSIXct
as.POSIXct("2019-03-21T07:51:41.521Z")
as.POSIXct("2019-03-22T05:35:47.824Z")
The first is ...
1
vote
1answer
29 views
Where to find documentation on Swift type methods/functions
I am new to Swift/iOS development and having trouble finding certain documentation. It must be out there somewhere if anyone is able to figure this stuff out. I just haven't been able to find it - my ...
1
vote
2answers
41 views
Should You Use an Else Statement if All Other Branches Return? [closed]
I am currently working with Java, though this question is relevant for other languages as well. If ALL "if" and "else if" branches return or throw an exception, should you still ...
0
votes
1answer
50 views
Most portable way to use mprotect() on allocated memory
I was wondering if there is a portable way to dynamically allocate memory and then restrict read/write access to a portion of this memory, e. g. using the POSIX function mprotect(). I can think of the ...
0
votes
0answers
7 views
international standard for name of multipart file array field
Is there an international standard for name of multipart file array field?
Flutter client using DIO library for networking. DIO library adds [] after name of the array file field(ex.files to files[])....
0
votes
1answer
34 views
What's better UX/accessibility: disabled button or link with .active state? [closed]
I have a news feed page with two display options: "All Content" and "Personalized Content". I need some buttons or links to let users move between these two options, which involves ...
2
votes
2answers
42 views
C# Enforcing Use of Dictionary Keys
I'm wondering what best practice is for verifying or enforcing the Keys used for a Dictionary object/parameter.
Take for example this method:
public override SqlServerQueryBuilder From(Dictionary<...
0
votes
0answers
26 views
Is there anything being worked on by the standard committee to standardize name mangling? [duplicate]
Is the standard committee working on anything to standardize name mangling? We know that binaries for the same target, made by different compilers, can be incompatible due to name mangling differences,...
0
votes
0answers
16 views
Where can I find more information on special sequences in 'hash' part of URL, I.E. #:~:text=start%20of%20selection,end%20of%20selection [duplicate]
I just noticed, that when Google serves links in search results, it adds a special segment in hash part of url, which causes browser (Edgium in this case) to highlight certain text on the page i.e.:
...
0
votes
0answers
19 views
Implementing oEmbed discovery with a static link
The oEmbed spec requires a site to link to its oEmbed endpoint and encode the current URL in that link. This is quite annoying for static/CDN-served websites that have to now encoding/return the ...
2
votes
0answers
18 views
Is there a standard format for describing a calendar system?
I'm in the beginning stages of designing a timeline software. One of the main features of this software is intended to be that the users are not restricted to just the Gregorian Calendar. In fact, ...
0
votes
0answers
16 views
Is it appropriate to use UUID-based OIDs for formally published standards?
The NIST Post-Quantum Cryptography project is underway, but suppose some private individual intends to use some of those public-key algorithms over public network in their private software packages, ...
0
votes
0answers
65 views
Why is there a _t in many data types in c++? [duplicate]
I understand that data types like uint32_t are defined in the standard of C++ and uint32 not. But why? Why didn't they give the data types the simpler name without the annoying _t, like uint32?
0
votes
0answers
8 views
How to build a range box of hi/low from 1400 (2pm) to 2000 (8pm) daily
I am trying to ranges from 1400 to 2000 NYC EST as seen in the picture blue box. I would like for it to do it automatically. I drew it out below what the end goal is. The lang is for trading view
...
7
votes
1answer
100 views
Is it portable to take the address of malloc(), realloc() and free()?
Per the standard, is it safe to take the address of malloc(), realloc(), and free()?
For example,
#include <stdlib.h>
void * (*my_malloc)(size_t) = &malloc;
Corollary, is it possible in ...
0
votes
1answer
19 views
Maximum Size for a phone number extension?
Im trying to make a phone number extension field but Im not sure what the maximum amount of digits it can have and I dont see any sources online.
3
votes
1answer
97 views
Is a conversion from a double to a float always potentially invoking undefined behaviour?
Here is the relevant part of the standard (6.3.1.5.2 Real floating types) of C99 :
When a double is demoted to float, a long double is demoted to double or
float, or a value being represented in ...
2
votes
3answers
104 views
std::shared_ptr Thread Safe
Is a shared pointer (std::shared_ptr) safe to use in a multi-threaded program?
I am not considering read/write accesses to the data owned by the shared pointer but rather the shared pointer itself.
I ...
1
vote
0answers
28 views
Does POSIX require that `getconf V7_ENV` works?
POSIX says:
All of the following variables shall be supported:
[...]
The names of the symbolic constants used as the name argument of the confstr() function in the System Interfaces volume of POSIX....
1
vote
3answers
83 views
Rules of main() function when running at non-startup are the same as at startup?
There are some rules for main() function in the Standard.
If the function is called by the OS,
the value of argc is non-negative,
the return value is 0 by default, etc.
On the other hand, main() can ...
3
votes
1answer
95 views
Why is array initialization with brackets () marked as error by compilers?
I was researching the initializer syntax in C++, and according to cppreference, there are three possible ways of writing it, 1) brackets, 2) equal sign, 3) braces.
When trying to initialize an array ...
2
votes
1answer
54 views
Return compound literal
Look at this code. I return an address of the compound literal here.
#include <stdio.h>
#define FOO(bar) ((bar)->a + (bar)->b)
struct bar {
int a;
int b;
};
static struct bar * ...
0
votes
0answers
24 views
calculate weighted s.d in r
I want to calculate in r weighted mean and weighted standard deviation (the weights are sample weights, for a survey sample. It is suppose to show how many units in the population represent each unit ...
0
votes
0answers
45 views
Pdf coversion using Microsoft graph api
Is it possible to convert docs to pdf/a standard pdf.
In VB, useISO19005_1 Boolean
true to limit PDF usage to the PDF subset standardized as ISO 19005-1; otherwise, false. If you set this parameter to ...
0
votes
1answer
31 views
How are XSD elements combined in an xsd:extension pattern
I am working on transforming an XSD to a FrameMaker EDD, and I get stuck on the xsd:extension mechanism. As the W3C description of the XSD standard is really complex, I am hoping one of the XSD ...
3
votes
1answer
56 views
Order of evaluation for ternary operator in C
I am aware that according to the standard, fun(++a, a) should be avoided since second argument is not well defined.
However, is this formulation safe:
(++a ? a : 10);
I tested this snippet and it ...
0
votes
1answer
23 views
Keep getting “Cannot access field item on a value with type ARRAY<STRUCT<hitNumber INT64, time INT64, hour INT64, …>>”
I'm copying and pasting the code from the Google Analytics Cookbook:
SELECT one.hits.item.productSku AS ProductSku, ( sum_of_hit_number / total_hits ) AS avg_hit_number
FROM (
SELECT hits.item....
0
votes
0answers
36 views
How to get types defined in <sys/types.h>?
I have this simple code:
#include <sys/types.h>
int main()
{
u_int a = 10;
}
where the u_int should be define in the types.h header /usr/include/x86_64-linux-gnu/sys/types.h:
#ifndef ...
0
votes
0answers
10 views
How to pronounce the abbreviation of Human Interface Device “HID”?
I thought that it should be pronounced with each letter seperated as "aitch ai dee" (H I D)
While reading this article I noticed they had written "... a HID ..."
Since the letter H ...
0
votes
0answers
35 views
.net standard old csproj, migrate to packageReference
I want to migrate packages.config to packagesReference. I have solution consisting of 46 projects, For ASP.NET it's not possible to migrate whole .SLN so we need to go one project by one using this ...
1
vote
1answer
41 views
Working of the operators ++ followed by -> in the below example
Consider the code segment given below:
#include <stdio.h>
struct s
{
int x;
char c;
};
int main()
{
struct s x[2]={{1,'a'},{2,'b'}};
struct s * p;
p=x;
...
0
votes
0answers
34 views
User preference client-server dialogue
Is there any established standard, or guideline, which would specify client-server dialogue regarding preference of any parameters?
Example
Let's consider all the websites with embedded code editor.
...
1
vote
1answer
63 views
Why does Stripe use the Post method for updating resources
According to the RFC Put is used to update an existing resource.
But, the Stripe API uses Post to update objects. Why is this?
For example, in the Stripe Node Library
update: stripeMethod({
...
0
votes
0answers
24 views
Is XML schema the only constraint on XML files which are zipped inside a DOCX file?
A .docx file, when unzipped, has a certain directory structure which contains multiple xml files, and there is more than one version of the DOCX standard to which the .docx file might conform. But I ...
0
votes
0answers
11 views
Logged scatterplot graph with regression and standard deviation
How do I plot a logged scatterplot graph with a regression line and standard deviation around the regression line? The line does not seem to appear at all even after putting a limit on the decimal ...
1
vote
0answers
36 views
What is the right way for error handing in Function inside sub function?
what is the best practice for error handling?
1st way:-
async mainFunction() {
try {
await subFunction();
}catch (err){
console.log(err);
}
}
async subFunction() {
try {
//DB Operation
...
1
vote
1answer
47 views
Update the version of the Unicode Standard that is being used by Python
How can I check which version of the Unicode Standard is being used by Python? Does Python automatically use the latest version of the Unicode Standard? Do I need to update Python or a certain package ...
0
votes
2answers
51 views
Dynamic arrays with an embedded meta-information struct
I am fiddling around with an implementation of a generic dynamic array. The array should hold information about its size, how many entries are used, and then hold the actual data. The meta-information ...
1
vote
2answers
101 views
C/C++: How should preprocessor directive work on macros argument list?
Both C and C++ standards specify the following:
16.3.1 Argument substitution (C++11)
6.10.3.1 Argument substitution (C11)
After the arguments for the invocation of a function-like macro have been ...
8
votes
3answers
169 views
Is modifying the internal bytes of a const object undefined behavior in case it contains another object constructed by placement new?
Consider the following example:
#include <new>
struct FunctionObject
{
int operator()() // non-const, modifies the state of this object
{
i += 1;
j += 2;
return ...
1
vote
0answers
13 views
Standards on new API version
We have solution based product which expose the rest API and our product has quarterly releases. Also, we expose an API for all the functionality we do in UI, and it may by around 30 end point.
...
1
vote
2answers
62 views
Is using np.random bad practice for a single int?
Following from a comment on an answer I recently posted,
Any reason you are using numpy.random instead of the standard random
module?
@Gulzar "Any reason not to?" - Yes: ModuleNotFoundError:...
-1
votes
1answer
26 views
package convention for java Springboot lightweight controllers? [closed]
We have the controllers already being used with many apis in the package
com.mycomp.myapp.controllers
The controllers developed are heavy, so planning to add light weight apis with minimum request ...
0
votes
0answers
23 views
How to obtain confidence intervals for predicted value in using natural spline in geeglm
Below is what I have done and the error message I am getting each time
gee_fit <- geeglm(rslt~ ns(day,3), data = epidem,id =patid, family = binomial, corstr = 'exchangeable')
To obtain predicted ...
0
votes
0answers
14 views
How best to seperate attributes in a url
I'm building a product page that allows for multiple groups of attributes to be associated with a product. I'm creating a query string detailing the options selected which allow for retrieval if the ...
-1
votes
1answer
56 views
Does the order of declaring data types matter in C++ according to standards? [closed]
To clarify, I'm asking in reference to the C++ standard, not in reference to declaration before usage.
Does it matter in what order are things declared in a C++ .cpp file?.. Assuming we want to put ...
0
votes
1answer
38 views
Pointer-interconvertibility of derived and base class objects and the Standard's wording on it
I'm trying to understand when I can safely cast a derived object to a base subobject through a pointer to void (I think it should be the same as reinterpret_cast). But the Standard's wording on this, ...