Why do modern sites frequently use JSON blobs client-side and construct the webpage in JavaScript client-side? [closed]

I have noticed something in later years. Instead of actually creating a HTML page, such as a table of data, on the server and sending the finished HTML page, they nowadays send a “minimal” (in a very broad sense of that word…) webpage which executes a JavaScript which in turn loads in JSON blobs which it then parses in JavaScript, client-side, to construct a webpage which is finally displayed to the user.

One side-effect of this, intentional or not, is that it often makes it much easier for me to “grab” their data since they frequently just “dump” their internal database’s fields to the client, even if they themselves don’t use all fields. So in a way, it’s like they are making it easier for people like me to automate things on their websites, whereas I used to have to constantly parse complex, messy, ever-changing HTML code.

So while I hate how idiotic this is from a logical/user perspective, as well as from a security one (depending on various factors), it’s actually “good” for me in a way. I just don’t understand it, since it’s significantly more work on their part and an overall extremely strange way of doing things.

Whenever I notice that a HTML page is “empty from content”, I always open the network tab in Pale Moon and reload the page, and then I see a “JSON” blob which I can study. It’s bizarre. It’s almost as if they are unofficially providing an “API” without mentioning it openly, but secretly they wink/nudge to us “powerusers”?

Why is the complexity of BFS & DFS frequently written as O(V+E) vs. O(max(V,E))

Why is the complexity of BFS & DFS frequently written as O(V+E) vs. O(max(V,E)) when the 2 are equivalent?

I feel like the latter conveys more meaning and is more simplified, and we can more easily see that the time grows as a function of the number of vertices OR edges, whichever is greater, whereas the latter reads “the time grows as a function of the number of vertices AND edges”

Handling a character who frequently pickpockets teammates

I am a DM for a small group. One of the players has a very sneaky dwarf from a criminal background and chaotic neutral alignment. The problem is he keeps pick pocketing his Elvish teammates, saying that he hates elves and how his criminal background means he did the same back home. He rolls very well, and his Elvish counterparts have low Wisdom (Perception). Since he is a dwarf, chaotic neutral and a criminal, it seems perfect.

He doesn’t steal much, just about 10 gold out of 1000 gold. But I don’t want this to continue because the players know that he has the gold but they can’t catch him without metagaming. How do I stop this?

Frequently crashes in Ubuntu 19.04

I’m frequently experiencing crashes in Ubuntu 19.04 with nvidia 390.129 and dual monitors. I’ve noted it happen aleatory, but more frequently when I’m customizing gnome extensions. See bellow crash on second monitor, after that the system not respond and I need to reboot. Can anyone give me some ideia about what’s happening?

nvid

PS.: On second monitor the colors change and sometimes like mosaics 😀

How can I permanently change the default audio output device to speakers if bluetooth headphones connect/disconnect frequently on 18.0.4?

I’m using pulseaudio 11.1 and Ubuntu 18.0.4.

My audio devices include: monitor (HDMI), docking station’s 3.5mm jack (analog), speakers (analog; connected directly to mobo), and Bluetooth headphones that connect/disconnect frequently.

My preferred setup is, if the headphones are connected via Bluetooth, use them. If disconnected, use my speakers.

Right now, headphones do take priority if connected. But when it disconnects or if I reboot my system, it falls back to the docking station as default.


I can change the default device temporarily with:

$   pacmd set-default-sink alsa_output.pci-0000_28_00.3.analog-stereo 

This gets cumbersome because I connect/disconnect my headphoens frequently so I need to run that command every single time.


Things I’ve done:

1) I followed ArchLinux docs on PulseAudio in which it says “To set a system wide default, add the source name in the default.pa file:”

set-default-sink alsa_output.pci-0000_04_01.0.analog-stereo 

So I did that with my preferred sink at the bottom of /etc/pulse/default.pa. Then, I rebooted and it still didn’t work.

2) This answer was not a permanent solution when I tried it.

3) This answer is the closest I’ve come to what I want. When I boot up, it uses the speakers as default. If I connect my headphones, it uses them.

But, the problem is, if I disconnect my headphones, it goes back to the docking station as fallback.


I’ve wasted hours and hours on this issue. Please give me some ideas on how I can achieve my preferred setup.

How to ensure that my Google accounts sync frequently?

Since I upgraded my S7 to Nougat I notice that the syncing of my google accounts is particularly slow.

If on a computer I create a calendar event, or I send myself an email, I often do not see that as an Inbox notification, or reflected on my Google Calendar widget, until I actually open either app.

I guess (but I am not sure — how about push notifications?) that this is related to the Google Account syncing being too slow, see attached below (“Sync Calendar”, “Sync Gmail” and “Sync Inbox”), taken on 6/20 8:15am.

The things I already tried:

  • I do have continuous internet, tried switching between WiFi and 4G mobile internet, all work. I receive near-real time notifications for e.g. WhatsApp and Slack.
  • In Settings > Apps > Special Access > Optimize battery usage, I added the below to “not optimized”:

    • Calendar
    • Calendar storage
    • Gmail
    • Google Play services
    • Inbox
  • In Settings > Device maintenance > Battery > Unmonitored apps, I added
    • Calendar
    • Inbox