Issues calling rest api from a custom plugin javascript

So, I have a custom plugin I’m working on for a WordPress site. I need to make an ajax call when a button is clicked. But when I make the call, nothing happens. So far I got this:

  1. I’ve already registered the rest route like this on the plugin php file:

    register_rest_route( $ base_path, ‘/agencias-all/’, array( ‘methods’ => ‘GET’, ‘callback’ => array( $ this, ‘get_agencias_all_sorted’ ), ));

  2. Got this code on the plugin main js file (which is already enqueued, and the function is available for me on the front end)

    function getAgenciasSorted(){ $ ("#agencias").addClass("loading"); console.log(‘test’);

    $ .get(mypath + ‘agencias-all’).done( response =>{ console.log(‘test 1’);
    console.log(response); }).complete( ()=>{ $ ("#agencias").removeClass("loading"); }) }

And I’m at lost here. The function runs, the console shows the first log "test". But doesn’t shows the second log of "test 1" nor the response. But what’s weird is that if I go to the network tabs in the dev tools, and look for the get_all call, it’s there, and it shows the response there. However, for some reason, it’s not running any code inside the .done

The rest of the api calls are run while the page loads, and those work fine. I’m just struggling to get this one in particular working. Any tips or help would be strongly appreciated, as I’m just starting to work with custom plugins.

Would re-seeding the InstanceID column of sys.jobhistory table create issues?

I have two Production servers, one active, one passive. On the active server, application specific jobs are enabled and run all the time. Jobs on the passive server do not run.

On a regular schedule, we fail over between the servers to test our fail over process. Once done, we remain on the "new" server until the next scheduled fail over.

We have a custom service built that logs job statuses to splunk utilizing the InstanceID from sys.jobhistory. Problem is, when we fail over, the InstanceID on the passive node is MUCH smaller than the active one, and the service is checking for "max(InstanceID)" to know what record in history to begin pulling data from. My questions is around reseeding the identity column in sys.jobhistory as part of the fail over process to be max(id) from prod server + 1. In theory this should work, but I’m concerned with any potential issues.

InfluxDB on Raspberry Pi 3 and load issues

first of all, I’m not an database expert at all, but I managed to set up a system fitting my monitoring needs for more than one year now. Unfortunately, now the problem arises. Short summary of my system:

  • Raspberry Pi 3 (Raspbian buster) is running InfluxDB 1.8.5
  • Python script is running as a service, writing ~20 datapoints every 5sec plus additional several 100 per month on demand. I would say, that is not too much in total.

My database is now >1GB:

/var/lib/influxdb $   sudo du -hd1 12K     ./meta 39M     ./wal 1.1G    ./data 1.2G    . 

I started to notice several days/weeks ago, that my system got really laggy. uptime reported load averages >4. I suspected the pretty old sd-card and switched to a proper new one, first only by putting the old image to the new card, later I really reinstalled everything and restored the influx data. It got better, but not really good. uptime reported now load averages in the range of 2. I added a monitor for uptime in my python script and it looks like this: plot of uptime over 3h

(at ~22.30 I restarted influxdb)

I did some more analysis and found that I can read the influx log with the command sudo journalctl -u influxdb.service. In the result I find lots of lines with the content similar to

Apr 26 21:04:22 xxx influxd[5598]: ts=2021-04-26T19:04:22.133912Z lvl=info msg="Error replacing new TSM files" log_id=0TksnBt0000 engine=tsm1 tsm1_strategy=full tsm1_optimize=false trace_id=0TktwGCG000 op_name=tsm1_compact_group db_shard_id=534 error="cannot allocate memory" 

And here my knowledge really stops. Does anyone know what the issue is and what I can do to "repair" my database without loosing more data?

Character issues with my group

I am fairly newish to d and d. Our group plays every week and I have been a GM before. My character is fairly chill, chaotic neutral and will often get distracted for a few moments looking at something or talking to someone, as it fits into her character. She will often be the one to push the button in the middle of the room, or lick the wall etc. A real yes character trying not to block anyone else’s ideas. The other players however, one in particular shut her down at every turn, undermining her to NPCs making out like she is annoying and pathetic and often at times it can get hurtful as it seems to be aimed at me personally. We get along great in real life but anything my character says Is shut down, even when my ideas are good, they will chat about it and then either do what I had said or ignore me completely. When everything is getting a but too serious during times that are not serious, my character may do something to bring the story back to life. The GM loves it and will always let me go for it, as the story is richer and more enjoyable and I will feed more into some of the story elements he has done. The group however want to follow everything to the book. The campaign we are playing, I have been tasked with looking after the money etc from our group business, and even though it is my role ,(we all have our own) I get no say in anything ever. I don’t even see the point having the role. As it is always 2 against me. I roll a lot of natural 20s and the dm will allow certain things and the group will straight up say no.

For example tonight we were having a long rest, and my character was having a bit of fun and while they slept, put mud on their hands and woke them with a feather…when they woke they got a muddy face. Nothing major, just a little prank. It’s not real. And one of them set their familiar onto me to attack, which I of course batted it away… I am a tabaxi, I have claws… the gm made me roll to hit it and with my roll it died (can be brought back with a spell). This is a great twist to the story! An ogre then attacked us due to all the noise they were making about it and the ogre ruined their tents, Instead of the characters continuing on, etc, instead they both start getting actual mad at me, blamed me for everything. Started using spells to grovel to them and trying to hurt me on purpose and leave me in the forest and go off and continue the adventure. Their words and behaviors actually made me the person feel so shit. It was not intentional and it was not permanent. I mean, is this not the point of the game, to have moments that you can not control, or you might fuck up etc. The person who had the bird has actually nearly killed my character by accident during the campaign and I didn’t freak out and go on some kind or attack mode. The last few sessions I am not having a lot of fun, as one of the characters in particular takes over the entire story, tells you no if it’s not what they want to do and the character is really not nice to play with. So serious and straight. I try to talk about it but often get shut down. Do you think j need to find a new group. I was actually nearly in tears tonight, it was embarrassing and it’s a game. Yes a game I take seriously but fun is supposed to be the main component. I love my gm and would be gutted but our characters do not seem t mesh well.

