I’m trying to use player data from a football stats API, but I can’t seem to get data for the current season (which can be found in the last object in the array). For some reason I’m only getting data for the third index (code below). Here is an image of the JSON data I am trying to access. …
Category: Questions
Loading spinner disables HTML5 required attribute
I have submit button (bootstrap) where i submit some data from input fields to my PHP query. I have added to this submit button a loading spinner after the button has been clicked by the user. Since i have added the spinner id to the button the HTML attribute for “required” is not longer working. …
How to detect regex pattern for strings with underscore
I am trying to create a regex for detecting the number of exact occurance of a string in another string. Here I am getting the exact match for “test” string and nothing else, but it’s ignoring all the “test” strings which have underscore associated with it either front or back(li…
Select filter hides all the items in the list
I am trying to create a select dropdown filter which dynamically gets its values and data from rest api. Here is my code HTML JS But for some reason it hides all the items and nothing change after changing the options I want to initially load all the items and then filter based on the option I want the select
Unexpected DOM Ordering Behaviour With Element.prepend on Infinite Slider-Track Animation
I’m working on an infinite slider but I’m experiencing a strange bug with DOM ordering. At the end of each animation iteration, the last child element is supposed to be prepended to the div.slider-track element so it renders at the beginning of the slider and pushes up the other cards before the n…
Verify if GraalVM is used
due to Nashorn being discontinued we are currently trying to change our (still Java 8) application (very big monolith) from Nashorn to GraalVM. Due to the application being used as library in multiple projects, instead of using the whole GraalVM runtime we decided to just adding the necessary jars to the clas…
How to check if array of objects that contains another array of object has property
Hi I have an array of objects which contains another array of objects. I need to find an object in array which contains another object in it’s array with certain propery ID. Let’s say i need to find an object in casses array which contains a user with certain ID. ID for user is unique. I could use…
Target a child link in a nav menu
I’m creating a dropdown nav for mobile and I’m using an active class to hide and show submenus via CSS. The code below works for the initial list item, but closes the parent as soon I try and open a child list item in the submenu (which uses the same structure and classes) What I think is happenin…
Node.js convert directory tree to JSON
What is expected?: I would like to convert the below listed directory structure into a single JSON file. The directory structure contains JSON files that are supposed to be included in the output file as well. Limitations: Node.js Questions: What would be a good/efficient way to generate the desired output, u…
how to sum of values in middle of pie chart using amchart 5
How can i show sum of value in the middle of pie chart using am charts. also i want to show values in decimal not in percentage. i have tried text:”[values.value.sum]” but it’s not working Answer You can just set the label text manually if you can’t figure out a built in way. Given I d…