How to point on value from csv file and compare it to values from MySQL DB table? [on hold]

I have MySQL DB table my_dictionary, containing soundex_code,word, translation

Also, I have a csv file containing sentences separated by ‘,’. Each sentence contains a set of words separated by ‘ ‘.

I would like to read each word from the csv file and compare it with values of the column soundex_code from my_dictionary. And return its equivalent ‘translation’ I started this code but I didn’t know how to point on each word from my csv file and compare it.

import java.sql.*;  public class dbConnection {      public static void main (String [] args) throws Exception {           String url = "jdbc:mysql://localhost:3306/dictionary";           String user = "root";            String password = "";         String query = "select translation from my_dictionary where soundex_code='3tl00'";          Class.forName("com.mysql.cj.jdbc.Driver");         Connection con = DriverManager.getConnection(url, user, password);          Statement st = con.createStatement();         ResultSet rs = st.executeQuery(query);;         String name = rs.getString("translation");           System.out.println(name);         st.close();         con.close();      }  } 

Is it a good idea to make huge objects dynamic in C++? [on hold]

im thinking about this: I have an engine and if i want to use the d3d systems i always have to pass a pointer to any mesh renderer. If i would make the 3d system static then i just could use them. But the 3d systems is big with lots of stuff and resources. I know static fields are stying in the memory til the end but the graphics system is used all the time. So is it bad for perfoamnce when declaring the d3d systems as a static field in the engine core?

Thanks in Advance!

What is the best solution for directory service for a medium size company (80 users), with heterogenous OS environment? [on hold]

I’m trying to figure out the best solution for directory service (Centralized user management) for a medium sized company,(right now 60 users but growing fast), which has different OS (Windows, Mac, Linux). Right now they are using mostly cloud services (Github, Tresorit, G suite) and all with different credentials. I would prefer for the directory service to be on premises. Any suggestions?

Microsoft interview question (percentage calculation) [on hold]

I am new to this group. I have an Microsoft interview question and seeking your help at the earliest

Question here as follows:

“I buy 100 donuts from Shop A , spending 10 Rupees per each – so total expense is 1000 Rupees”

“I see another Shop B and I found some offers such a way that I buy 60 donuts for 8 Rupees -> (60 donuts x 8 Rupees = 480 Rupees) and (40 donuts x 5 rupees = 200 Rupees) . So total expense in shop B is 680 Rupees”

Now I calculate the profit from Shop B to Shop A as 1 – 680/1000 is almost 32%

How much percentage of profit contributed by only 40 donuts (40 x 5 rupees cheaper) from the total savings of 32%?

Initial load of website(s) slow, appears to be PHP, what can I do? [on hold]

I have noticed that PHP based websites I have (running Joomla, Grav CMS, WordPress) tend to be slow on initial request of the site, but then seems to warm-up and runs fine for the page requests afterwards. However if no traffic for maybe a few hours to a day, the slow initial response time problem comes back.

Feels like to me that the hosting company Dreamhost (shared hosting plan) are putting PHP based sites with low / no consistent traffic in a sleeping state or on the back shelf when not used, so get slower initial responses when a request is made.

To back up this hypothesis, I test 3 sites that all had no traffic for over 24 hours and all under the same account with the following results;

  1. HTML static files – response time is fine.
  2. Joomla (PHP & MySQLi) – initial response time bad, then gets better with further page requests.
  3. Grav (PHP & flat file system) – initial response time bad, then gets better with further page requests.

As stated, if no traffic for a while, both PHP based systems above have low initial response times again.

Given that Grav doesn’t use MySQL, but Joomla, Grav and WordPress do use PHP, PHP must be what’s causing the problem, or rather the configuration / throttling / or whatever.

Is there any further tests I can try to pinpoint this problem or prove this problem, or any suggestions on what to do next?