1,530 questions
-2 votes
1 answer
67 views
Why does JavaScript map() return undefined without return in arrow function? [duplicate]
I'm trying to use JavaScript's map function to extract names from an array of objects. I expected it to return an array of names like ["Alice", "Bob", "Charlie"], but it ...
1 vote
1 answer
352 views
Fuzzy and exact matching using Arrow and Duckdb R
I have a large dataset of over 43 million rows and 3.84 GB and another dataset of over 6000 rows and 459 KB. I am trying to do an inner_join() based on two columns: One exact column based on a common ...
0 votes
2 answers
302 views
Working with a folder of large .txt files using Arrow, Duckdb, and Future
I am merging a folder 250 of large .txt files each approximately 1GB and over 6 million rows. I'm merging this folder with another .txt file outside of this folder that is also 1GB based on a common ...
0 votes
1 answer
74 views
Typescript-React Arrow Function Parameter Typing
When using Typescript and passing an arrow function into another function as parameter, what would the type callout be? My situation is with React components, and I'm trying to pass an activation ...
0 votes
1 answer
72 views
What forms a scope in javascript? [duplicate]
While reading about 'this' keyword and arrow function, I read: that arrow functions binds to whatever execution context the surrounding scope has. I have attached a simple code example below. When I ...
0 votes
1 answer
53 views
How can I return data from preloaded Electron script?
I have built a function in preload.js that gets a JSON file sent from main.js. renderer.js loads it fine, but I can't seem to give the data to another variable outside of the arrow function. main.js ...
1 vote
0 answers
337 views
Getting and Setting custom Json attribute in Laravel 11
I have a Model called Service which migration is as follows: Schema::create( 'services', function( Blueprint $table ){ $table->id(); $table->json( 'data' ); $table->dateTime( '...
1 vote
0 answers
64 views
Why use the (this) for a method that already has context, and how to use arrow syntax [duplicate]
I have an issue. I am learning JavaScript coding from a book I got and it is going pretty well. I went from not knowing anything at all to knowing how to store, modify and use data in about a week, ...
0 votes
1 answer
175 views
graphviz arrow, node, table - I'm looking for a solution to avoid a double arrow?
I generate a code for graphviz. This network plan always contains 2 arrows for there and back directions. Unfortunately, 2 separate arrows are displayed in the example - but I don't want that... ...
0 votes
4 answers
143 views
flatMap with one line of arrow function confusion
The first arrow function in flatMap does not get me what I need, the second arrow function does. I need to turn data into the flat name array ['John', 'Jane', 'Bob'] const data = [ [{ name: 'John',...
0 votes
0 answers
45 views
Can't change a variable inside onSnapshot method [duplicate]
So my intention is to fetch the data from Firestore with an onSnapshot method (as it automatically updates when a change occurs) and then write it inside a variable. I tried it with this: let ...
-2 votes
1 answer
75 views
Calling a function in Arrow Function
I just wanted to know how does this work, if I have an onChange() onChange={() => input()} The above code immediately executes the input function when onChange() is triggered. But what about this, ...
0 votes
1 answer
51 views
What is the difference between `function () {}` and `() => {}` in JavaScript? [duplicate]
I am trying to add a method to the Person constructor function but keep getting an output of "Hello undefined" function Person(name, age) { this.name = name; this.age = ...
0 votes
2 answers
93 views
Providing seperate ref attribute to multiple element in reacJS
I am trying to build a simple to-do list where each task can be edited by clicking on edit button which shows a previously hidden text field in which user can enter new name for the current task, for ...
-2 votes
2 answers
89 views
Higher Order Component in react js
The wrapper function takes two inputs, one is the component and the other is the class name. My question is, why didn't we directly use jsx codes after return? Why did we put an arrow function after ...