97 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
2
answers
111
views
Understanding Rust borrows/references when looping over vector
I am struggling to find a way on how to solve following problem in Rust. I want to be able to loop over a (mutable) vector and still be able to loop over the same vector nested in the outer one.
...
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?
-2
votes
1
answer
158
views
How do you 'catch' Email addresses inside a log file?
'''
This program is to read through any number of inputs (that is only: .txt files) the user passes through the sys.argv (through the terminal only). The file should only be a .txt file. Which means ...
0
votes
1
answer
85
views
How does the nlp object work in spacy library?
From what I understand so far, it is an instance of the 'Language' class in spacy, and can process text and perform a bunch of operations on it.
import spacy
nlp = spacy.blank("en")
# ...
27
votes
1
answer
18k
views
What Is The Purpose Of A Record Struct?
C# 9 added the record type, which is a new reference type that uses value-based equality.
C# 10 introduced the record struct syntax to define a value type with similar properties to record (https://...
2
votes
1
answer
263
views
Rust equivalent of concurrent code written in Go?
I'm stuck at doing multithread feature in Rust. I'm trying to do translate my code written in Go that updates a map's value while iterating and make a new thread. (simplified codes)
my_map := make(map[...
0
votes
1
answer
151
views
When is a variable in a nested scope destroyed from the memory?
void main() {
int x=5;
{
int x= 6;
cout<<x;
}
cout<<x;
}
the output is 6, 5.
My question is: when Assign x to 6, it reserved a memory cell for it, and ...
0
votes
2
answers
970
views
Is every variable and register name just a pointer in NASM Assembly?
There are [] operations which are similar to dereferencing in high-level languages. So does that mean that every variable and register name is just a pointer or are pointers a high-level languages ...
0
votes
2
answers
2k
views
When overloading a parent method, why did PHP8.1 change towards deprecating incompatible return types?
I overloaded query method of mysqli class like so:
class MySql extends \mysqli
{
function query(string $sql): ?MySqlResult // line #30
{
$result = parent::query($sql);
return ...
0
votes
0
answers
77
views
What is AsyncStorage *for*?
I can find information on how to write calls to AsyncStorage, how it actually stores information on device, etc., and some basic examples of usage storing keys, but what I'm looking for is a broader ...
1
vote
1
answer
261
views
Java import wildcard accessibility for nested static classes
How does the java accessibility (or perhaps, scope) work with respect to type import multi-level nested classes? An example:
ClassA.java:
package com.oracle.javatests;
public class ClassA {
...
0
votes
1
answer
193
views
An exercise about Java constructors
I have an exercise which is asking us about basics concept apparently. But I can't find any information or at least I'm not sure about what I'm suppose to search. So I have a small class and I need to ...
1
vote
1
answer
1k
views
What's the idea behing W-, P- and I-files?
I'm working with appBuilder and procedure editor in Progress Release 11.6.
As mentioned in some previous questions, regularly I'm having problems with the appBuilder, not wanting to open files, ...
0
votes
1
answer
160
views
Add new concepts to the WordNet using NLTK python API OR attach other concepts banks to WordNet
I am working on a project where I want to retrieve the list of semantically similar concepts for a given sentence using WordNet and BERT. But there are some concepts which are not included in the ...
-5
votes
1
answer
168
views
Why does the value of i not increment for i=i++; statement? [duplicate]
Code:
for(int i=0;i<5;){
i=i++;
printf("%d",i);
}
The above program print zeros infinitely, How is that possible?
There is the statement i=i++;. Please explain why the value of i do ...