How can I batch remove trailing silence from audio files

Question: I'm working on a sample pack of small audio files. I create & record the samples into Ableton Live & for most of them that works fine as they are tied to the BPM, so I can just cut them to the beat. For some of the samples, however, I'd like them to be as short/small as possible. Is there a way that I can batch trim the samples so that all silence at the end is removed? Either directly inside Ableton or as a program that I can just run on a folder. The samples are in .wav format
Comment: Have you tried searching for silence removers? Is the silence noise-floor silence or zero amplitude silence?
Comment: I did look for a little while but could not find anything. i think anything below -60dB will be fine to remove. some samples contain some reverb so that should eventually trail off. I don't need the whole tail for that though like down to the very quiet parts at the end...
Answer: I ended up using the following piece of python code:
"""Bulk trim silence from all wav files in the folder of this script."""

import os, glob
import numpy as np
import soundfile as sf

# Noise floor in dB
NOISE_FLOOR = -60

# Trim silence from start?
TRIM_START = True

# Trim silence from end?
TRIM_END = True

# Padding to apply around detected edge of silence
PADDING = 32

epsilon = 10**(NOISE_FLOOR/20)

def process(filename):
    # Load the wav file
    data, samplerate = sf.read(filename, always_2d=True)
    # Find indices of samples above noise floor
    indices = (np.abs(data) >= epsilon).any(axis=1).nonzero()[0]
    # Trim silence (if it found any non-silent samples)
    if len(indices) > 1:
        # Find start and end index to trim (+/- padding)
        start = max(0, indices[0] - PADDING) if TRIM_START else 0
        end = min(len(data), indices[-1] + PADDING) if TRIM_END else len(data)
        trim = data[start: end]
    else:
        trim = data
    # Write trimmed wave to subfolder called 'trimmed' with the same file name
    sf.write(os.path.join('trimmed', os.path.basename(filename)), trim, samplerate)

if __name__ == "__main__":
    # Prepare output directory
    os.makedirs('trimmed', exist_ok=True)
    # Find and process all wav files
    wav_files = glob.glob("*.wav")
    for i, filename in enumerate(wav_files):
        print(f"{i}/{len(wav_files)}: {filename}")
        try:
            process(filename)
        except Exception as ex:
            print("Trimming failed!")
            print(ex)

this will remove trailing silence from all files in a folder, and place them in a folder called trimmed
Answer: I've never used Ableton Live, so I'm not sure if you can automatically strip silence in it, but I recently created a small exe for Windows that does just that - it removes any samples below a given threshold (in dBFS) and allows you to pad the resulting blocks of samples (i.e. leave some leading/trailing silence).
It's called SiRemX (Pronounced "sai·rem ex" - silence remover - Smart, eh?) - I've tested it many times, and it works great, but there are currently some... minor limitations:

It currently only works with 16 bit & 32 bit(float) stereo WAVE files with simple headers.
As it writes NO AppData on the computer, the processed samples are held in the RAM, so it won't process large files (e.g. It processed a 3 minute 192k 32 bit(float) perfectly, but wouldn't process a 6-minute version due to memory problems (it reports any issues clearly, if it has any, so you know exactly what happened)).
It's a Windows .exe application, with a console-based UI, so it only works on Windows systems.
It still has some small UI issues, and you may need to Run as Administrator if you want to overwrite any files.

Other than that, it works perfectly. If you want to try it, it's on my GDrive - SiRemX. I'll update it now and then, when I'm bored.
Answer: you might be already done with that but anyways...
To me it sounds like a job for the "Gate" audio effect in Ableton.
Also the "remove ambience" Preset from the Multiband Dynamics audio effect should work.
Learned that trick from a "Virtual Riot" producer tutorial - since bass music ofthen relies on heavily processed sounds, whitch often produces ringing tails and stuff - so you got to clean that shi* up all the time... but you get used to it ^^
Comment: that's not what I want, I'm looking to remove silence from files, not from the signal in an audio track. I forgot to post the code I ended up using here which was provided to me by a friend!
Answer: https://ffmpeg.org/ffmpeg-filters.html#silenceremove
Remove silence from the beginning, middle or end of the audio.


Supremum of reals

Question: Hi this might seem quite trivial, but I'm a little stuck so any help please, thanks. Let $a\in\mathbb{R}$ and $\alpha\in(0,1)$. I need to show the obvious fact that $\sup\{\alpha. a|\alpha\in(0,1)\}=a$, i.e. for any other upper bound $b$, $a\leq b$. So I tried by contradiction, so took an upper bound $b$ and assumed $b<a$, but seem to get nowhere. So any help please with this simple problem, am probably mixing up some inequalities but just can't get it. Thanks, any help greatly apprecited.
Answer: First of all, $\sup \{\alpha \cdot (-1) \mid \alpha \in (0,1)\} = 0$, so you need $a \geq 0$. Moreover, $\alpha a \leq a$ for any $\alpha \in (0,1)$. Hence $\sup \{\alpha a \mid \alpha \in (0,1) \} \leq a$. If $b = \sup \{\alpha a \mid \alpha \in (0,1) \} \leq a < a$, then simply remark that
$$
0 < \bar{\alpha} = \frac{a+b}{2a}<1
$$
and
$$
\bar{\alpha} a > b,
$$
against the assumption that $b = \sup \{\alpha a \mid \alpha \in (0,1) \} \leq a < a$.

Supremum of reals


How long should one wait before reposting a question that wasn't answered?

Question: I posted a question yesterday, but no one answered it and it only got a dozen views. How long should I have to wait before it is acceptable to post the same question again?
Comment: I think you should edit your question and give further info. Editing your question makes it jump on the top of the list. If you ask a new question, probably it would be closed as duplicate.
Comment: You gave up and posted here after 12 hours?  I've gotten a tumbleweed (no comments or votes and low page views for a week), and then it was answered over a month later.  Sometimes you just need more patience.
Comment: Currently this meta post is one on the hot list, maybe including the link to your question in this meta post can aid giving it further attention.
Comment: I've earned the [Necromancer Badge](https://tex.stackexchange.com/help/badges/17/necromancer) on many sites, many times; occasionally for questions that are years old, some with and some without answers. Ensuring that you have a [good question](https://tex.stackexchange.com/help/how-to-ask) is the first step.
Comment: https://tex.stackexchange.com/questions/485396/
Answer: Forever. You should never repost a new question which is exactly a duplicate of one of your previous questions. If you do so, you will be flooded with downvotes and your question will be closed very soon.
The best way in this such cases is to modify the question so that it is bumped to the home page, and other users can see it. Edit the question; add more informations to it. Maybe consider editing the title to make your question more attractive and "interesting" to others is also a good option.
You can also offer a bounty for it. Literally every bounty makes the question much more attractive.

However, I voted to close your question because it literally has nothing to do with TeX or LaTeX. Texstudio issues should be asked in Texstudio bug tracker.  This site is only for, say, issue with compiling with Texstudio, or customize Texstudio so that it accepts shell-escape.
Comment: Nice, concise lead.


How to compress large files

Question: I want to learn how to highly compress a file. I
have downloaded files whose compressed size
was 4 GB, and after extracting they became 10
GB.
Which software do I need to use for such
high compression?
Will I lose quality of the data by
compression?
If you direct me to WinRAR or 7-Zip, please
tell me how can I highly compress a file
because I have tried compression with it,
but the size was reduced just by only a few
MBs.
Comment: Which program did you use to decompress the 4gb file?
Answer: There are mainly two types of compression : lossless and lossy. When you use softwares like WinRAR and 7-Zip, they use lossless algorithm. When you use software ripping DVD, encoding audio/video, etc… they generally use lossy algorithm. So it depends on what data you're dealing with. If it is unknown binary data, you'll surely use lossless algorithm. If it is audio/video, you'll use lossy algorithm (except if you don't want to loose any quality).
Lossy compression is surely more efficient regarding size of data than lossless.
That say, in your case you want lossless compression. I think that the best compression ratio would be obtained with LZMA algorithm in case it is unknown binary data. WinRAR doesn't support it as far as I know for compression, but 7-Zip does, through the use of the 7z container. When you make an archive with 7-Zip, select the 7z archiving format, then the LZMA (or LZMA2) compression algorithm, and then you'll be able to choose between some presets, from poor ratio but quick compression using less resources to best ratio but slow compression using more resources.
Answer: How much a file is compressed depends largely on what type of file it is.  Generally speaking, text files can be highly compressed (even 90% or more) whereas some file formats like images are already highly compressed in their existing form and adding them to a compressed archive will do little or nothing to further decrease their size.
Having said that, applications like 7-Zip usually have settings where you can choose the level of compression.  Using 7-Zip as an example, when you create an archive you can select from six different levels of compression ranging from Store (no compression) to Ultra (smallest file size).  Higher compression requires more time to process, so if you're in a hurry or saving every last byte isn't critical, choosing something like Normal is going to give you acceptable results.  Since your question is about how to get the most compression, you'd probably be happier choosing Ultra.  But again, some files can be compressed a lot more than others and even choosing Ultra when trying to compress an image file may not save you more than a few bytes of space, if that (depending on various factors including original file size).
Answer:
The size was reduced just by only a few MBs.

