Are synthetic fertilisers necessary in potting plants?

Question: Is it possible to have healthy plants (edible ones) flourishing in pots without the use of synthetic fertilisers? I have concerns regarding fertilisers polluting nearby water sources/soil from drainage as well as sustainability.
Comment: are these plants in post indoors or outdoors?
Comment: On the terrace. In full sun.
Comment: Unless you are intending to flood the plants with liquid fertiliser to the point where its gushing out the bottom of pots by the gallon very frequently, its unlikely to be an issue for nearby water sources or soil.
Comment: How does a potassium know if it came from leaching wood ashes ( organic) or from a potash mine  ( synthetic )?
Answer: If you want to avoid both synthetic fertilizers and animal waste (as discussed in some of the comments), there are some organic fertilizers that are based on waste products that would have to be disposed of otherwise.

The Bokashi method for example turns kitchen waste into liquid fertilizer on a household scale.

Some commercial producers also claim that their product uses waste from food production, e.g. grains from brewing. They are probably the most convenient as they are standardized in their strength and NPK ratio and tested for that during production.

Some gardeners apply a bit of their own compost or fermented plant "teas", but that can be a bit iffy for indoor plants if not done very well - for example it can be a bit smelly.

I recommend you do a bit of research on what exactly your potted plants need and then fertilize accordingly.
Answer: Yes that is possible, you can use organic fertilizer instead. For example cow or chicken manure can be used. I have these in dried granules form, I just add a hand full every month or so when I think the plants need some extra nutrients. But there are more organic fertilizers, check here on wiki if you want.
Comment: Are organic fertilisers less effective than synthetic ones? Secondly, am I supporting the dairy and slaughter industry if you buy cow manure? (I think not but there might be another way of thinking about this.)
Comment: Runoff from organic manure is arguably more polluting than synthetic fertilizer. At least with inorganic fertilizer, you know what it contains and at what concentration so you can plan to eliminate runoff. With organic manure, you have no idea what's in there (not to mention a collection of animal disease vectors, plus the medication given to control them...)
Comment: @Sam, it can be just as effective but you'll need to know first how to do it. I suggest you read more on Organic farming, there is a lot of information on the internet or in books (my father used to read them before internet was born). For your second question, if you support slaughter industry. I don't know, manure is not the main income for that industry, I see manure more as a side (or waste) product of it. If you don't want it, you can look at [green manure](https://en.wikipedia.org/wiki/Green_manure) as well.
Answer: There are a lot of organic fertilizers both solid and liquid you can use and they are more than enough to produce great crops.
The amount and type of fertilizer depends on the plant though so you are going to have to do some research on your own.
The main nutrients are NPK - Nitrogen, Phosphorus and Potassium - and you can run into trouble with lack of some trace minerals but that shouldn't be that big of a problem.
Most fertilizers have the ratios of NPK on their label somewhere. Very simplified Nitrogen is for foliage, Phosphorus for flowers and fruit and Phosphorus makes the cells strong and is important for photosynthesis and the building of starches and sugars.
For solid fertilizers you can get or make fertilizers based manure based, wool, bone, blood, algae, pomace and lots of other materials.
Liquid you can use vinasse or plant teas or slurrys - most popular based on stinging nettle - or compost based teas.
For most plants regular compost should work well enough too.
Also a lot of potting mix comes pre fertilized. That should be enough for most vegetables in the beginning.
Easiest way is to look up if, what kind and how much fertilizer you need for what you want to grow. There should be something organic that's close enough. Don't get too hung up on details though, plants are in general pretty forgiving and gardening means always learning.
Answer:
sustainability

Barrel composting of vegetable leftovers provides me several buckets of composted material each spring. I believe the ~20 liter buckets I have on my balcony don't get hot enough to kill pathogens ... but haven't had problems yet. I imagine a 120L barrel seeing some sun could reach suitable temperatures ... but then you can't have worms anymore.


How to make only the login.aspx webform use HTTPS\SSL instead of the whole web app?

Question: I would like the login form of my .net web forms app to use HTTPS but want the rest of the site to use HTTP only. What is the preferred method of doing this? The is .net 4.0 on IIS 7 (Win2k08 R2)
I realize I can set up a new site listening on 443, but Session state would be lost between the sites. I don't want to track session using SQL at this point (maybe later). Should I just have the current site listen on 443 and have my app reference the login.aspx page using https: instead of http:?
Thanks,
Brian
Answer: I suggest you have the site listen on both HTTP port 80 and HTTPS port 443, then you set  requireSSL="true" for the forms-tag


Can the same piano be used for Indian and western music?

Question: For any piano (keyboard, digital or acoustic), is the piano made or tuned differently for Indian and western music? Or, can the same piano be used for both?
Answer: I think the main problem in using a piano for Indian music is that quarter tones are often employed. For other instruments, special versions are sometimes made specifically to add them in addition to the normal half-step distances between notes.
It would be easy for a trombone to handle it, through the player would have to learn new slide positions. Since the slide allows them to play any pitch in their range, it could be done.
For a trumpet, some makers produce them with an extra 4th valve that lowers the pitch by a quarter step. When combined with the normal three, the player can play scales with quarter tones in them. There are also quarter tone clarinets, etc. but they are quite rare.
String instruments (without frets) can obviously play them, because they can position the hand anywhere along the neck.
It might be possible to reprogram a digital piano to remap the keys for quarter tones, but that would be very confusing to a conventional piano player.
You could also have much more complicated keyboard layout allowing extra keys for the quarter steps in between each of the normal 88-keys for a standard piano, but it would likely be extremely difficult to learn to play.
I think it might be easier to approach by having an additional pedal effect that would lower the step of a normal key by 1/4, but that would not work when you wanted to play chords with only some of them lowered a 1/4 step.
Normally, without very bizarre custom work, pianos are not considered capable of playing quarter tone music.
Comment: @Kamil You may want to look at players of the harmonium in Indian classical music (both Hindustani and Carnatic) (just search Youtube, say), and read about it, for how they deal with the issues. As it's much more used than the piano, you'll get some insights about the problems and possibilities, some of which would also apply to the piano.
Comment: Thanks for the comprehensive answer! I heard that the violin may be tuned for both styles of music and assumed that the same could be done for other instruments. Then I came across keyboards marketed as 'optimized for Indian music' which led me to question my assumption. I thought that my question was a simple one but for the last couple of days, I could not find an answer on Google or Youtube.
Answer: The main reason traditional keyboard instruments like the piano are unsuitable for playing Indian music is because Indian music uses a lot of smooth grace notes and glides between the notes. Some Indian ragas do use microtones in a very deliberate way, but they are not ubiquitous by any means. The reason Indian music sounds like it uses a lot of microtones is because of the glides, which include intervening pitches between the start and end notes. Even in ragas that do not use any microtones, the grace notes and glides can make the standard notes sound very different from what they sound like when sung/played straight.
Having said that, the harmonium (which is a keyboard instrument similar to the accordion) is popularly used as an accompanying instrument. Traditionally, harmoniums had equal-tempered tuning. Eventually some harmoniums began to be customized and just-tuned to the player or singer's preferred key. Then they came up with something called a scale-changer harmonium, which allows you to slide the keyboard up or down using a mechanical device. Personally, though, I don't like the harmonium very much for Indian music.
A lot of digital keyboards and other instruments these days have very interesting new features that may be great for Indian music. I am quite impressed with this iPad app called GeoShred, for instance:
Pibare Rama Rasam (feat. Pragathi Guruprasad and Shravan Sridhar) - Mahesh Raghvan


Lactic acid vs alcoholic fermentation

Question: I have been brewing fruit wine with wild yeast for some time now and one think that is really hard is determining the ABV of the wine. So there is my question, I have a certain mash with a known concentration of sugar, is there a way to estimate the ABV knowing that there will be lactic acid + alcohol fermentation?
Answer: The short answer to "can I determine the exact concentration of alcohol factoring in the lactic acid produced from only the change in concentration of sugar" is no you can't. That said it might not really matter according to this paper  the highest concentration of lactic acid they measured was 7.51 g/L which is 0.75%. Since there shouldn't be any lactic acid at the start of the fermentation, and the conversion from sugar is the same as ethanol. You should be able to subtract that directly from the ABV.
You are using a wild yeast with an unknown species, concentration, and strength of Lactobacillus. Unfortunately there isn't a easy way to measure the amount of lactic acid that I'm aware of. Its probably safe to assume that you could be producing anywhere from 1%-0.4% lactic acid depending on what you wine tastes like.

Lactic acid vs alcoholic fermentation


Compression of valve springs and camshaft rotation

