Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

David Simic

Ranch Hand
+ Follow
since Dec 06, 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
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David Simic

I downloaded the newest version MySql server 8.0.19, it seems like there is some kind of bug in this version, i will try downloading the older version.
5 months ago
Hi, i am new to this Java Data Base and i tried to connect to MySql but i have a lot of trouble

This code


is producing countless exceptions such as

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
Exception in thread "main" java.sql.SQLException: The server time zone value 'Central European Standard Tim' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:76)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:197)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
at com.company.Main.main(Main.java:14)
Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'Central European Standard Tim' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support.
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:85)
at com.mysql.cj.util.TimeUtil.getCanonicalTimezone(TimeUtil.java:132)
at com.mysql.cj.protocol.a.NativeProtocol.configureTimezone(NativeProtocol.java:2118)
at com.mysql.cj.protocol.a.NativeProtocol.initServerSession(NativeProtocol.java:2142)
at com.mysql.cj.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:1310)
at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:967)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826)
... 6 more

Does anyone know what the problem is ?
5 months ago
I don't understand, if i put num1 = 2 and num2 = 25
when i = 50 why does it print out SPI = 0 ?
50 is divisible by 2 and 50
9 months ago
I tired to make a program that finds the smallest positive integer divisible by 2 numbers

example output
Enter first number : 2
Enter second number: 25
SPI is : 50

but i can't find the solution in my program, this is what i tried

9 months ago
I have figured it out
1 year ago
There is actually First fit  algorithm written on site https://www.geeksforgeeks.org/program-first-fit-algorithm-memory-management/
But it is in C++ and i haven't transitioned to c++ yet, therefore i can't read it.

Would be very useful to me if you can convert this particular code into C



That would solve my problem
1 year ago
hi,
I need help on creating the First Fit algorithm i C programming language that allocates memory and writes number of comparison and also tells if all partitions are allocated
What i did here is i made a program that asks for number of partitions

Then i created array and added values to partition

Second array is array of processes that i also filled with numbers


Basically the output is number of comparison and an answer if all partitions are allocated
1 year ago
Thank you very much, Tim
Anyone know the name of it ???
Hi, sometimes when you connect to WI-Fi, internet tab opens with some background that says click "JOIN"(or whatever else)  to join network.

Does anyone know what is the name of that thing  and how to make it ??
Any tutorial or clue is helpful.
Thank you for your help, i found out another way that works

I will post it here just in case if someone else is looking for a same problem:

1 year ago

Rob Spoor wrote:

David Simic wrote:does not matter which operating system


Well it does. Creating directories and files are done through system calls which are not the same on all operating systems. My example on the directory creating calls already shows that.



Well, in that case use Windows.
1 year ago
Something using FILE in c, does not matter which operating system
1 year ago
I need help on how to write a program that creates a folder and inside of that folder is .c file and .h file
1 year ago
I have figured it out, thanks anyways
1 year ago