Sounds like the data is already compressed. Compressing already compressed data will only save you very little space.

Please tell me how can I highly compress a file because I have tried compression with it.

Using 7-zip or winrar should work fine. When compressing with Winrar or 7-zip, you have the option to use better compression at the cost of it taking longer.

Will I lose quality of the data by compression

When using lossless compression (think 7-zip/winrar) then, no. Compression algorithms like MP3 or jpegs do loose quality when compressing.
Comment: i am under the impression that OP told 7zip to shrink the 10gb file again.
Answer: This is highly dependant on the content of the file(s) you want to compress. Lossy compression usually gives smaller files due to the fact that it throws information away (lossy).
Find out about good comrpessors and how to use them and in what situations:
http://www.squeezechart.com/
Answer: There is now magic way to turn 10 GB into 4 GB. If you have a 10 GB file consisting of 10,000,000,000 repetitions of the letter A, it can be compressed into a few hundred bytes. If it's 10 GB of random data, you won't be able to compress it at all.

How to compress large files


HP Officejet scanner: "Failed to open a session on the device"

Question: I have an HP Officejet 4500 G510n-z printer/scanner, connected to the local wifi.  I'm trying to scan from my macbook running OS X Yosemite (10.10.5), but when I try to do so, I get the error message "Failed to open a session on the device".  This has worked before, with the same computer and scanner, so I'm trying to figure out what has changed, and how to fix it.
In Preview, the File menu has an "Import from Officejet 4500 G510n-z" entry, which suggests that it recognises that this is a scanner.  Selecting that menu entry gives the above error message.  I get the same result when using the "Open Scanner" button in "System Preferences" -> "Printers & Scanners".
I can access the HTTP interface of the device, which only shows information related to the printer part of it and the network configuration.
Printing works fine.  Looking at the network traffic with Wireshark, this generates a lot of traffic on port 9100, as expected.
When I try to scan something, as above, the computer sends a TCP SYN packet to port 9500 on the device, which gets an immediate RST response:
<code>No.     Abs Time           Time           Source                SPort  Destination           DPort  Protocol Info                                                            Host       seq        len        src addr unresolved
   5596 22:20:10.401777    368.249752     192.168.1.10          50100  192.168.1.158         9500   TCP      50100 → 9500 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=32 TSval=20957697 TSecr=0 SACK_PERM=1            0          0          192.168.1.10
   5597 22:20:10.406550    368.254525     192.168.1.158         9500   192.168.1.10          50100  TCP      9500 → 50100 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0                          1          0          192.168.1.158
</code>
Still it takes a few seconds for the error message to show up in the user interface.  Unfortunately I don't have a packet capture from the device when it's working properly.
Googling this error message suggested resetting the printer drivers and restarting the computer, which didn't help.
What can I do to debug this further and/or fix it?

Update: HP support suggested using the "HP Print and Scan Doctor" available on their website.
I tried running it under Wine on my Macbook, but it crashed before discovering the printer.
Having found an actual Windows machine, I tried running the tool again, but it didn't discover the printer.  I had to install the driver (in "Printers and scanners", click "Add printer") in order for the tool to discover the printer.
With the driver installed, the "doctor" said that the complete software for the printer was not installed, and provided a button for downloading and installing the software.
With the "complete software" installed, the "doctor" showed a button labelled "Fix scanning".  It ran a list of tests, not finding any problems.  A test scan also worked well, and the Windows scan utility was also able to scan — but my Macbook still couldn't.  Wireshark revealed that the Windows computer communicated with the scanner on port 9290 instead of port 9500.  I'm not sure if OS X could be persuaded to do likewise.
Answer: I had this issue on a Samsung MFP Printer. It was working then it stopped and I scratched my head for a few months figuring it out. The solution: (re-)enable T4NET protocol on port 9400 on the printer. Mac OSX is using it for the twain drivers.
Comment: Can you explain more to Help Op?


Is there a QGIS plugin that can transform tabular data to graph?

Question: I have a CSV file with water level measurments in a well, taken once a year for 40 years.
Is there a way to show this data as a graph (x axis being the date and y axis the water level) in QGIS?
Answer: Why do you need to produce the graph using QGIS? I would suggest using R (free software) or excel.
in R:
go to file / change dir... and navigate to the folder with your csv
code:
<code>data = read.csv("yourdata.csv")
x <- data$date
y <- data$waterlevel
plot(x,y)
?plot
</code>
If you need to display the graph in QGIS you can save the image as a TIFF from R and import it into QGIS.
Comment: I have hunderds of wells but need only the one closest to the site I'm working on. So selecting the closest wells in QGIS is very simple.
I can copy the data of those specific wells to Excell, but thought maybe there's a plugin in QGIS that creates such a graph.
Comment: Check out the TimeSeriesPlot plugin in the QGIS User-Contributed Python Plugin Repository, it might serve your purposes.


Does the iron weighted pressure plate work under blocks. If not? How can i get it to work?

