I have simple jekyll blog where I would love to add comments.app widget. Here is the code which I use to add the widget: the site.comments.commentsapp-id is stored in my _config.yml and it is placed correctly in rendered result. But the widget does not show on page. What did I do wrong ? Update: In inspect el…
Tag: javascript
How do I keep spaces in a string?
I am working with a substitution cipher, where each letter of the alphabet is represented by a letter from the substituted alphabet. The output I’m expecting is ‘pl m’, however I am getting ‘plo’ as the space moves to the next letter since there isn’t a space in the substit…
Electron, Javascript: How to select an array within an array returned by the database
I want to foreach an array to show on the screen. This array is the data from a database table. The code to get this data: But this variable comes this way: And I’m not able to select that array (_rejectionHandler0) Answer Since .query also returns a Promise, you need to await it. await conn waits for t…
How to add MySQL query results from a loop in Nodejs?
Essentially, I have an object with string keys and values (ex. {“michigan”:”minnesota”}). I’m trying to loop through all of these key value pairs and make a query from my database, and add the result to a list, which will then be what is returned to the front end. This is what I …
Problem with fetching data from Spring Boot API endpoint using Java Script
I work on web application and encountered an issue with fetching data from an endpoint using Java Script. If I type endpoint adres in a browser it works perfectly fine but somehow it does not work in the script. The response.ok is returns False. Here is script: Here is controller: Here is service: What is wro…
Merge PDF with PDF-LIB
I am trying to replicate the official example for merging 2 pdf files, but instead of hardcode the name of the file, I’d like to have the user upload two files. The code works well when the filename is hardcoded (see url2) but doesn’t work when trying to retrieve the filename from the input tag. W…
Comparing number always return false
I generate a random number with an interval and then I check if the number chooses by the user is the same, but it always returns false Answer Remove the rndNumber from function CheckNumber(rndNumber) { because that is actually the click event on the checkButton Also a good idea to cast to number since .value…
How can I redirect newly created users to their “logged-in” homepage?
I am running a Django Rest backend with a React front-end. JSON data during user registration is being pushed per normal. When users submit the register form, they are sent to a login page. I realize how annoying this is for the users, however I’m not so sure how automatically send the user to the logge…
discord.js eval command returning [object Map] and [object Object]
so I have my eval command, however when I run such things as an eval to set status or something like that, it returns either [object Object] or [object Map]. I have fixed the previous error with [object Promise], however Object and Map still occur. My code is below, if someone knows how to fix this that would…
‘Illegal invocation’ using input setCustomValidity and TS
I’m pretty much new to Typescript world and am converting one of the first React applications. Here I’m trying to set custom messages on input validation by using event.target.setCustomValidity but I’m getting the ‘Illegal invocation’ error when the setCustomValidity function get…