Question: As you know, in most cars it is not easy to turn the intake or exhaust camshaft by hand. You probably need to use both hands, grab the cam sprocket and apply a lot of force to rotate them even with the timing belt removed. This is due to valve springs resisting against compression. However, when you rotate the camshaft a few degrees, the springs should start to decompress which makes it much easier to continue turning the camshaft but is this what happens next? I think the camshaft will be hard to rotate through the full 360 degrees of its rotation because even if some springs are decompressing, the other springs of other valves have started to compress. Correct me if I'm wrong.
Answer: First of all you should NOT do this.  Rotating the cams while the crank is stationary can damage the valves and/or the pistons.
But assuming the head is removed from the engine and there is clearance below for the valves to move, you should be able to rotate the cams.
That being said, the needed force is not constant but varies depending on what valves/springs are being compressed or decompressed at that time.  You will feel that it's "jerky" to some degree.
Comment: It really depends on a number of factors like the number of cylinders, the profile of the cams, the strength of the springs, the friction of the cams to lifters, etc.
Comment: I don't do this with the head on the car. The thing I want to know is the pattern of rotation. Imagine you start turning the inlet camshaft at a certain point which is hard. What happens next if you continue rotating? What happens when you pass the compression of springs? Do the springs suddenly rotate the camshaft when they start to decompress? This is what I want to know.
Answer: Generally, your assertion that as one spring compresses another spring decompresses is correct. There are some caveats to this, though. This mainly has to do with the camshaft setup (ie: OHV v. SOHC v. DOHC) and the number of cylinders. Here is why each makes a difference ...
In a four stroke engine, there are intake and exhaust lobes on the cam which actuate their corresponding valves. The more cam lobes you have on any given cam, the more acculative tension you'll have on those lobes due to how the valvetrain works. If this is a single cam as in an OHV configuration, the tension is fairly equalized on the cam as there will be some lobes compressing valve springs while other springs are decompressing. The more cylinders, the more equalized it will be. Due to this, you most likely will not get the snapping effect you were asking about here.
If this is a V engine in a SOHC configuration (ie: Ford mod motor), the cam lobes are spread across the two camshafts. As long as the two cams are tied together via the timing chain, you should again, not see the snapping you're asking about. If the cams are not tied together, you have a lot higher chance of it happening. I've personally seen the snapping you're talking about on smaller, SOHC engines (ie: inline 4 cyl). There aren't enough cam lobes for there to have equal compression/decompression forces throughout the spin of the camshaft, so it will snap (or pop or spontaneously turn) due to the forces.
On a DOHC configuration, this becomes even greater, because the lobes are now spread out over four cams (in a V configuration) or two cams in a four cylinder. Again, if the cams are tied together via the timing chain (or belt), you'll see a lot less of it, but the fewer the cylinders, the higher the probability.
Something you didn't ask about, but I wanted to point out. There is a basic conservation of energy going on with the camshaft and spring compression/decompression. Yes it takes energy to open the valve as it comes up on the lobe. The energy is then returned back into the system when the valve is closing. There are some energy losses due to friction as the cam rotates in the cam bores as well as the lifters against the cam, but all-in-all, the system gives back to itself for the most part.
Comment: @NarimanAsgharian - TY ... that's the way SE works, so we should do it that way :o)
Comment: @Paulster2 -  Thanks a lot for your informative answer. Based on your answer, I edited my question and added something to it which I think is related to the subject. I'll be happy to know your opinion about it too.
Comment: @NarimanAsgharian - Please don't edit your question to include another question, especially considered the original question had been answered and you selected the answer as answering it. If you have a new question which is related, create a new question and link this question into it for reference.
Comment: I did what you said and created another topic for my question though it is directly related to the things discussed here.


Decreasing ADC Reference vs. Amplifying signal

Question: I have a sensor interfaced to ADC but the Range I am getting is not enough, so now there are 2 options, Gain up the signal or Reduce ADC Gain.
But as I heard it, reducing ADC gain will cause more noisy output, but then, can't I argue that applying gain to input signal will also gain up noise. are there more aspects than these which will cause noise if I reduce ADC Vref as compared to gaining up signal.
Comment: Why is the range not enough - what is the problem?
Comment: @Andyaka I mean the signal level is very low so I am not getting desired counts.
Comment: I ask because averaging a number of samples may give you the desired resolution you require. You haven't stated that the problem is one of resolution or accuracy and of course accuracy can also be improved if noise is affecting accuracy.
Answer: If you reduce the ADC Vref you will reduce the step voltage size of each bit you read.  A some point the bit voltage size is close to the noise level of the existing circuit.  You then need to add much filtering if you want a steady ADC reading.  You may not be able to reduce the noise in the existing circuit.
On the other hand if you create a new amplifier circuit and increase the level of the input signal you might be able to keep amplifier circuit noise low and keep the 1 bit voltage level well above the noise, (also using a higher Vref).
Note that the noise being compared here is the existing circuit noise, not the noise mixed in with the signal to be measured.  Even the Vref voltage will have some small noise in it.
Answer: You need to consider two main sources of noise:

ADC Code transition noise:
This is the noise of the ADC which causes the ADC to output several codes for a constant input voltage. It does not change (in Volts) as the reference reduces, so the code transition noise (in LSBs) increases as the reference is dropped.
Input Amplifier noise:
This is a constant voltage referred to the input of the amplifier. So it increases proportionally with the Gain. It can be reduced by analogue filtering.

In general though, reducing the ADC reference also increases the total noise at the output including the amplifier noise, whereas increasing the amplifier gain only increases its own noise, as shown below (where 'n' is the noise power).
A low noise ADC will have an ENOB (effective number of bits) close to its resolution e.g. 12bit ADC , 11.5bit ENOB (71dB SNR).


Advantage Integrating Shibboleth With ADFS

Question: Can someone explain what the advantage of integrating Shibboleth with Microsoft ADFS is?  I have been researching both products and it seems like they have similar offerings.  There are many articles about using both together, but I have not been able to find a clear answer as to why you should use both.
Answer: I think it's mainly an Interoperability thing, that you can use ADFS as an IdP for Shibboleth and vice versa, that you can use identities from both "worlds", where ADFS is mainly used as the "gateway" to AD Authentication
Comment: This is certainly how we've used it. We had a requirement to implement both ADFS for some providers and Shibboleth for others, so adding Shibboleth support to our ADFS system simplified that job for us.


aura storage without template component

Question: My user case needs to dynamically create tokens for the logging user. It looks a perfect case for aura storage to store the token results from the server action. From the answer of the question here, it looks the auraStorage is only applicable for template component. Since I need use my component in Lightning communities, there would be no need (and/or no way?) to define a lightning app. Is there a way to utilize auraStorage without template component?
Answer: The Aura Storage Service only supports caching of serverside actions:

Server-side actions storage is the only currently supported type of storage. Storage for server-side actions caches action response values. The storage name must be actions.

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/storage_init.htm
Within Communities and the Lightning Experience, the aura storage is already initialized for you and you can just used cached actions directly.
Stored/Cached actions are documented in depth here: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/controllers_server_storable_actions.htm
Comment: Cool, thanks a lot for the confirmation, Christian!
Comment: hm..., not sure what's wrong with it. I used action.setStorable() in the javascript controller, with ** "defaultAutoRefreshInterval": "1800"  and            "defaultExpiration": "1800"**, it did not help. I still saw the Apex controller being called each time.  Anyone has working sample to share?
Comment: A storable action will still hit the server in most cases. However, it will return an initial stored value and then hit your callback again with the fresh result.
Comment: yeah, that's what I observed. Actually the behavior of storable action is a perfect approach for my case. Thanks again for the explanation and confirmation!

aura storage without template component


What is so special about the U47 mic?

Question: I constantly hear awesome testimonials about the U47 and I was wondering why it is considered such a good mic. or is it?
What are some typical uses for it?
Answer: Part of it is the wide area of a relatively constant proximity effect, so the speaker/ singer can move quite freely without a drastic change in sound.
Answer: What makes it special nowadays is the classic, well known sound for singers. People expect singers to sound like U47 U87 ...

What is so special about the U47 mic?


How does Google Chrome's Sandbox work?

Question: I was reading some articles regarding Google Chrome's sandbox and watched a video but I don't have quite a full understanding of it. I read somewhere that it depends on Windows for its security so does that mean sandboxing for Google Chrome isn't used in Mac OS or Linux? I just wanted some clarification on this. Thanks.
Comment: "I read somewhere that it depends on Windows for its security" is true on Windows. If you read some more, you'll find that Chrome is sandboxed in Linux as well.
Answer: Besides Windows, Chrome's Sandbox is also used in MacOS and Linux.
It is using different strategies according to the OS in which it is running.

How does Google Chrome's Sandbox work?


Is it possible for a sequel to be a completely different genre than the first book?

