364 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
3
votes
2
answers
190
views
Getting inflated results when trying to find newline '\n' in a char array in C
First I opened a .txt file (less than 1kb btw) and stored the string data in a char array like this---
FILE *file = fopen("./tmp.txt","r+");
char CharArray[10000];
fread(CharArray,...
5
votes
1
answer
125
views
In Lua, why is this example (from Programming in Lua 1st edition) true?
I use SQL and R at work but I am brand new to Lua. (I'd like to learn it, among other new skills, so that I can eventually make mods for Baldur's Gate 3. Not sure that makes a difference but this is ...
3
votes
2
answers
163
views
Understanding static/dynamic array access with pointer arithmetic in C
I'm trying to understand how pointer arithmetic works in C.
Say if I have two arrays, one static and the other dynamic like so,
int a[10];
int * b = malloc(sizeof(int) * 10);
And lets assume each ...
0
votes
0
answers
47
views
Best way to add "style editor" to QuillJS?
I am currently trying to implement QuillJS as a WYSIWYG editor for HTML. Works well for many options. But, in order to keep my site "clean", I'd love to be able to present a "Styles&...
1
vote
1
answer
411
views
Is this use case diagram for managing and viewing business objects correct?
Hi I have multiple fonctionalities:
the manage and view share the same fontionalities but the view use case contains the view of dashboard and calender in addition.
I have one actor and if he/she ...
-1
votes
1
answer
69
views
In a loop what's the best practice to get input (cli) with validation, that also resumes like this? [closed]
I have written a java program to get a series of inputs from the user, step by step with the feature to move to the next question only after getting the valid input from the user like this, for ...
0
votes
2
answers
228
views
Should I have most of my code in the with statement? Python
I've noticed that most tutorials showing how to use a with statement they keep most of their code in that statement. Is there a benefit to keeping it open (other than accessing the contents again) ...
0
votes
1
answer
31
views
What type of datastructure does 'collections.defaultdict(set)' create?
Here, we are using set as the missing value default, how can we use an undefined set for that purpose?
0
votes
1
answer
35
views
Finding the right approach for creating an accumulated information table
I have a table in Power BI holding information about different customers. The table has the following columns:
ID - The unique ID of the customer.
Days since Registration - How many days have passed ...
0
votes
2
answers
649
views
Unable to add a generic concrete type to a list of generic interface
Background:
I am trying to create a list that can store different types/implementations of people. This list will then be filtered and operated on based on what type of person they are, and what data ...
0
votes
1
answer
109
views
Time complexity of the following two programs?
I know that the time complexity of the following code is O(n).
n = 10
for x in range(0,n):
print("")
I also know that the time complexity of the following code is O(n^2):
n = 10
for x ...
0
votes
1
answer
166
views
Shopware 6 administration: on create new product, price cannot be null
If i create a new product price.net === null & price.gross === null the product can't be saved.
What is the concept behind this? Why can a product.price not be null?
-1
votes
1
answer
239
views
Why is the "multiple .c files + linker" workflow is preferred over "multiple .h files included in one .c file"?
When I was starting .c programming my natural inclination was to write one "main" .c file, then add/organize extra features by #include-ing the .h files with function declarations, typedefs, ...
6
votes
1
answer
1k
views
What do files actually contain, and how are they "read"? What is a "format" and why should I worry about them?
As it becomes ever easier to use computers in general and get into programming in particular, an increasing fraction of beginners seem to lack certain fundamental understanding that was once taken for ...
2
votes
1
answer
121
views
Technical concept for a timeline-scheduler
my project is a scrollable scheduler, similar to vis-timeline and using Vue.js.
One of my biggest problems is how to scroll infinitely and smoothly in every direction (past and future).
I'll readily ...