Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. S

    What should I learn next? Mention anything

    I'm feeling bored. My job involves linux, k8s, docker, sql etc. What should I learn next? I want to learn music but it's expensive to purchase good musical instruments. I don't like learning drawing, new foreign language etc. I like to learn programming. But I'm not sure what should I learn...
  2. S

    C++ Which C++ book should I read?

    I'm picking the book for exercises.
  3. S

    C++ Which C++ book should I read?

    The graphics book is excellent. Have a look at it. None of SFML, Opengl or SDL books are written like this book. That's why. So, which book should I buy/read?
  4. S

    C++ Which C++ book should I read?

    I've finished a 50hr course on C++ and my basics are somewhat clear although I'm not confident of it. So, I am looking to improve my C++. My ultimate aim is to study data structures and algorithms in C++. As I said earlier, I've already grasped basics of C++. Since my ultimate goal is to...
  5. S

    Which of these projects are easier in order?

    CS Notes selling site for my country. blog website Meme templates website Movies like "movie_name" recommender Reminder in calendar. Video watched percentage calculator from a playlist. Like in udemy. Another blog where anyone can create an account and post. Locally hosted book search engine...
  6. S

    How do I learn programming?

    For eg: Currently I am trying to learn bash shell scripting, text processing using bash etc. But the problem is I don't think I can learn it. Why? Because I don't know programming. In particular, problem solving. I don't know problem solving at all. I try my best but I fail. In the past, I tried...
  7. S

    C++ How does changes in user defined function gets reflected in main function in call by address?

    I've got it. int main( void ) { int x, y; // two variables, allocated on the stack, say at locations 0x4 and 0x8, values undefined change( &x, &y ); // receives 0x4 and 0x8 return x + y; // accesses memory at 0x4 and 0x8, returning the sum of the values stored there } void change(...
  8. S

    C++ How does changes in user defined function gets reflected in main function in call by address?

    the common reason i'm reading is "address gets passed so". but I'm failing to realize it mathematically like above.
  9. S

    C++ How does changes in user defined function gets reflected in main function in call by address?

    I've asked my question in the figure below as picture speaks 1000 words. My question in short is same as title. Code: #include<iostream> using namespace std; void change(int*,int*); int main() { int x,y; cout<<"Enter values of x and y"<<endl; cin>>x>>y; change(&x,&y)...
  10. S

    What should I do Before I give up programming?

    can you suggest a micro level roadmap on what should I do now in order to learn programming?
  11. S

    JavaScript What does the x and y value mean here? Can you show in a figure?

    function checkBoundaryCollision() { if (x - ballRadius <= 0 || x + ballRadius >= canvasWidth) { dx = -dx; } if (y - ballRadius <= 0 || y + ballRadius >= canvasHeight) { dy = -dy; } } Full code here: https://codepen.io/pelko/pen/gOjXdaq
  12. S

    What should I do Before I give up programming?

    I'm in the verge of giving up programming and wondering what could I do before I give up to make sure I did what everyone did. I've a bachelors degree in computer science. I didn't do it as well as I'd have liked to do, but that degree has gave me familiarity with most terms used in basic...
  13. S

    JavaScript How to reflect the ball at an angle?

    Here's the full code: https://codepen.io/pelko/pen/MWBpNmL When a ball collides with bat or walls, I want the ball to be reflected with an angle, how do I do it? I suspect there's lots of physics to it. So, should I stop this project here? I'd have to probably build a part of game engine…Can...
  14. S

    JavaScript How to paint an element in screen using javascript?

    <div class="body"> <div id="board"> <div id="bat" class="bat"></div> <div id="ball" class="ball"></div> </div> </div> This is my HTML. I've done CSS For all of them and generated this: Now, I want the bat to move left and right when I press arrow keys...
  15. S

    JavaScript input Direction confusion in snake game javascript?

    My confusion is cleared. arrSnake=[{x:0,y:1}] inputDir={x:0,y:1} are 2 different object names. It doesn't matter if we use same key name for both of them.
  16. S

    JavaScript input Direction confusion in snake game javascript?

    I must tell why my confusion came here: Earlier in the code, we’ve done this: //head of snake let snakeArr = [ { x: 13, y: 15 } ] Here x,y means the grid row 13, grid column 15. That is why I’m confused. We’re using same variable names in 2 places with different meanings. In this...
  17. S

    JavaScript input Direction confusion in snake game javascript?

    Here's the full code: https://codepen.io/pelko/pen/jOpBmPN This is the code that I'm interested in: window.addEventListener("keydown", e => { inputDir = { x: 0, y: 1 }; moveSound.play(); switch (e.key) { case "ArrowUp": inputDir.x = 0; inputDir.y = -1; break...
  18. S

    JavaScript Why will the if condition be executed in this recursive snake game?

    I'm currently watching tutorials to build projects as I'm still not in a phase where I can carve a project that I want all on my own. Currently, working on a snake game. let speed = 2; let lastPaintTime = 0; //Game functions function main(ctime) { window.requestAnimationFrame(main); if...
  19. S

    JavaScript How does props program flow work in react js?

    1) Start with App.js 2) It returns Users component. 3) Inside Users component we pass properties name and job. 4) Inside Users.js we access it using props.name and props.job. A figure that helped me
  20. S

    JavaScript How does props program flow work in react js?

    App.js: import React from 'react' import Helloworld from './components/HelloWorld'; import Users from "./components/Users"; const App = () => { return ( <div> <h1>List of Users</h1> <Users name="Zino Emi" job="Developer" /> <Users name="Lionel Messi" job="Web Developer"...
Back
Top Bottom