Performance – Are these values ​​appropriate? If not, where should I start?

Below is the mysqladmin output for our mysql server, which has been experiencing consistent issues for months since we switched from a dedicated server to the cloud. In the conversion, we changed some tuning parameters, and it seems possible that one of these parameters was faulty. I am the Defacto DBA, but I do not know much. I'm trying to figure out how to interpret the following:

Server version 5.7.23-0ubuntu0.16.04.1 protocol
Uptime: 117 days 22 hours 28 minutes 44 seconds

Topics: 29 Questions: 1969788526 Slow queries: 143857 Opens: 11865506181 Rinse tables: 1 Open tables: 512 queries per second Avg. 193311

You need to rebuild a MySQL-based search directory for users / organizations / publishing locations in PHP. Which frame should start?

I need to completely rebuild / redesign a small directory / info service that I do for the blind; It's too complex to sustain, built in 2013 and based on a now-obsolete thing called php-mini, which was last updated in 2015.

This is what it looks like: Yes, back then it was really good for people with screen readers. Now it is embarrassing.

  • User enters the location or name of the service (a search box).
  • If it matches a service name, you will see the service and other services nearby.
  • If it matches the name of a city, display the service names within 20 miles.
  • Click Results to view organization and service details through an accessible page.
  • Very simple CRUD backend where users can log in and make changes – simple data and some toggle / checkboxes.
  • 2 user levels – admin or user.
  • Some json REST stuff to retrieve data from MYSQL RDB
  • A user can run multiple organizations, and organizations can have multiple publications.
  • Only 3 tables – users, publications and services – nothing more complex than
    users.userID <-> organisations.userID <-> Veröffentlichungen.organisationID
  • A frontend consisting of getting some DB queries and reading some static files – currently Twig 1 and Bootstrap 3 are used to render the output.
  • A request form that sends emails – I am currently using phpmailer with a Gmail STMP connection.

For the search results, I used a Jaro-Winkler-like mysql routine so that someone typing "macnhester" would receive "manchester" instead of a result.

For the "next" results I use SELECT *, 69 * GRAD (COS (RADIANS)) * COS (Latids) * COS (RADIANS (Longpoint) - RADIANS (lng)) + SIN (RADIANS (Latpoint)) * SIN (RADIANS (lat)))) AS distance_in_miles FROM services JOIN (SELECT: lat AS latpoint ,: lng AS longpoint) AS p ORDER BY distance_in_miles LIMIT 10

This means that everything is geocoded and stored in my database.

  • Where can I upload the service ID and address (or just the UK postal code or lat / long) and return a list of IDs and distance.
  • I could retrieve the rest of the data from my database based on the returned IDs.
  • Low consumption, preferably free. 500 requests per day would be more than enough.

I would have thought that Google Maps API has this now, but apparently not if I miss something?

Since this is not a commercial project, there is no advertising and no cost to users. This must be so cheap that the costs for the boilerplate / bootstrap / turnkey version are as low as possible. I think of Laravel or something based on it? Or what I missed? I am satisfied with PHP and MySQL.

Finally, I see that many of these questions are "not enough details" or simply refer to and then close. However, this page does not exist and would be more generic. Many Thanks!

Mariadb checks tables at the start

Is there any way that Mariadb checks tables in the background and does not lock the tables after a crash? We have quite a few large databases and a hardware failure that caused most of them to check tables on reboot, which unfortunately blocked access to the databases for hours.

I understand that a review is a good thing, but of all the databases, only one had to be fixed.


Exploit Development – How do I start using the Javascript engine?

I am a beginner in the exploit development. My experience is the development of buffer overflow exploits and shellcoding. Now I want to start using the javascript engine. After some research, I developed a strategy on how to do this. There are things that I have decided before trying to exploit some basic cases.

  • Get advanced Javascript programming skills.

  • Learn how compilers and script interpreters work.

  • Read the source code of some open source engines to understand how they work.

1. Are there any more things that I need to learn or some of the above?
are not necessary I mean skills that are specific to javascript only
Exploits, no exploits (eg debugging, understanding of the assembly)

2. If you can write javascript exploits, how did you learn it? Which books or websites did you use?

3.What are some vulnerabilities that are simple and relatively new and therefore good to practice?

Nic – Promiscuous mode when I start Wireshark

I run Ubuntu Linux and had Wireshark installed on it. I can see the incoming and outgoing traffic well. However, you know that if you run Wireshark, your Nic should be in promiscuous mode.
When I check my nic status with "netstat -i", I can not see the "p" flag in promiscuous mode. That means my Nic is not in promiscuous mode.
How do I know that my Nic is in promiscuous mode when I run Wireshark?

Discrete Mathematics – Subdivide smallest grammar problems into subproblems by considering irreducible start rule shortcuts.

