Ilya Mikh

Ranch Hand
+ Follow
since Sep 29, 2018
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
1
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ilya Mikh

Hello,

i need to make a button that goes disabled when the ObservableList is empty,
i hava a method that adds a listener:



then in gui controller i have constructor with lines like:



so its works perfect, but i dont actually understand  this code above..
actually i understand what is happening here but i want to understand how to write the same code without lambda expression, how i do that?

Kind regards, Ilya




4 weeks ago

Ron McLeod wrote:One other comment .. I would have probably used PrintWriter and BufferedReader rather than Formatter and Scanner since you are not really using any of the features that those classes bring.




Yes i see on many videos on youtube using these two objects; but in our school they give us, that we may better use this Scanner and Formatter.
4 weeks ago

Ron McLeod wrote:There are a number of issues.



Hello again,

thank you for your help; i made it like this now and it works.

the Socket.connection - i dont understand, Socket socket = new Socket(InetAddress.getLocalHost(), 5545) <- doesn't it means that client is connecting here by InetAddress and port?

the third issue, a think a got it..

SERVER

[/code]
4 weeks ago
Hello,

for my exercise i need to make a TCP connection where client sends couple of names, and server sends this names in uppercase, and cliend displays this uppercase names.
When i make a one way connection to server to display name its ok, but when i want to send this names back to client, my programm is waiting for somethin, i dont understand why,
could you suggest me something tp make it work?

when is says client connected, program is stuck...

this is my SERVER code



this is my CLIENT code

4 weeks ago

Campbell Ritchie wrote:You have two different buffer objects; you are setting x on one and reading x from the other, where it has the default value for a field: 0.



oh thank you) i should make in Producer and Consumer that constructor accepts Buffer. and when executing in main give to Producer/Consumer the instance of Buffer.
1 month ago
Hello freinds,

i have a code here, and the problem is, when the consumers calls the getX fucntion, it always returning 0;
i dont understand why, because in school we did almost the same example and it was ok..

possible some mistake in Buffer class?

kind regards, Ilya


1 month ago
Hello,

i have i wierd excercise in my course, i can not solve it by my self

i need to compare to objects in List with Iterator;
the objects have stating date and finishing dates;
i need to add objects that finishing for example in 01-april-2010 and starting in 02-april-2010 to one list

so  i think i know how i check iterator.next() objects, but how do i hace to compare it with next object??

this is code i need to make..



1 month ago
Hello,

I have a problem to solve. I have  a string: "hello world   !!!" for example. And on output a need to have an array like this
["hello", " ", "world", "   ", "!!!"]

I was trying to do it with regex, but possibly i use a wrong one.

This my code

public static String test(String s){        
   String[] words = s.split("\\b");  
   return Arrays.toString(words);  
 }


It give me an array with spaces , but I dont understand why, but words[0] contains empt element:
[, This,  , is,  , test]

6 months ago

Carey Brown wrote:Would "23" be a match?
"a23" ?



hello,
sorry i forgot to say that a string mast contain minimum 6 charakters
9 months ago
Hello,

i am trying to make a regular expression for a string with small letters that need to contain exactly 2 digits in it.
for example sdf3df2sdf = true;
dsdf2sd = false;



how do i Patter.compile to get this 2 digits in regular expression?

Kind regards, Ilya

9 months ago

Knute Snortum wrote:TelScherm#buildGui isn't returning anything.  Do you know what you should return?  It's what you're building in the method.



i made it work =) i ve deleted constructor of VBox and changed vbox to this.

9 months ago

Campbell Ritchie wrote:Moving to our FX forum.

You haven't asked a question. What happens when you run that code?



Hello,

As you may see, I added textfield and text area into VBox in method buildGui. Next I add this method to constructor of TelScherm class. And when i make a scene in main startup class, I see no vbox with my textfield and text area, I see only empty screen. How do I make it appear on my screen, when I execute this code?

Ilya
9 months ago
So now at school we started to inderstand javafx simple programs without scene builder
i was trying to make a VBox with one text filed above and text area under;

we need to work with domein class and strart up class.

for now i have this code suppose to represent a vbox, but i see only emty screen, can you please explain me what i am doing wrong? watched tutorials, but its kind of difficult to understand.

this is my domein class


and this is my start up class

9 months ago

Piet Souris wrote:Does every row need to have the same length, or can each row be of different length?



Every row need to be different, in my exercise we use customize in command line, to input number of students, and every student has different number of examens.


Piet Souris wrote:array2D[index] = new int[nrOfExamsByThisStudent]



I see this is a more easiest way to do this, i understand the logica now, I had a problem with using enhanced loop or using a simple one, because our teacher says to use enhanced loop as much as possible..

1 year ago

Piet Souris wrote:
Using Lists in stead of fixed length arrays would have its advantages here. Must you use arrays?



Thank you for explanation, it will help me to go firther,
i use arrays because i see how it works a bit, we may use any possible productive solution we saw, as you say me i can use list, i will try this one also.


Piet Souris wrote:

Do you think that second for loop is correct?



i think yes, because in Non enhanced loop, we give an index to run throught the array, and Second loop is enhanced, we enter 2d array with name of this array not by the index, thats why we have "for (int[] array1 : array)"
i see it like this, am i right?
1 year ago