Search results

  1. EkBass

    JavaScript code breaks when I use a variable

    https://validatejavascript.com/
  2. EkBass

    JavaScript code breaks when I use a variable

    I think you are missing at least one closing bracket there. A bracket that looks like is closing the function, is actually closing the IF statement. Function is not closed in your code at all. Make sure also, that you have declared properly whatever you are using in line l_LED_selected = 1;
  3. EkBass

    C++ How to calculate the greatest common divisor of two numbers in C++.

    I dont see anything wrong i your code, except if you try to find the greatest you should loop from top to down. Or im i too tired here to understand something? :D I think it was C++ 11 where was __gdc introduced. Then its basically like this: int a = 24, b = 36; int gcd = __gcd(a, b); cout <<...
  4. EkBass

    JavaScript if statements prompting a download

    You want this behaviour for webpage or console? Anyway, here is simple example. I cant test now, but its atleast close to something that works. // function comapres is parameter true or false // by that, one of two files is offered as download function downloadFile(isFile1) { const file1Url =...
  5. EkBass

    alternative name for composer.json

    I remember this issue was talked about somewhere few years ago. Then there was requests for alternative naming for composer.json. But to be honest, im not sure has it been done yet. Try seaarch from getcomposer.org
  6. EkBass

    JavaScript Syntax error line 1 character 1

    Please use code tags for your code and Java <> Javascript ;) This might be issue with ES6 vs. ES5. If you rename the suffix of your file from .js to .cjs then will it help? Also more information would help. Are you trying to run this with browser or with nodejs or something else?
  7. EkBass

    JavaScript JavaScript: how to keep track of the circle in canvas on specific path?

    Hi. If you dont want to use third party libraries, then i guess your best shot is to store coordinates of the shape somehow in array etc. By that, you can do collision detection. You can also read pixels from canvas from the area where the "ball" is and if there is not black pixel inside the...
  8. EkBass

    JavaScript Javascript: Password Generator - I need help.

    Hi. Can you provide more information about the problem you face here? JS code itself looks valid.
  9. EkBass

    Travelling Salesman Problem Using Dynamic Programming

    Hi. If you need help with this problem, youtube is full of tutorials about this issue. I have not ever coded this myself, though maybe i should try.
  10. EkBass

    JavaScript Why is my gltf-animations not playing? (Javascript & Three.js)

    Please use proper code tags in your post to make code more readable. Anyway, there is issue with the structure and the update function is not called with the render loop. I have not tested this code, but it should work or be close to it. const loader = new GLTFLoader()...
  11. EkBass

    Introducing TeaScript script language

    Ok. Im kind of dirrerent here lol. I think semicolon at the end is a good thing. Not that i would not survive without. Several years with BASIC dialects wnet just fine without semicolons. I just wonder why its so big issue is there or is there not. Afaik, js neither require semicolons.
  12. EkBass

    JavaScript Date Refresh

    Ok. What have you tried so far?
  13. EkBass

    JavaScript Auto background image in JS

    Looks proper and good way. If it works, you are ok to go. Not sure what you mean with multiple images,
  14. EkBass

    JavaScript Date Refresh

    Hi. Check out setInterval function. Window setInterval() Method
  15. EkBass

    PHP Undefined Array Key Help

    hmm...not sure what you mean. $rows[$key] = $row['id']; Tries to add value of $row['id'] to $rows[$key] and this 'id' is not found.
  16. EkBass

    JavaScript Auto background image in JS

    Hi. This should be a good place to start at with your task HTML DOM Style background Property
  17. EkBass

    JavaScript What is JavaScript?

    Yeah. JS cant be considered anymore as front-end language for websites. Its actually a very powerful and popular for backend works aswell. Though, all the tutorials are not yet updated for that fact. In generally, i think that in gaming, JS has already significant footsteps around everwhere.
  18. EkBass

    would Firebase be good for making a forum/chatroom?

    MySQL has its own syntax how to use it just like every other db has, so whatever db you use, you need to learn something. PHP is good tool for many issues, just like js, c, c++, freebasic etc. If you open up a bit what you are working on, we might be able to help you a bit.
  19. EkBass

    PHP A non-numeric value encountered Warning

    if ( (int)$smof_data[$value['id']] != $value['std'] ) That compares the integer value of $smof_data[$value['id']] to $value['std'] ) which is type of what? If its boolean, double, string, char, floating etc. it causes an warning or error depending of context.
  20. EkBass

    PHP Undefined Array Key Help

    Hi. That's because of the $row variable in the line $rows[$key] = $row['id']; does not have an index of 'id' defined.
Top