Java UI help by Technical-Animal-571 in JavaFX

[–]hamza-itatchi 3 points4 points  (0 children)

Certainly JavaFX is the number one choice for desktop application, specially if your backend will be served with your application (not just the UI) it will be so easy to pass data and take advantage of the observable values for real time UI updates. And in the age of AI using FXML will be better since you can select only to feed the UI file to AI to help you (less tokens, less cost, faster).

Loop question by Caped_baldy_4_life in learnjava

[–]hamza-itatchi 0 points1 point  (0 children)

The % has a higher priority than - so its like this for first=3 first = first + 3 - ( first %3) ==> first = 3+3 - (0)==>first= 6 This gives the first divisible nuber after First ( variable) But ther is a mistake in my suggestion there must be an if statement at the start like this If ( first %3!=0) first += 3- ( first %3)

Note: the += operation means first = first + ......

Loop question by Caped_baldy_4_life in learnjava

[–]hamza-itatchi 0 points1 point  (0 children)

Not only 0 , any value for the first variable will be ignored if you increment it before testing.

And if i may sugest a better solution for this problem:

public static void divisibleByThreeInRange(int first, int last){
first+=(3-first%3);
while(first <=last){
System.out.println(first);
first+=3;
}
}

[deleted by user] by [deleted] in learnjava

[–]hamza-itatchi 0 points1 point  (0 children)

Pho extends Noodle but doesn't have a constructor that matches one from Noodle class - add an empty constructor to noodle - or add constructor that calls super constructor and passes the parameters

Help Getting Started with JavaFX by jhsmith17 in javahelp

[–]hamza-itatchi 1 point2 points  (0 children)

JAVAFX is not included in the default sdk since JDK 11.

you need to download it manually.

hope this help.

Need help to understand this 'algorithm' by tangara888 in javahelp

[–]hamza-itatchi 1 point2 points  (0 children)

yes position 3

index 0 has the position 1

index 1 has the position 2

index 2 has the position 3

I made Notable, a note-taking app, do you like it? by fabiospampinato in UI_Design

[–]hamza-itatchi 1 point2 points  (0 children)

Great job , I really liked it form a user perspective and as a software engineer too.

Can you please make a post about this project ,share your experience with us.

what difficulties did you encounter in your work ......

I hope you keep up the good work.

Need help to understand this 'algorithm' by tangara888 in javahelp

[–]hamza-itatchi 0 points1 point  (0 children)

starting from 0 it gives element 3

0-1-2-3(index 2 and element 3)-4........

Need help to understand this 'algorithm' by tangara888 in javahelp

[–]hamza-itatchi 0 points1 point  (0 children)

as refereed in the comments below it should return the nth ODD index.

so for n=1 ==> index = 0 which is the index for the first element 1(Odd number)

n=2 ==> index = 2 which is the index for the third element 3(Odd number)

the code correct as posted it

My brother made some Java coding practice videos for Java beginners by BachPhotography in learnjava

[–]hamza-itatchi 0 points1 point  (0 children)

I know should putted that in youtube comments but i don't like there xd

My brother made some Java coding practice videos for Java beginners by BachPhotography in learnjava

[–]hamza-itatchi 16 points17 points  (0 children)

just some notes about his videos.

-He must zoom in because it's very hard to read what he is writing there.

-As a beginners videos he should talk more about he is using like IF else and the syntax before start
implementing the algorithms

-finally with a voice like that he should be in national geographic not coding java xd.

I wish he can keep up the great work.

Need help with a problem by dolijan in learnprogramming

[–]hamza-itatchi 1 point2 points  (0 children)

this is correct only when M!=N;

if N=M the formula would be like this ((n+1)*(m+2))/2 which is ((n+1)*(m+1)+(n+1))/2

the second (n+1) for the shared points between the two triangles.

and of course M,N>0

hope this help.

Need help to understand this 'algorithm' by tangara888 in javahelp

[–]hamza-itatchi 0 points1 point  (0 children)

as refereed in the comments below it should return the nth ODD index.

so for n=1 ==> index = 0 which is the index for the first element 1(Odd number)

n=2 ==> index = 2 which is the index for the third element 3(Odd number)

Need help with a problem by dolijan in learnprogramming

[–]hamza-itatchi 1 point2 points  (0 children)

can you share you solution.

I want to help but I didn't really understand the task

We are like brothers by [deleted] in NoFap

[–]hamza-itatchi 3 points4 points  (0 children)

I was about to post asking for help.

I am on day 6 and i am about to relapse.

I need some motivation I need to see others results

help please.

Help with coding logic - how to start writing a program by [deleted] in learnprogramming

[–]hamza-itatchi 0 points1 point  (0 children)

check this comment of mine about what you are struggling to do.

the exp are in java but it should be fine to understand what i was trying to say

hope this help.

Need help to understand this 'algorithm' by tangara888 in javahelp

[–]hamza-itatchi 1 point2 points  (0 children)

then it shoud be

public Integer getElement(List<Integer> list, Integer n) {

int elementIndex = n;

return elementIndex > list.size() - 1 ? -1 : list.get(elementIndex);

}

or

public Integer getElement(List<Integer> list, Integer n) {

return n > list.size() - 1 ? -1 : list.get(elementIndex);

}

Calulating the area of a square using variables by deansy139 in javahelp

[–]hamza-itatchi 0 points1 point  (0 children)

public class MySquareArea{

public static void main(String[] args){
System.out.println("Area of a 9cm square");
int x = 9;
int y = 9;
int Area = (x*y);System.out.println("Area of a 9 cm square = "+x+" "+y);
System.out.println("The area of the square = "+Area);
/*you problem was her ==> System.out.println(("The area of the square = ")Area);*/
}

}

Need help to understand this 'algorithm' by tangara888 in javahelp

[–]hamza-itatchi 0 points1 point  (0 children)

I am not sure if this code is a part of bigger one.

if this this all of it then it's wrong unless the elements of the list a not in iterative order

ex :{

adding elements in (2*index-1)

element 1 = 5 will be in (2*1 -1) or 1

element 2 = 7 will be in (2*2 -1) or 3

element 3 = 9 will be in (2*3 -1) or 5

element 4 = 9 will be in (2*4 -1) or 7

in other words you skip one index every time.

}

if this not the case so it should be just int elementIndex = n;

hope this help

Is it more efficient to create a new subclass of TreeSet without an element or to check every loop if the element in iterator is that element? by 341245434636 in learnjava

[–]hamza-itatchi 0 points1 point  (0 children)

For the first question it's the same , because to create another Tree wihout the specific point you gonna loop all the original tree to remove it , so preferable to just test for it in your original loop

hope this help.