Difference between "inspiring" and "inspirational"

Question: What is the difference between the words inspiring and inspirational? In which context should one choose one over the other?
Comment: Reminds me of the difference between "historic" and "historical".
Answer: One difference is that inspiring always means that someone is actually inspired by it, whereas inspirational can also be used in compounds where it means only that something is intended to inspire; an inspirational speaker (or "motivational speaker"), for example, is someone whose job is to give speeches that are intended to inspire, without regard for whether they succeed (so "boring inspirational speaker" is not a contradiction in terms), and similarly, an inspirational poster (or "motivational poster") is a poster that is (supposedly) intended to inspire positive qualities, but I don't think it generally succeeds. But this use is non-predicative; in "the speaker was inspirational" (predicate adjective) or "a very inspirational poster" (modified by very), that meaning is not available, so in these cases inspirational just means inspiring.
Comment: An excellent answer, with one reservation: An inspiring speech (or whatever) need not come from an inspired speaker (or other creator); it only needs to inspire its beholder (to some action, thought, or feeling). However, an inspired speaker, except in a theo-historical context, must inspire someone to merit the label.
Comment: @HStephenStraight: When I say that "*inspiring* always means that someone is inspired", I mean that something is only 'inspiring' if it actually inspires someone. That is -- if someone is inspired *by it*. (Sorry for the belated response; it wasn't until just now that I finally realized what part of my answer you had a reservation about.)
Answer: "Inspirational" shows intent; "Inspiring" shows effect. So, "Inspirational" often carries an ironic comment on the pretensions of the subject. It is often hyperbole. "Inspiring" is a clean and simple word meaning to be filled with breath which suggests that there was something "breathtaking" about the subjects action. I chose "inspiring" in all uses, except the ironic.
Answer: From usage I have seen (to the limited extent I did), the two words are quite different.
inspiring is typically used to qualify something post-facto: 'The speech was inspiring.'
inspirational is common in qualifying in functional terms: 'He is going to deliver an inspirational speech.' (intended to be or do/ supposed to  be or do, looking forward).
I do not think we can find an authentic reference on the above lines, though.
Answer: Having noticed that the word "Inspiring" has recently taken a back seat to "Inspirational", I decided to look up and see for myself what the differences between the two words might be.
For instance, Kate Middleton referred to Diana as "Inspirational."
I thought to myself, "Surely she was inspiring rather than "inspirational".
So, I chalked that up to nerves.
However, I've since noticed that nothing is "inspiring" anymore.  It's always "inspirational".
Very strange.
Answer: Inspirational is more closely associated with the spirit in a religious context; an example is "inspirational hymn".  Inspiring can have the same meaning but is used more commonly in the sense of uplifting or creating an impetus to action; an example is "the coach gave an inspiring half-time speech".
Comment: I feel like this answer asserts that "inspirational" is primarily used in religious contexts. It certainly can be understood that way, but isn't intrinsic to the word.
Answer: Inspirational (adj) is with the intend to inspire, e.g. an inspirational speech.
Inspiring (adj, v) is delivering the impact, e.g. the speech is inspiring, or an inspiring coach.
Answer: Verbs ending in -ing can be used as gerunds (nouns) or present participles (verbs or adjectives). "Inspiring" ends in ~ing. It is mostly used as a present participle and hence its usage as an adjective is correct.
"[I]nspirational" is always an adjective.
Comment: You've misunderstood *gerund* and *vowel*.


Hoping to get rid of "no message" CAN error that even BMW engineers in Munich cannot/will not solve

Question: I have one persistent info error remaining on my BMW F30 that my OCD won't let go. BMW also threw in the towel on this as described in this NHTSA bulletin: https://static.nhtsa.gov/odi/tsbs/2013/MC-10149299-9999.pdf
CDA904 No message (status, trailer, 0x2E4), receiver DME, transmitter AHM
Can you point me in the right direction? What CANBUS message ID should I be sniffing for? I reached several dead ends.
Background: The car never had a trailer connected, so no trailer module (AHM). I may have inadvertently a while back coded some or all the ECUs with a VO/FA (Vehicle Order) that contained a code "3AC". This adds a trailer module to the car in the software. Several ECUs have some settings changed to reflect that and they start expecting communication from the AHM module (trailer ECU).
In a nutshell the problem: The DME ECU in error memory has the above error. It seems to indicate that the DME (or another ECU that the DME communicates with) expects a message from the AHM that "here I am, alive, etc" Obviously, there is no AHM there physically to send any CANBUS messages.
The car and its CANBUS network: BMW F30, 2012, 328i, N26 engine. DME is on PT_CAN(1) and PT-CAN2 (redundancy) with 500kbs both. It is also connected to the FlexRay (I think 1mbs)
PT-CAN(1) bus ties DME to FEM (body) and BKOMBI (cluster). FEM and KOMBI are the end nodes with 120ohm each.
PT-CAN2 ties DME to EGS (transmission) and GWS (gear selector switch).
FlexRay ties the DME to DSC (Dynamic Stability Control), EPS (steering), ICM (chassis).
The AHM (trailer module, if physicality present, would connect to the K-CAN2 network that ties together REM (Rear Electronic Module) with some other ECUs.
I think ZGM (gateway ECU) connects to all the ECU via all the networks.

What I did so far that did not work:

When I followed the BMW factory diagnosis software ISTA+ (used by all BMW dealers) to troubleshoot this particular error, it prompted for the re-initialization of the FlexRay. (and other canbusses?)

Recoded all the ECUs with the factory VO/FA that never contained the AHM trailer code 3AC, as to turn off all AHM related settings.

Flashed all the ECUs (except NBT_HU) to the latest firmware.

The original error code was for CF2501 No message (status, trailer, 0x2E4), receiver EGS, transmitter AHM. But I used an EEPROM-level program called BMW TOOL32 and reset all the adaptations/bonds in the EGS (Transmission) along with the CAN-learning function. This error code disappeared, but immediately migrated to the DME with CDA904 No message (status, trailer, 0x2E4), receiver DME, transmitter AHM.

Reset adaptations for the DME as well. There was no way to reset CAN-learning (if any) for this ECU.

Based on what I read, DME is either looking for an error every 8 sec or every 1 min. Cannot confirm which one is true. And if DME does not receive an "I am alive" message from the AHM (or through another module that it tasked with reading AHM messages), then DME will throw the error.

Connected a CANBUS sniffing and parsing module/program directly to the PT-CAN(1) and PT-CAN2 and K-CAN2 networks separately. Did not use the OBDII port on purpose to make it's not reading an isolated network segment. I was looking for Hex ID 2E4 (from the error message) but that never showed up. (Excellent QT-based program using Arduino+ cheap CANBUS module for sniffing:) https://github.com/adamtheone/canDrive

It would be of tremendous help to identify/confirm what CANBUS ID code should I be looking for while sniffing. Here is a collection of related CANBUS codes that may make sense to some of you:
0xCD98 52632 PT-CAN, no message (trailer status, 2E4): The diagnostic function monitors reception of the message.
"0xCD98 Botschaft (Drehmomentanforderung DSC, B6)" //torque request
0x2E4 Status Anhänger (8) Status Trailers (8) 0x71 AHM
0x4F1 Netzwerkmanagement Network management 0x71 AHM
0x5F1 Dienste services 0x71 AHM
BO_ 740 Status_trailer: 8 AHM (740 decimal = 2E4 hex)
Engine-DME Motor Elec. Cd98: message error, DME Receiver, AHM/DSC Transmitter
What I see as options, short of fixing the actual problem:

Block DME from looking for/receiving the missing AHM message

Auto-delete the DME error via some CANBUS command in regular intervals (less than 8 sec intervals)

Send a fake AHM CANBUS message that the AHM is there and ok.

Install a physical AHM module ($80+) (if you can't beat them...join them!)

Thank you for any assistance!
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Comment: Thank you @Pᴀᴜʟsᴛᴇʀ2   New here, but member on several other communities.
Answer: Well, I ended up installing the trailer module ECU to satisfy the DME and EGS ECUs yearning for commms with the AHM (trailer) module. Not the solution I envisioned, but it worked at a lower cost than others.


how to control relative of Fe2+ and Fe3+

Question: hi   how can I control relative of Fe2+  andFe3+  when  we  adding  raw iron to acid solution  To get the ratio 2:1
Answer: Most acids aren't strong oxidisers and really only yield $\ce{Fe^2+}$ when dissolving iron. The most common oxidising acid is nitric acid, $\ce{HNO3}$, which does fully oxidise the iron to $\ce{Fe^3+}$.
If you don't have access to nitric acid (now a restricted material in most European countries), you can dissolve the iron in hydrochloric acid, $\ce{HCl}(aq)$, then oxidise the $\ce{Fe^2+}$ subsequently with hydrogen peroxide $\ce{H2O2}(aq)$ solution. Then boil that solution for a bit to get rid of any excess peroxide.
You can also buy ferric chloride solution, $\ce{FeCl3}(aq)$, as etching solution.
Now how do you create a solution with a known $\frac{\ce{Fe^2+}}{\ce{Fe^3+}}$ ratio?
Add a calculated amount of steel wool to a known quantity of the ferric solution. The following reaction takes place:
$$\ce{Fe^3+ + Fe -> 2Fe^2+}$$
Control the concentration and quantity of ferric solution and the amount of steel wool used and you can obtain any $\frac{\ce{Fe^2+}}{\ce{Fe^3+}}$ ratio. For example, if you set aside precisely half of your ferric solution, then add an excess of steel wool to the other part, filter of the unreacted iron (leave it to react overnight, e.g.) and mix both parts then your ratio will be $\frac21$.
This how many instructables for ferrofluid are written. I've done this myself and it works well.


Is it possible to reduce maturity time of plants with biotechnology?

Question: I've heard of speed breeding which makes use of optimal circumstances in glasshouses and growth chambers. Is it also possible to shorten a plant's maturity time (i.e. the time it needs from being planted until the time its yield can be harvested) using genetic modifications?
Comment: Your use of "growing season" is confusing, since it almost always means the length of time plants will grow - basically from the last frost in the spring to the first frost in the fall (for those of us in temperate latitudes).  What you're asking is more often "days to maturity" or "time to harvest".
Comment: Pick up a packet of seeds at a garden shop. Most will have "days to maturity" . And there will be choices of time(growing season) .Such as a 70 day corn or a 100 day corn. Growing conditions such as moisture an nutrient level have a secondary affects.
Comment: @AlexReynolds thanks for the reply and links. I also suggest you post this comment as an answer to get some reputation.
Comment: @jamesqf thanks for the clarification; I've edited the question accordingly. Is there any other word for what I mean other than "days to maturity" or "time to harvest" (or as I said maturity time)?
Answer: Perhaps investigate the families of YUC genes that synthesize the growth hormone auxin (ncbi.nlm.nih.gov/pmc/articles/PMC6941117) and ARF genes (ncbi.nlm.nih.gov/pmc/articles/PMC4737911) that respond to auxin. Auxin overproduction or changes to ARFs might speed growth. But some herbicides are synthetic auxins (e.g. 2,4-D) and work by exhausting and killing weeds (en.wikipedia.org/wiki/2,4-Dichlorophenoxyacetic_acid), so modifying these pathways may have unwanted side effects, depending on the crop.
Answer: Independent of the hormone manipulation suggested by Alex Reynolds, perturbation of transcription factor UPB1 has been found to have an effect on plant growth by Tsukagoshi and colleagues -- Transcriptional regulation of ROS controls transition from proliferation to differentiation in the root.
In short, disrupting UPB1 activity in model Arabidopsis roots alters the balance of free radicals, leading to delayed differentiation and continued cell growth. UPB1-deficient roots were faster growing and composed of larger cells. Artificially increasing UPB1 activity resulted in slower root growth.
Taking OP's definition of maturity time --

the time it needs from being planted until the time its yield can be harvested

-- the agricultural utility of this mutation depends on the crop.  If the goal is to increase the amount of biomass as fast as possible, this is likely a beneficial mutation.  If the goal is to decrease the time needed for a plant to bear mature fruit, this mutation would not be ideal, given that disruption of UPB1 activity leads to slowed cell differentiation.


opportunity how to show the close date show msg close date in near throw on vf page

Question: shows the message(Close date is near) on opportunity when a particular opportunity's close date is 5 days ahead
Answer: In addition to the Lightning Experience suggestion from @Raspi, for Salesforce Classic, you can simply create an image formula field that looks like this:
IF (TODAY() + 5 = CloseDate,
  IMAGE("/img/samples/flag_yellow.gif" , 'Yellow' ,12,12) & ' Close Date is imminent. Do something!' & BR(),
  NULL)

and place the formula field on the page layout, perhaps in an untitled section at the top.  I use this technique to display 'soft alerts' that appear only when viewing a record. You can have many image expressions within one formula field.
Answer: Do you need it in the current Record Page as 'advise' ?
I usually use a Lightning component with some rules, using TOAST advises. An invisible Lightning component that handler the INIT and if some rules are true, then i call 'showToast' function:
showToast : function(component, event, helper) {
var toastEvent = $A.get("e.force:showToast");
toastEvent.setParams({
    "title": "Close Date is near!",
    "message": "The Close date is 5 days ahead!",
    "type": "warning",
    "mode": "pester"
});
toastEvent.fire();}

See documentation here: Lightning Component Show Toast
IMPORTANT! : Just for Lightning Experience Layout. If do you need for Salesforce Classic, you must build a Visualforce Page with an 'alert()'.


Use of 常識 for common sense

Question: I find that 常識 is often translated as common sense, but to me the two have different nuances, even different meanings. In English, having common sense is more likely to mean "having the good sense to," say, look both ways when crossing the street. It has less to do with knowing something specific, like President Biden is a Democrat. The Japanese 常識 seems more expansive and encompasses both meanings; but perhaps with a greater emphasis on the latter, like knowing Shinkansen lines leave from both Tokyo and Ueno Stations.  Am I right? And if so, is there a more specific term in Japanese for "having the good sense to"?
Comment: @sundowner yes, you might say (for an American anyway) that "President Biden is a Democrat" is common knowledge, not common sense. As the OP indicates, "common sense" basically means "sensible judgement in everyday situations."
Comment: In English, the phrase you're looking for is "general knowledge". So, "the new AI system has good general knowledge, it understand that Biden is a President."  The other phrase is "common knowledge" ... so for example "The visitor from Mars had excellent common sense, but of course he knew nothing that was common knowledge to us."
Comment: You mean 'President Biden is a Democrat' is not called a common sense?
Answer: You are right, 常識 includes knowledge as well as judgement.  Generally it means what the speaker thinks other people take for granted.

常識
一般の社会人が共通にもつ、またもつべき普通の知識・意見や判断力。「―がない人」「―で考えればわかる」「―に欠けた振る舞い」「―外れ」)
[補説]common senseの訳語として明治時代から普及。(emphasis added)

The following J-E dictionary entry has multiple senses :

常識
1〔思慮分別〕common sense
2〔周知のこと〕common knowledge
3〔妥当なこと〕

A word for good sense and not knowledge is 良識. But at least to me, this generally refers to moral judgements. Assuming that is not always the case with good sense, it may not be a perfect fit.
Comment: A word for "knowing right from wrong" is わきまえ. It's not commonly used but the former premier 森喜朗 used this word when he made the news with discriminatory remarks against women.

Use of 常識 for common sense


why aren't prisms archimedian solids?

Question: I don't understand which part of the definition of an archimedian solid excludes prisms from being one. each vertex of a prism has the same polygons around it (4,4,n for a n-gonal prism), and also each vertex is symmetrical to every other vertex, and that isn't even always part of an archimedian solid's definition (see pseudo-rhombicuboctahedron). why are they not classed as archimedian solids?
Comment: by symmetrical I meant vertex transistive
Answer:
Prisms and antiprisms, whose symmetry groups are the dihedral groups, are generally not considered to be Archimedean solids, despite meeting the above definition. With this restriction, there are only finitely many Archimedean solids.

From Wikipedia. They're not counted because they're infinite families, and it's the others that are more interesting, I guess. Or maybe people just like having a finite amount of Archimedean solids.
Answer: Prisms don't have 2 or more types of polygons meeting in identical vertices. But other than that your answer should be right and they should be counted.
Comment: If the end-faces of the prisms are regular $n$ sided polygons and the side faces are squares, then every vertex has an $n$-gon and two squares, and the vertices are essentially identical, in much the same way as a truncated icosahedron is an Archimedean solid.  With anti-prisms where the side faces are equilateral triangles, every vertex has an $n$-gon and three triangles, rather like a snub dodecahedron.

why aren't prisms archimedian solids?


Origins of molecular orbital diagrams?

Question: Does anyone remember who proposed molecular diagrams for simple molecules as taught today in most general chemistry texts? I cannot access Hund's original article, however, Mulliken's early articles on molecular orbitals do not show any diagram like this. For example, The Assignment of Quantum Numbers for Electrons in Molecules (MULLIKEN, Phys. Reviews 1928) does not have a single figure.
Thanks
Answer: You mean Hund (1927)? I don't know if he was first, but p. 756:

(Similar depictions for Zeeman splitting occur in Sommerfeld (1922, p. 553) and probably earlier.)

Added: Hall (1991) points to Lennard-Jones (1929) who "introduced the Linear Combination of Atomic Orbitals approximation for the molecular orbitals" and has (p. 679):

The possible molecular states are shown diagrammatically in Fig. 4, each being represented by a cell which can contain two electrons of opposite spins.
$\hspace{5.5em}$

Later in (1931, pp. 314–318) Lennard-Jones also has:

Let $A$ and $B$ be two atoms, which, when infinitely distant, are in $S$ states of multiplicity $2s_a+1$ and $2s_b+1$. (...) The energy levels of the system $AB$ depend on the distance between the atoms, and the lower levels usually have a minimum, which is the equilibrium distance of the molecule $AB$. An example of the relation between the energy levels of separated atoms and the same atoms when interacting with each other is shown in Fig. 8.
Comment: Isn't there any citation of previous article?
Comment: I feel the united nuclear model (Vereinigte Kerne) was a predecessor to molecular orbital theory.
Comment: Sommerfeld's diagram is showing the effect of magnetic field (Zeeman effect ) on sodium atoms on a pair of doublets. The sigma and pi notation there shows the polarization of the Zeeman lines as perpendicular or parallel to the magnetic field. I think we have to go to 1927 onwards.  It seems that these molecular orbitals diagrams were imaginations of chemistry teachers. I still could not find such pictures in original papers. These MO diagrams are so common in every chemistry textbook and webpage.
Comment: @ Francois Zeigler, Yes thanks, it seems Lennard was the first one to draw such diagrams (1929). Mulliken later published a series of notations of sigmal, pi, sigma star and pi star.

Origins of molecular orbital diagrams?


How to browse the server to upload files from there in Drupal 7

Question: I need to upload the audios and videos on server in a specific folder via FTP and then let the content managers to select them when they want to upload any of them in add/content path (because it takes a long time to upload them via the Add Content user interface). Is there such a capability in Drupal 7?
Comment: @FelixEve did you see the `Image` word in my question? I'm talking about videos and audios
Comment: Still just browsing the server for files. IMCE does all of that. File type is irrelevant.
Comment: @Drupalist file is a file. Do you really think file browser will care what's inside the file?
Comment: Related: http://drupal.stackexchange.com/q/76823/16495 http://drupal.stackexchange.com/q/76525/16495
Answer: ****UPDATE****
Best option is to use https://drupal.org/project/imce_filefield
This is specially made to upload files to sites/default/files and add them.
Just configure imce and the field.
Uninstall file field sources, because it's not compatible to have them at the same time

Old anwser
You could use the FileField Sources module. To browse the server it looks like you need to use this with IMCE. From the FileField Sources project page:
The FileField Sources module expands on this ability by allowing you to
select new or existing files through additional means, including:

    Re-use files by an auto-complete textfield
    Attach server-side files uploaded via FTP
    Transfer files from a remote server (cURL required)
    Select existing files through the IMCE file browser

This question / answer was on another question:
Image Field Browser Option
Comment: Does this work for video and audio?
Comment: I had to upload the file by imce, to get it seen, but there are some patches which can allow file field source + imce to see all file even if not uploaded with imce.
I noticed some patches but patches aint so nice. *EDITED ANSWER*


How to start new word instance without add-ins when word is already started

Question: I am using Word (from 2007 to 2013) to convert documents to PDFA format,
and i'm having trouble with users who have certain add-ins. When they use the system they get an assortment of COM Exceptions like RPC_E_SERVERCALL_RETRYLATER and (0x800706BA) RPC server unavailable.
If they disable the add-ins it works fine. Problem is that the add-ins are required so that simple solution is out the window. (Also I know that using word for this kind of thing is frowned upon, and we are looking into getting something better, but until the business side want's to pay, we are stuck with this)
The new plan is to start word with the /a parameter to make it start without add-ins.
I have seen another question How can I start MS Office Word from .NET without Add-ins?
Where there is a working solution for one instance of Word,
 //startup without plugins
        System.Diagnostics.Process.Start(
            @"Winword.exe",
            @"/a");
        //give a time for startup
        Thread.Sleep(2000);
        //attach to office
        Application officeApplication = (Application)Marshal.GetActiveObject("Word.Application");

My question is two fold: Is it possible to set startup parameters when you start word like this
var _word = new Word.Application();

So I don't have to use Process.start();
And if not, how do I do a late bind to a specific word instance (GetActiveObject(), always gets the oldest word instance), perhaps there is some other method?
Answer: To your first question, there's no way to pass parameters or otherwise influence how Word starts when using the new keyword. The instructions for starting the application are in the Registry, so it would involve changing how the new keyword is implemented in the Registry. And since this Registry entry also determines how Windows Explorer starts the Word.Application, changing the Registry entry would also change the way Word works for the user.
It is possible to unload add-ins after an instance of Word has started via the Application.COMAddins property. This is the equivalent of unchecking the boxes next to the Add-in entries in the COM Add-ins dialog box in the Word UI. I would test whether doing this in the UI allows your software to work properly.
If it does, you can incorporate this in your code - no need to worry about starting Word without the add-ins.
Which brings us to the second question: GetActiveObject is only able to access the single instance of Word (any Office application) registered in the ROT. By design, Office applications register only a single instance in the ROT and usually, this will be the first instance. There are a couple of KB articles on MSDN that describe this. The only work-around is to start two instances of Word in the user profile, "hiding" the first (the registered) one and presenting the second to the user.
But this can be tricky, so if it works, I'd go with the suggestion about the COMAddins collection to unload the problem Add-ins.
(I'm currently on a mobile device. Next time I'm on my main machine I'll try to remember to paste in the links to the KB articles on the ROT.)


How to disable multiarch support?

Question: I don't want to install any i386 package.
Is there any way to disable functionality?
Comment: [How to remove all i386 packages from Ubuntu 64bit?](http://askubuntu.com/questions/113301/how-to-remove-all-i386-packages-from-ubuntu-64bit)
Answer: Since 12.10
dpkg --remove-architecture i386

to get rid of multiarch on an amd64 installation. In case you will have message, like:
dpkg: error: cannot remove architecture 'i386' currently in use by the database

you should remove all i386 packages before:
dpkg -l | grep i386

Comment: With the regex feature of apt-get, you can `apt-get remove .*:i386`
Comment: or: sudo aptitude purge '~i ~ri386'
Answer: 11.10 & 12.04
Multiarch support is enabled by the file /etc/dpkg/dpkg.cfg.d/multiarch
If you rename this file and run an update in a terminal you will notice that the i386 repo's are no longer visible.
Thus
sudo mv /etc/dpkg/dpkg.cfg.d/multiarch /etc/dpkg/dpkg.cfg.d/multiarch.backup

Answer: Based on both Ben's answer and user41220's answer I did the following:
sudo apt-get remove --purge `dpkg --get-selections | grep i386 | awk '{print $1}'`

Then
sudo dpkg --remove-architecture i386

and that worked just fine for me.
Comment: I see no additional information than existing answers.
Answer: First of all, remove all i386-packages like so:
sudo apt-get remove --purge `dpkg --get-selections | grep i386 | awk '{print $1}'`

Please note: Skype, Steam, teamviewer etc. might be purged as well.
Then proceed with fossfreedoms advices.
Comment: This is true for more recent oses. If you put this in as an answer, I'd vote for it (for its simplicity).
Answer: Simpler alternative to remove all packages of that architecture before removing it (source; apt man page):
sudo apt purge .*:i386

If necessary (check with dpkg --print-foreign-architectures) you can remove the architecture from dpkg:
sudo dpkg --remove-architecture i386

Answer: For those who want to disable multiarch support from the get-go, here's a one liner that can be used in (init) scripts...
[ ! $(dpkg --get-selections | grep -q i386) ] && dpkg --remove-architecture i386

This would remove i386 architechture as expected on the first run. On consecutive runs, it'd show the following warning...

dpkg: warning: cannot remove non-foreign architecture 'i386'

This one-liner could be useful in most cloud servers where there are no i386 packages are installed (by default). While this is a Ubuntu forum, here is some detailed info on multiarch from Debian... https://wiki.debian.org/Multiarch/HOWTO .
Other answers recommended dpkg -l to get the list of packages and then grep the result. In my experience, dpkg -l has failed to show some packages (with i386 arch), but dpkg --get-selections showed them clearly marking them as package_name:i386. So, if we want to remove i386 packages previous installed, then to remove them, here's actual command that works...
apt-get remove --purge `dpkg --get-selections | awk '/i386/{print $1}'`

How to disable multiarch support?


Parents bought my house

Question: My parents bought my house with cash when I was going through a divorce, and now I owe them 1/3 of the money back.  What is the best loan option for me to get so I can make one payment back to them?  the house is in their name and I would like that transferred to me as well?  should I now get a home loan and buy it for the lesser amount?
Comment: Be careful. You are implying that the amount paid by your parents did not equal the value of the house at the time. Whether some or all of the value of the house would be considered a gift for tax purposes will depend on specifics relevant to your jurisdiction (which you have not mentioned). In short, if your parents technically own the house outright, and it's worth $300k, then you paying them $100k is not fair compensation for the house. In some cases, that might mean you are receiving a gift worth $200k for taxable income purposes.
Comment: You need to go to the bank and get a mortgage to buy the house.
Comment: house is paid for at 300,000 and I owe them only 100,000...do I buy it from them at 100,000?
Comment: Which country are you in?
Comment: Why do you owe them 1/3 of it back? They paid you and received a house in return - so why do you owe them anything?
Comment: they were giving me 200,000 and anything above that I owed back to them.  They paid for the home so I would have a place to move before my divorce was final.
Answer: Assuming you're in the US, you can buy the house from your parents for $100k with a mortgage, and the excess value (less annual gift limit) will count against your unified federal gift and estate tax exemption. So at $300k value you'd take $172k against your total exemption ($200k value over price paid, less $14k per parent). No gift tax liability on your parents' end, unless the exemption has already been used up.
Comment: Note that your parents would almost certainly have to file a [form 709](https://www.irs.gov/pub/irs-pdf/i709.pdf) with their next tax return.

Parents bought my house


Two switches in one gangbox have a black wire connecting them together. Why?

Question: I am updating a couple of switches that are in the same gang box.  All wires connecting to both of the switches are black.  One switch has three back wires going into it and then on shared shorter black wire (see bottom of picture) connecting to the second switch.  Curious why it is that way and is there another way to wire the two switches safely?
Answer: A typical light is on a circuit which powers many things. You know because they all go out when you switch the breaker off, which of course you do for any work :)
Switches take always-hot from the circuit, and connect (or not) to switched-hot to the lamp.  Switches don't need neutral.
So it is normal for the switched-hot to be a solo wire on the switch that connects to nothing else.  And for always-hot to hop from switch to switch making the rounds.
When wires need to be spliced to each other, there are many ways to do that. Many devices (switches or receptacles) provide a convenience splice block on them.  Electrically it is no different than having pigtails joined in a wire nut, although it saves a wire nut if your boss counts your wire nuts at the end of every day.
Your switches have side screws and backstabs.  Internally, the backstab is connected to the side screw closest to it.  So 1 wire in backstab and 1 wire in the connected side-screw is an efficient (if hokey) way of connecting the 2 wires to each other and also to the switch.
Another is stripping  the insulation 6" from the end of the wire and wrapping it in a U-hook around a side screw so the rest of the wire goes onward to somewhere else.
This could all be replaced with pigtails if you care.
I for one prefer to make my boxes intuitive by marking wires with tape or shrink tube to reflect their functionality.

Native white or gray for neutral (this is mandatory)
black for always-hot (since most wires are both these things)
red for switched-hot for lamp #1
blue for switched-hot for lamp  #2
yellow for switched-hot for lamp #3
yellow in pairs for 3-way travelers
blue for alt travelers, etc.

etc.
Answer: They are using the screw wrong instead of having a proper connection for the wires.
The wire connecting the two switches is a hot wire providing the power for both.
Switch screws should only have one wire under them, two(or bad case more) tends to make the connection not good.
The wires that use the push in connections plus the ones under the screw should use a wire connector(nut or wago) with one short wire to the screw.  Push in connectors do seem to be a source of problems later on in life.
Have three wires at the bottom that are connected together(one in a push in).  Add all three plus a short one to a connector(nut) and short one to the screw.
Top single wire should be removed from the push in and placed under the top screw.
Turn off the breaker and double check for power before touching.


webshare on IIS

Question: We want to offer some file storage capability in our asp.net 3.5 web app and would like users to map a drive to the webshare hosted on our IIS. this will allow users to simply copy files from their systems to the mapped [as a drive] web folder and save them the task of uploading files, etc. Any ideas on how we can implement a webshare capability on IIS 7.0 ?
Answer: I believe you'll require an installation of WebDAV on your IIS server.
Instructions are available on this WebDav tutorial site

webshare on IIS


Extract VU meter value as text from arecord

Question: I want to save a VU meter output (like arecord -V mono -f cd /home/sound) in a file as a simple ASCII table and not as a sound wave. In other words, I need to save VU meter value in dB every second. How can I do that from command line? Or is there other software that can do this instead of arecord? Thanks!!
Answer: You can make a bash shell script which will catch the standard output of the VU meter.
 #!/bin/bash

 # redirect stdout to a text file
 exec &> audio.info

 # use -q so the contents of the text file are only vumeter data

 arecord -q -f cd -V mono test.wav

 # removes extra symbols except percentages,
 # I'm sure this can be consolidated if needed

cat audio.info | sed 's/#//g' | sed 's/ //g' | sed 's/|//g' | sed 's/+//g' | sed 's/[^[:print:]]//g' > new.info

 #resets stdout
 exec &>/dev/tty

percents=$(cat new.info)

max="0";

 #breaks up the values with '%' as the delimiter

 IFS='%' read -ra values <<< $percents

 for i in "${values[@]}"; do

    if [ $i -gt $max ]
    then
        max=$i
    fi
done

echo "maximum amplitude = $max"

The for loop will find the max amplitude during your recording, but you can replace this with

echo $i >> table.txt

Comment: You can apply several `sed` expressions in one call using `sed -e 'expr1' -e 'expr2' etc`.
Comment: this works too:                                                     cat audio.info | grep -o '[0-9]\{2\}%' | tr -d '\n' > new.info


Is water vapour formation possible at -10 degree celcius?

Question: Under any pressure conditions is it possible ? If not then is there no water vapour present in places where temperature drops to -10 degree celcius ?
Comment: Yes it is possible, albeit to a little extent.
Comment: Welcome to Chemistry.SE! Questions are the central focus of this site, but we ask that questions demonstrate an attempt to solve/understand the question to maintain quality.  Please take a minute to look over the [help center](https://chemistry.stackexchange.com/help) and [tour page](https://chemistry.stackexchange.com/tour) to better understand our guidelines and question policies.
Answer: As @Ivan Neretin comments just a little. At $-10$ C the vapour pressure is $\approx 260 $ Pa (Pascal)  where $1\text{ atm} = 101325$ Pa. Even at $-100$ C there is some absolutely minute amount, $0.0014$ Pa.
The reason is that there is still some energy around even at these low temperatures. The chance (probability) that there is enough energy to propel a molecule into the gas phase, decreases, of course, as the temperature falls. It does so very rapidly as it is given by the Boltzmann distribution which decrease exponentially with energy at any fixed temperature.; $prob(E)\sim \exp(-E/(k_BT))$ where $E$ is the energy/ molecule needed to put the molecule into the gas phase and $k_B$ the Boltzmann constant.
Answer: Snowflakes are ice crystals that are formed directly from water vapor present in the air when the ambient temperature is below 0 Celsius. So it is quite common to have water vapor present in the air at below-freezing temperatures. Snow formation occurs on a gigantic scale every day, somewhere in the world.
Sometimes you can observe ice and snow slowly disappear even during a cold snap in winter when temperatures remain below freezing over a long period of time. In this case, the ice sublimes directly into the vapor phase. You could also observe this process in the laboratory on a small scale by placing ice in a vacuum chamber and pumping on it to a high vacuum.


How do you map an X gate to a constant pulse?

Question: I was wondering how to map an X gate to a constant pulse shape. This https://qiskit.org/documentation/tutorials/circuits_advanced/05_pulse_gates.html is the link that I am working off. It shows an example of a Hadamard on a Gaussian pulse and how to do custom gates. I cannot figure out what changes I should make to the code in the Custom gates section of the link that would result in an X gate on a constant pulse shape.
Answer: The pulse shape you specify in Qiskit is the envelop function of the drive, so you will need to set the area under the constant pulse to be the same as the area under the original $X$ gate pulse, which is usually a Gaussian or DRAG pulse.
Specifically, suppose the qubit Hamiltonian is
$$
\hat{H}_d = -\frac{1}{2}\omega_q\hat{\sigma}_z + QV(t)\hat{\sigma}_x,
$$
where $\omega_q$ is the qubit frequency, $V(t)$ is the drive and $Q$ is a constant that has the unit of electric charge. Suppose the drive has the form
$$
V(t) = A(t)\cos(\omega_d t).
$$
with envelop function $A(t)$ and frequency $\omega_d$. If we are driving on resonance, i.e. $\omega_d = \omega_q$, the unitary transformation applied to the qubit from time 0 to $t$ is
$$
\hat{U}_d = \exp\Big(-i\underbrace{\frac{Q}{2}\int_0^t A(t')dt'}_{\Theta(t)} \hat{\sigma}_x\Big).
$$
Using an envelop function such that $\Theta(t) = \pi$ will give us the $X$ gate.
The above is theoretically how you would obtain the $X$ gate. In practice this procedure usually includes sweeping multiple parameters.
Also usually you wouldn't want a constant pulse for your gate because it would contain high-frequency components that lead to excitations to unwanted modes, whereas with a Gaussian pulse you get a relatively narrow excitation bandwidth.
Answer: Following the tutorial, you can change the Gaussian and the add_calibration.
To build a constant pulse shape, there is qiskit.pulse.library.Constant, and for the mapping, change the gate from 'h' to 'x' in circ.add_calibration.
Here's the code:
from qiskit import QuantumCircuit, pulse, transpile
from qiskit.test.mock import FakeValencia
from qiskit.pulse.library import Constant
backend = FakeValencia()

# build a simple circuit that only contain one x gate and measurement
circ = QuantumCircuit(1, 1)
circ.x(0)
circ.measure(0, 0)
with pulse.build(backend) as my_schedule:
    pulse.play(Constant(duration=10, amp=0.1), pulse.drive_channel(0)) # build the constant pulse

circ.add_calibration('x', [0], my_schedule) # map x gate in qubit 0 to my_schedule
circ = transpile(circ, backend)
circ.draw('mpl', idle_wires=False)

Comment: Thank for your help. Do you know if there is any way to verify the output of the X gate?
Comment: Sorry, I don't quite understand. Maybe you can try asking that in new question so the others can help. Cheers.


How would Gauss' law hold in time varying electric fields?

Question: Let's say we have a cube of side length $a$ as a Gaussian surface in an electric field (in vacuum) and then we raise the strength of the electric field. As I understand, this rise in the field strength would travel through the field at the speed of light. This means that for a duration of $\frac{a}{c}$, the field strength, and thus the flux, would differ at the 2 opposing faces of the cube. This implies that the flux through the surface is non-zero and thus the charge inside it must also be non-zero by Gauss' Law. How is this possible?
Comment: Does this answer your question? [Do the integral forms of Maxwell's Equations have limited applicability because of retardation?](https://physics.stackexchange.com/q/162744/)
Comment: What do you mean, physically, by "raise the strength of the electric field"? Not all changes are physically possible, and those that are obey the laws of EM
Answer: As the field begins to rise at one place, it must also be doing related things at other places. To get an intuition about this, try sketching field lines on a piece of paper. The equation $\nabla \cdot {\bf E} = 0$ (for a charge-free region) implies that the lines, when drawn in 3-dimensional space, have to be continuous. The spacing between the lines indicates the field strength. If you have a field that is weaker at one place than at another, then when moving from the weaker to the stronger field region the field lines have to curve in a bit, to end up closer together where the field is stronger. When you count the lines going into and out of a given volume (this is what indicates the total flux through the surface) you find, at each instant of time, that as many lines go in as come out.
The overall conclusion is that the field at one place cannot grow larger without this kind of modification of the field at nearby places. Using the cube you described as a Gaussian surface, if the field is initially uniform then initially there is no flux in or out through the sides of the cube that are parallel to the field. But if the field subsequently becomes larger at one end of the cube than the other, then there must now be a flux across those sides.
For further clarity, for electric fields $\nabla \cdot {\bf E} = 0$ always holds in charge-free regions, and it follows that
$$
\oint {\bf E} \cdot d{\bf S} = 0
$$
for charge-free regions, and this equation is correct and exact at all times, including for time-varying fields. The fact that changes at one place don't immediately propagate to places a finite distance away is all accounted for correctly. As those changes propagate, $\nabla \cdot {\bf E}$ remains equal to zero at each and every local region at each and every moment, and therefore its integral over a charge-free volume of any shape or size also remains zero.
In the following three diagrams the rectangle is a Gaussian cylinder and the lines are electric field lines. The field has higher strength on the right than on the left. The diagrams show a change in the field propagating from left to right. The flux through any given edge of the rectangle is equal to the number of field lines crossing that edge.
Comment: Professor Steane, I too, have serious doubts about your answer, as @PhilipWood did. In time varying fields, we can use Jefimenko's equations to calculate electric and magnetic fields at every point at any time. The fields need not follow Gauss's law in its integration form.  Your intuitive thinking (I think based on Purcell's approach with the field lines) may not be correct. Purcell used it without proof in his book.
Comment: There is a problem with this argument. Suppose some charge is initially at rest at the origin, and starts accelerating at time $t = 0$. The disturbance in the electric field propagates as a spherical wave centered at $O$ with radius $ct$. Assume the box is centered on the $z$ axis with its bottom face parallel to the $xy$ plane, at distance $d$ from $O$. Then for $d < ct < \sqrt{d^2 + a^2/4}$, the disturbance only reaches the bottom face, so the flux on the other faces cannot change yet. One needs to consider the shape of the electric field from the Liénard-Wiechert formulas.
Comment: Moreover, if the charge starts accelerating along the $z$-axis, then the field must be rotationally symmetric around the $z$-axis, so there won't even be any cancellation on the surface itself.
Comment: @BlueRaja-DannyPflughoeft The diagrams show a wave front propagating from left to right. It could, for example, be part of the spherical wave indicated in the answer to which you provide a link, when that spherical wave has propagated out to a large size. The only difference is the direction of travel. I hope you will either argue back or else correct your comment.
Comment: @BlueRaja-DannyPflughoeft (i) My diagram should not be completed in 3D in the way you suggest. (ii) Drawing continuous field lines in 3D is sufficient to ensure the field thus indicated (with the usual convention that line density represents strength of field) has zero divergence.
Comment: No. The answer I had doubts about is my own; I couldn't reconcile it with the Divergence theorem.
Comment: Sorry @PhilipWood. I have assumed too much about your comment. This problem has been with me for very long time.
Comment: No problem. It was slightly eccentric of me to make a sceptical comment about my own post, but I intended it as a health warning.
Comment: Now I think my comment is incorrect and your answer is correct. So Purcell's method must also be valid.
Comment: I think this means that there are constraints in how exactly the electric field is "allowed" to change, and these must be taken into account to avoid otherwise unphysical results. Another similar scenario would be if a point charge suddenly pops into existence at the origin at time $t = 0$. Its electric field would propagate as a spherical wave and clearly the divergence will be nonzero right on the wavefronts. Gauss' law then predicts an expanding shell of negative charge, which would be consistent with charge conservation.
Comment: @AndrewSteane So to clarify, the reasoning here is that the divergence remains 0 at all points as the changes propagate? But from what I understand, Gauss' Law puts no restriction on the location of our surface and so we may very well assume a surface where the wavefront of the changed field is passing through the middle of the cube. So while it is still valid at points on either side of the wavefront, the flux should be different at 2 opposing faces of the cube. So, in conclusion, I still don't understand how this would work, and a clarification would be really appreciated.
Comment: This answer is wrong. In order for the fields to behave as shown in the diagram in all directions, the new field must have more field lines than the old one, causing nonzero divergence where they are created. The correct answer is [here](https://physics.stackexchange.com/a/566210/175)
Comment: Imagine pausing time and traveling in a giant circle around the spherical wavefront. Without transverse waves, the field must look the same as your diagram, just rotated, in every direction. But in order for the field lines to get closer together like that _in every direction_, there must be more total field lines outside the sphere than inside it, which is a contradiction to Gauss's Law. Hence, if we assume Gauss's Law is always correct, the field lines _cannot_ behave as described here.
Answer: The Maxwell equation that is said to embody Gauss's law for electric fields, namely
$$\nabla.\mathbf E=\frac{\rho}{\epsilon_0}$$
holds at every instant. That's alright even if the field changes with time, because it is a local equation, applying at a point.
However the same need not be the case for the integrated version (arguably Gauss's law itself):
$$\int_S \mathbf E.d\mathbf S=\Sigma Q$$
in which $\Sigma Q$ is the total charge in the volume bounded by surface S. This volume is finite, and, as you say, changes in field strength at one boundary couldn't propagate instantaneously to other parts of the boundary. This integrated version is strictly for electrostatics. The Maxwell version is more general, applying at any point at any time, even if charges are moving and fields are changing.
Comment: @ verdelite No, I have serious doubts about my own answer!
Comment: I have serious doubts about this answer. Surely the Divergence theorem (Gauss's theorem) applies at any instant, so if the Maxwell equation applies at any instant, whether or not fields are changing, so must the integrated version.
Comment: This answer is, as you suspect, quite wrong! The divergence theorem is a mathematical theorem, its validity has nothing to do with the physics of the vector fields it's applied to.
Comment: Did you intend to comment on the answer by @AndrewSteane ? Your answer I think is correct and you surely did not have serious doubts about your own answer.
Comment: Thanks for your comment; I added a paragraph to my answer. I think that your answer is wrong when you say "this integrated version is strictly for electrostatics" and therefore the thrust of your answer is wrong. I would be interested to know if, on reflection, you agree.
Comment: @knzhou That's why I think I must be wrong!
Comment: @Andrew Steane. I'm now pretty convinced that I'm wrong, but I'm still worried by the original question. I'm imagining a positive charge being moved towards one face of a large empty Gaussian box, and don't understand how the flux leaving through distant parts of its surface can keep exact pace with the additional flux entering the 'near' face. No doubt I'll suddenly see where I'm going wrong.
Comment: Maybe take a look at the diagrams I added to my answer.
Answer: Any disturbance in an electric field presumably propagates at the speed of light. Therefor a Gaussian surface some distance out, will lag in reflecting any changes in the enclosed charge.


Does an inductor stretch or compress when a current is passed through it?

Question: If an inductor is given to you and it is connected across a battery without any resistance in the circuit,then will the inductor stretch,compress or remain the same length?
Comment: There is an interesting analogy between stretching a coil connected across a battery and (slowly) pulling further apart the two plates of a parallel plate capacitor, connected across a battery. The virtual work approach plays out rather similarly in the two cases.
Answer: A solenoid carrying a current compresses. This is because the field lines start to 'splay out' 'before' the geometrical ends of the solenoid, so there is a motor effect (Laplace) force on the end turns of the solenoid that acts parallel to the axis towards the centre of the solenoid.
To understand this better, assume a particular sense of current in the solenoid. Use the right hand grip rule to get the direction of the field lines through the solenoid. Consider now the North end of the solenoid, that is the end from which the lines emerge. But because the lines splay out; there is a field component, $B_r$,  radially outward from the axis. Now apply $\mathbf {dF} = I \mathbf {dl}\times B_r \mathbf {\hat r}$ (or Fleming's left hand motor rule) to any part of any of the end turns. You should find a force parallel to the axis towards the solenoid's centre. Now consider the South end.
So the ends of the solenoid experience forces towards the solenoid centre, tending to compress the whole solenoid, just as if we used our hands to push the two ends of a spring towards each other.
Suppose now that we broke the solenoid somewhere in the middle and separated the two 'halves', maintaining the current in each. Both halves would still be 'long solenoids' and the newly formed ends would behave qualitatively and quantitatively just like the original ends.
Magnitude of the force: (a) Developing the previous qualitative argument
Let $A$ and $l$ be the cross-sectional area and length of the solenoid and $n$ be the number of turns.
The axial force on a slice, $dl$, of the solenoid (containing $\tfrac nl dl$ turns) near an end is
$$dF\ \ =\ \ B_rI\ 2\pi r \frac nl dl\ \ =\ \ \frac{d\Phi_{esc}}{2\pi r\ dl}I\ 2\pi r \frac nl dl\ \ \ =\ \ I \frac nl d\Phi_{esc} $$
in which $d\Phi_{esc}$ is the flux escaping through area $2\pi r\ dl$ of the curved surface of the solenoid. Integrating, we find that the total force on the end region is
$$F=I \frac nl \Phi_{esc} = I \frac nl \tfrac12 \Phi.$$
Here, $\Phi_{esc}$ is the total flux escaping through the sides of the end-region. This is half the main flux, $\Phi$, that is the flux through any cross-section, $A$, of the solenoid except near the ends. [We know this because half the flux density at A must be due to the 'half' solenoid to one side of $A$, and the other half to the other. Therefore the flux emerging from the geometric end of  a long solenoid must be $\tfrac12\Phi$, and so $\Phi_{esc}=\Phi-\tfrac12\Phi$]
Using Ampère's rule
$$\Phi =\mu_0 \frac nl I A$$
The magnitude of the compressive force is therefore
$$F=\tfrac12 \mu_0 A \left(\frac nl \right)^2 I^2.$$
This can be neatly recast in terms of the solenoid inductance, $L$, or the energy stored in it:
$$F= \left.\tfrac12 L I^2 \middle/l \right.$$
Magnitude of the force: (b) Virtual Work approach
We consider what happens when we increase the solenoid length by $\Delta l$ at constant current.
The flux $\Phi$ decreases because
$$\Phi=\mu_0 \frac nl I A \ \ \ \ \text{so} \ \ \ \ \ \frac{\partial \Phi}{\partial l}=-\mu_0 \frac {n}{l^2} I A$$
To first order
$$\Delta \Phi = -\mu_0 \frac{n}{l^2} IA \Delta l.$$
The energy stored in the solenoid's field is
$$U=\tfrac 12 L I^2 =\tfrac 12 \frac{n\Phi}{I}I^2=\tfrac 12 nI \Phi$$
So on stretching the solenoid by $\Delta l$,
$$\Delta U =\tfrac12 n I \Delta \Phi=-\tfrac12 \mu_0 \left(\frac nl \right)^2 A I^2 \Delta l.$$
However, changing the flux produces an electric field that does work, $W_{elec}$. We calculate $W_{elec}$ using the emf $\mathscr E(t)$ induced in the time $\Delta t$ that the flux changes by $\Delta \Phi$:
$$W_{elec}=\int_0 ^{\Delta t} \mathscr E I dt = I\int_0 ^{\Delta t} -n \frac{d\Phi}{dt}dt =-I n\Delta \Phi =+\mu_0 \left(\frac nl \right)^2 A I^2\Delta l.$$
[The induced emf is in the same sense as the external emf, $\mathscr E_{ext}$ that has been driving current through the solenoid, thereby increasing the current and opposing the decrease in flux due to the stretching. But we claimed that we were holding the current constant! It suffices simply to have $\mathscr E_{ext}>>\mathscr E_{int}$, with a suitable circuit resistance. The extra electrical work results in extra heating of this resistance.]
To recap: electrical work of amount $+\mu_0 \left(\frac nl \right)^2 A I^2 \Delta l$ has been done when the flux changes, but the solenoid's field has lost only half this energy. Therefore the missing $\tfrac 12 \mu_0 \left(\frac nl \right)^2 A I^2 \Delta l$ needed fully to fund the electrical work must be mechanical work put in when the coil is stretched by $\Delta l$.
Therefore
$$F \Delta l =\tfrac 12 \mu_0 \left(\frac nl \right)^2 A I^2 \Delta l$$
So
$$F=\tfrac 12 \mu_0 \left(\frac nl \right)^2 A I^2$$
Answer: Due to the Lorentz force parallel currents
attract each other, and antiparallel currents
repel each other
(see also "Magnetic force between wires").
In a current-carrying solenoid the currents through the
wire are parallel, and that is why the wires
are compressed.

Now let's make it quantitative and actually calculate the compressive force.
For simplicity we consider a solenoid coil (with $n$ turns,
length $l$, cross section area $A$).
For a very long solenoid (i.e. $l^2 \gg A$)
the magnetic field is nearly homogenous inside the coil,
and nearly zero outside. The magnetic field strength inside the coil is
$$B=\mu_0\frac{nI}{l}. \tag{1}$$
The energy density of the magnetic field is
$$u=\frac{1}{2\mu_0}B^2, \tag{2}$$
and hence the total magnetic energy
(within the whole cylindrical volume $V=Al$) is $$E=u Al. \tag{3}$$
Now let's pull the coil apart between two neighboring turns
by a small distance $\Delta l$.
The magnetic field $B$ in this newly added volume ($\Delta V=A\ \Delta l$) will be
nearly equal to the magnetic field in the other parts of the cylinder.
Hence the total field energy will increase by the amount
$$\Delta E=u A\ \Delta l. \tag{4}$$
On the other hand, by pulling with a force $F$
(compensating the magnetic compressive force) we do mechanical work
$\Delta E=F\ \Delta l. \tag{5}$
By the conservation of energy (4) and (5) must be equal, and we get the force
$$F=u A \tag{6}$$
and by inserting (1) and (2) we finally get
$$F=\frac{1}{2}\mu_0\left(\frac{nI}{l}\right)^2A \tag{7}$$
which (by no surprise) is the same result
as given in the answer by @PhilipWood.
Comment: I have difficulties with this approach. Consider a turn near the middle of the solenoid. At any point on this turn its neighbouring turns give equal and opposite fields, so there is no force on it.
Comment: @PhilipWood What if you consider the entire force on one turn though?
Comment: @BioPhysicist  I'd have thought that, parallel to the axis, it was zero (away from the ends of the solenoid). By symmetry it must zero on the middle turn itself, but that's not what my claim rests on.
Comment: @BioPhysicist I have to confess that I'm uneasy about my own argument. I'm comparing two set-ups: (a) a array of parallel equally spaced wires in the same plane and all carrying the same current, so  we could represent them in section on paper by a line of crosses (current into paper) and (b) a line of atoms spaced further apart than their equilibrium separations. In (b) an atom near the middle of the chain will experience no net force, yet the chain is under tension because there are attractive forces between neighbouring atoms. CONTINUED
Comment: @BioPhysicist CONTINUATION In (a) I've been arguing that a wire near the middle of the array won't even experience forces because the fields from neighbouring (and near neighbouring) atoms on either side cancel. I'm uneasy about this; I'm not sure that the distinction between fields cancelling and forces cancelling can really lead to different physical consequences. I think the solution is along these lines: cut the long solenoid in the middle, and we get a new end, to which we can apply the argument I gave in my answer! I think I'm saying that Thomas's approach and mine are equivalent!
Comment: @Thomas Fritsch  I love your derivation. So elegant! Mine (which I've now added to my answer) is less sophisticated and less elegant, but it's so satisfying to see how such different approaches lead to the same result.
Comment: @Thomas Fritsch I'm sorry, but I think I've found a flaw in your argument. The energy stored in the solenoid goes DOWN when you stretch it. This is because the decrease in energy density has a bigger effect than the increase in volume. To make your argument work, I think you've got to take account of the ELECTRICAL energy flow due to the induced emf when you change the flux linkage. I can confirm that; it does work with that modification.
Comment: @PhilipWood I think I can't follow you.
When you don't apply a manual force, then the system "wants" to go into a state of lowest total energy, i.e. to a coil with smaller length.
Or saying the other way round: You need to pull to make the coil longer.
Comment: The energy stored in the solenoid's field is $$U=ulA=\frac{1}{2\mu_0}B^2 lA=\frac{1}{2\mu_0}\left(\mu_0 \frac nl I \right)^2 lA =\tfrac 12 \mu_0 n^2 A I^2 \frac 1l$$ so $$\frac{dU}{dl} =-\tfrac 12 \mu_0 n^2 A I^2 \frac {1}{l^2}$$

So the stored energy goes down when  is increased.
Comment: @Thomas Fritsch But you can save your argument by considering the electrical work due to the emf induced when the flux decreases. The flux decreases because the flux density goes down when the coil is stretched. Sorry about the missing $\frac 12$ in the previous comment. Now corrected!
Comment: @Thomas Fritsch  I'm sorry that I didn't make myself clear in my last few comments. I've explained myself in detail in an addition to my own answer.


Get Job step run for all jobs and job steps using TSQL

Question: I was wondering if there is an easy way to check the "Run as" value for each job step using TSQL code instead of opening every job on the server and each individual step? I cannot figure out where to get this data from and I have scoured the MSDB in search of this but cant find anything in the sysjobs and related tables? SQL has to store this value somewhere. The question is where?
Comment: I think the OP is asking for the Proxy account used for each step, not the job owners.
Comment: Does this help,i dont have acces to check currently..
Comment: select suser_sname(owner_sid) from msdb.dbo.sysjobs
Answer: This should get you close, if NULL for ProxyName then it's using the SQL Server Agent credentials.
<code>USE msdb

SELECT J.job_id
    , J.name
    , S.step_name
    , S.step_id
    , P.name AS ProxyName
    , SP.name AS CredentialUserName
    , SP.type_desc AS CredentialUserType
FROM msdb.dbo.sysjobs J
    INNER JOIN msdb.dbo.sysjobsteps S ON S.job_id = J.job_id
    LEFT OUTER JOIN msdb.dbo.sysproxies P ON P.proxy_id = S.proxy_id
    LEFT OUTER JOIN sys.server_principals SP ON SP.sid = P.user_sid
</code>


Chrome cannot download files from network path

Question: I am trying to download a file from network path and Chrome Dev Tools shows 200 for the request but the file does not download (nothing happens on the webpage). When I tried to open the link in new tab it says about:blank#blocked. The file downloads fine in IE/Edge. I think there is a Chrome setting somewhere which I have to disable. I have enabled Flash, 'Safe Browsing' and 'Popup and redirect' options still no luck. Can someone please help me? Thanks.
Answer: I had the same problem. I could fix it with an extension from chrome webstore "Enable local file links" https://chrome.google.com/webstore/detail/enable-local-file-links/nikfmfgobenbhmocjaaboihbeocackld


Equalizer for Toshiba Satellite Pro Laptop (Windows 7) (has Realtek sound)

Question: I've been trying to find a way to have a real equalizer for my Toshiba Satellite Pro Laptop.  I don't know much about computers but the guys in the store seem to know less than I do! From what I've been able to glean through friends, Windows 7 no longer supports a real equalizer function with Realtek, and the result is a fake "equalizer" that does nothing.  I have hearing issues so not being able properly adjust the higher frequencies is causing me physical pain and ringing in my ears.  I've tried to decipher the threads I find online but am quite confused by them.  Basically I need an equalizer that will work with Windows 7 (with everything, internet, skype, music, etc).  The current drivers offered by Realtek do nothing except make the sound inaudible.  The one that may possibly work and provide an actual equalizer is a few versions back and can't be found anywhere.  Thanks! And sorry if this is a duplicate question but I am confused a bit by the threads online.
Answer: Breakaway Audio Enhancer may be the answer. It's not free ($30) but does have a 30 day demo so you can test it out.

Breakaway Audio Enhancer dramatically improves the audio experience
  for all PC users with the same technology as pros in the music
  business use to clarify and control your computer audio. Breakaway
  Audio Enhancer provides complete audio control over music, videos, web
  browsers, and games. Screaming web ads impale speakers, Hulu videos
  require cranking the volume up, and every media player makes favorite
  CD's sound different but Breakaway Audio Enhancer changes all that.
  Audio from any source sounds professionally mixed with the Audio
  Enhancer's automatic adjustment of volume dynamics and equalization.
Answer: I have a Toshiba Laptop and I was trying to accomplish the same thing with my speakers. I went into the control panel and clicked on the "more options" icon and it brought up a SmartAudio icon which had a terrific equalizer for my speakers!
I hope this helped you!
Answer: For a quick fix, you can go to the "sound" window in the control panel and change the settings accordingly in your speakers properties. Granted it's not quite the same has having a full-on equalizer, but it may do the trick.
Answer: I found a solution to your problem. I have the same problem you have and I managed to fix it. What you want to do is go into your "Smart Audio" control panel and once that's opened, you will see a few tabs on the bottom. Click on the Large Speaker Equalization icon. (It should say "SmartEQ / 3D Settings") Now, once you're on that screen, you will see 7 small icons for tweaking..Select the "VOIP" icon and close that window. You should now hear the difference in sound.


"May I come in?" is misleading?

Question: Yesterday I saw a lesson of English on TV. The teacher asked to some people to translate (from Italian) some expression. One is: "What can you say to a person to invite him into your office?" and lot of people answer: "Can you come in my office?". The teacher said that it is wrong, because it sound like an erotic invite and the correct sentence is "Can you come to/into my office?" Is it correct? Because here: What do I have to say when I enter into a house? someone answer me to say "May I come in?". Is it misleading?
Answer: "Come in" is the right translation of entrare.
But with a location it would normally suggest movement from one place to another. English doesn't really use cases to communicate this, so we use prepositions like into and out of to indicate movement. Therefore "come into my office" would be correct.
"Come in my office" suggests an action which takes place entirely inside the office - the sense of entering is lost - so it's easy for someone with a vulgar mind to think of the ... sexual meaning of the verb "come".  The true meaning would still be understood,  but saying/writing it this way might produce sniggering from teenage boys.
Comment: Yes. The use of prepositions is one of the most idiosyncratic parts of English (and other languages). I have experience of French writers who clearly did not grasp the difference between "in" and "into" in English (my guess is that they had been taught that "in" means "dans" and "into" means "en", but I may be wrong). But as njd implies, "come in" is an intransitive phrasal verb with its own structure. "Come into" is not a phrasal verb (except in the specialised sense of "inherit"), so "come into my office" parses as "come [into my office]".
Answer: "Can you come in my office" does not sound like an erotic invitation. The problem with that sentence is that "come" is being used as a verb of motion with respect to "my office", so you need a preposition that refers to motion, rather than "in" which refers to being static.
"May I come in?" is different because although the action is literally the same, there is no (stated) object to pass "into" - instead once one has "come", one will be "in". (And for the foreign reader, that last sentence does sound like cheap innuendo).
Answer: "Come into" and "come to" are better than "come in" because they convey transition (from outside to inside).  As njd said, "come in" is inviting snickering from teen boys.
The other aspect of your question is "can" versus "may".  "Can" is about ability while "may" is about permission, so "can you come" (are you able to come) and "may I come" (do I have permission to come) are the right forms there.  When asking someone else to meet/join you, you may also see "will you" (are you agreeable to this).
I suggest avoiding "can I come in?", which will prompt the smart-alecks to say "I don't know, can you?" -- that is, are you capable of doing so?
Comment: Technically it is true that one should use "*may*" instead of "*can*" to ask permission; but most native English speakers get this wrong too, and they normally say "*Can I ...*" (or "*Could I ...*" if being more polite).
Comment: "Could" is a good alternative.  As you say, lots of native speakers say "can" and are understood.  If you're not thinking about it, you'll say whatever comes out; wiso is obviously thinking about it, so may as well try to avoid "can". :-)
Comment: @njd: Or to put it another way, some time ago some pedagogues arbitrarily decided that we shouldn't say "can I" for permission and started bullying children into speaking their way rather than ordinary English. ;-)

"May I come in?" is misleading?


How can pre-main sequence stars radiate more energy than main-sequence stars?

Question: How can a pre-main sequence star radiate more energy by gravitational contraction than a main-sequence star can by hydrogen fusion?
Answer:
Although pre-main sequence stars have lower temperature, they are essentially huge clouds of gas, often as large as 1 pc wide. The luminousity being proportional to square of the radius is essentially large for pre-main sequence stars.
Plus, the problem with gravitational contraction is not the amount of energy that can be generated per second. That can actually be larger than that produced from fusion if you insist on really massive objects. The logic, when we ruled out gravitational contraction as a source of energy for Sun, was that gravitational contraction cannot sustain it for long. Geologists knew from their dating science that Sun had to be older than grav. contraction accounts for.
Thus, admit it. Gravitational contraction makes pre-main sequence stars radiate more energy than main sequence starts, but that's just luminousity and not really energy.
Luminousity is energy per second.
Answer: The luminosity of a PMS star is provided by the rate of change of gravitational potential energy as it contracts.
Since PMS stars contract along Hayashi tracks at almost constant effective temperature, their luminosities decrease considerably with time as their surface area diminishes. However, the virial theorem tells us, that the core temperature of the PMS star must increase, roughly as the reciprocal of the radius. Ultimately, this leads to the ignition of hydrogen, but the rate of nuclear burning only ramps up to be equivalent to the luminosity at that point. Therefore the luminosity of a main sequence star is generally$^1$ lower than during the majority of the PMS phase for a star of the same mass.
$^1$ This is not always true. There can be a brief phase of constant or slightly increasing luminosity just prior to hydrogen ignition that is caused by the development of a radiative core - called the Henyey track.


Relation between chords length and radius of circle

Question: Two chords of a circle, of lengths $2a$ and $2b$ are mutually perpendicular. If the distance of the point at which the chords intersect,from the centre of the circle is $c$($c<$radius of the circle),then find out the radius of the circle in terms of $a,b$ and $c$.Show some short-cut to do it quickly
Answer: Another similar approach may be arisen as following: ${}{}{}{}{}{}{}{}{}{}{}{}{}{}{}$
Comment: I got it but can't I solve without incorporating axis system?
Comment: @iostream007: I did it without Calculus. I made $xy$ axes just to make the solution better. You can remove it easily. Just know that two chords are perpendicular to diameters of the circle and so the diameter bisect them to $a=AH$ and $b=DL$ respectively.
Comment: @iostream007: $a^2+b^2+c^2=2r^2$
Comment: nice work, dear friend! $\;\;+\;\left(\lim_{n\to\infty} \sqrt[\Large n]{n}\right)\;\;$
Answer: Let $a'$, $b'$ be the lengths of the perpendiculars from $M$ to the chord of length $2a$, resp. $2b$. Then
$$c^2=a'^2+b'^2=(r^2-a^2)+(r^2-b^2)\ ,$$
from which we obtain
$$r=\sqrt{a^2+b^2+c^2\over2}\ .$$
Answer: Draw a circle through c.  Let's suppose the chords are parallel to the x and y axis, and that the points a and b lie on some large circle, and the lines $x=a$ and $y=b$ cross at $A, B$
We then have the equation that $A^2+B^2=C^2$ for the crossing, which gives these lines, and thence $A^2 + b^2 = a^2 + B^2 = R^2$,  which leads to the equation $a^2+b^2+c^2 = 2R^2$.
Answer:   $R^2 = (a^2+b^2+c^2)/2$
Comment: How t0 do it for general case?
Comment: @isostream007.  It is a general case.  One should note that we simply set the coordinates up to simplify the coordinates.  The coordinates where the chords strike the sphere is at $A, b$ and $a,B$, and the lines cross at $A,B$ at distance $c$.  Because we know that $A^2+b^2 = a^2 + B^2 = R^2$, and $A^2+B^2=C^2$, the sum of the first two LHS, with the third substituted of the second reduces the value of R directly in terms of a, b, c.
Comment: The relationship of this equation is identical to that of a a tetrahedron, whose opposite sides are equal.
Answer: Let $P$ be the point where the two chords (and a diameter) meet. Let $h$ (and $k$) be the distance from $P$ to the midpoint of the $2a$ chord (respectively, the $2b$ chord); that is, say $P$ divides the chord into sub-segments of length $a+h$ and $a-h$ (respectively, $b+k$ and $b-k$). Note that $P$ divides a diameter into sub-segments of length $r+c$ and $r-c$ (where $r$ is the radius of the circle); note also that $c$ is the hypotenuse of a right triangle with legs $h$ and $k$: so, $c^2 = h^2 + k^2$.
The Power of a Point principle says that every chord through a particular point of a circle is divided into sub-segments such that the product of the lengths of those sub-segments is a constant (the so-called "power" of the point in question). Thus,
$$(a+h)(a-h) = (b+k)(b-k) = (r+c)(r-c)$$
More succinctly,
$$a^2 - h^2 \;\;=\;\; b^2 - k^2 \;\;=\;\; r^2 - c^2$$
With an eye towards combining an $h^2$ with a $k^2$, I'll add the left-hand and "middle-hand" sides together; their sum is necessarily twice the right-hand side:
$$\begin{align}
( a^2 - h^2 ) + ( b^2 - k^2 ) &= 2 (r^2 - c^2) \\
\implies a^2 + b^2 - ( h^2 + k^2 ) &= 2 r^2 - 2 c^2 \\
\implies a^2 + b^2 - c^2 &= 2 r^2 - 2 c^2 \\
\implies a^2 + b^2 + c^2 &= 2 r^2
\end{align}$$


HD Transfer Rate going down

Question: So I want to copy a 97,9GB folder to another folder and started with a high transfer rate and an estimated time of about 30 minutes. As the fdsr continues to copy the transfer rate goes down. Its at about 5Mb/Sec now and the estimated time raised to 5 Hours. The Rate is still dropping (while I wrote this its at 4,3Mb/s already)
how can I avoid this and copy the folder at a consistent high transfer rate? I am using ubuntu
Comment: Are you sure you mean Mb/sec instead of MB/sec? How many files, and specifically how many small files do you have? Have you tried tarring up the source folder, transferring the tar file, and untarring on the destination side?
Comment: Yes its MB/second and there are about 500,000 Files to be copied. I figured out that copying everything in small portions results in a faster total time. I am still Interested why this is happening.
Answer: In general, it is much faster to copy larger files than many smaller files. When transferring a single large file, your copy time is dominated by transfer speed. When copying many small files, your time is dominated by file creation.
You could probably speed things up by tarring up your source folder and transferring the tar file, but note if you have 500,000 files to transfer, you'll have to pay the cost of all that metadata creation sooner or later.
You may also find different file systems are more or less costly. https://unix.stackexchange.com/questions/28756/what-is-the-most-high-performance-linux-filesystem-for-storing-a-lot-of-small-fi is quite old now, but includes a comparison. Additionally, you may choose different mount options for your filesystem, as some of these can make a significant difference. For example, on ext4, you may wish to investigate noatime,nodiratime,relatime,barrier=0,commit=30

HD Transfer Rate going down


Extract approximation and detail coefficients

Question: I am a student and would like to know how to extract the approximation and detail coefficients (A5, D5, D4, D3, D2 and D1) after an applied DWT decomposition dB5 (Daubechies 5, level = 5)?
Answer: This sounds quite doable, reading the online documentation, for instance:
Multilevel DWT, IDWT and SWT, by adapting the example given:
>>> import pywt
>>> x = [3, 7, 1, 1, -2, 5, 4, 6]
>>> db1 = pywt.Wavelet('db1')
>>> cA3, cD3, cD2, cD1 = pywt.wavedec(x, db1)
>>> print(cA3)
[ 8.83883476]
>>> print(cD3)
[-0.35355339]
>>> print(cD2)
[ 4.  -3.5]
>>> print(cD1)
[-2.82842712  0.         -4.94974747 -1.41421356]

Answer: How do you get the rest of the approximation coefficients?
The pywt.wavelt only gives the highest level of the approximation coefficients (if level is set to 5 we only get cA5) as far as I understood.
Comment: This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://dsp.stackexchange.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://dsp.stackexchange.com/help/whats-reputation), you can also [add a bounty](https://dsp.stackexchange.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/51174)


make multiple addresses and send from one address to the other

Question: I have a node, and I use GetNewAddress to generate a new receiving address. is it possible to transfer what's in that address to one of the other addresses I have created using GetNewAddress? Each address appears to have an "amount" property. so i assume each address has a balance. so i want to send what's in address A, over to Address B, but from the same wallet.  How would I go about doing this with RPC calls? Forgive me if I don't make sense I am still learning Bitcoin RPC. Thanks so much.
Answer: I would try Rawtransactions RPC calls such as createrawtransaction, fundrawtransaction and sendrawtransaction


There are Few Accepted Answers

Question: It seems that very answers are accepted here. Are the answers all that bad or do the OP's just not care to accept?
Comment: Wouldn't that depend on the question & answers?
Comment: It does, but overall very few here are accepted is all I'm saying.
Answer: I don't think Dan is asking for a central authority to mark questions as answered; he's just observing that people don't do it here.
Stack Exchange sites work better when users accept questions. It helps future readers be confident that answers are correct, it rewards answerers with more reputation points, and it's generally a sign of a healthy community.
I haven't looked. There's a good chance that most of the questions with good answers that haven't been accepted were posed by people without much investment in this community. Still, a little consideration about how to encourage more askers to accept a solid answer would be worthwhile.
Comment: Thanks Joe. Exactly.
Answer: I feel that people not voting enough is a bigger problem. After all, an accept mark does not bring much value to visitors, if answers are already correctly ordered by votes.
So, no accept is not a big problem.
Actually, accepting an answer too early might lead to situations where the accepted answer is outdated (example on StackOverflow). This is especially true for data requests, which is a domain in which the value of answers might change very fast, as old datasets get outdated and new datasets appear often.
Comment: why would answers be correctly ordered by votes? i've found plenty of gems in the lesser voted answers...
Comment: @albert: In such cases, please upvote them :-) If everyone think they are gems, they will raise to the top!
Answer: The answers on Stack Exchange are not accepted by a central authority. Anyone can post a question or answer directly. Sometimes, questions or answers are flagged by members of the Open Data Stack Exchange community for either positive or negative reasons. For example, members can vote an answer or question up or down, mark as a favorite, or provide a comment.
If there's an issue with the question or answer, any member can flag that item for moderation or removal, vote it down, add a comment, or make an edit. There are three moderators (currently these are Joe, Patrick Hoefler, and myself). We are prompted to look at the first post by a new member or an item that a member has flagged for moderation and address it.
In looking at the metrics since we started, 9 posts have been deleted out of a total of 247 questions. About half of those were deleted by Stack Exchange employees helping us get started and setting the rules of the road.
If you have an issue with a post that has been deleted, please feel free to contact any group moderator for a better resolution. I am personally always happy to help out.
Comment: See [Joe's answer](http://meta.opendata.stackexchange.com/a/141/215). I wasn't looking for a central authority. I'm very familiar with how SE works. I just was making an observation.

There are Few Accepted Answers


How to play a PCM file on an UNIX system?

Question: I'm trying to figure out how to use libmad with C. The trouble is, libmad converts audio files to .pcm files and I'm unable to find a way to play these files. There is no straightforward .pcm player, and Audacity crashes every time I try to open the pcm file with it. Does any one have any experience with this? I'm open to converting these pcm files to wav files or some other format, but again there's no straightforward way to do this (at least I haven't found one).
Answer: `ffplay
Tested on Ubuntu Linux 15.10:
sudo apt-get install ffmpeg
ffplay -autoexit -f u16be -ar 44100 -ac 1 in.raw

or:
sudo apt-get install play
play -b 16 --endian big -e unsigned -r 44100 in.raw

ffplay options:

-autoexit: exit player when stream ends
-f: format:

u: unsigned
16: 16 bits per value
be: big-endian

-ar: sample frequency
-ac: number of channels

play options: compare the values ;-)
Example of how to generate your own .raw files to play with: https://stackoverflow.com/questions/732699/how-is-audio-represented-with-numbers/36510894#36510894
See also: https://stackoverflow.com/questions/20314739/how-to-play-pcm-sound-file-in-ubuntu
Answer: Are you sure you're getting valid PCM data?  What type of PCM are you getting?
Basic PCM is used on audio CDs and in WAV files ripped from CDs; it should be playable by just about anything.  Specifically, it is 16-bit (per sample), 44.1 kHz (sample rate), stereo (2 channels).  Playing this kind of PCM is as simple as cat file.pcm > /dev/audio (or /dev/dsp or another appropriate audio device).
The libmad homepage indicates that libmad may default to outputting 24-bit PCM, and your player software could be confused by it if expecting the standard 16-bit PCM.  If you haven't already, check your program's libmad usage against the madlld (libmad low-level API tutorial) to make sure you're getting the correct output from the library.
Since PCM data doesn't include headers like a WAV file does, you may need to specify the PCM format for a program to load the file correctly.  Audacity should be able to handle any standard PCM format.
It's also possible you're getting invalid PCM output from libmad, due to a bug in the library or due to improper use of the library by your code.
Comment: This lead me to the correct answer. Although Audacity crashed when I tried to open the PCM file, I was able to import it successfully. I just went to Project > Import Raw Data. I left it at the default settings (Signed 16-bit PCM, little-endian, stereo, at 44khz) and voila!

Thank you.
Comment: `/dev/audio` may require extra packages, and `/dev/sdn` may not be very easy to use: http://unix.stackexchange.com/questions/13732/generating-random-noise-for-fun-in-dev-snd
Answer: Perhaps you can use a tool like Sox

SoX is a cross-platform (Windows,
  Linux, MacOS X, etc.) command line
  utility that can convert various
  formats of computer audio files in to
  other formats. It can also apply
  various effects to these sound files,
  and, as an added bonus, SoX can play
  and record audio files on most
  platforms.


How do I recursively remove temporary files containing ~ in git repositories

Question: I have committed a large number of files and folders to a git repository, but realized all of the temporary files ending in ~ have also been committed. I would like to remove these recursively.  I have tried
git rm -r *~

Unfortunately this does not look through each subfolder to remove these files.
What is missing here?
Answer: Quote the glob to let git (rather than your shell) expand it.
git rm '*~'

Note that you don't need -r in this case. (All ...~ are temporary files, you are not looking to remove directories and their contents which is what -r is all about.)
Answer: From the documentation:
http://git-scm.com/docs/git-rm

-r
  Allow recursive removal when a leading directory name is given.

Based on this, you may have to explicitly list the leading directory to perform a recursive remove.
Answer: The glob "*~" only expands to file names in the current directory. But you can use the Unix find command to find the files that you are looking for, and use backticks to pass the output of find to git.
git rm `find . -name "*~"`

Answer: You can use the unix find and xargs commands to accomplish tasks like this:
find -name '*~' | xargs git rm

(If your file names contain could potentially contain newline characters you should also look at the -print0 option of find and the -0 option of xargs.)
Note that this will remove the temporary files from your computer as well! Use --cached to only remove the files from git. Also you might want to run with the --dry-run option first to make sure you aren't about to delete anything important.


programming nRF51822 and integrating it on a PCB

Question: I have a basic firmware question. I am looking to program a nRF51822 IC and integrate it on my own PCB. The evaluation kit seems to already have the IC soldered on it. Is it a way I can only program the nRF51822 and getting it ready to use elsewhere?
Answer: Get yourself one of these J-LINK LITE CortexM:

and hook up your connection header like this to your microcontroller (SWDIO, SWCLK, VCC and GND are the only ones needed):
.
Then, use Keil or nRFGo Studio to program your device.
Answer: You don't need J-Link at all. Any STLinkv2 board will work, like STM32 dev boards. But even nicer are these cheap Chinese programmers: http://www.aliexpress.com/item/FREE-SHIPPING-ST-Link-V2-stlink-mini-STM8STM32-STLINK-simulator-download-programming-With-Cover/32247200104.html
All you need to do is connect the Vcc, Ground, SDIO, and SWDCLK lines from your board/chip to the programmer, so make sure those pins are broken out and easy to get to.
There are some good instructions on how to do that here: https://github.com/RIOT-OS/RIOT/wiki/Board:-yunjia-nrf51822
I've built Linux workstations for workers on assembly lines to use with this method, and it just loops over and over for new boards. So they don't even need to touch the PC, they can just place a board on the jig or connect a header and it's all automatic.
Comment: i am really interested in how to build a toolchain with compiler and IDE around the nrf51822, do you have any information about how to do this and what software to use?
Answer: You will need a programming device, such as a Segger Jlink. The eval kit has an on-board Segger programmer on it (that big chip with the Segger sticker on it).
I'm working through this process myself at the moment. I read somewhere that some people were successful at 'hacking' the eval kit, to bring the SWDIO and SWCLK over to their custom board but that really isn't the right way to go about it.
Instead, purchase an actual programmer and put a programming header on your custom circuit board.
While I am also still in the research phase here as well, it looks like there are 4-5 pins to connect from the programmer to your custom target board. The nRF documentation seems to be rather lacking in the definition of the programming setup, but look under the debugging category and take a look at Segger documentation as well.
If going into mass production there are ways to pre-program the chip before assembly, but I haven't had a chance to learn about that just yet.


Using MAX7301 GPIO Expander for Raspberry Pi Switching and Chip Selecting

Question: I'm designing a PCB that uses Analog Devices' MAX7301AAX GPIO Expander IC to expand the Raspberry PI's GPIOs.
Digikey MAX7301
The reason I'm using this IC is that my application requires a lot of output pins for SPI's CHIP SELECT and digital switches to output HIGH/LOW.
For example: P4 to P14, each pin is a Chip Select to enable an device through SPI; and P15 to P25, each pin is able to output HIGH(>2V) or LOW(<0.8V) to control digital switches ON/OFF.

I have a few concerns that can't find answers from the datasheet:

Can these GPIOs pins(p4-p31) have multiple pins outputing HIGH(V>2.0V) at the same time to turn on multiple switches at the same time? ex. p5,p7,p9,p11 output HIGH at the same time.

Will input a new command reset the previous command? ex. first set p5,p7,p9,p11 as HIGH, will a new command for p28 reset previous pins' status?
In other words, does each pin act as an independent GPIO and does not intefer with other pin's commands?

Thank you for your answers!
Answer: The datasheet says:

The MAX7301 ... provides microprocessors with up to 28 ports.
Each port is individually user configurable to either a logic input
or logic output. Each port can be configured either as a push-pull logic
output capable of sinking 10mA and sourcing 4.5mA, or a Schmitt logic input
with optional internal pullup.

It does not mention any additional restrictions, except for the total sink current.


One Drive stuck - cannot delete folder and never fully synced

Question: I have setup OneDrive Sync for Documents, Desktop and Pictures.
Later I disabled Desktop.
Now I cannot get fully synced and cannot delete old renamed Desktop folder.
Why I cannot delete a folder? OneDrive seems completely stuck.
Comment: A folder not fully synchronized typically means it contains a file that cannot be synchronized. Are you able to delete the folder from within the browser?  What error do you receive when you attempt to delete the folder?
Comment: @Ramhoud no error, delete file in explorer just does nothing. Found out there are errors on disk also, so it was one reason probably.
Answer: File system got corrupted during OneDrive sync. I did scan disk for errors and fix the errors during Windows startup. That was the reason that delete file/folder in explorer not worked probably. I had reinstalled OneDrive to latest version and it reported bad filenames and did not let me synchronize the Documents folder at all.
I very much recommend to upgrade OneDrive to the latest version & to review long paths and illegal characters in filenames before enabling sync of existing Windows folders.


How to persist jobs in Jenkins Mesos framework?

Question: i have started Jenkins Scheduler (Framework) as Marathon app. Now if the Jenkins Scheduler dies somehow, the Marathon will  restart it. But all the jobs and settings will be gone. How to persist jobs in Jenkins Mesos framework if it dies and started again?
Answer: The Jenkins plugin for Mesos does not yet support scheduler HA. To do so, the scheduler would need to persist the frameworkId remotely somewhere (ZK?) and try to reregister with the same frameworkId when it restarts. We'd also need to set the failover_timeout to a sufficient duration. Bonus points: persist task state and perform task reconciliation on reregistration.
I filed a new github issue for this: https://github.com/jenkinsci/mesos-plugin/issues/147


How can social security numbers be safely stored in databases and retrieved?

Question: How can personal information that needs to be retrieved at a later date be stored securely in a database? For instance when companies store social security numbers and use them for taxation purposes. They have to be stored securely obviously, and retrieved later. It seems using hashes and salt as with password storage isn't the correct solution. From a high level, how is this done?
Comment: Limit access to who has what's stored, no matter *how* it is stored, please.
Comment: If you have to ask this then you are a very long way away from securely storing this data. If the question is just for curiosity then the answer is there are a lot of things that need to be done including physical security of the building, preventing individual employees accessing data without multiple approvals, preventing access to the system from the outer internet and a team of talented security experts.
Answer: Encryption is what you want. Password hashing schemes just check that you've heard the same password twice. They don't even let you figure out what the password is. Encryption would.
Tread lightly here because there are many laws about storing social security numbers. Just saying "It's encrypted" isn't enough. For example, where are you storing the encryption keys? How secure are they?
Comment: "How secure are they" - Exactly - a lock is only as secure as the keys; if they're hanging on a hook nearby... then there's no real security (maybe a little protection against people just walking by), but if someone's actually looking for a way in they won't even be slowed down
Comment: Encryption is also no use at all if the other side which is "storing and retrieving" is attacked since the data will helpfully be decrypted and handed over.


What is the noun for someone who receives a referral?

Question: When a referrer (noun) gives a referral (noun) to another person, what is the term (noun) used for the recipient of the referral? "The referred" may work, but am I missing another term? "Referred" indicates past-tense, but I intend to use the term in future and present tense as well.
Comment: This is just "[referee](http://www.thefreedictionary.com/referee)".
Answer: Neither referent nor  referee seems quite suitable to denote the person who receives a referral.  Meanings of some relevant words include:
• referent: "That which is referenced"
• referee: "A person who writes a letter of reference or provides a reference by phone call for someone"
• referrer: "A person who refers another"
• referral: "The act or process of transferring someone or something to another, of sending by reference, or referring" (or commonly, the documents for the transfer)
In a common scenario, Doctor A (the referrer or referee) writes a letter to specialist Doctor B (the referral recipient) about patient C (the referred) who needs special treatment.  From the Doctors' points of view, B is not a referent, referee, referrer, or referral, but can be called (accurately) a referral recipient or could be called (inaccurately?) a referred doctor.  The doctors are likely to call the patient a referral but if pedantic might say referred patient.  The doctors could also refer to the patient as the referred.  The patient might call B a referral or a referred doctor, but is more likely to say something like "I was referred to Doctor B".  All of them call the letter of referral a referral.
In a similar but commercial scenario, the referral recipient (the party to whom the referred is referred) might be called an endorsed party, but could probably be called just the endorsed without confusion.
Answer: referee:a person to whom reference is made, esp for an opinion, information, or a decision                                                                                http://www.thefreedictionary.com/referee
Answer: You could consider referent for whoever got the referral - as opposed to the referrer, who gave the referral.
Comment: [Merriam-Webster](http://www.merriam-webster.com/dictionary/referent) supports this definition. I've often seen the word used in online marketing, but I'm not sure how well-known it is outside that context.
Answer: There's no reason to try to use a noun formed from the verb refer here.
The fact that referral is one such — in this very special idiomatic sense of refer — is no guarantee either that there are any more forms like it to use (in that special idiomatic sense), nor that trying to use one is a good idea, even if they do exist.
For one thing, precisely what does referral mean? I have heard referral used to refer to:

a letter of reference, written by X, for (= about) Y, to be sent to Z
a note, written by X, requesting Z's attention to some request of Y's
an address or URL, provided by X to Y, for the purpose of finding out about/contacting Z
various other forms of information transfer

So if A gives B a referral, what exactly is changing hands or minds here?
Comment: In business when we give a customer a reference to do business with another business, it's considered a "referral". In the transaction of a referral in this manner, I assumed there would be an oft-used noun attached to the recipient. @Mark above mentions "referee", which could also work; however, that term is more often used as a sports judge and could lend to confusion. I may have to settle on "referee" if there are no other terms, however.