Skip to content

Ternary conditions to find expmod?

I am reading SICP in JS about a non-terminating example of ternary conditions: It explains that: This would make the function not just inefficient, but actually non-terminating! The problem is that the constant declaration appears outside the conditional expression, which means that it is executed even when t…

Javascript for loop only giving one output

I’ve been toying with this for far too long… I have no clue why that for loop at the end only sends one GET request. Please, spare me my sanity… I just don’t get it. The array “urls” contains the information I need, and the variable “sendstr” works perfectly wel…

Insert a image in on column in my table in quasar

How can I insert an image on one row of my table? I have tried to put v-if in my loop through the columns but I cannot get it right. I am pretty new to quasar so I might confuse things. My idea was to use the v-if for checking if the column name is ‘Image’ insert an image. And

How do I match up text labels in a legend created in d3

I am building a data visualization project utilizing the d3 library. I have created a legend and am trying to match up text labels with that legend. To elaborate further, I have 10 rect objects created and colored per each line of my graph. I want text to appear adjacent to each rect object corresponding with…

Ties are still running win messages?

I’ve been messing around with a rock, paper scissors project that codecademy gets you to try, I’m pretty happy with it but I have one problem! When the result is a tie, it logs the tie message (perfect!) but also logs the win message linked with the result! How do I get it to ONLY log the tie mess…

happy number algo question solution not working

trying to figure out this coding problem: Write an algorithm to determine if a number n is “happy”. A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number e…