Question: I'm wondering if is it possible to write a romantic dramatic book, and then write a second book that's a sequel but in a completely different genre, like a horror or psychological horror story?
Comment: @dorijan5484 I'm not so sure. I don't think a lot of the advice given on that question is applicable here. For example, if you're switching genres between books, it's easier to signal that in advance (i.e. before release) than if you switch genre within the same book.
Comment: It's a little poorly-worded, I think we could do with some clarification from OP, but they do seem to be asking about two separate books.
Comment: Of course it's possible. But you are guaranteed to lose some readers between the books. Some people have strong preferences regarding genres, and genre switch may feel bad enough for them to not even touch the book. But if you want just to dial the drama up or down, this is done quite often.
Comment: possible duplicate?
[changing genres in the middle of the story](https://writing.stackexchange.com/questions/51651/changing-genres-in-the-middle-of-a-story)
Comment: @F1Krazy Oh, my bad. I misread the title and misinterpreted the following season as a chapter.
Comment: If you have a common underlying theme/sub-genre linking the books, and a large enough catalogue of works in the series, then [it's certainly been done before](https://en.wikipedia.org/wiki/Discworld)
Answer: Yes, it's possible. While changing genres during a story can leave the audience feeling betrayed - they expected one thing but got something else entirely - but changing genres between stories gives you a chance to let your audience know in advance, through (depending on the medium) trailers, interviews, the front cover, etc. This will lessen the shock, and give them time to adjust to the idea.
Some fans will invariably be put off by the switch; the more drastic the change, the more fans you're likely to alienate. The trick is to keep the core aspect of whatever made them like your first novel. To use your example, while the sequel may be a psychological horror, you can keep some of the romantic aspects by emphasising how the leads from the first book are still very much in love; that love can either help them get through the traumatic events of the story, and/or be exploited by who/whatever your villain is as part of those traumatic events.
A good example of how to do this is Aliens. The first Alien film was very much horror. Aliens, by contrast, was an 80s action movie, but it kept the horror elements from the first film and managed to blend the two together. The Alien Queen appearing from nowhere and graphically tearing Bishop in half? Horror. Ripley showing up in a power loader a few seconds later to fight her? 80s action movie. The fusion worked so well that Aliens is considered one of the greatest sequels of all time.
Comment: The most recent season of *Marvel's Agents of S.H.I.E.L.D* has done this on a micro level. It's still science fiction, but the episodes have had the characters jump to different times—and whenever they've ended up in a different era, the entire theme of the show has altered in order to match the stereotypes of that era—not just the set design, but many meta aspects of the overall characterizations themselves. For example, one episode was filmed in black and white with a character narrating action, all in the style of old gumshoe private-eye movies.
Comment: Another example is Mary Robinette Kowal's Glamourist Histories.  Each book is a different genre, but they stay grounded by using the same characters and literary aesthetic.
Answer: Possibly, but not without resistance. Anytime something is successful, both the publisher and the audience will demand more of the same. Your best bet is to do some genre-blending in a way that brings something old and something new at the same time. For instance, if your first book is romantic-drama, your second could be action-drama. People will stick with you if it was the shared elements that brought them to your book in the first place.
Harry Potter is a good example. Several of the books have different genre elements --middle-grade mystery in one, action adventure in another, war novel in a third --but the overall series stays grounded around YA fantasy.


Where are all the Stones of Barenziah located? (No Stone Unturned)

Question: I can't seem to find a few of the Stones, so, is there a list available with the location of all the stones?
Answer: You're tasked with finding these for the "No Stone Unturned" quest.
From the UESP:

The stones are located in the following places:

Dark Brotherhood Sanctuary (Astrid's room)
Whiterun Halls of the Dead Catacombs (in the first room, go down the left stairs and it will be to your left)
Mistveil Keep in Riften (Jarl's room)
Proudspire Manor in Solitude (has to be purchased for 25.000 gold)
College of Winterhold (Arch-Mages room)
Dragonsreach in Whiterun (Jarl's room)
Jorrvaskr in Whiterun (Kodlak's room)
Dead Crone Rock (On the table near the 'boss')
House of Clan Shatter-Shield in Windhelm
Black-Briar Lodge east-northeast of Riften (Second floor bedroom, next to bed)
Ansilvund Burial Chambers (northeast of Riften)
Wuunferth's Room in the Palace of Kings 2nd floor (Windhelm)
Stony Creek Cave (South of the Eastmarch Imperial Camp, last room on the table)
Rannveig's Fast south of Morthal, northeast of Rorikstead (after falling down the trapdoor in fron of the chest and dragon-word-wall)
Fellglow Keep northeast of Whiterun (straight up the stairs and to the right)
Dainty Sload (A ship along the coast southwest of the Solitude Lighthouse)
Sunderstone Gorge (Right of the alchemy on a table with skeletons)
Solitude Palace (Queen's room)
Yngvild, between Dawnstar and Winterhold (Very last room near the end)
Treasury House in Markarth (End table in Thonar's bedroom, which is the left from the front door)
Dwemer Museum in Markarth, entrance to the right as you enter Understone Keep (Table in room to the Left)
Thalmor Embassy (Elenwen's Solar, second floor, first bedroom on your left) (Or in the cave through which you escape, after jumping from the ledge, on a small table beside a skill book and dead mage.)
Hob's Fall Cave (Near the alchemy set on the left)
Pinewatch - House Northwest of Helgen with a Bandit hideout underground. Gem is in a storeroom before the 'boss'.

Now there are also mods that place map markers for them or otherwise make collection easier:

Stones of Barenziah Quest Markers
Stackable Stones of Barenziah with Optional Quest Markers
Sounds of Barenziah
Comment: @spauny selling all the stones to vex starts another quest to find the crown, and the reward from *that* quest gives you a better chance to find gems in chests.
Comment: @IrishJMA taking the stones of barenziah will never count as stealing. They're quest items, and they don't appear as stolen in your inventory.
Comment: What can you do with all the stones? Other than selling them to Vex, because she offered to buy them if the collection is complete, you can do other things with them?
Comment: When you become leader of the Companions (or any other guild), can you take the items without it being stealing?
Comment: I also found a stone at the river shack of the forlorn lover on Solstheim. It was in my last playthrough and was located at the river that flows west. (vicinity of Bristleback Mine). The shack did not spawn in current playthrough. I keep checking back. Did not expect one to even show up in Dragonborn. So, now one or two might generate randomly.
Comment: There shouldn't be - the UESP lists the same 24 stones. Perhaps you're using a mod that added one?
Answer: If you have the latest patch, the Thalmor embassy one has been moved so it's not in the bedroom anymore. It has been relocated to the cave after you rescue someone from the Thalmor dungeon.
Answer: I recently made a guide that includes all the 24 stones of Barenziah and the final reward. Hope this helps everyone!
Comment: And this is why we don't like link only answers.  Even YouTube links can rot.
Comment: Interesting, my mobile app displays a broken link, but on the computer it is ok...
Answer: Knowing where to find each of the Stones is half the battle, but this info can easily be found online, for example in the UESP wiki mentioned by the Accepted answer, or on the Fandom Elder Scrolls wiki.
The harder part is often keeping track of which ones you've already found, because you're basically on your own for this. My wife and I used to use a Google doc to track them, but for multiple playthroughs it gets tedious to reset the list. I ended up building a mobile app (aptly called "Barenziah Tracker") to help with this - it includes location info and screenshots from the Fandom wiki, and lets you check off each stone as you collect it, with independent lists for multiple playthroughs. Here's the link for iOS, and here's the link for Android. Hope that still helps someone enjoy this timeless game.


When shutting down Arch Linux, the message display is erratic

Question: I installed KDE Plasma and LightDM on Arch Linux.
Then, when shutting down, the message display was disrupted.
Apparently, this occurs in Linux distributions that employ Systemd.
How can I fix this phenomenon?
Comment: The problem is multi-factor. While starting up and shutting down, the display modes may change, Screen resolutions (both graphical and text), cursor positioning as well as how to handle LF, CR and CR+LF, frame buffers, etc. Eventually, the output detects the changes and adjusts itself, but does not go back to adjust anything that was already output. For example, right after shutting down LightDM, the output resets to "nomal". And I see someone else already posted an answer for this, so read that answer. But understanding the base problem might be helpful for others.
Answer: When systemd prints its output, it justifies the lines acording to the current screen resolution.
When lightdm shuts down, the screen resolution reverts to some default.  systemd already printed those previous lines so it makes sense that it doesn't go backwards and try to clear the screen then reprint things with the new resolution every time the resolution changes.
To solve this you could figure out, you would need to set the default TTY resolution to match the resolution of your X (or wayland) server.
I'll also point out that spending effort to improve the look of shutdown text is pretty pedantic.  These messages aren't intended to be on the screen for much longer, and if a service shutdown is hanging, it'll get printed in your current resolution, meaning anything important should be readable.  If your journal is persistent (is stored in /var/ and isn't deleted between boots), then you'll be relieved to know that the journal is not stored in the same way it was displayed.  In a case where you've configured the journal to be persistent, you can journalctl -b 1 to see the messages properly justified from the previous boot.  That may be important to you if you feel it is essential to read these messages and decided they were unreadable.
Comment: I have changed the GRUB settings and changed the TTY resolution.

This still does not solve the problem. What should I do?
Answer: DISCLAIMER: This solution is intended for users running systemd and LightDM. If your setup is different, you might have to modify the following instructions to suit your system. Skip to the SOLUTION section if you don't feel like reading all the background information regarding the misaligned shutdown messages.

OVERVIEW: I spent a long time trying to solve this problem and was only able to fix it a few days ago. It most likely HAS NOTHING TO DO WITH YOUR SCREEN RESOLUTION, but instead is caused by one of your applications (possibly LightDM) formatting your terminal/tty incorrectly. At some point during startup/shutdown, something changes your tty so that new lines (NL) don't receive an automatic carriage return (CR) as they normally do. In English, this means that if you pressed Enter on your keyboard, your text cursor would move down one line, BUT NOT REALIGN ITSELF TO THE LEFT SIDE OF THE TERMINAL WINDOW (you can see this in the picture you provided, https://i.stack.imgur.com/oARSo.jpg). This is known as a "staircase effect" and, from what I've read, is a fairly common issue on Linux. The core code to resolve said problem is stty opost onlcr, but using it can be a major pain if you don't know exactly where to put it in systemd. If you apply the command too early or too late, you'll just be formatting text that is already correctly displayed. ONE SOLUTION is to create a CUSTOM SYSTEMD SERVICE to adjust tty output properly. You can have the service restart itself occasionally so you don't have to pinpoint the precise location where stty opost onlcr should go.

SOLUTION:
#Find out what tty instance your Desktop Environment (e.g. Gnome, KDE Plasma, etc.) is running. Typically it's tty1, but since you're using LightDM, it should actually be tty7. You need this information when you create your systemd service in Step 2.

Run who in your terminal. It should produce output like:

user-name tty7         2021-02-08 12:11 (:0)

#Create a custom systemd service as root in /etc/systemd/system/. Under the ExecStart= section, include the tty information you found in Step 1. Name the service anything you want, such as staircase-effect.service.

Run sudo nano /etc/systemd/system/staircase-effect.service in your terminal. Here is a sample unit to try with important options explained afterwards.

[Unit]
Description=Fix tty staircase effect
DefaultDependencies=no
Before=halt.target shutdown.target reboot.target
email@example.com
StartLimitBurst=5
StartLimitIntervalSec=0
[Service]
Type=simple
ExecStart=/bin/stty -F /dev/tty7 opost onlcr
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target

StartLimitIntervalSec=0 - Setting this option to "0" lets systemd restart your service an infinite amount of times without returning any errors.
Type=simple - It's better to use "simple" than "oneshot" with this service because it runs in a never-ending loop. AFAIK, "oneshot" prevents other services from running at the same time it is, which would be undesireable in this situation.
ExecStart=/bin/stty -F /dev/tty7 opost onlcr - This line is what actually solves the staircase messages. Make sure to put in the correct tty number you got from the who command in Step 1.
Restart=always - You want this service to repeat itself UNLESS you know exactly where to place it in your startup/shutdown procedure. The stty command is no good if you run it when text is already displayed properly.
RestartSec=30 - Technically, this option is a matter of personal preference. You're going to want your service to restart itself frequently enough to solve the problem, but not so much so that it becomes its own nuisance.

#Enable your new service as root with systemctl.

Run sudo systemctl enable staircase-effect.service in your terminal. Then reboot to see if the fix works.

OPTIONAL LIGHTDM ADJUSTMENTS:
#The default LightDM service /usr/lib/systemd/system/lightdm.service conflicts with firstname.lastname@example.com unnecessarily (https://bugs.archlinux.org/task/49527?opened=22169&status%5B0%5D=). I'm not sure if this is related to the staircase messages or not, but it probably won't hurt to remove the email@example.com line from the unit file.

Run sudo systemctl edit --full lightdm.service in your terminal. Then either remove or comment out the email@example.com line to stop LightDM from interfering with your standard getty service. reboot to see the changes.

ALTERNATIVE SOLUTIONS:
https://www.reddit.com/r/linux/comments/iwnm9w/shutdown_staircase_output_fix/
Alternative Solution 1 (this is where I got the main stty command from)
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617249
Alternative Solution 2 (for users running System V and Debian)


What do 'All things delivered to Jesus by His Father' include?

Question: Matthew 11:27:- All things have been delivered to Me by My Father, and no one knows the Son except the Father. Nor does anyone know the Father except the Son, and the one to whom the Son wills to reveal Him.
Answer: The teaching in Matt 11:27 is not unique:

Matt 28:18 - Then Jesus came to them and said, "All authority in heaven and on earth has been given to Me.
John 3:35 - The Father loves the Son and has placed all things in His hands.
John 13:3 - Jesus knew that the Father had delivered all things into His hands, and that He had come from God and was returning to God.
John 17:2 - For You granted Him authority over all people, so that He may give eternal life to all those You have given Him.
1 Cor 15:25 - For He must reign until He has put all His enemies under His feet.
1 Cor 15:27 - For "God has put everything under His feet." ...
Col 1:16, 17 - For in Him all things were created, things in heaven and on earth, visible and invisible, whether thrones or dominions or rulers or authorities. All things were created through Him and for Him. He is before all things, and in Him all things hold together.
Heb 1:8 - But about the Son He says: "Your throne, O God, endures forever and ever, and justice is the scepter of Your kingdom."
Heb 1:13 - ... "Sit at My right hand until I make Your enemies a footstool for Your feet"
Eph 1:19-22 - ... These are in accordance with the working of His mighty strength, which He exerted in Christ when He raised Him from the dead and seated Him at His right hand in the heavenly realms, far above all rule and authority, power and dominion, and every name that is named, not only in the present age but also in the one to come.
Rev 11:15 - "The kingdom of the world has become the kingdom of our Lord and of His Christ, and He will reign forever and ever."

Little wonder that Jesus could say:

Matt 1:27 - All things have been entrusted to Me by My Father. ...

Note the comments of Barnes:

All things are delivered ... It means that Christ has control over all things for the good of his church; that the government of the
universe is committed to him "as Mediator," that he may redeem his
people and guide them to glory, Ephesians 1:20-22.
Answer: In some of the commentaries. these words are related to the immediate context; in this case, the context being the previous "Thou has hidden these things from the wise and understanding and revealed them to babes" (v25 RSV). Then "all things" would be the knowledge of all things (or at least all things relating to salvation), leading in turn to the statement at the end of the verse that "knowledge of the Father" also necessarily comes through the Son.
So R.T. France says in his commentary; "There are no secrets between Father and Son... "All things" refers here (in the light of vv25-26) to the knowledge they share." (p199).
A fuller answer would incorporate both angles; the immediate context and the usage in the rest of the Bible.
Answer: I read this part as an obvious statement that is used to motivate his followers. Jesus is a monogeneous son [John 3:16]
So he just states the obvious that a [monogeneous] son gets all his talents from his father only.
What you have as "all things" in Greek Septuaginta LXX https://biblehub.com/interlinear/apostolic/matthew/11.htm is just one word πάντα - which does not specifically refer to things but just means "all". https://biblehub.com/greek/3956.htm
Also "no one knows" is οὐδείς and it can mean "knows nothing" as well as "no one knows"  https://biblehub.com/greek/3762.htm
So the 11:27 I would read as following:
... All was handed over to me by my father. And a [monogeneous] son can not know anything were it not for the [genes] that came from father. Only a son would know his father and whoever the father decided to reveal that he is son. (Biological genes and knowledge being both Information this is kind of a trivial statement too.)
Now, one could argue that a mother can know for sure who the father was. But here it was not the case. And anyway in a natural order of things it is impossible to know which sperm from millions did manage to inseminate the egg.

What do ‘All things delivered to Jesus by His Father’ include?


Do fault codes get recorded with a date stamp into a log with a history of DTCs?

Question: If it's relevant, I'm asking this question about a 2006 Lexus GS300. A previous post asked if a fault code leaves a time stamp, and the answer was "no." I want to know if fault codes have a date stored in the metadata. I only need to go back a few months. Thanks.
Comment: Welcome to Motor Vehicle Maintenance & Repair! .
Answer: The OBDII standard does not specify either a date or a time to be attached to the fault codes.
While it's certainly possible that a given manufacturer might store timestamps with fault codes internally, those codes would potentially be available only to manufacturer-specific diagnostic tools or perhaps some third-party tools that have either cracked the system or have licensed the technology from the manufacturer.
Another problem with this idea is that many cars really don't know what date/time is current, at least not 2006 vintage.  Some of the newer "connected" cars do but that's a more recent development.
Comment: Thank you Paulster2 for answering my question. I have a follow-up question: Do fault codes provide a mileage stamp, or some other way to calculate the distance travelled between occurrences of fault codes?
Comment: Perhaps it would help if you explained what you are trying to accomplish here.  But in answer to your follow-up, NO, I don't believe mileage is included either.  The fault is recorded and that's it.  Keep in mind that OBDII was implemented in 1994 and was designed in the early 1990's, so it's not going to reflect 2020's technology.  Again, SOME manufacturers may implement additional data logging for SOME models but OBDII is not going to support it directly.  Manufacturers can and do have proprietary extensions and some of those may have what you're asking for.
Comment: I know from experience that some vehicles do record the number of ignition cycles since a given fault, which I found very interesting when a service department told me this. It's been a while so I'm not 100% sure, but I believe this was on an original version Nissan Versa. I don't know if a Lexus would have similar info


Why don't we train neural networks to maximize linear correlation instead of error?

Question: Recently a project I've been a part of has involved training neural networks so that we maximize the Pearson correlation between actual and predicted values. So this came to my mind: why don't we change the mathematical workings of, say, gradient descent so that instead of minimizing RMSE, we maximize $r$? If we can make the network predict with a high correlation, all we have to do is chain a linear function to the predictions and we have good prediction.
Answer: Because that would be a completely different objective altogether. Note that unlike MSE, Pearson correlation is maximal iff there is a linear relationship between both variables. This means that

The network would "think" it has correctly learned its inputs if its output is roughly proportional to the dependent variable samples, rather than equal (or similar). Therefore predicting $Y$ or $2Y$ or $-Y$ (etc.) would be equivalent. This is generally undesirable, since we would like our network to give prediction similar to its inputs, rather than proportionally to said inputs.
There would not be a global minimum to the optimisation problem thus posed. Any proportional constant as set above would give an optimal solution. This is undesirable from a numerical point of view and would lead to instability.
Comment: 1) Assuming the network would converge and 2) You'll find (write it down) that if you constrain everything to have mean 0 and variance 1 (which is equivalent to what you call normalizing linearly), maximizing correlation and minimizing mse is strictly equivalent.
Comment: It's worth noting that we don't even maximize $R^2$ for linear regression, where it might actually make sense to do so.
Comment: But if we let the network converge to $r=1-\epsilon$, couldn't we just normalize the output linearly and have great predictions?
Answer: It's more like a comment, though I can't comment yet.
I'd suspect that minimizing RMSE respective to a normalized input is (roughly?) equivalent to maximizing the Pearson correlation coefficient, but the latter is more computationally expensive.


How was the specific heat capacity of water determined experimentally?

Question: I know it seems like a silly question but I've googled it several times and I just couldn't find the answer. The experiments I found always assume knowing the specific heat of another metal, and by using the calorimeter experiment you can calculate the specific heat of water. And there are other experiments that use the specific heat of water to determine the specific heat of other metals. So my question is, what was the experiment used to determined the specific heat of water? Or was it determined theoretically?
Comment: You can eliminate the unknown specific heat of the apparatus that contains the water, by repeating the experiment using different quantities of water in the same apparatus.
Answer: Orignally by James Prescott Joule in 1843. It is on his thombstone!
Joule did this mechanically, with a weight that dropped driving a "mill" in a calorimeter with water:
https://commons.wikimedia.org/wiki/Category:Mechanical_equivalent_of_heat
Answer: Such values are measured by national laboratories such as the National Institute of Standards and Technology (NIST) (formerly National Bureau of Standards) in the USA, and National Physical Laboratory in the UK.
They re-measure such physical standards from time to time, mainly to demonstrate the use of new technology and methods in measurement, and to improve accuracy.
You can find out from their publications how they do so. For example this from 2001 (you will need access to the Journal of Chemical and Engineering Data for the text, or it may be requested from the authors in ResearchGate) or this from 1939.


Mavericks: Second Apple Thunderbolt Monitor Intermittently Ignored

Question: I run a mid 2012 MacBook Pro as my main system. It drives two Apple Thunderbolt Monitors. Prior to my clean install of OSX 10.9 Mavericks, I worked with both monitors connected (as an expanded desktop) without issue. Now it regularly ignores the second monitor after the displays go to sleep.
Answer: Similar issue here. I have a 15" Macbook (early 2011) and a single thunderbolt display. Often, when the mac wakes from sleep my thunderbolt display does not connect.
I found that unplugging the thunderbolt cable and reconnecting it gets the display recognized again. Not ideal but at least better than a reboot.


How to stress test a web application relying on Socket.IO?

Question: I developed a web application in typescript relying on a node.js server. Now I want to monitor the load time behaviour under stress accessing it on my public development server by virtual users.
The problem is, that after loading the page client code is executed requesting further data from the server using message based communication with Socket.IO. This means the loading process cannot be called finished until all the data has been sent by the server. Upon arrival of all necessary data the client sends a message to the server indicating the end of loading and triggers an entry in a log file on the server which tracks all load durations and number of clients that are simultaneously going through the loading process. This seems to work when I manually start the app with a browser but the message isn't triggered when I use a headless browser let alone virtual users from cloud-based solutions. Only the download of static content together with my client-side script are measured but not the following transmissions by Socket.IO.
What would be a feasible approach I could take in order to make the loading process compatible with such tools? Could I maybe include a string by which the client signals that loading is finished and have the time until its emergence measured by some online tool? Do you maybe know such an application?
Answer: You'd do it pretty much the same way you'd load test other interfaces for servers. You need a client that interacts with the server and a way to generate a lot of actions concurrently and for some period of time or repetitions. You could probably roll this solution yourself if you really wanted to or you could try an existing tool like Artillery. They provide a quick write-up using their tool at https://artillery.io/blog/load-testing-socketio-with-artillery .


Android status bar symbols

Question: Why has Android not made available the meaning of all the relevant status bar symbols?  Why can I not find this complete list?  I try to find out and post it, now Android is stopping me from doing this because I cannot find a ""TAG"" ???  What is going on?
Answer: It is mostly because status bar icons vary from OEM to OEM. Each one has a slightly modified icon set to go with their overall skin/UI. And then icons will depend a lot on the features incorporated within a device. So, developing a full list of icon sets seems like a tough task. Because you'll eventually miss at least something used on a phone.
Other than that, 3rd party apps also show their icons up the status bar. And it's impossible to keep a track of each and every app.

Android status bar symbols


Cellular chip antenna feedline width?

Question: I have a chip cellular antenna from Pulse W3544B. In the datasheet it is said to make the transmission line 1.34 mm thick which I feel is too huge and also I wanted to make a strip line for impedance matching and according to online calculations the thickness of the strip line is determined according to my dielectric and layer properties. I got 0.325mm. I'm confused which to use?
Answer: The width of the stripline is not a design target in itself.
You design a transmission line to have a specific impedance, to match the antenna or whatever is at the other end of the transmission line (or both, if possible).
So, you're right to calculate based on your actual substrate and copper properties. Both 1.3 and 0.3 mm are feasible widths, and variations on a scale of 4 really don't surprise me – there's a large difference in dielectric constants across different board substrates, and a large difference of board thicknesses.
So, make sure you read the datasheet correctly – I can't find your 1.34 mm anywhere in that datasheet, but a clear labeling that says "50 Ω transmission line".
Answer: Both the value you calculated and the one stated in the datasheet are feasible, but you have to remember that the value stated in the datasheet represents what fits to the specific user case they have shown.
You are correct in calculating the value yourself, as that is the only method that will give you a certain line impedance value.
Check the datasheet for the impedance required, and run the calculations based on that.
If you budget allows for it use the Polar Instrument tools, otherwise, just do like most of us and use the Saturn PCB Toolkit which is free and does the job quite well.

Cellular chip antenna feedline width?


How do I migrate my iTunes media library from Windows PC to Mac?

Question: How do I migrate my iTunes media library from my old laptop with windows (all music stored on external hard drive), to my new MacBook without losing any files and data, i.e. playcounts, ratings, playlists etc?
Answer: See Migrate Your iTunes Library from Windows to Mac (and keep your ratings, play counts and date added).


how to displaying pivot in matrix reporting service?

Question: I have problem relating to pivot query and matrix reporting. I don't know how to display it on matrix reporting service so it will dynamic column. Can any body help me to show how to configure the matrix table? or could you give the link where can I find the answer of my problem? I'm newbie in reporting service.
Answer: Think of a matrix control as a 'design time pivot table'
Once it has been designed and it has rendered the data, the output is fixed - you cannot drag and drop like you would with a pivot table.
The matrix control can have dynamic row/column groupings which will grow with your data.
It's pretty easy to use once you get your head around the concept of 'inscope'
To create dynamic columns, you just need to create a column grouping (towards the top right section of the matrix control once you have dragged it on to the form) Just tell it which field to use as a grouping.


Existing command line text on screen to file? (non-graphical Linux)

Question: On tty2, how do I take a text screenshot  of the command line?
Comment: Related: [Where is terminal output stored?](https://unix.stackexchange.com/q/472328)
Answer: Did you consider the screendump command?
Comment: Try it and see.
Comment: "Just saying `cat /dev/vcsN ` has a *similar* effect". Then why not just use `cat /dev/vcsN`?
Comment: Nice. Is there a way to get it to do colour as well? (`screendump` reads from `/dev/vcsa` devices which does have colour information, but it seems to be stripped from the output.) Btw. I like to combine it with the `watch` command to see live output like `watch -n0.1 screendump`.
Comment: @WeijunZhou `/dev/vcs` devices don't contain information about the size of the screen, so `cat /dev/vcsN` only works if your terminal window has the same number of characters across as the VC you are capturing.
Answer: If you can use tmux or screen, they have the ability to save the scrollback buffer to a file.

Write all tmux scrollback to a file
Copying GNU screen scrollback buffer to file (extended hardcopy)?

Unlike screendump, which is Linux-only, tmux and screen are available for BSD-based OSes too (e.g. macOS, FreeBSD) and won't require special permissions.
Comment: Because of that, I marked this one as accepted. But @RudiC Don't take it personally. Your solution is still the simplest.
Comment: Those two add another layer; you need to login and then run screen, have another shell, and then can communicate with your CLI.
Answer: You can use script for this. It will record a typescript of the terminal session. By default, it will write to ./typescript. Of course, you need to do this in advance so it is not really a "screenshot".
$ script
Script started, file is typescript
$ ls asdf
ls: cannot access asdf: No such file or directory
$ exit
Script done, file is typescript

# Then check the recordings:

$ cat typescript
Script started on Thu 29 Nov 2018 02:52:04 PM CET

$ ls asdf
ls: cannot access asf: No such file or directory
$ exit

Script done on Thu 29 Nov 2018 02:52:09 PM CET


Diablo 2 digital download patch level

Question: I am trying to play Diablo 2 with my flat mate over LAN but it looks as if my CD has seen some better days (and some sand paper).  Suffice to say I cannot play.  I am trying to stay with v1.00 as apparently later patches make the single player too hard to play through multiple times.  Does anyone know if the digital download from Blizzard is v1.00 and whether it stays as v1.00 or does it auto update like Starcraft or WoW?
Comment: What do you mean "make the single player too hard to play through multiple times"?  I frequently played Diablo 2 single player, and I don't remember any problems with the later patches.
Comment: well i have been informed, not having played through multiple times, that later patches granted mobs an immunity to certain damage types that could make it, if not impossible, ridiculously hard for someone on their own.  may not be true but as i said have not gone that far through diablo 2 myself.
Answer: You have no say in the matter; for the digital download they give you a Blizzard downloader and that gives you the game in a patched state.
Looking at my downloaded installers from when I did it last (Nov 2010), I have 1.12A for D2 and LOD, then I had to manually patch to 1.13 (released Mar 2010) to play on Battle.Net.  Apparently they don't keep it totally up-to-date, nor is it automatically updated, but you also can't get 1.0 either.
That said, my friends and I did 1.13 on ladder without much trouble at least up to the end of Nightmare without any difficulty issues.
Comment: thanks for the heads up with the digital downloader.  it is what i expected so glad i did not take the plunge.  may track down a set of disks on amazon.  Ta

Diablo 2 digital download patch level


Delete sent mails that do not have a label

Question: I would like to erase the sent messages, but many of them have a label since they are in a folder, and these I do not need to erase.
How can I delete the sent mails that do not have label?
Answer: Search for
<code>in:sent has:nouserlabels
</code>
Then "select all", then click the link to really choose all messages, then delete.


How vulnerable is ADB (Android Debugging Bridge) over wifi now that WPA2 is cracked?

Question: How vulnerable is ADB over wifi now that WPA2 is cracked? Could hackers MITM/inject commands I am sending from my pc to my phone? My Windows PC is patched but no official fix is available for Android yet.
Answer: Some clarification: WPA2 is not cracked. The WPA2 protocol is mathematically secure however an implementation oversight in a few OS's allows for some nasty consequences with a local attacker. WPA2 can continue to be used for the foreseeable future so long as you update your devices.
ADB is fine so long as your device is >4.2.2 (which as far as I know is the only vulnerable range for Android?).

ADB Authentication. Since Android 4.2.2, connections to ADB are authenticated with an RSA keypair. This prevents unauthorized use of ADB where the attacker has physical access to a device.

Unless the attacker steals the keypair their only option is to trick you into authorizing a new device which really isn't anything new or novel.
Source: https://source.android.com/security/enhancements/enhancements43


Statics software for structural engineering

Question: I'm attempting to expand my knowledge of engineering software. I've found comsol and ansys for acoustics and thermodynamics/fluid dynamics (not necessarily in that order), now I'd like to see if I can find something for architectural statics/load calculations. Which packages are in common industry use?
Comment: This question appears to be off-topic because it is about engineering without any physics in it.
Comment: We generally don't deal with software questions, or with pure recommendation questions.
Comment: You mean you don't want to compile your own Fortran FEA code like the CFD people do?
Answer: I'm studying mechanical engineering, so I don't have a real "industry insight" in construction. Anyway, Ansys and Abaqus are very widely used in mechanics, whether it's cars or buildings. Both have examples on their websites were they were used to solve real world problems:
Ansys Structural Building Design
3DS Construction Engineering
Comment: nice to know ansys can do that too, will have to look at abaqus. Gotta say, instaplay youtube video = instaturnoff
Answer: You can find pretty much information on mathematica website and they are providing even seperate packages to work in specific domain. Check thislink and this link on structural mechanics. The student version of this product costs just $50 and is worth it. I bought it for myself too.
They also provide demonstrations
Answer: It depends on what you are trying to achieve. The first thing to realise is that most civil / structural engineering projects do not need high specification numerical analysis. We work on a number of projects often with a high turnover and generally solving relatively simple problems so avoid the use of high specification numerical analysis typically a sensible part of the design process.
The second thing to realise is that there are a wide variety of problems in Civil / Structural engineering and so there are a wide variety of tools to solve them. Aspects that you will want to consider will be things like 2D or 3D, do you want to model a structure as a simple frame or using complex elements, do you want to model the ground, do you want to model dynamics, thermal effects, creep, model complex load patterns (such as live loads on bridges), fatigue, hydraulic or wind loads, large displacements etc.
My suggestion in Civil / Structural engineering is that you don't want to learn the software before you learn about the fundamentals of the subject. Normally it only takes a few days to learn to 'drive' any specific piece of software but it can take many years to learn how to model structures such as bridges, this part of the learning is generally not software specific but can be solved with many different pieces of software which all do similar things.


Grounding wires

Question: For a light fixture, if I ground the wire to the light fixture and the wire in the box is also grounded, do I need to connect the two grounded wires?  The cooper wire within the box is extremely short, making it very difficult to connect it to the cooper wire on the light fixture. Thanks
Comment: Your question is a bit confusing, a photo might help.
Comment: From your description, it sounds like you connected the bare copper wire from your box to the box and then connected the ground wire from the fixture back to the fixture. If this is the case, then your fixture is not grounded at all. As already stated, a picture would help clarify.
Answer: You do need a ground connection between the fixture, and the ground wire coming into that box (and to the box itself if it is metal).
If the incoming wire is too short and you only need to connect it to the fixture (not the box because the box is plastic), you can add an extension to the ground wire using an inline butt splice

Push the splice on the short wire and add an extra wire, often called a pigtail, to the other end of the splice. For a ground connection, the wire should be bare or green (assuming you are in the US)
If you need to connect the fixture, the incoming wire and the box (because the box is metal), you can use a conventional wire nut to join the short incoming wire, and two pigtails, one to the fixture and one to the box. You also can use push on connectors, like this one
Answer: You are supposed to use a wire nut or some other secure method to connect it. All the grounds should be connected together.

Grounding wires


Why thermal conductivity increases with temperature?

Question: what is the molecular mechanism with which thermal conductivity increases by increasing temperature? at least for metals? I know that heat increases the oscillations of the atoms in the crystal. But how that explains the increase in thermal conductivity?
Comment: In metals conductivity is primarily due to free electrons. Following the Wiedemann–Franz law, thermal conductivity of metals is approximately proportional to the absolute temperature (in kelvin) times electrical conductivity. **In pure metals** the electrical conductivity decreases with increasing temperature and thus the product of the two, **the thermal conductivity, stays approximately constant**. In **alloys the change in electrical conductivity is usually smaller and thus thermal conductivity increases with temperature, often proportionally to temperature**.
Comment: you said "In metals conductivity is primarily due to free electrons", are you refering for thermal conductivity? I understand that for electrical conductivity this is true, but for thermal I am not sure. Any reference?
Answer: The mechanism for increasing the thermal conductivity is phonon assisted hopping. For a disordered system, one which do not preserve the long range order, the electronic wave function becomes localized. The wave function extent is typically much smaller than the system size and is characterized by the localization length $\xi$, a parameter in theory. In this case, electron propagates by hopping events along the applied electric field. The tunneling rate for an electron to hop from a localized state $i$ to another state $j$ is proportional (exponentially) to the distance between those states $r_{ij}$ and temperature
\begin{equation}
\Gamma_{ij}=\gamma_0\exp(-\frac{r_{ij}}{\xi}-\frac{|E_i-E_j|}{T})
\end{equation}
where $\gamma_0$ is another parameter of the theory, that depends of phonon DOS and electron-phonon coupling. From this equation you may see how $\Gamma$ (and hence conductivity) depends on $T$.
The hopping theory was first introduced to describe electron transport in disordered semiconductors. A notable person is F. N. Mott. Nowadays, it is used also, for example, for organic materials. For metal, it might be applied, if it is disordered enough, in a sense of wave function localization as said above.

I know that heat increases the oscillations of the atoms in the
  crystal. But how that explains the increase in thermal conductivity?

Yes, heat increases atomic displacements, but this apples to "normal" (not disordered) metal. As a result, electron scattering increases and conductivity decreases. Note that this is related to different conduction mechanism. If a system studied shows increasing conductivity with $T$ - it is a hopping conduction.
A classic text book on the subject is Electronic Properties of Doped Semiconductors by Shklovskii and Efros.


what does "HasSession" means in bloodhound tool

Question: I'm exploring the Bloodhound Active Directory reconnaissance tool. There are few labels in this tool such as "AdminTo, MemberOf, HasSession" the first two is obvious to me. However, I didn't get the concept of "HasSession". Does it mean a user has RDP connection on that machine or executed something on that machine with psexec or totally something else?
Answer: This corresponds to the "User-Hunter" Powerview script that finds admins who are authenticated to resources. Yes, I have confirmed that only RDP sessions are logged, and not PSExec or any other sessions, which is unfortunate, because those sessions are often just as valuable.
However, you can find SMB sessions using the PSLoggedon.exe Sysinternals tool. The Nmap script "smb-enum-sessions.nse" uses the same method and may also work.


Why only $\omega=-1$ is taken to explain accelerated expansion of the universe and named dark energy?

Question: From the acceleration equation in cosmology the condition for acceleration comes out if $$\rho+3P\lt0$$,$$P\lt\frac{-1}{3}\rho$$,$$\omega\lt\frac{-1}{3}$$. For $\omega=-1$ it gives a constt. energy density & gives an exponential expansion which is quite suitable with the accelerated expansion.
My question is why $\omega=-1$ is only taken to explain accelerated expansion and named dark energy??
Any $\omega\lt\frac{-1}{3}$ will work for accelerated expansion.
Answer: Because there are three reasonably-compelling physical models which give $w=-1$!
The first is a cosmological-constant term in the Einstein-Hilbert action. If you expand the action in powers the curvature, is simply the zeroth-order term. We know there is a first-order term proportional to the Ricci scalar. Wouldn't it be strange if there were no zeroth-order term? (And higher-order terms?)
The second is vacuum energy due to quantum fluctuations. This is an inescapable part of quantum field theory. Why should it be exactly zero? In fact, the real question is why it isn't huge. Maybe it's zero because of supersymmetry. But supersymmetry cannot be an unbroken symmetry or we would see selectrons that are the same mass as electrons, etc. With broken supersymmetry, the exact cancellation of bosonic and fermionic vacuum energy is broken.
The third is a uniform and static-or-slowly evolving scalar field filling space. We know such scalar fields exist in nature, because the Higgs field is one. The Higgs field does not seem to be suitable for explaining cosmological expansion, but we should not rule out the possibility that other scalar fields exist that do have cosmological effects.
By contrast, I am not aware of arguments as natural as these for another value of $w$ that is less than -1/3.


How to fetch data from External API in custom created admin grid in magento2

Question: Is there any method that can fetch data from external API ?
Basically i have created a grid in admin page & in that grid i want to display the data from External API.
Answer: Should use uiComponent and provide a DataProvider which implements \Magento\Framework\View\Element\UiComponent\DataProvider\DataProviderInterface or extends \Magento\Ui\DataProvider\AbstractDataProvider.
There are example on the documentation: https://developer.adobe.com/commerce/frontend-core/ui-components/concepts/data-source/


Would the Moon be able to take water from Earth?

Question: I know that if you add mass to the moon, it would get closer to the Earth. We all know that the moon causes the tides because it's gravity pulls the water. So, my question is: If the moon gained more mass and got closer to the Earth, could it have enough pull on the water that it actually pulls it into space?
Comment: If you added mass to the moon instantaneously but left all else the same, the moon would NOT get closer to Earth...
Answer: Gravity acts on all matter, not just water (it just so happens that water flows with less resistance than rock) which is why we get noticeable water tides but not very noticeable earth tides. However, if you were to bring a very large gravitating body too close to earth, you would find that the earth isn't quite as solid as it feels.
The answer to your question is yes, but along with the water that would go into 'space', the earth itself would get ripped to shreds by tidal forces bringing large chunks of earth up into 'space' as well, though the name space doesn't really apply here since it's not more of a very messy debris field or accretion disk.


Changed the name of my website and now in the editingpage all photo's are questionmarks

Question: So the titel says it all.
I changed the name of my website and now all the photo's in the editingpage show up as boxes with blue question marks.
But the website still works and shows the right images. The only way to fix it is to change the photo for a new one that is in the library but that's an extreme amount of work. Is there another way to fix this?
Answer: Try to install and activate the "Better Search Replace" plugin.
Once activated, go to Tools -> "Better Search Replace" in your WordPress dashboard.
Then, in the 'Search for' field, enter your old domain name (e.g., oldsite.com), and in the 'Replace with' field, enter your new domain name (e.g., newsite.com).
Select all the tables (or at least the posts table, if you're sure that's where the issue is) and run a search/replace.
It's best if you do a 'dry run' first, which will show you what changes the plugin will make without actually making them. This is a great way to double-check that you're replacing the right thing.
And if you're satisfied with the dry run results, uncheck the dry run option and run the actual search/replace.
By the way, before doing all that, I strongly recommend that you backup your database first. This way, if something goes wrong while you're in the middle you will always have a restore point to go back to.
I hope this helps!


I do not understand why finding the minimum of elements take O(n) time

Question: I know that sorting the array take O(logn) time. But why finding the minimum of elements take O(n) time, which is more expensive? If I sort the array, I simply output the first element and this would be my minimum.
Answer: Sorting the array using comparison-based method takes $\Omega(n \log n)$. So sorting is obviously more expensive than finding minimum in $\mathcal O(n)$.
In fact finding minimum or sorting takes $\Omega(n)$ to at least read the whole array. For finding minimum it is actually $\Theta(n)$.
If it were true that sorting takes $\mathcal O(\log n)$ then you would be right to use sorting instead.
Answer: I think there is no possible way a sorting algorithm can be less than O(n). Best performance we generally get is  O(nlogn).
Also, In case of finding the minimum in an array It should be O(n) at least, unless you have more data about the numbers in array. Because you need to go through all the numbers in array at least.


Site for NZ and AU appearing in the US search results over the site for the US

Question: I have 2 websites, one for Australia and New Zealand, and another for the US and the rest of the world the one for the Australia is indexing 1st when I search it from the US, how can I promote the US site and remove the Australian site from the US index
Comment: You can't have a site for two countries.  To be able to geo-target your site and not have it not appear in the US search results you need to focus it on just one country.   Create a site for AU and a second site for NZ.   Then set the geo targeting for each of them in Google Search Console.   The sites can be completely 100% duplicate.  They just need different domains or subdomains.
Comment: @StephenOstermiller You can target a page or site to multiple countries with hreflang, e.g., you could have `.com/north-america/`targeted to `"en-us"` and `"en-ca"` [source: https://twitter.com/JohnMu/status/837326127089729536?ref_src=twsrc%5Etfw&ref_url=https%3A%2F%2Fwww.rebelytics.com%2Fmultiple-hreflang-tags-one-url%2F]. Of course, this approach only helps Google and Yandex.
Answer: Use hreflang to target the two sites to their respective markets. This markup is supported by Google and Yandex, but not Bing etc., which may or may not be an issue depending on your traffic sources.
Google's John Mueller has confirmed that the same content can be targeted to multiple markets, and I've had clients successfully deploy this approach. For example:
<code><link rel="alternate" href="http://www.example.com/oceania/" hreflang="en-au">
<link rel="alternate" href="http://www.example.com/oceania/" hreflang="en-nz">
<link rel="alternate" href="http://www.example.com/us/" hreflang="en-us">
</code>
Answer: If you think, plan and implement 2 different sites with unique content and structure then you do not need to worry which one getting indexed first.
Let's say you have got:

example-au-nz.com
example-us.com

Now, your business process may be same but its highly recommended that you should have unique content, website structure etc for both websites.
On a side note: If your website structure (Design, Navigation etc) may be same (to save cost etc) then you should even be more careful about unique content on the website.
Modified:
Watch This: https://www.youtube.com/watch?v=Ets7nHOV1Yo
Now, even if there will be same content on different TLDs which may be OK but no one can guarantee the level of duplication Google will detect.
My approach would be simple, if a business just need websites in different countries (Different TLDs) without expecting much results then I would say it would be OK.
But as an when you plan and think about greater ranking, my approach would be GO UNIQUE. Safe and effective approach.
We can see all big companies when they have the significant local operation they have unique design tailored to a local audience with appropriate text.
So, sometimes grey book theory is not good enough.
Examples:
Let's say: Oracle website US & AU might have duplicate content on the same domain. As their website is not targeted to the normal consumer.
Another example ebay (US and AU) got different domain and they do rely on organic traffic and hence they have different content & structure. Same applies to Gumtree etc.
Conclusion
My approach would be to implement clean and safer techniques. Things which we don't know how Google may consider duplicate content it's always better to be safe.
Comment: Having completely different content is hard.  It is also not needed.   Google lets you have duplicate sites focused on different countries.  They even end up ranking better than a globally targeted site.
Comment: This is quite grey. https://www.youtube.com/watch?v=Ets7nHOV1Yo
TLDs have mentioned. Firstly, there are many businesses which operate in AU and NZ using one website. Sorry, don't agree as without knowing details. Unique content is by far the best and risk-free method.
Comment: Right or wrong... I could not stand seeing -2 on one of your answers. Cheers!! I am not sure what is objectionable, perhaps an edit is required. I know you give good answers! So I am sure it is minor.
Comment: Appreciate your feedback. Just added few extra lines. If someone downvote, it will be good not just comment (General one line) but also have a detailed answer with appropriate link/reference. Now, if the subject matter is bit grey like above, it might need an answer with some examples.


Chalk objects: 3D Printed or Molds?

Question: I am thinking about making something from chalk. But can chalk be printed into shapes directly or is it better to shape it with printed molds? What kind of material would be suitable for a mold for the chalk so I can ensure the mold releases after the chalk solution cures?
Comment: Have you considered printing your mold in a flexible TPE or TPU?
Comment: Asking for "recommendations" don't make particular good SE questions as it can be read as "*what is the best solution for ...*". You should only ask practical, reasonably scoped, answerable questions based on actual problems that you face. Please help us help you by updating the question to include what you already found about *chalk* printing and ask a specific question on release agents of such printing techniques. Are you e.g. hinting on printing with chalk containing filament called LAYBRICK?
Answer: Chalk, as a ceramic substance, could be printed with a paste printer and if the substance can hold its shape during drying for a couple of hours.
It might be easier to use a flexible filament like TPE or TPU to print a mold in which the paste can cure slowly to a point it can be safely removed. These filaments make release easier as one can flex them away from the printed object.
Another option could be vapor smoothed ABS and a tapered shape so that the object has no undercuts and easy paths only. If one adds a pusher rod place, which is closed by a plug during casting the chalk and can remove from the back after casting, removal gets easier as air can flow in from the back through the removed plug. It can also be used to use a pen or similar obect to gently release the item with light taps.

Chalk objects: 3D Printed or Molds?


trying to CP a directory to /dev/null

Question: What I'm really tring to do, it verify the the data on an external drive is still readable.  I thought the simplest and surest way to do this would be to copy everything to /dev/null.  It works great for a file. But when I add -R to recursive copy a dirfectory structure, if fails (presumably) because it can't create subdirectories in /dev/null.
When I try :
cp -R Flintstones/ /dev/null

I get :
cp: cannot overwrite non-directory '/dev/null' with directory 'Flintstones/'

But this works:
cd Flintstones
cp Fred.txt /dev/null

How can I copy the entire directory in one go??
Thank you, and please be gentle with the newbie.
Answer: I found a nice way to replace rsync for reading out my harddisk without copying.
In bash window #1 run this command:
tar -cv <path to your hard disk> 2>/tmp/tt |pv >/dev/null

Progress in Bytes / MB / GB is shown along with the current transfer speed, e.g.:
$ sudo tar -cv /mnt/mnt/ 2>/tmp/tt |pv >/dev/null
111GiB 0:21:57 [99,0MiB/s] [                 <=>                          ]

In bash window #2 run this command to show the file that is currently being read (terminate with ctrl-c once the test is completed).
tail -f /tmp/tt

This works even if your hard disk contains special files like block device descriptors.
Background:
tar -cv <dirname>
creates an archive containing all the files in <dirname>. The output goes through the pipeline ("|"), the filenames are printed to stderr which is redirected to /tmp/tt.
pv prints out the size and the current transfer speed. Using the option "-s" you could tell pv how large your data is (e.g. "pv -s 370G"), so it can also print out the percentage of data already copied:
$ sudo tar -cv /media/jcs/SG4TBR1/ 2>/tmp/tt |pv -s370G >/dev/null
24,7GiB 0:04:07 [ 130MiB/s] [=>                   ]  6% ETA 0:57:27

"tail -f /tmp/tt" simply prints the contents of /tmp/tt and continues to show any changes (-f: "follow").
Answer: Use cat instead of cp
Instead of using cp to read every file, you can use the cat command.
The screen below illustrates catall.sh bash script. The first section shows results for a short run (40 minutes!) on /home/rick/. The second section shows in progress display on /:

On my system there are many partitions (including two full Windows 10 installations) where all the files are being read.
catall.sh bash script
The bash script must be called with sudo powers because there are files in Linux a regular user cannot read. Additionally you must pass a parameter to the starting location to begin reading files, eg / or /mnt/ext_drive, etc. :
#!/bin/bash

# NAME: catall.sh (cat every single file)
# PATH: $HOME/askubuntu/
# DESC: Answer for: https://askubuntu.com/questions/1184103/trying-to-cp-a-directory-to-dev-null/1184105#1184105
# DATE: October 27, 2019.

[[ $(id -u) != 0 ]] && { echo "Must be called with sudo" >&2 ; exit 2 ; }
[[ $1 != /* ]] && { echo "Parameter 1 must be a path" >&2 ; exit 3 ; }

DirCnt=0    # Directory count
FileCnt=0   # File
LinkCnt=0   # Symbolic Link
BdevCnt=0   # Block Device
CdevCnt=0   # Character Device
PipeCnt=0   # Pipe
SockCnt=0   # Socket
ZeroCnt=0   # Zero sized files count
SkipCnt=0   # Files skipped

updatedb    # Update locate's database for files added today
StartSec=$SECONDS

while read File ; do
    if [[ ! -e "$File" ]] ; then : # File no longer exists, stale database
    elif [[ -d "$File" ]] ; then (( DirCnt++ ))
    elif [[ -h "$File" ]] ; then (( LinkCnt++ ))
    elif [[ -b "$File" ]] ; then (( BdevCnt++ ))
    elif [[ -b "$File" ]] ; then (( CdevCnt++ ))
    elif [[ -c "$File" ]] ; then (( CdevCnt++ ))
    elif [[ -p "$File" ]] ; then (( PipeCnt++ ))
    elif [[ -S "$File" ]] ; then (( SockCnt++ ))
    # elif [[ $File == /mnt/* ]] ; then (( SkipCnt ++ ))
    elif [[ -s "$File" ]] ; then
        cat "$File" 1>/dev/null
        (( FileCnt++ ))
    else
        (( ZeroCnt++ ))
    fi
    printf "Number of Directories: %'d Files: %'d \r" "$DirCnt" "$FileCnt"
done <<<"$(locate "$1")"

echo # Line feed to keep statistics visible when job ends
printf "Number of Sybolic Links: %'d\n"     "$LinkCnt"
printf "Number of Block Devices: %'d\n"     "$BdevCnt"
printf "Number of Character Devices: %'d\n" "$CdevCnt"
printf "Number of Pipes: %'d\n"             "$PipeCnt"
printf "Number of Sockets: %'d\n"           "$SockCnt"
printf "Number of Zero sized files: %'d\n"  "$ZeroCnt"
# printf "Number of Skipped files: %'d\n"     "$SkipCnt"
echo
EndSec=$SECONDS
TotalSec=$(( EndSec - StartSec ))
printf "Total Seconds: %'d\n"               "$TotalSec"

Two lines are commented out for skipping specific directories:
    # elif [[ $File == /mnt/* ]] ; then (( SkipCnt ++ ))
# printf "Number of Skipped files: %'d\n"     "$SkipCnt"

Remove the comment tag (#) and change /mnt/* to the directory you wish to skip to save time. In my case /mnt/ represents over a million files in Windows and other Ubuntu installations on different partitions.

Speed of cat is terrible
The final results were:
$ sudo ./catall.sh /

Number of Directories: 378,571 Files: 1,741,640
Number of Sybolic Links: 92,011
Number of Block Devices: 25
Number of Character Devices: 55
Number of Pipes: 48
Number of Sockets: 138
Number of Zero sized files: 210,515

Total Seconds: 82,554

The process took 23 hours or almost a full day!
Much better speed can be achieved with dd even though a full partition is read including spaces where no files exist:
$ time sudo dd if=/dev/nvme0n1p4 of=/dev/null bs=100M
3719+1 records in
3719+1 records out
389969573888 bytes (390 GB, 363 GiB) copied, 249.867 s, 1.6 GB/s

real    4m9.896s
user    0m0.017s
sys     2m38.305s

Why use sudo with catall.sh script?
This example illustrates why sudo is required:
$ locate udev.log.1.gz
/mnt/clone/var/log/upstart/udev.log.1.gz
/var/log/upstart/udev.log.1.gz

$ cat /var/log/upstart/udev.log.1.gz | wc
cat: /var/log/upstart/udev.log.1.gz: Permission denied
      0       0       0

$ sudo cat /var/log/upstart/udev.log.1.gz | wc
      0       1      82

Answer: Hello and welcome to Ask Ubuntu!
If I understood your question correctly you just want to run some command that will read all files in the given directory, but you are not interested in any output other than potential error messages saying files could not be read. You can achieve that for example using the grep command, like this:
grep -r Zaphod Flintstones/

The above command means that grep will recursively go through all files in the Flintstones directory looking for the string "Zaphod" (you could put some other string there, it does not matter, just something for grep to search for, if you want no output pick something that you think will not occur in any file). If the command completes without error messages about unreadable files, then that means the directory is readable.
Not saying this is the best way, probably there are more elegant ways, but the above is one way of doing it.
Comment: Bingo!!!  That did it.
`[~] # cd "/share/external/DEV3312_1"
[/share/external/DEV3312_1] # ls
Remote Backup Seven/
[/share/external/DEV3312_1] # grep -r Zaphod "Remote Backup Seven/"`

And, sure, there may be some _elegant_ syntax to take each file name in the directory and pipe it to the `copy to null` command.  But this is all this newly-hatched penguin can handle right now.  Thank you so much for your help.
Comment: "cat" and "cp" are not going to work. These commands seem smart enough to realize that since I'm copying to /dev/null, there's no point in actually reading the data.  At least, that's what the timings suggest.  the "grep" method does work, but only one or two at a time, as they eat the processor.  The _real_ cat's pajamas is the "dd" command.  As a bonus, it also reads the empty space on the disk (partition?).  I can run eight at a time on the 4TB USB drives and processor hovers around 15%. So, "fdisk -l" to find the drive names, and "dd if=/dev/sdm1 of=/dev/null bs=100M" on each drive. Thanks
Answer: One possible solution I came up with to ensure all of the content of all files can be read is this right here:
sudo find -type f -exec cat {} + > /dev/null
sudo so all files will be read and none of the errors will be related to permissions, find to get a list of files, -type f to filter out directories (since cat prints an error for those), and -exec cat {} + > /dev/null to tell cat to cat all of the files in find's current batch to /dev/null. This works fairly well, but I haven't tested with block, pipe, or other files, and you don't get any progress either.
P.S. This was me mostly checking to see if a certain drive was still good.
Answer: Building on what WinEunuuchs2Unix wrote, I prettied it up a bit:
#!/bin/bash
# NAME: cachewarmup.sh
# DESC: Adapted from https://askubuntu.com/questions/1184103/trying-to-cp-a-directory-to-dev-null/1184105#1184105
# DATE: 25 Feb 2023

[[ $(id -u) != 0 ]] && { echo "Must be called with sudo" >&2 ; exit 2 ; }
[[ $1 != /* ]] && { echo "Input flag must be the starting directory ( sudo cachewarmup / for root directory )" >&2 ; exit 3 ; }

# NOTE: Put Omitted Paths below:
# =============================
OP0="/mnt/**/*"
OP1="/media/$USER/**/*"
OP2=""
OP3=""
OP4=""
OP5=""
OP6=""
OP7=""
OP8=""
OP9=""
# =============================

SkipCnt=0                                                                               # Count of skipped files
StalCnt=0                                                                               # Count of files that existed last run, but don't now
ZeroCnt=0                                                                               # Count of zero sized files
DirCnt=0                                                                                # Count of directories
LinkCnt=0                                                                               # Count of symbolic links
CdevCnt=0                                                                               # Count of character devices
BdevCnt=0                                                                               # Count of block devices
PipeCnt=0                                                                               # Count of pipes
SockCnt=0                                                                               # Count of sockets
FileCnt=0                                                                               # Count of files cache-loaded

StartSec=$SECONDS
clear
echo "Updating Locate's database... please wait..."
updatedb > /dev/null 2>&1                                                               # Update locate's database for recently added files
clear
tput civis
for file in $(find $1 -maxdepth 10000 -xdev -ignore_readdir_race); do
    if [[ "$file" =~ ^($OP0|$OP1|$OP2|$OP3|$OP4|$OP5|$OP6|$OP7|$OP8|$OP9)$ ]]; then (( SkipCnt++ )) # Count of skipped files
    elif [[ ! -e "$file" ]] ; then (( StalCnt++ ))                                      # Count of files that existed last run, but don't now
    elif [[ ! -s "$file" ]] ; then (( ZeroCnt++ ))                                      # Count of zero sized files
    elif [[ -d "$file" ]] ; then (( DirCnt++ ))                                         # Count of directories
    elif [[ -h "$file" || -L "$file" ]] ; then (( LinkCnt++ ))                          # Count of symbolic links
    elif [[ -c "$file" ]] ; then (( CdevCnt++ ))                                        # Count of character devices
    elif [[ -b "$file" ]] ; then (( BdevCnt++ ))                                        # Count of block devices
    elif [[ -p "$file" ]] ; then (( PipeCnt++ ))                                        # Count of pipes
    elif [[ -S "$file" ]] ; then (( SockCnt++ ))                                        # Count of sockets
    elif [[ -f "$file" && -s "$file" ]] ; then                                          # File must exist, and not be any of the above.
        cat "$file" 1>/dev/null
        (( FileCnt++ ))                                                                 # Count of files cache-loaded
    else
        (( SkipCnt++ ))                                                                 # Count of any files not otherwise processed.
    fi
    printf "  Directories:      %d\n"       "$DirCnt"
    printf "  Cached Files:     %d\n"       "$FileCnt"
    printf "  Symbolic Links:   %d\n"       "$LinkCnt"
    printf "  Block Devices:    %d\n"       "$BdevCnt"
    printf "  Character Devices:    %d\n"   "$CdevCnt"
    printf "  Pipes:        %d\n"           "$PipeCnt"
    printf "  Sockets:      %d\n"           "$SockCnt"
    printf "  Zero Sized files: %d\n"       "$ZeroCnt"
    printf "  Skipped files:    %d\n"       "$SkipCnt"
    printf "  Stale files:      %d\n"       "$StalCnt"
    echo
    tput cup 11 1;tput el;printf "%s" "$file"
    tput cup 12 0;tput el
    tput cup 13 0;tput el
    Elapsed=($SECONDS - $StartSec)
    tput cup 14 1;tput el;printf "Time %dh:%dm:%ds" "$((($Elapsed)/3600))" "$(((($Elapsed)%3600)/60))" "$((($Elapsed)%60))"
    tput cup 0 0
done <<<"$(locate "$1")"
tput cnorm

If you want to nice it up:
nice gnome-terminal -- /bin/sh -c 'echo Warming up ZFS ARC...; sleep 60; sudo cachewarmup /; sleep 300' 19

That'll run from a keyboard shortcut or the Startup Applications.

trying to CP a directory to /dev/null


Would a "opto-isolator" help in reducing EMI/RFI from recording guitar?

Question: I am using Reaper with the guitar plugged directly into my interface (Scarlet 2-i2), and I get a decent sound with the TSE 808 -> TSE x50 -> Poulin LeCab -> ReEq. However, I have a high noise threhold when cranking the gain for the sound that i want, to the point where it interferes with my regular signal (even with a noise gate). Would it potentially reduce the noise floor if I were to use one or more USB opto-isolators, or would I be better off getting a device with paired transformers to break the electrical chain and reduce noise/ground loops?
Answer: You don't have a ground loop as there is no connection between the guitar and the computer chassis (other than via the interface).
You can try using a DI box - this might improve your situation but without having access to the setup it is hard to diagnose correctly.
Answer: If the noise is induced in the pickups - eg from your monitor screen or fluorescent lighting, then no amount of electrical isolation will cure it.
The only cure is switching off the offending sources, or moving away from them.
A long-shot 3rd option is to get an old Line6 Variax, which doesn't use magnetic pickups at all & is therefore induced-voltage-free.
Comment: Yes, there is some noise induced from the monitor scren. Oh well.


Migration of Craft CMS from one host to another

Question: I'm a newbie in Craft CMS. I need to make changes in an existing craft website which is with one hosting platform.
The site was previously managed by another developer. I need to migrate to a new hosting platform and i would like to know what all credentials i would need to obtain to perform this task and how i can migrate it?
Comment: would be nice of you to accept my answer. Or are there things that need to be cleared up?
Comment: I have followed these instructions but after the site is back up I am seeing what looks like the original theme for Craft CMS. I have a few licensing issues in the backend of the site. Is this likely to cause the problem?: - You're running Craft Pro with a Craft Solo license. - The license located at config/license.key belongs to xxxx.com - Your Commerce license key is invalid. This is my first time using Craft so bare with me being an absolute novice.
Comment: I have a follow up question. I migrated the existing codebase to a new server and migrated database using phpmyadmin. The site loads fine but I cannot access the /admin - it will not take the credentials and just sits there. Is there something I need to update on the moved install? This is Craft 2.4 Thanks
Answer: You need a copy of the database which you can either export via Craft's Control Panel or via phpMyAdmin or a similar database management tool.
You need these folders:

craft/templates
craft/translations (if it's multi-language)
craft/plugins
craft/config
public

They might be called differently, I am writing this as if the previous developer followed the installation instructions.
Upload a fresh copy of Craft to the new server.
Import the database.
Replace the stock folders with the ones you got from the other install.
Make sure db-credentials are correct in craft/config/db.php. Make sure all paths are correct in craft/config/general.php.
Make sure the folders that need to be writeable are writeable.
Generally speaking your site should be running now.
Comment: Note that a fresh copy of Craft will not work with backed database if that database was running on some of previous Craft's versions. Before making back up make sure that you have Craft's latest version.
Answer: The accepted answer is a good one, but I thought I'd add something as food for thought. If you set up your workflow such that:

All of your Craft CMS project is checked into a git repo and deploy it as discussed in the Setting up a New Craft CMS 3 Project article
You use Craft-Scripts (or the like) to sync down your db and assets (or you put your assets in an S3 bucket) as discussed in the Database & Asset Syncing Between Environments in Craft CMS article
You use a provisioning like Forge to spin up a new VPS as discussed in the How Agencies & Freelancers Should Do Web Hosting article

...you can become a Digital Nomad. I realize it seems like a lot of tooling, but the payoff is exactly the question being answered here.
If you set things up in this manner, it's trivial to move to a new VPS because all of the ingredients that go into making the website are neatly compartmentalized, and can be deployed without any hassle.
Future-you will thank you for setting things up so that not only is your day to day workflow easier and more fault-tolerant, but also when you move to a new VPS, that's trivial as well.
While you're at it, set up backups as per the Mitigating Disaster via Website Backups article too.
Aesop was wise; it's an ant & grasshopper thing.