Issues with redirecting domain name to another Apache with WordPress

I am currently running into an issue where if someone types in ‘’, which is redirected to, into Google it will bring up the error message about ‘Attackers trying to steal information’. I do understand the concept that you cannot go from HTTPS to HTTPS without having the SSL certificate match the domain that gets redirected, but I was wondering if there was a way to force browsers to view the old domain as HTTP only and not attempt to load it as HTTPS. I know there is a way I just don’t know how to do it in Apache because I have an IIS site that does this and has no issues. I tried several different rewrite rules and disabling WordPress SSL plugins (this was an inherited site) and still have nothing. If more information is needed please let me know. I appreciate your time.

MariaDB views: I want to replace repeated multi-table joins in my queries with a view – are there any issues to watch out for?

Rather than

SELECT,,,  FROM a JOIN b on = JOIN c on = JOIN d on = 

I can do

SELECT a_pk, b_pk, c_pk, d_name  FROM view_a_b_c_d 

I have a lot of this sort of thing through my code.

I’ve done a performance test, and the differences seem to be negligible, and I feel it would greatly tidy my codebase up and remove a lot of repetition.

But before I commit to that (as it’d be a big change with a lot of work and testing), I want to check that this IS a good thing to do. I didn’t study computer science and have no formal DBA training. I’m also a sole dev working on my own closed-source product. So I don’t get much input from the outside world, unless I strike out and ask for it.

Thank you – any opinions/experience appreciated.

Numerical issues in Fourier transform of Mathieu functions

I’m trying to calculate the Fourier transform of the Mathieu $ \text{me}$ functions using NIntegrate but keep on getting NIntegrate::inumr (the integrand has evaluated to non-numerical values) and NIntegrate:ncvb (failed to converge to prescribed accuracy) errors. Here is how I’m defining the Mathieu functions

ce[r_, z_, q_] := MathieuC[MathieuCharacteristicA[r, q], q, z] se[r_, z_, q_] := MathieuS[MathieuCharacteristicB[r, q], q, z] me[r_, z_, q_] := (ce[r, z, q] + I se[r, z, q]) / Sqrt[2 Pi] 

and I’m evaluating the integral

NIntegrate[Exp[-I n z] / Sqrt[2 Pi] me[r, z, q], {z, 0, 2 Pi}] 

where r is very close to an integer (I avoid exact integers because MathieuCharaceristicA and MathieuCharaceteristicB are not continuous at integers) and q for example varies continuously from -70 to 0.

Does anyone know how I can get around the numerical issues? Or is there a more efficient way to numerically Fourier transform Mathieu functions?

Can differing A, CNAME, TXT, and NS records in multiple domains TLD’s cause email deliverability issues?

I’m troubleshooting an issue where, after switching TLD’s internal and ESP-based emails are getting blocked when going to external customers. Could different A, CNAME, TXT, and NS records cause email deliverability issues? Short of posting actual differences, is there anything obvious before I look for other issues?

Issues Applying Selections to Hierarchical Datasets

I have a large dataset in the format below. I’m able to graph them as polygons easily enough, but am having trouble doing fine selections of the coordinates in Dataset format for further checks and processing. (I have other functions downstream that do geographic intersections that are being thrown off.) Some days I feel like I’m finally starting to understand Mathematica dataset operators, and other days I’m just confused.

ds = {{<|lat -> 49.275, lng -> -123.03|>, <|lat -> 49.2753, lng -> -123.03|>, <|lat -> 49.2753, lng -> -123.03|>, <|lat -> 49.275, lng -> -123.03|>, <|lat -> 49.275, lng -> -123.03|>}, {<|lat -> 49.275, lng -> -123.029|>, <|lat -> 49.2753, lng -> -123.029|>, <|lat -> 49.2753, lng -> -123.029|>, <|lat -> 49.275, lng -> -123.029|>, <|lat -> 49.275, lng -> -123.029|>},  {<|lat -> 49.275, lng -> -123.029|>, <|lat -> 49.275, lng -> -123.029|>, <|lat -> 49.2753, lng -> -123.029|>, <|lat -> 49.2753, lng -> -123.029|>, <|lat -> 49.275, lng -> -123.029|>}} // Dataset 

I have a simple check that I wanted to break out because I will probably add complexity later. I thought applying it to the dataset would be straightforward but nothing is being returned from the several configurations I’ve tried. I thought I was following the "Select Elements from Dataset" doc closely, but I’m still not connecting what’s written there to the behaviour I’m seeing in this example. I assumed the operators would take the little mini-dataset polygon as input but I assume something else is happening instead.

testcoords[shape_] := shape[Min, "lat"] > 40   testcoords[ds[[2]]]. (* true *)  ds[Select[testcoords]]  (* returns empty Dataset *)  ds[All, Select[testcoords]]  (* returns {} ... *) 

How can I configure a selection operator to check each polygon?