To let $ s = aaaaaaa cdot aaaaaaa $ that's 14 for example $ a $& # 39; see Fig. Ask what the starting rule might look like in a reduced least grammar.

$$ S to DDDDD \ D to aa $$
will not be reduced but:

S to EED \ E to DD \ D to aa

is. In other words, you will not see length-2, but repeat subordinate strings under the rules together.

So if we just wanted to look for a standard form of least grammar, that would be reduced formThen we do not have to assume that the starting rule could ever be in $ S to DDDDD $ form. Let's take a look at all the "cuts" that could make up the starting rule. Next let us make sure no rearrangement a rule is reducible. A valid rearrangement of $ S to AaaA $ would $ AaAa $ if $ A aa $and with it the cut $ AaaA $ would not be included in the list. We have:

(aaaaaaa) (aaaaaaa) \
(aaaaaa) (aaaaaa) (aa) \
(aaaaa) (aaaaa) (aaaa) \
(aaaa) (aaaa) (aaaa) (aa)
(aaaa) (aaaa) (aaa) (aa) a

where do we see the bigger cut $ (aaaaa) $ Say in line 3 must happen twice, since it can never occur as sub-variable of a smaller cut. This drastically shortens our list of things to check.

Question: What is the formula for the length of the list of possible cuts in the start rule?

Javascript – Finds all start indexes in a string that are anagrams of a word

The task:

With a word W and a string S, determine all start indices in S what
are anagrams of W.

For example, if W is "down" and S is "abxaba," return 0, 3, and

My solution:

const anagramOccurrencesOf = (w, s) => {
const eventsCopy = [];
Let sCopy = s.Slice (0);

let index = 0;
while (sCopy.length && index! == -1) {
index = sCopy.indexOf (w);
if (index === -1) {break; }
OccurrenceCopy.push ((occurrencesCopy[occurrencesCopy.length - 1] + index + 1 || 0));
sCopy = sCopy.slice (index + 1);
const eventsReverse = [];
Leave sReverse = s.split (& # 39; & # 39;). reverse (). join (& # 39; & # 39;);

Index = 0;
while (sReverse.length && index! == -1) {
index = sReverse.indexOf (w);
if (index === -1) {break; }
OccurrenceReverse.push ((occurrenceReverse[occurrencesReverse.length - 1] - with.length - index + 1) || s.length - with.length);
sReverse = sReverse.slice (index + 1);

return [...occurrencesCopy, ...occurrencesReverse]location ((a, b) => a -b);

console.log (anagramOccurrencesOf ("ab", "abxaba"));

START WITH and CONNECT BY conditions in Oracle SQL

I have a question about the conditions START WITH and CONNECT BY (in Oracle 12c):

This is my Oracle SQL:

Employee ID,
lpad (& # 39; & # 39 ;, level * 2-1, & # 39; & # 39;) || Surname,
SYS_CONNECT_BY_PATH (last_name, & # 39; / & # 39;) "Path" - calls the full path of the child object
Start with employee_id = 100
CONNECT BY PRIOR employee_id = manager_id
AND NOT (last_name = C Cambrault und and first_name = # Gerald #)
Sort siblings by last name

what gives the following output:

100 King Zero 1 / King
102 De Haan 100 2 / King / De Haan
103 Hunold 102 3 / King / De Haan / Hunold
105 Austin 103 4 / King / De Haan / Hunold / Austin
104 Ernst 103 4 / King / De Haan / Hunold / Ernst
107 Lorentz 103 4 / King / De Haan / Hunold / Lorentz
106 Pataballa 103 4 / King / De Haan / Hunold / Pataballa

However, if I remove the START WITH in the above query:

Employee ID,
lpad (& # 39; & # 39 ;, level * 2-1, & # 39; & # 39;) || Surname,
SYS_CONNECT_BY_PATH (last_name, & # 39; / & # 39;) "Path" - calls the full path of the child object
CONNECT BY PRIOR employee_id = manager_id
AND NOT (last_name = C Cambrault und and first_name = # Gerald #)
Sort siblings by last name

it gives the following result:

148 Cambrault 100 1 / Cambrault
172 Bates 148 2 / Cambrault / Bates
169 Bloom 148 2 / Cambrault / Bloom
170 Fox 148 2 / Cambrault / Fox
173 Kumar 148 2 / Cambrault / Kumar
168 Ozer 148 2 / Cambrault / Ozer
171 Smith 148 2 / Cambrault / Smith

Can you please explain why, despite using the NOT condition (last_name = # Cambrault # and first_name = # Gerald #), it will not work unless it is used with START WITH (Starting the hierarchy of employee_id = 100). I understand that the condition in CONNECT BY has no effect on the root row (s), but employee_id (148) is not root. it's just a parent line, why does not it work?