How to resolve the issues of IPhone Safari keep reloading old taps when open them again?

I have multiple question with regard “Loading & Reloading of Pages” on IPhone’s Safari.

So basically, when you are browsing while using Safari, sometimes you opened a tap with Page A, then suddenly decided to open another tap to load and view PAGE B

The tap with Page A then was left untouched and being kept open in your browser.

Then, here’s the issue. After closing tap with PAGE B. I wanted to view again the same content of the tap for PAGE A

From the thumbnail of the tap, it page looked if it was still the same as I previously viewed. However, when I click that thumbnail and get that tap enlarge and open properly. That Page A suddenly got a “Reload” or “Refresh” without my consent!

This is annoying because I am very strict on limiting my internet traffic!

I want to understand all these opened tabs when they have already previously loaded, do they only get the “reload” when you properly enlarge and open the tap?

I closed some of existing taps without reopening the thumbnail. Is it safe to say there was reloading or new traffic has been generated?

I looking forward to your answers.

Many thanks!

Also, When these tap were left in a thumbnail status, do they keep getting reloading at the back without you knowing?

How to keep a substring and delete rest of string using Python

I am beginner in Python and I am web scraping a webpage and I get the following most of the time with the word “available” always there.

Your   product is    available   and costs 10.00€ 

I cannot count the empty spaces and remove word by word, so how can I keep only the word available and delete the rest of it?

And have something like


thank you

(Ubuntu) How to keep bluetooth icon in menu bar even when disconnected?

I have a fresh install of Ubuntu 18.04 Bionic Beaver, and I noticed that the Bluetooth icon only displays at the top of the menu bar when there is an active connection with a Bluetooth device. I would like to keep the icon there even when there is no Bluetooth connection / Bluetooth is off. Is there a way to do this?

I tried installing indicator-bluetooth, but that didn’t appear to do anything. I looked in the main Settings app and didn’t see a relevant configuration item for this behavior. I also checked GNOME Tweaks, but did not find a relevant configuration item there, either.

In fact, I do see some Bluetooth settings available if I click on the menubar as a whole. But I would prefer to see Bluetooth always up at the top alongside the WiFi, volume, and battery indicators.

Signal Messenger: Do they keep a copy of disappearing messages? [on hold]

Let’s assume that Alice and Bob have a conversation using Signal. They activated disappearing messages every 6 hours so all their messages disappear in both signal clients.

But are these messages stored in Signal’s servers? Are they stored in backups? Are they removed at any point from their servers?

How to keep track of the installed software/system configuration to restore after a fresh linux install?

I have been thinking of writing some sort of utility for linux that keeps track of all my installed software and configuration. Something that after doing a fresh install I can just run it and will restore my copy of ubuntu as it used to be before doing the fresh install.

I do not know exactly where to start with this. I know that you can get a list of user installed software from dpkg -i | grep ii.

I would really appreciate any suggestions.

Systemd: how to keep the timer active after reboot?

I need to setup daily reboot of CoreOS machine. So I have /etc/systemd/system/reboot.service:

[Unit] Description=Daily reboot  [Service] Type=oneshot ExecStart=/usr/bin/sh -c 'reboot' 

…and /etc/systemd/system/reboot.timer:

[Unit] Description=Daily reboot  [Timer] OnCalendar=*-*-* 21:20:00 

If I activate timer by sudo systemctl start reboot.timer, I see it in the list:

core@node-011 ~ $   sudo systemctl list-timers --all | grep reboot Fri 2019-03-22 21:20:00 UTC  12h left  n/a                          n/a      reboot.timer                 reboot.service core@node-011 ~ $    

But after reboot this timer became turned off (not in the list).

How to configure it persistent?

Can I please keep the things I liked about Inbox?

I’m incredibly bummed that Inbox is going away because it made Gmail tolerable for me and the things I’ll miss aren’t on any of their “how to keep the features you love” posts:

  • The inbox bundled by date. Currently I see “Today, Yesterday, This month, February” in separate bundles.
  • The efficient placement of the compose button on the bottom right.
  • Smarter folder/label sections in the sidebar, WITH DIVIDERS,
  • bundled trips
  • “Purchases” and “Finance” bundles.

I like seeing “Updates” / “Purchases” bundled in my inbox, rather than in tabs. And I like to pop open the bundle, so I can skim it and archive it all. That works far better for me than the tabs in Gmail standard.

I like that I can mark a whole bundle as “done” with a single click, too. Especially for bundles that I tend to skim (like Updates or Social).

Any tips on how to get those functions back in?

What is a good method/practice I can employ to keep identical code snippits in two places in sync? Also, help documenting functionals

If I could get some input on the design of this, I would be grateful as well.

Note that I’m programming in python.

There’s a function F that takes lots of data, runs some analysis on it (taking maybe a minute or more) to compute some crucial fruits theta, and then spits out a function g(x), that has a lot of functionality that it can do efficiently solely by accessing theta, the fruits of analyzing the data.

Now one might wish to save this g function. So I designed the following functionality

theta = g(mode="get theta") # gets the `theta` value that `g` was using # perhaps store `theta` as a pickle file, or a json file, whatever # read `theta` from its storage restored_g = restore_g(theta) # restore_g is a function that                                # takes a `theta` and gives you                                # a `g` that runs based off that                                # `theta` 

If you want a concrete example to think about, think interploation. F gets a bunch of data points, and after processing, spits out an interpolation function g. You can’t save a function though, so you save the theta that g was using, and then you can theoretically restore the interpolator later on with a restore_g function using that saved theta.

The thing is, though, that the code for F and restore_g will look like this

def F(data):   theta = do_tons_of_processing(data)   def g(args):     return do_stuff(args, theta)   return g  def restore_g(theta):   def g(args):     return do_stuff(args, theta)   return g 

The problem here is that

def g(args):   return do_stuff(args, theta) 

appears twice, exactly the same, seemingly by necessity. I can’t think of a way around editing that snippet of code in both places whenever I want to make a change to g, like what arguments it takes, the description of what it does, etc. How can I best address this?

Two more related questions I have are: what is the best practice for describing the functions?

Normally, one would do something like

def f(x):   """concise description    longer description    inputs   ------   x : int     what the input means    returns   -------   y : float     what the return value is    maybe some examples   """   return 0.2*x 

But my F and restore_g themselves return a function g, whose inputs and outputs should also be described. So where should this description happen? And how can it be maximally synced between F and restore_g with minimal redundancy?

Finally, what is the “best” (or at least, a good) practice for going about g having multiple orthogonal purposes? Sometimes, it might take an x and a y array as arguments to spit out something. Sometimes it could just take an x value to spit out something. And sometimes, it’ll take "get theta" so it knows to spit out theta. Is it considered inappropriate to just overload the x argument so that if it’s fed "get theta" (or some other keyword), then g will follow the “get theta” functionality? Is it better to create a whole other argument called mode or some such that can be set to "get theta" or what have you?