Question: I`m trying to make a really secret base on a friend's realm but i have no idea how to make an item be thrown and a piston revealing the base. Can someone help?
Answer: It's somewhat unclear what you're asking.
Like great majority of blocks in the game (rare exceptions being items that manifest as entities: item frames, paintings, armor stands), the pressure plates occupy 1 block space - despite their thin hitbox. And they do work within that 1 block space regardless of whatever block is placed above them - any items/entities placed on them (within limitations; stone plates - only mobs/players; weighted - set number of items) will produce a signal. They do not detect blocks - a block, even a gravity block like sand, placed above them will not be detected (though sand falling from above will break into the item form and the item will be detected).
And obviously they will not detect items on blocks above them - only items on the plate. So if you place the plate under ground, the item on top of the ground won't influence it.
Consider instead using a hopper - it can pull items in through blocks shorter than a full block - e.g. farmland, path block, bottom slab. Reading the hopper content with a comparator will produce a signal, which you then can e.g. send to a T flip-flop circuit to toggle the door (and then retrieve the item from the hopper through an underground passage from within the base).
A hopper minecart can even pull items through a solid block like stone and can also give its items on to a hopper or chest. If it is on a detector rail, a comparator can also detect its contents.


Correct way to update Core Data

Question: I'm trying to update my Core Data stack when a button gets pressed. it all looks fine when the app is running in one session, but when I restart the app the update I made no longer exist.
My code looks like this:
if let indexPath = self.tv.indexPathForRowAtPoint(point){
    let data = messageList[indexPath.row] as Messages
    if data.read == true{
        println("Message already read")
    }else{
        data.read = true
    }
 }

Why does this happen? The change always get reverted when my app is being restarted.
Answer: You have to ensure, that you call save on the NSManagedObjectContext instance. There should be at least on call already defined in AppDelegate, but you might want to call it more often, e.g. when your app enters the background or on similar occasions.
For further reference, take a look at iOS Core Data when to save context?
Answer: You nedd to save NSManagedObjectContext before close your application.
For example:
AppDelegate.swift
func applicationWillTerminate(application: UIApplication) {
    self.saveContext()
}

This works only if you kill the app.
But if you want to save context after any change in NSManagedObject, you need to call mangedObjectContext.save(&error)
Comment: Thank you, I totally forgot! :)

Correct way to update Core Data


Convex function subject to $0\le x_1\le \ldots \le x_n\le 1$ and linear constraint

Question: I am maximizing a convex function (a positive definite quadratic form, if it makes a difference) subject to $0\le x_1\le \ldots \le x_n\le 1$ and a linear constraint $a^\top x+b=0$. Can I conclude that the maximum occurs where some of those inequalities are equalities, or something of the sort?
Answer: Yes. Your feasible region is a convex (bounded) polytope, which means that every point in the feasible region can be written as a convex combination of extreme points. Let's say that your function is $f()$, the maximum occurs at $\bar{x}\in [0,1]^n$, and $\bar{x} = \sum_{i=1}^k \alpha_i x^{(i)}$, where the $x^{(i)}\in [0,1]^n$ are extreme points of the feasible region and the $\alpha_i$ are nonnegative weights with $\sum_{i=1}^k \alpha_i = 1$. By the convexity of $f()$, $$f(\bar{x}) \le \sum_{i=1}^k \alpha_i f(x^{(i)}),$$so for $\bar{x}$ to maximize $f()$ over the feasible region every $x^{(i)}$ in the sum with $\alpha_i >0$ must maximize $f()$.
An extreme point (corner) of a polytope is the intersection of a bunch of linearly independent bounding hyperplanes (binding constraints), so there will be at least one maximizer of $f()$ where $n$ of the constraints are binding.
Comment: When you say at least $n$ of the constraints are binding at the corner, $n$ is the number of hyperplanes/constraints that intersect to make up that corner of the polytope?
Comment: Yes. In two dimensions, the hyperplanes are lines, and you need two (not parallel to each other) intersecting to get a point (corner). In three dimensions, hyperplanes are planes, and you need three with linearly independent normals intersecting to get a corner, etc.


fancyunits VS siunitx

Question: I am wondering which of the two packages (fancyunits or siunitx) is the best one to use ? is one of them depreciated ? is one if them more complete or easier to use or even more pretty ? which one is the standard among authors of technical or scientific documentation ?
Would it make any sense to use them simultaneously ?
Comment: The `fancyunits` package I've found is essentially a long list of macros for unit names. I wouldn't take it into consideration.
Comment: I would definitely go with `siunitx` it is actively developed. I believe `fancyunits` is not really being developed upon anymore, I could be wrong though.
Comment: `fancyunits` doesn't seem to be on CTAN?
Comment: Definitely `siunitx`. It is by far the best package for typesetting physical quantities (and you can create really beautiful tables) that I have seen.
Comment: Related: http://tex.stackexchange.com/questions/2248/what-package-should-i-use-to-typeset-units
Answer: Well, long time ago I was wondering the same thing, but in a more general form, i.e., I was wondering what would be the best way to insert units in LaTeX. Actually there are various packages, more than the two you are asking for.
Back to your question and trying to solve it, I opted for siunitx. But since it is not possible to respond basing on my opinion and these subjectivities, I will try to explain myself better.
About your first question... in fact, the fancyunits package does NOT appear in the CTAN catalogue, but if you search for it in the web you'll find a site with all the necessary for use it. Take a look at the manual, it is from 2007 (6 years old). But I don't know if it's depreciated, you could send an email to the author and ask him.
On the other hand, the package is not only siunitx on CTAN, but its last update is from 28 November (today). So if we talk about topicality, the choice is sinunitx.
Regarding which is the most complete and easy to use, if you check the manuals of both packages (the manual for siunitx before version 2 is almost identical) you will see that the logic is very similar indeed, we can say the same for other related packages in the CTAN. It does not seem easy to each other. What if I believe, and my experience is that siunitx has more development time, thus several improvements.
While no longer accounts with various set of special units, you have the option to define easily you need a management formats, numbers and units quite flexible and complete and option to easily make lists and ranges of both numbers and units. You can also make tables and gets along well with other packages.
I'm not sure there is a standard yet, but I always recommend using siunitx, and when I give courses of LaTeX for engineers and scientists is mandatory package.
My recommendation is to try both and decide with which you feel most comfortable, draw your own conclusions. I hope I was clear.

fancyunits VS siunitx


Would a piece that moved like a king – but could be captured (and could be moved en prise) – be considered a major or a minor piece?

Question: I could be wrong, but it seems like the major determinant of whether a piece is a major piece or a minor piece is whether a king and one of that piece can force checkmate on a lone king. Would this be possible with a king and one of these hypothetical pieces? (Or is that not actually the determinant of what is a major piece and what is a minor piece?)
Comment: I've heard of a variant where there is a piece called a "Decoy", which takes the place of the Queen and looks and moves identically to the King.  The player secretly marks one of the two kings on the bottom before the game and they can start in either position.  The mark is not revealed unless the Decoy or the King is mated.  (If Decoy is mated, it may then be optionally captured and the game continues as normal.)  This can lead to interesting misdirection where a player may think they have mated, but only succeeded in taking the Decoy.
Answer: This piece is widely used in different fairy chess variants. It appears under several names, including Commoner, Guard and Man / Mann.
While the table in the Wikipedia article also linked to in @Allure's answer states it's worth about four points, the article itself limits that value to the endgame:

In the endgame, where there is usually little danger of checkmate, the fighting value of the king is about four points (Lasker 1934:73). In the endgame, a king is more powerful than a minor piece but less powerful than a rook. Julian Hodgson also puts its value at four points (Aagaard 2004:12).

On the other hand, the Wikipedia article about the fairy chess piece says

A man is approximately equal in strength and value to a knight, generally.

That would make it a minor piece. It might depend on the board size (it's less effective on large boards, and worth much more on small boards) or the other pieces available to the players.

it seems like the major determinant of whether a piece is a major piece or a minor piece is whether a king and one of that piece can force checkmate on a lone king

That's close to the definition I've heard: a major piece is one which can cut off the enemy king from one side of the board. Rooks and queens can do this, but this non-royal king cannot.
On the other hand, there is a basic situation where this piece is even stronger than a rook. King + rook lose against king + queen, but king + commoner is a rather simple draw.
Comment: I would think a king that isn't subject to check rules would be worth more points than a normal king in an endgame. I'm not sure by how much, but just the ability to deliver check to a king would be a huge benefit. Eg you can construct mating positions (I don't know if you could force them) with a decoy and a knight or a decoy and a bishop, even though you can't with a king and a knight or king and bishop.
Answer: I haven't heard of that definition being used for a major piece, but it's a neat observation. Such a piece (call it X) should be able to force a checkmate in a K+X vs K situation.
Say White's pieces are on d3 and e3, while Black's is on d5:
1) White plays Xd4, and Black's king must retreat. Say ...Kd6 is played.
2) White plays Ke4. Now Xd5 is coming, forcing Black's king further back. ...Ke6 doesn't help him since it runs into Xe5. So Black could try ...Kc6, as White's king doesn't hold it back there.
3) Now instead of advancing the 'X' piece to d5 (since it would allow ...Kb5, although this would also work nonetheless), White could play Xc4, placing Black in zugzwang. In the case of ...Kd6, White plays Xd5. And in the case of ...Kb6, White plays Kd5, forcing Black further towards one side.
This general process can be repeated.
I don't know of a strict definition of what makes a major piece 'major'. Of the queen, rook, bishop, and knight, a major piece is just one that is in the top half strength-wise. So a king-like piece shouldn't be considered a major piece, since typically it only reaches the rough strength of a bishop/knight in sufficiently simplified endgames.
EDIT - one thing to note is that, because capturing this hypothetical piece wouldn't result in the game ending, it's usefulness would be higher than a normal king. It could be safely used in the middlegame like any other piece. So it's possible it could be stronger than a minor piece, but still below a rook.
Comment: You can play this endgame (for either side) here:  https://www.chessvariants.com/membergraphics/MSinteractive-diagrams/EGT.html?betza=K&name=Man&img=guard
Answer: The king is worth about 4 pawns if its loss didn't lose the game, which means it's neither a minor or a major piece, but something in between.
(Major pieces like the rook is worth 5+ pawns; minor pieces are worth 3.)
Answer: That is an interesting distinction theory.  Although this king-like piece could deliver checkmate with the help of the king, I've always considered the difference to be based on the value of the piece.  A king-like piece would only be worth the same as the other minor pieces.


"Speak of the devil and he shall appear"- Why is "shall" allowed here?

Question:
Speak of the devil and he shall appear

First the thing struck me was use of "shall" because "shall" has taken it's place pretty much in language museum. It appears via the Wikipedia article that it is a term originated in middle ages. So I thought "shall" might be possible. But I could not understand how "shall" is being allowed with "he" here. If I remember correctly, I read a rule in English Grammar in my childhood that if a subject in a sentence is emphasizing that he certainly will do something in future, then "will" follows "I" and "We" and "shall" follows rest of the pronouns. Is this rule being applied here? Or it is as it is from it's birth?
Comment: Because it sounds old-fashioned and dramatic, as if imitating a quote from the Bible. "He shall" is a totally valid construction; it's just obsolete.
Answer: It's a neologism.
A survey of Google Books finds exactly one instance of the version with shall before 1980, and that's in 1962. Before then the verb is doth appear or will appear or 'll appear or simply appears.
Versions with shall begin to flourish in the 1980s. Significantly, they all derive from popular fiction; in scholarly works the older forms are employed.
The 'rule' you refer to was still operational in my childhood, but in the last two generations shall has almost disappeared from the language. That means that there are fewer and fewer people left who know how shall used to be used; so novelists who don't know any better, and whose audiences don't know any better, use shall appear without reproach to give either the proverb or their settings a flavor of archaism.
Comment: I think there's also the matter of pacing. "Speak of the devil and he appears" seems too abrupt to me. The "he appears" just comes to quickly. So you need another word or two in there to stretch it out. Of course "will" works just as well as "shall", or one could say "... and then he appears", etc etc.
Comment: @Jay Love them dactyls.


What is the difference between emission wavelength and lasing wavelength?

Question: I'm reading an article on liquid crystal lasers and they're saying periodicity determines lasing wavelength and cavity geometry determines emission wavelength. What is the difference?
Answer: There is not much difference, probably the context of where you found these terms will tell you the intent of the author.
In any case, emission of light is a property of materials, normally the emission spectrum is broad. Sometimes one might ignore the idea if a spectrum and the talk about an emission wavelength (singular) as a short hand to refer to the peak wavelength.
In lasers the lasing wavelength is the emission wavelength out of the whole emission spectrum which has the most gain. For this reason energy tends to funnel into the laser mode and it is virtually monochromatic.
Regarding the liquid crystals. I'm not an expert on that but they seem to be saying that the liquid crystal has a natural emission spectrum which can be tuned by changing the periodicity. The cavity (basically a wavelength selective mirror) will be designed to overlap with the broad emission spectrum and essentially picks the wavelength which has the most optical gain, therefore this becomes the lasing wavelength.
Comment: Not necessarily the most gain. Lasers are somewhat tunable - if You have sufficiently high emission you can change lasing wavelength in some range. Cavity picks *some* wavelength - and if emission at this wavelength is high enough you get lasing.


SharePoint 2019 - Windows OS Server upgrade

Question: Can we perform an in-place OS upgrade (From Windows Server 2016 to Windows Server 2019) on a server that hosts SharePoint 2019?
This is a DEV server, so it is a single server setup.
Answer: Windows Server 2016 can be upgraded in-place to Windows Server 2019, but it is highly discouraged to do an in-place upgrade for OS with SharePoint installed.
The recommended way is to deploy the farm on Windows Server 2019, and then retire the older SharePoint servers by migration.
In conclusion, it is technically workable, but not recommended.
References:
Updating SharePoint Server Farms.
Overview about Windows Server upgrades.
How to upgrade a server operating system that has SharePoint Server 2013 or 2010 installed.


What are security risks when running an Erlang cluster?

Question: It's more a general question in terms of what one has to look out for when running an Erlang system. For example, I know of atom exhaustion attacks. What are other possible attacks and how to make your system more secure?
Answer: Running a cluster means they are sharing a cookie, and if one knows the cookie than they can attach to any of your nodes (assuming they are attached to your network) and execute any arbitrary Erlang command or program.
So my thought is that clustered means that there are at least two files (and some number of people) who know what the cookie is (or where to find it).
Comment: I think that erlang host must not be available to public access
Comment: I meant epmd, and high ports of net_kernel
Comment: As [reference](http://www.erlang.org/doc/reference_manual/distributed.html#id87338) says, two nodes are able to connect with different cookies. But one must know each other's cookie anyway.
Answer: First of all, you want to have your Cluster in a closed VPN (if they are far apart and parhaps communicate over a WAN). Then, you want to run them atop hardened UNIX or LINUX. Another strong idea is to close all epmd connections to your cluster even if one has got the cookie by using net_kernel:allow(Nodes). One of the main Weaknesses of Erlang Vms (i have come to realise) is memory consumption. I think that if an Erlang Platform providing service to many users and its NOT protected against DOS attacks, its left really vulnerable. You need to limit number of allowed concurrent connections for the Web Servers so that you can easilly block out some script boys in the neighbourhood. Another situation is having distributed/replicated Mnesia database across your cluster. Mnesia replicates data but i ain't sure if that data is encrypted. Lastly, ensure that you are the sole administrator of all the machines in your cluster.
Answer: I would be afraid of bugs in applications deployed in your system. Good example from otp is SSL app, which was completely re-written 3 years ago. The next would be http client - memory leaks. Xmerl was never a strong part of the system.
Also, be careful with 3rd party Erlang apps: new web servers (probably better than inets, but if you do not need all the performance consider stable Yaws), ejabberd - number of techniques hitting directly OS, Riak - interaction with filesystem, ulimit, iostats etc.


If I buy a bitcoin in USD who gets the cash?

Question: Question if I buy a bitcoin @$103.89 USD as of today's prices where does the USD payment go?  Do the funds paid in any world currency go into a pool to back the bitcoin or into the developers of bitcoin clients?  What are the IRS requirements as to the value of ones account?  The Norfed dollars where backed or made of precious metals and taken down by the federal coinage act.  The $20.00 coin is now worth about 30% more than face value, go figure.  Thanks any info would be appreciated.
Comment: Just like any other currency exchange, then you find a person/company, agree on a rate, and you get bitcoins and the exchanger get dollars/euro/whatever you have.
Comment: So... lets say someone buys a lighter from me, it cost B2, how do i cash the money in order to buy more lighters? And i don't mean only in the USA i mean in more complicate economies, with hardcore money regulations, as Venezuela or Argentina?
Answer: When you buy an ounce of silver bullion at the coin store, who gets the money?
The person who held the coin before you did.
All bitcoins are first issued to miners. From there, miners use those coins for trade or exchange.  So when you buy a bitcoin with cash, you are buying it from someone who owned it but initially it was obtained from a miner.
Comment: When I buy a gold or silver coin I have the coin with value, as silver and gold are needed to build computers and other things.  I only see the bitcoin as another fiat currency?  I still do not quite comprehend the miner aspect, what does a miner do to add value to the bitcoins?  The I.R.S. question still not answered.  Can bitcoins be held in a ROTH or IRA account?  The overall concept sounds ok however a barter system would be value for value, I trade you some food you fix my roof.  What am I missing?
Comment: Hi Stephen I can see this is a fraud as my first post has been edited by you? post as I sent here it is again
Comment: Again here was my post before it was changed by Stephen"Question if I buy a bitcoin @$103.89 USD as of today's prices where does the USD payment go?  Do the funds paid in any world currency go into a pool to back the bitcoin or into the developers of bitcoins pockets?  What are the IRS requirements as to the value of ones account?  The Norfed dollars where backed or made of precious metals and taken down by the federal coinage act.  The $20.00 coin is now worth about 30% more than face value, go figure.  Thanks any info would be appreciated
Comment: Gold is gold, silver is silver and food is food.  I still can not see where the value in bitcoins are?  What happens if your computer is hacked?
Answer: Bitcoin is neither a commodity or a fiat currency, but has characters of both. The value is derived from the scarcity (since there will only ever be a finite amount of bitcoins, and before then there can only be so many at any given time, with no possibility of finding a new resource of them). The value is also derived from the liquidity perks that commodities and currencies have failed to offer, especially person to person, and over the internet.
If you bought a bitcoin with usd, the person you bought it from no longer has a bitcoin and would have usd instead.
For the IRS you would most likely have to report your cost basis in US Dollars, and at reporting time report a gain or a loss if you sold them for cash. In the absence of specific regulations (recognized foreign currency trading profits have a max tax rate subject to the 60/40 rule), you will use the short-term or long-term capital gains tax code. Short-term capital gains are treated as normal income and taxed in whatever bracket you are in. Long-Term Capital gains are treated in a lower max different tax bracket. Unless explicitly prohibited you can hold anything in an IRA or Roth account.......
Comment: Still the question has not been answered how was or is the bitcoin monetized ?  I have a real cool cat that I have trained to give me a high five on command.  If I brush him everyday there will be a finite amount of RARE,,,scarce cat hairs from this cat.  Are these hairs worth the same as gold, silver or bitcoins? When I dig a hole in my backyard and say goodbye to my beloved kitty are the hairs worth anything?  There are a limited amount of these hairs on the market,  $1.00 each, any takers?
Comment: what answer do you want to hear? bitcoin is currently very liquid and allows people to transfer large amounts with zero reporting requirements. There are liquidity crisis around the world and people are using bitcoins for liquidity instead of a reserve currency like gold and precious metals. People find value in that.
Answer: If you are asking about trading on an exchange, then the exchange software matches up buyers and sellers.  Since you are a buyer, it matches you up with someone that wants to sell (or potentially several sellers that add up to what you want to buy).  The sellers get the money (and usually a small part of it goes to the exchange itself)


Can an extra 300s glide upside down and backward?

Question: I had a crasy idea;  here it is.  Let's say I'm flying an 80" Extra 300s with a .6 nitro motor in it.  I then go into a dive straight down with full throttle util my plane is 30 ft. off the ground.  I then pull up, and go straight up until I reach a complete stall so the plane is not moving at all.  Then, instead of letting the nose of the plane fall to point down and regain speed, I cut the motor, then I move the right controll stick, on the remote, to the top so as the elevator flippers point toward the bottom of the craft. Then (here's the crasy part) could I, by careful maneuvers with the control surfaces, cause the plane to start a reverse momentum and start gliding down backward for at least a few seconds?
Comment: I guess it could be done, but because the center of gravity is a lot closer to the nose than the tail, it would be extraordinarily difficult.
Comment: By the way, there's a very similar maneuver called a [Tailslide](https://en.wikipedia.org/wiki/Tailslide)
Comment: I know it would be extremely hard.  I was looking for a theoretical answer and that's what you gave me. Thanks.
Comment: I see.  Interesing.  It still does not resemble my question's description well enough.
Answer: The plane would be extremely unstable in reverse - like trying to throw a dart with the fins first.
It's not really the same thing, but some indoor models with reverse thrust do manage to fly backwards for short distances at low speed.
Another example is RC helicopters flying backwards at high speed, despite a vertical tail - this is only possible because the tail gyro can react very quickly, and the tail rotor works in either direction. It wasn't possible before heading-hold gyros were available.
However for the sort of model you're talking about, you'd not only need superhuman reflexes, but the loads on the control surfaces could overpower the servos.
Comment: I wouldn't attempt the stunt for fear of breaking the plane.  I just wanted to know if it was even slightly possible.
Answer: The maneuver you describe is called a "tailslide" -- I've seen it done in full size aircraft, but it virtually always ends in a "whipstall" (the alternative is advancing power after a short slide and pulling up with thrust/weight greater than 1:1, if you have that much power available).  Because the airplane is unstable in that direction (both in pitch and yaw), it requires the reflexes of a computer to keep it correctly lined up with the airflow while it gathers any significant speed.
As soon as the stabilizer gets far enough out of line that you can't overcome it with elevator input (too little or too late), it will flip nose first -- in a full size aircraft, this can pull enough G load to damage the airframe or injure the pilot.  Most models, even pretty large ones, can take more G than a full size, so the bigger issue is that, since you're doing this fairly close to the ground, you may crash while trying to recover from the whipstall.
At the very least, practice with some altitude cushion.


a legal term to refer to "public right prosecution"

Question: is there a legal term to refer to "public right prosecution" which is a fine charged by the public prosecution in the case a complain was filed against a drawer of a bounced cheque.. the drawer is subject to criminal charges and a fine for the public right prosecution? thank you
Comment: Do you mean: a law that prosecutes financial fraud?
Answer: The law varies based on the legal jurisdiction.  In the US, there may be a financial penalty which is called just a "fine".  For example, in California:

Most criminal violations of Penal Code 476a PC California's bad checks law are what we call "wobblers."  A California wobbler is a charge that the prosecution may file as either a misdemeanor or a felony, depending on

the facts of the case, and
your criminal history.

If you are convicted of the California misdemeanor charge, you face up to one year in a county jail and a maximum $1,000 fine. If you are convicted of the
  California felony charge, you face 16 months or two or three years in the California state prison and a maximum $10,000 fine.

If you are talking about a different jurisdiction, then it probably depends on the specific language of the local law.
The office of the "public right prosecution" may not exist in the United States.  Fines are paid to some level of government (the city, the county, the state, or the federal government) but usually through an agency of some kind (like the county court or the Internal Revenue Service) and not to a specific person.
Comment: I doubt whether writing bad checks is a  misdemeanor....
Comment: @Lambie apparently it is in California if the total value of the checks is less than $950, and the person has not previously been convicted of three or more forgery-related infractions.   [source 1](https://www.shouselaw.com/bad-checks-laws.html#3.1) and [source 2](http://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?sectionNum=476a.&lawCode=PEN) .  I actually don't see anything about felony vs. misdemeanor in the text of the law, so I'm going to have to accept the shouselaw site on faith, as other sites corroborate.
Comment: thank you Andrew and Lambie.. what Andrew wrote is very close.. however, the term I am looking for is related to the name of the "fine" or the financial penalty charged by the Prosecution Attorney office and not to the felony.. it is charged as a compensation for disturbing the public..and it varies as Andrew said..maybe in the US there is no such fine and it is only in a couple of Arab countries ..if you are not familiar with it..
Comment: @Haneen  That particular office probably doesn't exist here.
Comment: @Haneen It may exist if I could grasp what you mean by right of public prosecution. Please note: prosecuting attorney general. There are fines given in common law countries for "disturbing the peace". But that's for bad behavior in public: too much noise or drunkenness.
Comment: @Haneen - I don't think we have a special name for it.  It's just called "a fine".  Also, in the US, the fine is technically imposed by the judicial branch, not by the prosecutor's office.


Why don't I have to free heap objects when I pass them into a function?

Question: The following program has no memory leaks. My question is, why does str1 and str2 not have to be passed into free(), even though I malloc'd both strings? Please see two commented locations in the code where I attempted to free str1 and str2, uncommenting that code resulted in an error saying I free'd a non-heap object. But from my understanding, str1 and str2 are objects created by malloc, hence are heap objects. I do not understand this contradiction.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

char* StrCat(char* s1, const char* s2) {
    // Removing const from const char* s2
    //  made no difference on memory leak error message
    char *s, *tmp;
    s = tmp = malloc(strlen(s1) + strlen(s2) + 1);
    strcpy(tmp, s1);
    tmp += strlen(s1);
    strcpy(tmp, s2);
    //free(str1); free(str2); Why not?
    printf("%d\n", s[strlen(s)] == '\0'); // Prints 1
    return s;
}

int main(int argc, char** argv) {
    char* str1 = malloc(4 * sizeof (char));
    str1 = "abc\n";
    char* str2 = malloc(6 * sizeof (char));
    str2 = "party\n";

    char* new = StrCat(str1, str2);
    //free(str1); free(str2); Why not?
    printf("%s\n", new);
    free(new); // Required
    return 0;
}

Comment: You may be lucky that the compiler spots that you throw away what `malloc()` returns in the `main()` function and optimizes away the call to `malloc()`, so you don't actually have any allocated memory to leak.  But in general, you need to free allocated memory.  Did you use [Valgrind](http://valgrind.org/) to check for memory leaks?
Comment: Note that if you do use `strcpy()` instead of pointer assignment, then the calls to `free()` are required — because the optimizer can't optimize away the calls to `malloc()` any more.  You should also verify that the calls are optimized away, maybe by reviewing the assembler output, or by compiling a file containing only `main()` and using `nm` to find the functions called (and if my hypothesis is correct, `malloc()` won't be called from `main()`).
Answer: Of course you need to free heap objects, whether you pass them to a function or not.  Whatever is returned by malloc() must eventually be free()d, regardless of how you will use it.
Your problem is as follows:
The following line:
char* str1 = malloc(4 * sizeof (char));

allocates memory for 4 characters and stores a reference to it in str1.
The following line:
str1 = "abc\n";

forgets whatever memory str1 was pointing to, (thus causing a memory leak,) and makes str1 point to a new location, in your program's static data segment.  This is memory which was never allocated, and therefore may not be freed.
In order to solve your problem, instead of setting str1 to point to "abc\n" you need to use strcpy() to copy "abc\n" to the allocated memory block which is pointed by str1.
Before doing that, do not forget to increment your 4 and your 6 by 1 each, because strings in C also contain a null-terminating byte, so you need to allocate space for 5 and 7 characters respectively.


how to protect young tree from leafcutter bee

Question: every season a leaf-cutter bee chews hundreds of holes in my redbud tree's leaves. The tree is only three years old and I worry that it won't thrive. How can I protect it?
Comment: please add a picture
Answer: Leaf cutter bees are mason bees!  Sweet wonderful critical guys!  DO NOT WORRY ABOUT THESE.  I really don't think these could harm a baby much less a tree.  Please send some pictures of what is happening.  Bees are actually far more important than a tree (although cercis canadensis is a super wonderful tree).  Go out at different times of the day to observe.  Go at night in particular.  Send pictures of damaged leaves, the insects you find, I'd like to see the base of the trunk and what is happening between soil and bark.  Also, pruning these guys early is important, for their branching is one of their best attributes.
What are you using for fertilizer?  Watering?


How to install wsp file in sharepoint2013?

Question: I have already tried based on the following site http://jaxsharepoint.blogspot.in/2013/06/deploying-wsp-to-sharepoint-2013.html but I can't see anything on Manage Farm Solution other than a02.contenttypes.wsp this file... so, I don't know where the problem  i did. or Is there any new method to install wsp file on sharepoint?
Answer: This row from your link adds the WSP to "Manage Farm Solutions" page (if it is not sandboxed off course)
<code>Add-SPSolution "c:\Deploy\WSP\{file name}.wsp"
</code>


Mortality Rates - can I add individual rates together?

Question: I need to calculate the mortality rates per 100,000 for various age groups (Ex: age 0-19), however the data I am given is broken down into smaller age categories (Ex: ages 0-4, 5-9, 10-14, 15-19). Can I simply add the rates together for each sub-age group to get the total mortality rate for 0-19 years?
Answer: No. Suppose, for example, that the rate for each age group is 1 in 100,000. Then the overall rate should of course be 1 in 100,000, not 4 in 100,000. In general the overall rate is an average of the individual rates where each individual rate is weighted by the population of its age group. So you would compute the overall rate as (rate of group 1 * population of group 1 + rate of group 2 * population of group 2 + ...) / total population of all groups.


How do I take the larger of two analog signals?

Question: I have two feedback signals. I want to create a circuit that outputs the larger of the two. I know I could do this with diodes, but I'm unwilling to accept the diode drops. I suspect some op amp circuit would do the job, but I'm not sure how. What should this circuit look like?
Comment: Are you comparing ac signals? What (rough) frequency?
Comment: @PeterSmith DC signals, 0-5V, feedbacks to a control circuit for a switching power supply running at 200 kHz.
Comment: A comparator controlling an analog switch?
Comment: @BrianDrummond that's neat - just like a synchronous rectifier. I'd make that an answer (before I do muhuhahaha)
Answer: Sketch of a solution : for it to work well, the devil's in the details...
A comparator decides which signal is larger.
Its output controls an analog switch, aka 2:1 multiplexer, connecting the selected signal (the larger one) to the output.

simulate this circuit – Schematic created using CircuitLab
You probably want a "make before break" switch (read the datasheets) so that at the moment of switching, the output is the average of the two input values. As they are by definition the same voltage at the moment of switching, this prevents glitches or spikes.
Note : depending on the actual devigce you use as a comparator, you may need a pullup resistor on its output (the MUX "select" line). Details of comparator, MUX control voltages etc aren't shown, they will depend on the actual devices selected.
Answer: Use an op-amp precision rectifier, well, actually use two of these: -

Shown above is the circuit for one feedback signal - use another identical circuit for the other feedback signal. Then connect the outputs together - highest input dominates the output.
Because the basic circuit inverts you might probably want to invert the inputs to each precision rectifier first.


Why can't one make C60 with a combination of hexagons and heptagons?

Question: $\ce{C60}$ has a pentagon-hexagon system. Why can't one make it from a hexagon-heptagon system, or a pentagon-heptagon system for that matter?
Comment: It is possible to build carbon skeletons of other geometric forms (though they usually contain hydrogen as well). But they are not exactly *easy* to make. Dodecahedrane, for example, has a carbon skeleton with just pentagons, derivatives of cubane (just squares) are known. And they don't have 60 carbons.
Answer: Well, let's see. This is not quite a chemical question, though I wouldn't recommend moving it to Math.SE either, because they might have hard time recognizing what's $\ce{C60}$.
Now, let's imagine we're considering locally planar conjugated carbon
structures. Each carbon has to reserve one $p$ orbital for $\pi$-bonding,
which leaves it with 3 bonds. Now, the bonds tend to go in cycles; let's
confine ourselves to 5-, 6-, and 7-membered cycles, because otherwise we'll
have too much of angular strain (not that other cycles are totally impossible, though). So in effect, we are considering graphs
consisting of pentagons, hexagons, and heptagons, with 3 edges meeting at
each vertex. Let's say the numbers of these n-gons are $n_5, n_6$, and $n_7$,
correspondingly.
That's when old Euler kicks in. Polyhedra must meet a certain relation
between the number of faces (F), edges (E), and vertices (V):
$$V - E + F = 2$$
OK, what is the number of faces? Why, that's quite simple: $F=n_5+n_6+n_7$.
Then what is the number of vertices? Apparently, each pentagonal face has
five of them, and so on, so it would be $5n_5+6n_6+7n_7$. But wait, we've
counted each atom three times (for it belongs to three polygons), hence we must divide by 3: $V=(5n_5+6n_6+7n_7)/3$. By similar reasoning, the number of edges would be $5n_5+6n_6+7n_7$, if not for the fact that each edge belongs to two faces and thus is counted twice, hence $E=(5n_5+6n_6+7n_7)/2$.
All in all,
$$
V - E + F = 2\\
{5n_5+6n_6+7n_7\over3} - {5n_5+6n_6+7n_7\over2} + n_5+n_6+n_7 = 2\\
-{5n_5+6n_6+7n_7\over6} + n_5+n_6+n_7 = 2\\
{n_5-n_7\over6} = 2\\
n_5-n_7 = 12
$$
That's pretty much the size of it. You can do more or less whatever you want, as long as you have twelve more pentagons than heptagons. There is no going around it.
Now chemistry kicks in, too, and brings its own limitations. An $sp^2$ carbon wants to have its bonds in one plane, at $120^\circ$ angles. You can convince it to budge, but only so much. If you strain it more, the system becomes unstable. It turns out that two pentagons meeting at one carbon is already too much (not for an $sp^3$ carbon, though; see dodecahedrane). That's why you can't have constructions made of pentagons alone (or pentagons and heptagons, for that matter). Geometry would allow that, but chemistry wouldn't.
Let's see how that translates to actual shapes. Several fused hexagons give us coronene; it's planar.

(It is tilted sideways to give it a 3D feel. There are hydrogens attached on the outer edge; I omitted them for clarity.)
Extend it further, and you'll have an infinite flat sheet; that would be graphene.
Throw in a pentagon, and here's corannulene; it's bowl-shaped.

Extend that pattern, and you'll have fullerene.

Use a heptagon, and get circulene:

See that? It's bent indeed, but it's bent the wrong way. It's a
saddle-shaped bend. An example of negative Gaussian curvature, so to say. You can't wrap it to a sphere, no matter how hard you try.
Can we extend this further? Well, we kinda can (on paper, that is).
Moreover, it can be done in a number of ways, some leading to magnificent structures (purely hypothetical, of course).

Upd. It was brought to my attention that according to some studies, so-called carbon nanofoam might be a real example of structures of the latter kind. I'm not quite convinced (to me, until you have an X-ray diffraction study, everything is just hand-waving), but let's mention that anyway.
Comment: I was wondering whether anyone would look at this from a geometrical standpoint, and your answer is even more pleasant to read than I expected! I shall briefly point out [Stone-Wales defects](https://en.wikipedia.org/wiki/Stone%E2%80%93Wales_defect) and [carbon nanofoam](https://en.wikipedia.org/wiki/Carbon_nanofoam) as chemically-relevant examples of fused heptagons in carbon structures.
Comment: Thought of including the Stone-Wales thing at some point or another, but it didn't quite fit anywhere, and the answer is long enough already (by my standards, that is), so let's save it for another day.
Comment: Really, really great answer!


How to put isolinux on an sd card

Question: Hey I need to put the isolinux bootloader on an sd card but how do I properly do that?
Comment: Is a Linux distro? Because each distro have it own way to do it.
Answer: Assuming that you can boot to the SD card, you might try using dd to write the ISO image to the SD card.  Note that any image written this way may or may not have problems writing to the image, depending on how the ISO is configured.  Also, you might destroy your Linux installation if you use incorrect parameters, so be careful.
dmesg | grep sd | less

This will allow you to look through your boot log for disks.  Do this before and after putting the SD card into your working Linux machine.  The device file /dev/sd? which is new to your list of visible drives will be your SD card.  For example, let's say that it was assigned /dev/sdz.
dd if=your-linux-iso-image.iso of=/dev/sdz

This will take the contents of the ISO image and write it, bit for bit, to the SD card.  The 'if' parameter is your input file, which should be your ISO image.  The 'of' parameter is your output file, which should point to the SD card.  This command may take some time, perhaps even several cups of coffee, so be patient.  It's due to the low write speed of the memory inside the SD card and the speed of the USB bus.
Keep in mind that the /dev/sdz listed here is an example.  If that were replace by the reference to an actual hard drive, that would be overwritten by the ISO image, causing irreparable damage to the Linux installation.  Examine the results of the mount command to know what partitions are mounted and what disks are hard drives versus SD cards and other removable media.

How to put isolinux on an sd card


What's the use of SHA on Non Digital Signature applications?

Question: What's the use of SHA on Non Digital Signature applications?
Why is SHA1 not a risk for Non Digital Signature applications?
What's the difference between Non Digital Signature applications vs. Digital Signature?
Comment: Does this answer your question? [What are the differences between a digital signature, a MAC and a hash?](https://crypto.stackexchange.com/questions/5646/what-are-the-differences-between-a-digital-signature-a-mac-and-a-hash)
Comment: $$Integrity{}{}$$
Comment: Just to show that how broad this question. Replace hash with Sha-1 [Other than password hashes, are their other uses for non-reversible crypto](https://crypto.stackexchange.com/q/64588/18298) then see that hash function are ubiquitous usages.
Answer: SHA1 can be used for error detecting just like CRC32, but with much stronger message integrity guarantee (though not as strong as SHA-256).
SHA1 can also be used for generating random bits. This can be done by instantiating NIST-SP-800-90Ar1 Hash_DRBG and HMAC_DRBG with SHA1 and HMAC-SHA1 respectively.
SHA1 can also be used in key derivation functions. PBKDF2 and HKDF can be instantiated from it.
The security requirement difference between digital signature and non digital signature application is that: the hash that directly process the input message must be collision resistant, which SHA1 can provides a maximum of 63-bit security due to its structural weakness; non digital signature applications often only require appearant randomess of the output.
Comment: Addition: there are some applications beyond digital signature where the broken collision-resistance of SHA-1 matters. An example is file integrity by displaying a hash, when adversaries can prepare some content of the file, and predict what's before that. There also are convoluted way to use SHA-1 securely in signature applications, by forcing a random prefix (e.g. random serial number in X.509 certs). It remains that SHA-1 should not be used in any new application, and must not be used when collision-resistance (including with chosen prefix) matters.
Comment: I'd also note that Blake3 is pretty much always going to be faster than SHA-1, and is far more secure. The only use of SHA-1 is for legacy systems that can't be upgraded.
Comment: CRCs are stronger at detecting runs of errors.  It is common for communication links to have bursts of bits that are corrupt.  For random corruptions, they may perform in a similar manner.  So in some ways, using a SHA for error detection might be a mis-use, just as it is to use a CRC for data integrity.  They are both similar and in a pinch they can be used, but each serve a particular purpose.  If you can trust the SHA value, then it gives trust in the hashed data.  This is non-signature application.  You need public/private keys as well to do signing.  Isn't that the difference?


Does "No sh*t!" have many meanings?

Question: I often see "No shit!" in different contexts and wonder if it has only one specific meaning or different meanings in various contexts? I know that it's slang and informal.
Comment: How about adding some of those various contexts?
Comment: I would rather say that it has no actual *meaning* -- it's used to *amplify* a particular impression or state of mind, but what that is you have to determine from context.  There are many similar amplifiers, from single words like "wow!" or "golly!" to long, colorful phrases, many of which are unique to a particular dialect.
Comment: @user3169 I'd have to rewatch the films.
Comment: I agree that *no shit* is mostly just used for amplification, but I believe it also does have a basic meaning, which might be, "I hear you" or "You're not full of shit." And phrases like "wow" and "gee whiz" and "no shit" all have slightly different origins and connotations and patterns for usage.
Answer: In my experience, No shit! has two main usages.
The first is to express sincere wonderment. It is usually in response to something surprising that someone has just said. For example:

John: I just won $100 from this lottery ticket!
Jane: No shit!

It can be used to convey negative emotions as well:

John: I just got a $500 speeding ticket!
Jane: No shit!

The second usage is to express insincere wonderment. In this case, No shit! is a sarcastic response to something the person finds obvious:

John: If you stare at the sun, you'll probably go blind.
Jane: No shit!

This sarcastic meaning is worth mentioning, because it's probably used as often as the sincere meaning, if not more often.
Along these same lines, you might occasionally hear No shit! when someone thinks the other person is not being honest. Again, the response is entirely pat and sarcastic.

John: Barack Obama just called to say he'll be stopping by for tea.
Jane: No shit!

And note that the person telling the lie may have no idea whether the response is sincere or sarcastic:

John: I'm driving this Honda because my Lamborghini is at the repair shop.
Jane: No shit!
Comment: The sarcastic usage is the only one I've ever heard here in Britain, though I've heard the non-sarcastic version in American movies.
Comment: Jesus, this "No shit!" thing is really wide!
Comment: @Andrew I think you're right to a point, but I do think these terms do have slightly different meanings and usages. I think "No shit" is so commonly used sarcastically that it's worth examining in and of itself. Take a word like "Golly!" That word was popular in the 40's and 50's and has its origin in being a placeholder for "god" and meant to prevent people from taking the Lord's name in vain. Sure, you might be able to replace ***no shit*** with ***golly***, but my opinion is it changes the meaning and tone of the sentences.
Comment: I wonder if the meaning has anything to do with the phrase itself.  Almost any expression can be spoken seriously or *ironically*,  with only subtle differences in intonation.  You could replace "no shit" with "well knock me over with a feather" in any of the above examples without changing the meaning.
Comment: You left out the literal meaning. **John:** What did you find in that outhouse? **Jane:** No shit! It didn't smell too bad in there at all. They must have just cleaned it.
Comment: Ha, I also left out the the literal, sarcastic meaning, i.e., a dirty outhouse.

Does "No sh*t!" have many meanings?


Photoshop: shift+resize (transform) disables snap to grid function?

Question: When I grab any side of an object in transform mode, I can have them snap to a grid (purple line is visible to indicate alignment) but whenever I grab a corner to keep the correct ratio, the shift+resize disables snap to grid function. Any way around this?
Answer: My workaround is to let it snap unproportionally and than change the skewed width manually by dialing in the value to the percentage of the one side that fits my needs.
Answer: It seems that the behaviour is just as you describe: you can snap if you resize by dragging the side handles but not the corner handles. With aspect ratio now being locked by default you can choose whether to snap with or without the locking the aspect ratio (holding shift key) by choosing which handles you drag. It's weird, don't know if I like it, but it works. Took me weeks to figure it out.


Will Play Store update a sideloaded APK?

Question: We have created an Android app, and we wish to share the APK with a few friends and family before publishing it to the Play Store. Our concern is that, if they install the APK, and then later we push an updated version to Play Store, even with the same signature, will the update be delivered to the users who downloaded the APK manually and installed it?
Answer: As of 2015, Google Play will detect apps with the same signature, but they will not be updated unless the user uninstalls the app, and then reinstalls from the Play Store.
So in short, to answer your questions - no, Google Play will not update the application if it is installed from somewhere other than the Play Store.
See: Stack Overflow - Android, sideloading applications and keep them up to date via Google Play
Comment: +1, you can also see this if you install something from the Amazon (for example) app store. It shows as 'installed' on the Play Store but never has an update option, or uninstall option, just Open.
Answer: As of 2015, as stated in the answer by @Ankush, Google says it won't.
But in practice, if you sideload an APK, and an update is pushed on Play Store, it does get pushed down. We tested this scenario. It is important to note that the automatic update to the phone, will happen after a few hours of the app getting published (not APK upload) on the App Store, so in case you are testing, wait for 12 hours.
As of 20th Feb 2015, we have tested it, and this stands true.
Comment: Tested this March 2020, it is no longer correct.


Application functionality calls for saving Credit Card details for future ease. Need to investigate if any specific security design exists for this

Question: Hi i Need to know if any specific security design exists for saving credit card details of user for future use.Actually iam developing an application in android and its like an app market selling products and i want to implement this functionality ie payment through credit card.
Answer: DO NOT save user credit card data on a device!   There's just no way to make it secure.  A device can get lost or stolen.   You'll have to implement a secure user login to your server and store the CC data there.
Answer: If you want to charge a user's credit card at future dates you would use a service like [Authorize.Net's Customer Information Manager (CIM)][3] to create payment profiles for your customers. Basically you're storing credit card information on Authorize.Net's servers and whenever you want to receive a payment from a customer you tell Authorize.Net to charge the amount due to that payment profile.
They even just released SDKs for Andorid and iOS.


How can I get out of a team celebration happening during work hours and an hours drive away?

Question: The hospital where I work was recently "taken over" by a larger, more profitable facility. Consequently, myself and one co-worker are now part of a much larger team. However, those other team members are spread out, the closest being at least an hour drive away, depending on traffic. Our new manager would like to have a "celebration" for our career national recognition week, however, we would be required to drive to another facility, at least an hour away, which doesn't make it much of a celebration. How can we tactfully get out of attending without being labelled uncooperative? FYI, this is a difficult manager, we don't know the others on the team and won't have a need to, and we have already been to the larger facility at least twice, but other team members have never been to ours, we are monitored for productivity, and this will most definitely take away from that.
Comment: If this is happening during work hours, does that mean you can count the drive and the party as part of your work hours for the day?
Comment: Have you let your manager know that this celebration will take way from your productivity?
Comment: Can you expense the miles?
Comment: I'd suspect that going will be seen as more important than lost productivity but you might as well clear that up first.
Answer: Hate to say it, but if you want to be a "team player", you may just have to suck it up and go.
Having said that, if there is any reason to be "busy" during the time, maybe putting out some kind of fire so you have to stay at the home office, that's an option.  Maybe you are too busy to go and just have to make the deadline.
Maybe you have car trouble...but then your bluff may be called and you may have to ride with said manager.    Maybe you call in sick, but it will appear you're just trying to dodge it.
There are all sorts of excuses to use, but ultimately, if you don't go it may look bad.
Comment: I agree with Joe... on top of his comment, I urge care when suggesting lying as an option to someone on a public forum.. it may be a small, innocent lie in reality but who know how long this post will be visible and who will read it in another context... I do think this answer is sound enough outside of the third paragraph
Comment: Let me clarify:    I was not suggesting a person do that...but it was an option, albeit a bad one that has a huge potential to backfire.
Comment: No problem.. I ended up giving the answer a vote.. your actual suggestion was "suck it up and go" and I think that is pretty sound advice..In reality, Im not totally against "craft a decent excuse" either but, I just wanted to point out that you never know who will read this in the future and it's conceivable that it is a potential employer... I have first hand experience with a company that would kick an employee out if they were to even acknowledge that minor deception is worth considering.. Im probably a little extra paranoid since I can be personally identified here.. carry on!


What's the difference between 'decimated' and 'undecimated' data?

Question: How is 'decimated' data different from 'undecimated' data?
Answer: "Decimated" is another word for "downsampling," or in other words resampling the original ("undecimated") data with a lower sampling rate. So the decimated data will have a lower sampling rate than the undecimated data.
Edit As pointed out in the comments, it is a very good idea to low pass filter the data before downsampling, to avoid aliasing effects. There seem to be different conventions as to whether low pass filtering is included in the definition of "decimation".
Comment: There's a subtle difference between the two isn't there? I believe that decimation is low-pass filtering, e.g., CIC filter, followed by downsampling. For example, the Matlab function downsample(x,n) keeps every nth sample from x, while the function decimate(x,r) low-pass filters x first and then keeps every rth sample
Comment: The way I learned it, decimating refers to downsampling, but it is a good idea to low pass filter before downsampling. (Eg, on wikipedia (https://en.wikipedia.org/wiki/Downsampling_(signal_processing)): "Decimate the filtered signal by M; that is, keep only every Mth sample.)" However, this is just semantics, one should certainly low pass filter first.
Comment: In Oppenheim's *Discrete-Time Signal Processing*, a downsampler that does not pre-filter the input is called a *sampling rate compressor* or *compressor*, while a downsampler that does low-pass filter the input is called a *decimator*.

What’s the difference between ‘decimated‘ and ‘undecimated’ data?


representation of SU(2)

Question: The question is regarding SU(2) group and SU(2) algebra.
The SU(2) group can be generated by exponentiating the
generators of SU(2) algebra $X_a$ as $exp(i t_a X_a )$
with $t_a$ being three parameters. Genreally we use half
the Pauli matrices as $X_a$ when discussing SU(2)
algebra as well as the group.
But if we use the spin-1 representation of $X_a$ (which
can surely be done at the Lie Alebra level) can they
be exponentiated to give another rep. of the SU(2)
group (which would be 3 dimensional)?
Comment: By the way, the group you obtain in this case is isomorphic to SO(3). If you choose infinitesimal rotations as the spin-1 representation, you obtain the SO(3) matrices directly.
Answer: Yes. A representation of a Lie algebra always exponentiates to a representation of the simply connected Lie group corresponding to it. The representations of each are in bijective correspondence this way.
I recommend the free online book by Kirillov ( http://www.math.sunysb.edu/~kirillov/mat552/liegroups.pdf ) as a reference for this business.
Comment: It exponentiates if the Lie algebra is finite-dimensional (as in case of SU(2)), but not necessarily in infinite dimensions.
Comment: I second a vote for Kirillov's Lie Group notes! Download them and keep a copy lest they should disappear. The university sector's shrinking faster than a pierced balloon in my home land and, although Kirillov's present home land is not mine, it is also infected with the English language bacterium which seems to be an effective economic "rationalist" virus's vector organism! Also see [my answer on how several different exponentiations](http://physics.stackexchange.com/a/76191/26076) can happen in finite dimensions, and I also recommend Chapter 8 of John Stillwell's "Naive Lie Theory".

representation of SU(2)


How do I get the shop to refresh, and how often does it refresh?

Question: How do I get the shop to refresh?  And how often does it refresh?  Currently I have 7 out of 10 slots open with purchasable items, 3 of the slots are locked and don't have any merchandise.  I bought out everything but the first 3 items, and got a message saying I needed to spend 1200gp? to refresh the shop, but I've done that and still can't figure out how to get the shop to refresh.  Is it a timer based thing? Or is there some other, more consistent and quicker way to get the shop to refresh. I'd like to buy up as much Mii headgear as possible.
Answer: From this GameFaq's question, it sounds like the shop should refresh after a Classic Mode run or after a certain number of battles are fought.
I just bought some items from the shop and ran through classic mode. It seems that one of the "sold out" slots has been repopulated with a new item. I'm not sure if it was only one that refreshed because I did Classic on the easiest setting to run it through quickly? But I'd say that your best bet is to just fight more battles and maybe do some Classic runs and give it time.
Comment: I read that GameFaq thread. I'd like a certain, factual answer instead of a speculative, anecdotal answer.    As of this point I'm just playing 5-6 matches then quitting out to battle new challengers and check the shop, but it still seems inconsistent if the shop gets a full restock, or just a few items added in.
Comment: @senpai fair enough. If someone posts are more well informed answer I'll delete this one. But I think right now with the information available to the Smash community this may be the best you'll get.
Answer: I'm pretty sure its time based because I quickly ran through classic mode and nothing refreshed. in order to unlock all 10 slots you have to just spend a bunch of coins. My guess is each individual slot has its own refresh rate rather than the entire shop because when you go back only one or two new items are in the shop.
Comment: I'm wondering if you have to reset the game at all, because I left my game on sleep all night and when I came back the shop still looked the same way as when I left it. It wasn't until I played through a few WoL battles that the shop had new stock
Answer: I know it is time based because I was just sitting around and then I checked and some of the items had refreshed.
Answer: Basically, every 5-10 minutes a new item is added to the shop, so it would take an hour and forty minutes to completely refresh the shop.


Renaming virtio network devices in Ubuntu 16.04 is not working

Question: I am trying to rename some virtio ethernet devices on an Ubuntu 16.04 VM.  I've done this successfully many times on non-Ubuntu systems with physical interfaces and older Ubuntu systems.  Yet, despite following the advice from Renaming network interface in Ubuntu 16.04 with systemd fails and seeing Persistent network interface naming and kvm it still is not being renamed.  This is on an openstack VM, but that really shouldn't matter very much.
I have tried using udev (my normal approach):
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="fa:16:3e:bf:be:d0", NAME="enet"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="fa:16:3e:64:fb:74", NAME="snet"

I have tried using systemd.link files (with and without 99-default.link being symlinked to /dev/null):
[Match]
MACAddress=fa:16:3e:bf:be:d0

[Link]
Name=enet

and
[Match]
MACAddress=fa:16:3e:64:fb:74

[Link]
Name=snet

I have tried with both udev and systemd links.  I have certainly run sudo update-initramfs -u
Both systemd and udev acknowledge the new name to some extent
systemctl says:
  sys-devices-pci0000:00-0000:00:03.0-virtio0-net-ens3.device       loaded active plugged   Virtio network device
  sys-devices-pci0000:00-0000:00:03.0-virtio0-net-enet.device       loaded active plugged   Virtio network device
  sys-devices-pci0000:00-0000:00:04.0-virtio1-net-ens4.device       loaded active plugged   Virtio network device
  sys-devices-pci0000:00-0000:00:04.0-virtio1-net-snet.device       loaded active plugged   Virtio network device

udevadm info /sys/class/net/ens3
P: /devices/pci0000:00/0000:00:03.0/virtio0/net/ens3
E: DEVPATH=/devices/pci0000:00/0000:00:03.0/virtio0/net/ens3
E: ID_BUS=pci
E: ID_MODEL_FROM_DATABASE=Virtio network device
E: ID_MODEL_ID=0x1000
E: ID_NET_DRIVER=virtio_net
E: ID_NET_LINK_FILE=/etc/systemd/network/80-etr-net-names.link
E: ID_NET_NAME_MAC=enxfa163ebfbed0
E: ID_NET_NAME_PATH=enp0s3
E: ID_NET_NAME_SLOT=ens3
E: ID_PATH=virtio-pci-0000:00:03.0
E: ID_PATH_TAG=virtio-pci-0000_00_03_0
E: ID_PCI_CLASS_FROM_DATABASE=Network controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=Ethernet controller
E: ID_VENDOR_FROM_DATABASE=Red Hat, Inc
E: ID_VENDOR_ID=0x1af4
E: IFINDEX=2
E: INTERFACE=ens3
E: SUBSYSTEM=net
E: SYSTEMD_ALIAS=/sys/subsystem/net/devices/enet /sys/subsystem/net/devices/ens3
E: TAGS=:systemd:
E: USEC_INITIALIZED=1532927

But somehow, the device maintains the ensX name.  I am not running NetworkManager
2: ens3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether fa:16:3e:bf:be:d0 brd ff:ff:ff:ff:ff:ff
3: ens4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether fa:16:3e:64:fb:74 brd ff:ff:ff:ff:ff:ff

Answer: You might be in luck because Linux Kernel version 4.9.9 was just released on Thursday (Feb 9, 2017) with improvements to Virtio among many others. You can read about it here (softpedia.com - Linux kernel 4.9.9 released with many updated drivers x86).
To install the latest kernel version you can follow the instructions here (How do I update kernel to the latest mainline version?) but replace 4.9.8 with 4.9.9.
As an aside there are improvements for Intel i915 and AMDGPU display drivers and Nouveau drivers for nVidia cards. Anyone with unsolvable bugs in those areas should seriously consider installing the new Linux Kernel version.
Comment: No, that didn't help.  Most likely the problem is a udev/systemd one, probably exacerbated by initrd.
Comment: @SethRobertson Have you read this article for disabling udev/systemd setting up network names?: https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
Comment: I have read that, and my question in fact discussed my attempts to use the solutions outlined on that page.