Questions tagged [definition]
A generic tag for topics providing definitions.
1,567
questions
0
votes
1
answer
39
views
How to update a variable after it's returned in a function without repetition
i am making a game(cookieclicker to be exact)
im running of a problem of repetition so I fixed it but theirs still a problem of var not being returned, i cant seem to find a way to do it without ...
0
votes
1
answer
45
views
+200
Impenetrable confusing definition of API
So I was going through the Wikipedia page on API, in the first paragraph it is stated that
A document or standard that describes how to build or use such a connection or interface is called an API ...
0
votes
2
answers
36
views
How to returning a value that is not excluded in python?
I would like to create a function that would check if a given account is not a technical account. If the account is technical, we skip it, if not, we display account details.
technical accounts are ...
0
votes
1
answer
61
views
Function definition not found (even if they exist)
Here's my main:
#include "terremoto.h"
int main(){
std::string filename, zona;
std::ifstream in_stream;
std::ofstream out_stream;
nodo *elenco, *filtroZona;
std::list<...
-1
votes
2
answers
40
views
Multiple Definition Error Using Header and Implementation Files in C
With the header file (UDPRBPlib.h) and the implementation file (UDPRBPlib.c) I keep getting errors of multiple definitions for global variables and all of my functions shown below:
/usr/bin/ld: /tmp/...
0
votes
2
answers
73
views
A question about type conversion in C language
How to understand the conversion of character '!' to int type in C language is the process of converting from 1-byte 33 to 4-byte 33
I know that 33 is an Ascill table value, but why do they use ...
0
votes
1
answer
42
views
In Lean, how can i get the element from an exists_unique in a definition
I want to make the following
variables {Ω : Type} (P:set Ω → Ω → Prop)(a:Ω)
def G :set Ω → Ω:=
begin
intro V,
by_cases h: ∃!u : Ω, P V u,
--I want to use the u that is unique as return in this ...
0
votes
0
answers
69
views
Which is correct, namespace declaration or definition in header file? [duplicate]
If I want to create a namespace in a separate file. Which is the correct format? Defining that namespace directly in the header file or only declaring the namespace and its members in header file, ...
0
votes
0
answers
16
views
Big Data Characteristics and Challenges to DBMSs: precise correspondences
If we consider the seven features of Big Data individually as challenges to (NoSQL) DBMSs, what would be the features of NoSQL DBMSs that meet each of the challenges?
Volume : (horizontal) ...
-1
votes
1
answer
61
views
Stack problem c++. Error: ‘cin’ does not name a type [closed]
This stack program runs correctly for given array size arr[5] or arr[10].But when i take size as input from the user cin>>n it says "Error: ‘cin’ does not name a type."
Here is that ...
0
votes
1
answer
34
views
static member definition outside class template template
I'm getting:
error: default argument for template parameter for class enclosing 'ticker<T, E, A>::garbage_element'
51 | E ticker<T,E,A> ::garbage_element;
| ^~~~~...
-2
votes
1
answer
59
views
string or object in typescript resulting in error while accessing
I have replicated the issue in this playground
I tried with different safety checks before accessing the inner key, nothing helped.
0
votes
2
answers
29
views
Why is the dictionary not updating outside the definition even if i've returned the dictionary?
So the this dictionary is basically from a txt file and I formatted in order to have the same format as its supposed to have in order for my other definitions to work. The problem I'm having is that ...
0
votes
0
answers
13
views
In the context of Supply Chain Security, what is "provenance data" and "attestation data"?
I'm pretty new to the subject of Supply Chain Security (SCS) and there are two important key-terms that I see being used quite heavily (provenance and attestation), but I'm not sure that I understand ...
0
votes
2
answers
135
views
C# dynamic anonymous JSON definition
I have a rather large JSON file I am attempting to parse and set definitions for in C#. I am getting an error from the Newtonsoft JSON Deserializer.
Newtonsoft.Json.JsonSerializationException: 'Error ...
0
votes
1
answer
64
views
How does source code that hasn't included the necessary header files compile?
I am working on a open source project (Blender) and have encountered the problem that many source code files like the file I am currently working on don't have the necessary header files #included. ...
0
votes
0
answers
34
views
Getting time index
I have a time series data.I am getting only increasin and decraesing trends and values as sub-lists in a list from this data by using code below. But I also wantt to get time indexes of these trend ...
-4
votes
1
answer
68
views
What did Bruce Eckel mean by the formulation "inside methods of that type" in the term "private"? [closed]
The private keyword, on the other hand, means that no one can access that element except you, the creator of the type, inside methods of that type.
I don’t really understand what’s going on in the ...
-2
votes
1
answer
90
views
What is the definition of deblobbing?
I see references to deblobbed software, such as a deblobbed Linux kernel, or Mull, a deblobbed web browser. I scoured the Internet for definitions, but found none.
What is the definition of deblobbing?...
0
votes
1
answer
390
views
variable has incomplete type 'struct stat'
Hi trying to port some code and I'm not understanding the problem here,
getting the error - file.c:370:17: error: variable has incomplete type 'struct stat'
here is the code that is throwing up the ...
0
votes
0
answers
38
views
What's the universal formal definition of workflow (in contrast of a state-machine)?
TL;DR
What's the formal (or mathematical) model of a workflow?
Investigation so far
We all know that state machines are mathematically made of 6 components:
The list of states
The identification of ...
0
votes
0
answers
21
views
How to declare/define constructor with private data that is of a pre filled array [duplicate]
so I am having an issue with defining and declaring my constructor, normally this isnt a problem but this time I the private data is 2 sets of pre filled arrays. And I am not sure of the syntax for ...
-1
votes
1
answer
85
views
C++ extern variable exception (Solved) [duplicate]
extern int eg_i = 0;
int main(){
++eg_i; // 1
return 0;
}
This code surprisingly throws no compile error.
Because if an extern variable is declared with initialization, it is taken as the ...
0
votes
0
answers
67
views
How to get data from one definition to another
I have
a main.py,
I am trying to send a data
from main.py to utils.py.data_creation(Config_Address_loc, Read_data_Number, Selected_Camera) this side can send data successfully.
1- main.py side (OK)
if ...
0
votes
2
answers
74
views
Segmentation fault (core dumped) struct with an array c
I have this struct with an array in it that is supposed to tell the enemy where to walk. The problem is that I get a segmentation fault and I can not figure out why.
The Struct
struct Enemy {
...
0
votes
1
answer
170
views
Calling '' with incomplete return type ''
Despites all my verifications, I still can't figure what is wrong with the 10 first lines of my program...
typedef struct Case_PN Case_PN;
struct Case_PN {
unsigned entier;
unsigned flottant;
...
0
votes
1
answer
252
views
airline reservation def help python
for my homework I am asked to create a airline reservation system. It asks if they would like to either create, cancel, display reservations, or exit the program. I am having trouble figuring out how ...
0
votes
0
answers
55
views
how to pass a json file as a parameter in a swagger url
I'm trying to create a swagger definition from a json file.
what i want to do is to link that json file in the url so it'll be generated automatically as a swagger definition. (I want to send it as a ...
0
votes
0
answers
48
views
Synchronous and Asynchronous code confusing definitions
I might have misunderstood or be missing something but I have to clear this issue:
Asynchronous code means code that gets executed with multiple operations at the same time, without blocking.
...
1
vote
2
answers
164
views
Python lottery balls probability: name is not defined
Please excuse my beginners' mistakes :)
I have a task that asks me to find probabilities for user input amounts of total lottery balls and balls drawn. There's most likely something else wrong with my ...
0
votes
1
answer
40
views
c++ errror: undefined reference to 'function' [duplicate]
I have an error of using CvMatToImageView() function in main.cpp
#include "morph.hpp"
...
cv::Mat frame;
ImageView grayscale_image;
...
CvMatToImageView(frame, grayscale_image);
...
error
/...
0
votes
1
answer
91
views
Access a variable from the main block in Progress 4GL
Is there a way to access a variable from the main block if I am in an internal procedure and the internal procedure defines a variable with the same name?
For example:
define variable myVariable as ...
1
vote
0
answers
38
views
What's the technical term for a REST API that can accept/send multiple content types for the same endpoint?
Is there a technical term to describe the concept of an endpoint being able to accept/respond with multiple types depending on the Accept and Content-Type headers supplied by the client?
For example, ...
0
votes
2
answers
86
views
how do i convert results to list python
I have this code I'm trying to run by using two columns of a csv file that I've converted into lists and used those lists to get a < and > comparison between the numbers inside, now i want to ...
0
votes
0
answers
52
views
What does the first argument `this: SomeName` mean in the `*.d.ts` file?
interface Function {
/**
* Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
* @param ...
0
votes
0
answers
18
views
Create def I can apply to a column
I want to write a definition that transforms values into categories. I than want to apply it to a column.
This is my code:
def dur(list_of_duration):
for number in list_of_duration:
if ...
4
votes
1
answer
98
views
unit testing __init_subclass__ method in python 3.x
I am trying to unit test an inherited class for which its base class implements __init_subclass__ method. Code is the following:
quick_test.py
import unittest
from unittest.mock import ...
0
votes
1
answer
517
views
"error expected expression before '{' token"
I'm trying to declare global extern array and define it in another file but error is given. Please find the code snippet below
in .h
extern unsigned int HoldingRegisters[2];
in .c
HoldingRegisters={2,...
0
votes
0
answers
60
views
Finding definitions and declarations in Geany don't work in a C++ project
I use Geany IDE for editing C++ files. I should be able to find definitions and declarations of functions and variables in cpp files using right click menu or keybindings but it doesn't work. Whenever ...
2
votes
2
answers
84
views
Returning a struct pointer from class method
EDIT: Changed example code to code from my project that doesn't work.
I'm writing code in C++, learning templates and got stuck with some problem.
There's a class:
template<class T, class Cmp>
...
1
vote
0
answers
73
views
Inline out-of-class member function definition [duplicate]
struct S {
void foo();
};
inline void S::foo() {}
Can't figure out from the documentation if this function is considered inline or not. We use the inline keyword but in the definition of a ...
-2
votes
1
answer
74
views
why i am getting this error request for member set in b which is of non class type box[5] [closed]
why I am getting this request for member set in b which is of non class type box[5]?
I am calculating volume of box and storing length breadth and volume in box array of objects
what can I do to solve ...
0
votes
0
answers
31
views
How to define a function using cwt in Python
I am trying to define a function using cwt in Python, however, I get the error message
global name 'cwt' is not defined
This is the code that I am using:
import os
import matplotlib.pyplot as plt
...
0
votes
2
answers
77
views
char *test[]. What does it means this structure?
Example:
//
test.h
#define MAX 3
test.cpp
static char *movies[MAX] = {
"The Departed", "The Crow", "Hot Fuzz"};
//
Why not use Vector<char*>, or Vector<...
1
vote
0
answers
29
views
TSDF value when integrating around a thin surface
While doing 3D-reconstruction, I was puzzled by the following scenario of computing the TSDF value of a voxel:
Suppose you have a thin piece of paper standing up and you take pictures around it. You ...
1
vote
1
answer
154
views
What is the difference between function and keyword/statements?
I've seen 'del' being referred to as a keyword and as a statement. Apparently, it is not considered a function:
Python has a del statement (keyword) to delete objects, not a del function.
https://...
-1
votes
1
answer
63
views
Is there a shortcut to write a function with the same definition but different prototypes?
I have a method of a class which basically looks like this:
void MyClass::method() {
// Here I'm just doing something with parameters which are class attributes
parameter_3 = parameter_1 + ...
0
votes
0
answers
12
views
What does it occur when a global variable is defined twice in the same scope? [duplicate]
For example, vrb is a global variable:
<script>
var vrb = 25
if (true) {
var vrb = 15
}
document.write(vrb)
</script>
, what did it occured in my script related ...
0
votes
1
answer
78
views
How to create an object in a form like this: ifstream in();
Im beginner in c++. I have seen several times when object created like:
class_name object_name();
and after that you can refer to object_name as an object of the class.
How can i do this in my class? ...
0
votes
0
answers
68
views
3D vector class and assert that does not work
I'm trying creating a 3D class Vector and I have prepared the following code:
class Vector:
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z = z
...