calculator/

directory
v0.0.0-...-bb73ec8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2022 License: Apache-2.0

README

runlogs

client server
dummy_go_service git:(main) ✗ go run calculator/client/*.go

Press:
1 for Calculator
2 for prime factorization
3 for average
4 for latest max in stream of numbers
exit for terminate
3

Enter comma separated numbers to get its Average :
10,20,223
sending 0 : 10
sending 1 : 20
sending 2 : 223
2022/08/04 18:26:59 the average is : 84.33333333333333

Press:
1 for Calculator
2 for prime factorization
3 for average
4 for latest max in stream of numbers
exit for terminate
4

Enter comma separated numbers to get its stream them to server at interval of 1s and get max response :
2,3,4,33,2,333,124,23,234324,234,2323,4,43533
sending 0 : 2
2022/08/04 18:27:15 the updated current max is : 2
sending 1 : 3
2022/08/04 18:27:16 the updated current max is : 3
sending 2 : 4
2022/08/04 18:27:17 the updated current max is : 4
sending 3 : 33
2022/08/04 18:27:18 the updated current max is : 33
sending 4 : 2
sending 5 : 333
2022/08/04 18:27:20 the updated current max is : 333
sending 6 : 124
sending 7 : 23
sending 8 : 234324
2022/08/04 18:27:23 the updated current max is : 234324
sending 9 : 234
sending 10 : 2323
sending 11 : 4
sending 12 : 43533
2022/08/04 18:27:28 everything read from bistream response from server

Press:
1 for Calculator
2 for prime factorization
3 for average
4 for latest max in stream of numbers
exit for terminate
3

Enter comma separated numbers to get its Average :
fasdf
sending 0 : 0
2022/08/04 18:27:35 the average is : 0

Press:
1 for Calculator
2 for prime factorization
3 for average
4 for latest max in stream of numbers
exit for terminate
3

Enter comma separated numbers to get its Average :
3,34,2,asdf324,34
sending 0 : 3
sending 1 : 34
sending 2 : 2
sending 3 : 0
sending 4 : 34
2022/08/04 18:27:44 the average is : 14.6

Press:
1 for Calculator
2 for prime factorization
3 for average
4 for latest max in stream of numbers
exit for terminate
4

Enter comma separated numbers to get its stream them to server at interval of 1s and get max response :
3,45,342,54,fdf,434.3,adf,34,34552
sending 0 : 3
2022/08/04 18:28:24 the updated current max is : 3
sending 1 : 45
2022/08/04 18:28:25 the updated current max is : 45
sending 2 : 342
2022/08/04 18:28:26 the updated current max is : 342
sending 3 : 54
sending 4 : 0
sending 5 : 0
sending 6 : 0
sending 7 : 34
sending 8 : 34552
2022/08/04 18:28:32 the updated current max is : 34552
2022/08/04 18:28:33 everything read from bistream response from server

Press:
1 for Calculator
2 for prime factorization
3 for average
4 for latest max in stream of numbers
exit for terminate
2

Enter number to get its prime factors :
334534542
Prime factors of 334534542 are :
factor 1 : 2
factor 2 : 3
factor 3 : 55755757
everything read from server response

Press:
1 for Calculator
2 for prime factorization
3 for average
4 for latest max in stream of numbers
exit for terminate
1

Enter operation/value and press enter
operations supported [ + * AC = exit]
22
+
22
34
+
56
AC
0
34
+
34
54
=
34



exit
closing calculator

Press:
1 for Calculator
2 for prime factorization
3 for average
4 for latest max in stream of numbers
exit for terminate
eixt
dhang se daalo!

Press:
1 for Calculator
2 for prime factorization
3 for average
4 for latest max in stream of numbers
exit for terminate
exit
closing calculator client
dummy_go_service git:(main) ✗ go run calculator/server/*.go
2022/08/04 18:26:59 operation received do average
2022/08/04 18:26:59 received to average : 10
2022/08/04 18:26:59 received to average : 20
2022/08/04 18:26:59 received to average : 223
2022/08/04 18:26:59 replying with average : 84.33333333333333
2022/08/04 18:27:15 operation received do find max among all
2022/08/04 18:27:15 received num from stream to find max from past data : 2
2022/08/04 18:27:15 the updated current max is : 2
2022/08/04 18:27:16 received num from stream to find max from past data : 3
2022/08/04 18:27:16 the updated current max is : 3
2022/08/04 18:27:17 received num from stream to find max from past data : 4
2022/08/04 18:27:17 the updated current max is : 4
2022/08/04 18:27:18 received num from stream to find max from past data : 33
2022/08/04 18:27:18 the updated current max is : 33
2022/08/04 18:27:19 received num from stream to find max from past data : 2
2022/08/04 18:27:20 received num from stream to find max from past data : 333
2022/08/04 18:27:20 the updated current max is : 333
2022/08/04 18:27:21 received num from stream to find max from past data : 124
2022/08/04 18:27:22 received num from stream to find max from past data : 23
2022/08/04 18:27:23 received num from stream to find max from past data : 234324
2022/08/04 18:27:23 the updated current max is : 234324
2022/08/04 18:27:24 received num from stream to find max from past data : 234
2022/08/04 18:27:25 received num from stream to find max from past data : 2323
2022/08/04 18:27:26 received num from stream to find max from past data : 4
2022/08/04 18:27:27 received num from stream to find max from past data : 43533
2022/08/04 18:27:35 operation received do average
2022/08/04 18:27:35 received to average : 0
2022/08/04 18:27:35 replying with average : 0
2022/08/04 18:27:44 operation received do average
2022/08/04 18:27:44 received to average : 3
2022/08/04 18:27:44 received to average : 34
2022/08/04 18:27:44 received to average : 2
2022/08/04 18:27:44 received to average : 0
2022/08/04 18:27:44 received to average : 34
2022/08/04 18:27:44 replying with average : 14.6
2022/08/04 18:28:24 operation received do find max among all
2022/08/04 18:28:24 received num from stream to find max from past data : 3
2022/08/04 18:28:24 the updated current max is : 3
2022/08/04 18:28:25 received num from stream to find max from past data : 45
2022/08/04 18:28:25 the updated current max is : 45
2022/08/04 18:28:26 received num from stream to find max from past data : 342
2022/08/04 18:28:26 the updated current max is : 342
2022/08/04 18:28:27 received num from stream to find max from past data : 54
2022/08/04 18:28:28 received num from stream to find max from past data : 0
2022/08/04 18:28:29 received num from stream to find max from past data : 0
2022/08/04 18:28:30 received num from stream to find max from past data : 0
2022/08/04 18:28:31 received num from stream to find max from past data : 34
2022/08/04 18:28:32 received num from stream to find max from past data : 34552
2022/08/04 18:28:32 the updated current max is : 34552
operation received to factorize : number:334534542
334534542 = 2 * 167267271
167267271 = 3 * 55755757
55755757 = 55755757 * 1
operation received : action:ADD value:22
operation received : action:ADD value:34
operation received : action:CLEAR value:34
operation received : action:ADD value:34
operation received :

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL