React-Router not receiving props if it's the same path, but different param?
I have a path /player/:id/If I navigate from say /player/12 to /player/13 it will error out, for example: cannot find foo of undefined. However if I navigate from a different path such as /heroes/100...
View ArticleMailChimp. Error 401 (Unauthorized) when sending a request for adding a new...
Here is how I'm trying to send a request:fetch('https://us17.api.mailchimp.com/3.0/lists/185415c92c/members', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization':...
View ArticleReact Dropzone Uploader not playing along with form upload to mongo
(New to stackoverflow so please correct me if I've seemed to miss something from CoC) (Unfortunately wasn't able to tag this under 'react-dropzone-uploader', since I don't have 1500+ rep points)I'm...
View ArticleWhy is only one property being printed
I'm working on a project with Google Apps Scripts that use the scriptProperties service to save text a user inputs and print what was input last when the program is opened later. The problem I'm...
View ArticleJavascript function to convert decimal years value into years, months and days
I need a function to transform decimal values of years in years, months and days. Ex: 1.5 years = 1 year, 6 month. 2.2527397260273973 years = 2 years, 3 months and 1 day.I started with this...
View ArticleString and number concatenation
I have this little script that adds a a certain increment to numbers from text field. I have two text fields, Text1 and Text2. Text1 takes the input numbers,the function adds a plus 6, ie makes a 4 a...
View ArticleStruggling to render multiple components onto a page using a function + for loop
I want to render components into my React app using a for loop inside of a function.But when I add n > 1 number of components to the variable I am returning inside of the function, the page ends up...
View ArticleHow to return a value from a PouchDB database?
I am working in a React-Native project (JavaScript language) with a PouchDB database. A have a specific file for database functions and one of them is:export function getStratumName(columnId,layerKey){...
View ArticleInput type="file" data empty when posted
I'm working on a Vehicle damage form where users can click picture of their vehicle. How it works?They choose a description of the photo they want to click.Then they click on Add buttonI append input...
View ArticleTweet API Discord.js
const Discord = require('discord.js'); const Commando = require('discord.js-commando'); const Twitter = require('twitter'); const config = require("../config.json"); const clientTwitter = new Twitter({...
View ArticleReact native DatePicker component: the wanted date disappear?
mycode <DatePicker style={{width: 170}} date={this.state.date1} mode="date" placeholder="select date" format="YYYY-MM-DD" maxDate="2020-01-01" minDate="2010-01-01" confirmBtnText="Confirm"...
View ArticleNon-capturing group matching whitespace boundaries in JavaScript regex
I have this function that finds whole words and should replace them. It identifies spaces but should not replace them, ie, not capture them.function asd (sentence, word) { str = sentence.replace(new...
View ArticleHow to center the whole image comparison slider
When I manage to move the image comparison slider, the actual 'slider' left behind. The slider JS code is from https://www.w3schools.com/howto/howto_js_image_comparison.aspand can be easily inspect...
View ArticleHow to fetch data (method call) every five seconds in Flutter?
In JavaScript, I could constantly fetch data without an explicit request from the user by calling a function fetchData() every five seconds using setInterval(function() { fetchData() }, 5000); and this...
View ArticleJavaScript not working after GitHub deployment
I am trying to host my developer profile on GitHub. I have a small javascript typing project I am working on that gets a quote from an API and lets you type the results showing your errors and WPM. It...
View ArticleFormat input with regex
I have a input field which is a percent value, i am trying for it to display as % when not focused in and when focused in it will loose the %, also the input field needs to avoid chars on it. I'm using...
View ArticleHow to check empty/undefined/null string in JavaScript?
I saw this thread, but I didn't see a JavaScript specific example. Is there a simple string.Empty available in JavaScript, or is it just a case of checking for ""?
View ArticleAccess model property from javascript
I have an ASP.NET MVC project and I am trying to access a model property (isNew) from the view (.cshtml) and from within javascript function so I am performing below without success:@model...
View Articledisplaying modal image from loop, function in javascript
so i am trying to display some images onclick function, which comprises of many clickable images. Problem is that i made the thumbnail images from an arrayloop in php. Found a way to set distinct id...
View ArticleNode.js - How to hide html pages?
I have html pages which shouldn’t be seen by the users who haven’t logged in. I used the command below and my html pages became public.app.use(express.static('public')); For example, I do not want...
View Article