Posts by wkrueger • 301 points
12 posts
-
0
votes1
answer39
viewsA: Google maps addListener using React
The following code from your example creates a map instance var map = new window.google.maps.Map(ref.current, options) setMap(map) ... Refer to the object created by this call, and pass it in the…
-
1
votes2
answers102
viewsA: Uncaught Typeerror: Cannot read Property 'split' of Undefined - Javascript
It means that the variable events is empty. The part of your code pasted above does not seem to bring this error. It may be that your function is being called from elsewhere. Suggestion: Edit your…
javascriptanswered wkrueger 301 -
1
votes2
answers49
viewsA: I started studying Java Script, and I’m having a problem with my code ( from an exercise). And I have no idea how to solve the problem
Not answering your problem directly... You don’t know where to go because you can’t isolate which part of your code is the problem. First: I strongly recommend you study how to use a Debugger…
-
-1
votes2
answers1211
viewsA: How to Create a Reusable Component in Angular
There are many ways to write, and it may be difficult. First, let me give you some general reminders: A service is a state container. It has only data and no template; A component is a state…
-
0
votes2
answers50
viewsA: Overwriting the occurrences of a string in a text file. Differences presented with several file opening modes
The syntax with creates an isolated scope. In its first code snippet, crypto with refers to a variable X, the crypto with refers to another instance, a variable Y. What is a scope? The scope refers…
-
2
votes2
answers623
viewsA: How to publish a Typescript library on NPM?
import * as idb from 'idb2promise' That worked. Probably place esModuleInterop: true in your tsconfig solve the problem. Then you can also import via import idb from 'idb2promise' (import defailt…
-
3
votes2
answers487
viewsA: Can anyone explain to me the meaning of the $ dollar symbol in Javascript?
There are 3 different cases there! $(this).parent().parent().find('input'); In this case $ is simply a variable name. There is no special meaning! When you include the library jquery in the context…
javascriptanswered wkrueger 301 -
-1
votes2
answers77
viewsA: Performance problem when declaring variables
There is no problem of performance you make designations. Probably even compilers optimize this. Okay, kicking an answer, more related to programming patterns in general. It is very common for a set…
-
0
votes1
answer69
viewsA: Update nested array in mongodb
The mongodb javascript API provides the methods updateOne and updateMany, who accept the key $set to make partial updates. Verify: https://docs.mongodb.com/manual/tutorial/update-documents/ If you…
-
6
votes3
answers731
viewsA: What is the advantage of using getters/setters in Javascript classes?
It is more a matter of opinion. I believe that the most common current of opinion discourages the use of such a form of statement, some reasons include: Code readability, nonexplicit code (an access…
-
2
votes1
answer309
viewsA: Adonisjs, how to update multiple tables with just one await?
I don’t know Donis, giving another generic answer... Recalling that what the await does is "unwind" the response of an object of type Promise<T>. const x = await y //onde y possui tipo…
-
0
votes3
answers363
viewsA: Print values from the same variable via GET PHP
If you want to debug your code, you should actually try to configure the use of Xdebug with your text editor of choice, instead of debugging in the print base. Phpstorm - I believe it comes along…