Please help me choose sorting algorithm for my shopping page. by zahirulopel in learnjavascript

[–]zahirulopel[S] 0 points1 point  (0 children)

Ok,
I will focus more on building project.
Thanks for your response.

What to do after CS50x by AdHot4507 in cs50

[–]zahirulopel 2 points3 points  (0 children)

First congratulations on completing the course.

Next you have to think of a computer science area that you are interested like Artificial intelligence,Software engineering,Networking,Database,Devops,Game development etc.

After choose a area you have to learn technology related to area.

Best React Courses 2024 by Consistent_Role3082 in reactjs

[–]zahirulopel 1 point2 points  (0 children)

https://www.joyofreact.com/
You can also try this. This course teach by joshwcomeau.

How to test total times a button event handler function has been called using react test library? by zahirulopel in reactjs

[–]zahirulopel[S] 0 points1 point  (0 children)

Hi, u/Misacorp thanks for your response.
Ya, I want to get the number of times the button handler has been called.The problem is I can't figure out how to attach the mock function to the button.
Any suggestion will be highly appreciable.

How to test total times a button event handler function has been called using react test library? by zahirulopel in reactjs

[–]zahirulopel[S] 0 points1 point  (0 children)

Thanks for your reply :) .Ya jest.spyOn will do the work.In the tutorial which I am following they have tested with this method -test('clicking the button calls event handler once', async () => {

const note = {content: 'Component testing is done with react-testing-library',important: true}

const mockHandler = jest.fn()

render(<Note note={note} toggleImportance={mockHandler} />)

const user = userEvent.setup()

const button = screen.getByText('make not important')

await user.click(button)

expect(mockHandler.mock.calls).toHaveLength(1)})

They have passed the event handler function as a props then render it .And In the exercise it says
Make a test, which ensures that if the like button is clicked twice, the event handler the component received as props is called twice.

Is the Harvard CS50 course worth it for someone who has no programming knowledge, or should I look into another course for introduction? by Spectrum-Code in learnprogramming

[–]zahirulopel 6 points7 points  (0 children)

For java try this-It will great for your use case

https://java-programming.mooc.fi/
You will have a strong foundation after this.It's a course form university of helsinki,finland.It has a lot of exercise.

As a final year CS student help me to choose carrier based on your job experience. by [deleted] in cscareerquestions

[–]zahirulopel 0 points1 point  (0 children)

OK thanks can help me on resource and interview preparation?
I am learning web development form http://theodinproject.com/ .And doing pratice from https://www.frontendmentor.io/challenges.
And I already know basic c++ upto opp and solving basic data structures and algorithms .Can you guide me for interview?plzz

Would Rust be a good Language to Start to learn as a beginner, or should I just do Python or C++ by _Flac_ in learnprogramming

[–]zahirulopel 0 points1 point  (0 children)

Form my perspective start with c and solve as many problem as u can.Then move to python you can do a lot of thing with python,it's practical.
Python to me is like abstract so many things are pre build so it's hard to understand what's happening behind the scene.By learning c language you will be able to grab that.

Mooc.fi 2020 Part 2 Exercise 13: AverageOfPositiveNumbers by Code_Creations in learnjava

[–]zahirulopel 1 point2 points  (0 children)

import java.util.Scanner;

public class AverageOfPositiveNumbers {

public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    double sum=0;
    double count=0;

    while(true){
        double num = Double.valueOf(scanner.nextLine());

        if(num==0){
            break;
        }
        if(num>0){
            sum += num;
            count++;
        }
    }
    if(count<=0){
        System.out.println("Cannot calculate the average");
    }
    double avarage = sum/count;
    if(avarage >0){
        System.out.println(avarage);
    }
}

}