How to make a CCl3F Fluorine NMR standard?

Question: I am running some fluorine NMR and would like to make a bulk solution of $\ce{CCl3F}$ in $\ce{CDCl3}$ to aid in assessing the amount of fluorinated product present by having my NMR solvent act as a reference. Can anyone suggest a good ratio of the $\ce{CCl3F}$  standard to $\ce{CDCl3}$ NMR solvent?
Comment: The amount of standard should be in the same order of magnitude as the amount of compound in the NMR sample (i.e. not as a v/v% ratio of chloroform-d). This is because unlike in H-NMR where the solvent peak is just residual chloroform-h, the fluorine standard is all fluorine, so if you add too much the reference signal will swamp your actual signal and it'll be difficult to get the peak shape of your compound to come out right (it also screws with the integration but this isn't such an issue with 19F NMR as you probably dont have that much fluorine to worry about)
Comment: @NotWoodward -you should expand this into an answer, as it essentially answers the question.
Answer: You need the concentration of your reference peak to be the same order of magnitude as your solute. Accuracy of your integration depends on something called dynamic range, which refers to the relative intensities of the peaks being integrated. The greater the dynamic range; the greater the difference in peak intensities, the bigger the error.
You might want consider that for most medium-high field NMR applications, CDCl3 is used with TMS at concentrations of about 0.03%v/v. Low field and bench top applications use TMS at 0.5-1%v/v concentration.
Comment: And FIW, selection of correct relaxation delay for 19F is critical, depending on the types of systems you are analysing. 19F have a big range in T1 - something like CCl3F will have a T1 of a few seconds. Many F-containing molecules will have much shorter T1s. This will compound error across multiple scans if not taken into account, when comparing multiple samples.
Comment: While your answer is certainly correct, the dynamic range of modern spectrometers is large.
Comment: On second thought, it is actually not correct. Only when the concentration difference comes close to the dynamic range of the instrument, you suddenly get a big error.
Comment: @Karl, this is not DR in terms of limit of detection but rather limit of quantification - very different. Error in measurement is determined by the error of your minor component; the error increases with decreasing S/N. A S/N decrease by an order of magnitude gives an increase in uncertainty by an order of magnitude. For S/N of 1000, uncertainty is ~0.1%; for S/N 100, uncertainty ~1%. So, as per the question, it is very important to get the relative concentrations correct. There are many other things to consider for quantitative measurements also, and depends on level of accuracy needed.
Comment: But that is not a matter of dynamic range, but only of sensitivity. The uncertainty is the sum of the inverses of the S/N ratios of each component to be compared if I'm not very mistaken.
Answer: There are three points to take into account, imo:

Dynamic range: If the concentration of the reference peak is very large, your analyte vanishes in the digital noise. Modern spectrometers have a large dynamic range, which ameliorates the problem, but you should adjust the gain.
Signal overlap: A huge reference peak (which has a Poisson lineshape, i.e. broad "feet") distorts the baseline to a great distance. Less of a problem with 19F, because the CS range is large.
Sensitivity: It'd be bad if you had to measure four or eight times as many scans, just to get a proper signal from your reference peak.

So I'd recommend a reference with as many fluorine atoms as your analyte in the smallest expected concentration (per peak, of course!), and perhaps not more than one order of magnitude more.


Does the microwave generating component in a microwave operate under the same physics as an antenna radio transmitter?

Question: Essentially does the component of a microwave which generates those microwave photons operate using an AC power supply connected to a broken circuit which causes an oscillating dipole to radiate electromagnetic radiation? Is there any amplification that is needed?
Comment: the first microwave ovens were called radar ranges, as it was discovered that early radar systems transmitting microwaves could heat objects.
Answer: it has an AC power supply connected to an unbroken (not sure what you mean by "broken") circuit called a microwave oscillator. At the frequencies generated by that circuit, the dipole antenna it feeds looks like a piece of hollow pipe with a flared-out end on it, pointing into the oven chamber.
The necessary amplification is generated by the vacuum tube (called a magnetron) in the circuit that also does the oscillating.
The basic physics is the same as that in a lower-frequency radio transmitter, but the implementation details are different because of how high the operating frequency of the microwave tube is.
Comment: maybe broken was the wrong word... Is open loop the right phrasing? 1:54 in this video https://www.youtube.com/watch?v=IWVPJSoJDzA


Chebyshev's theorem with large standard deviations

Question: I was wondering how reliable is a large standard deviation whose negative values are below 0? If we were calculating 2 standard deviations away from the mean to catch at least 75% of the observations over a non-normal distribution and end up with (say) -600 standard deviation over a mean of 300 knowing that the measure we are applying the standard deviation to does not accept negative values(i.e. min value is 0), we would end up with something like 300 - (600*2) on the left of our distribution and 300 + (600*2) on the right. Does it even make sense to have those negative values below 0? Or in this case, is it imperative to normalize the data? Thanks
Comment: In many applications--likely a great many--any rule that automatically eliminates data it declares to be "outliers" will be suspect, difficult to defend, and may lead to procedures that have poor properties.
Comment: You didn't say this, but am I correct to assume that your data is measuring something that cannot be negative? Can you provide more information on what you're trying to do?
Comment: Hi Chris, correct. I have a large population of 174k observation circa which represent the deposit amounts from unique users in the last 6 months. That population is largely right skewed and of course cannot accept negative values. I want to apply the ± 2 SD to catch at least 75% of the observations and to get rid of outliers skewing the data. Thanks
Comment: for your purposes would you consider any deposit lower than the mean to be an outlier?
Comment: No, in the specific distribution I have none of the low values below the mean would be considered outliers.Thanks
Answer: Standard deviation is always positive, so a std of -600 doesn't make sense.
Chebyshev's inequality is just that: an inequality. It doesn't say that to get 75% of the data, you have to go out 2 std. It says you have to go out at most 2 std. In your examples, at least 75% of the data has a value greater than -900. Now, you may know, from sources other than Chebyshev's inequality, that all of the data has a value greater than 0, and hence greater than -900. So in that case, Chebyshev's inequality doesn't give you any more information about the lower bound than what you already had. In that case, Chebyshev's inequality isn't particularly useful, but it is still valid.
Comment: I think the std is 600, OP is just concerned with the value of mean - std*2 being negative.
Comment: Thanks for your answer, would it be then accurate in your opinion to consider anything from 0 up to +2 SD from the mean a valid threshold to delimit our data, streamlining its central values?
Answer: Given you said in your comment

none of the low values below the mean would be considered outliers

I wouldn't worry about the lower end (mean - std*2).
I use Chebyshev's inequality in a similar situation-- data that is not normally distributed, cannot be negative, and has a long tail on the high end. While there can be outliers on the low end (where mean is high and std relatively small) it's generally on the high side. We use 3 std for excluding outliers prior to doing some forecasting, so that no more than 11% of observations will be excluded per the inequality. In practice when we first implemented we found that only about 1% of observations were excluded. Chebyshev's was a nice theoretical bound to give us some justification for setting the threshold at 3 std's instead of needing to go higher.
Comment: Thanks Chris, I came to the same conclusion but had no basis to sustain it. However the end result was that 99% circa of the observations were caught with a thick agglomerate close to the mean and mildly above. Thanks


Free WYSIWYG Editor with the ability to upload video from device

Question: I am building a website that would compile test questions. However, test questions and answers should be entered in LaTeX format with image/gif/audio/video/hybrid files upload features from the device. I found some recommended text editors from stackoverflow, but I couldn't find a free text editor with video upload from the device. Most of them support URL pasting or embedded code. I try to use froala but it requires buying a premium.
Answer: You can try Syncfusion Angular RichTextEditor control https://www.syncfusion.com/angular-ui-components/angular-wysiwyg-rich-text-editor
The whole suite of controls is available for free (commercial applications also) through the community license program if you qualify. The community license is the full product with no limitations or watermarks.
https://www.syncfusion.com/products/communitylicense
Note: I work for Syncfusion.
Comment: `Thanks for recommending angular rich text editor by Syncfusion. But I am afraid that there is no video upload feature in it. (`


Real-world technologies to provide better safety to spaceship passengers

Question: Is there any real technology, experimental or conceptual, that can prolong a person's survivability in outer space in case of sudden life support failure? Something that is also easy to wear or implement for day-to-day activity? Something that you keep on your person in the spaceship/station on all time that, in case of a hull breach or similar disasters, can help you survive long enough until help arrives?
Comment: What for? A sudden hull breach does not happen, unless you fiddle with explosives, and the oxygen in the air lasts for hours, which gives you ample time to switch on some backup system or repair the original life support.
Comment: Do you mean like an oxygen tank (not enough oxygen or toxic levels of some other gas in the air), something to keep a person warm like a blanket (loss of heat) or an ultra-light space suit (pressure loss, does not exist currently and I don't know how one would build one to make it practical)?
Answer: It depends very much on the exact circumstances. Are we talking shirt sleeves to vacuum in 3 seconds or a catastrophic failure of the life support system leading to build-up of carbon dioxide and depletion of oxygen over minutes or hours? And how long before help arrives minutes hours or days? All of these things are critical.
Worst case scenario immediate decompression: Survival unlikely. Your only hope would be some sort of automated device like air bags in a car but I don't know how you could arrange that to work. There would also be a lot of dangerous fast moving debris and high wind speed as the atmosphere rushed out together with massive shock effects on the body.
If decompression takes at least 30 seconds: I suggest that survival chances would be fair in most cases assuming that training is given. You would have to carry a deflated version of this and climb into it and seal it quickly. You might live for an hour perhaps a bit lot longer. With modifications that time
could probably be extended at the cost of making the thing you have to carry (back pack?) a little more bulky.
If decompression takes a minute or more, or the atmosphere remains breathable for a minute or more: survival chances would be very good using the same method.
Humans can probably remain conscious in a vacuum for up to 15 seconds and might survive for a minute or two before death. That said it would be a horrific experience and you would be incapacitated almost immediately.
This Scientific American article might be of interest concerning NASA experiments on dogs and accidental human exposure to vacuum (warning this contains some rather gruesome descriptions)
Answer: You may be interested in anti-puncture technology used for pneumatic tires such as bike tube slime. Tire slime is is a liquid when in the tire, but 'sets' when exposed to air. In doing so it seals small leaks. I believe similar systems were at one stage proposed for the ISS. I could see some sort of expanding foam being good for this task in a spaceship - the drop in pressure causing it to expand and set.
Similarly, in one sci-fi universe (maybe an Arthur C Clarke? I can't remember) they had airborne equivalent. Lots of lightweight particles/string/aerogel things floated around. When a hull breach occured, they would be sucked into the hole.
System modularity also applies. How do ships and submarines stay afloat in the case of a leak? Bulkheads that can shut off damaged parts of the vessel. This is a staple of sci-fi ship design.....
Aircraft have drop-down air-supplies in case of cabin pressure loss. Some back of the envelope calculations I did a couple years back suggest passengers would get 'the bends'  (can anyone confirm/deny this?) and this would only be worse in space.
None the less, there are numerous safety systems that already exist that can be applied to a future commercial spacecraft.
For an individual? Not so much. There are three issues:

oxygen
pressure difference
temperature

Oxygen could easily be provided/available. Divers tanks exist, canned air for climbing Mt Everest exists, and I wouldn't be surprised if something like the jedi breathing device: http://www.starwars.com/databank/jedi-breathing-device is possible at some point - though how you keep it in the guys mouth, and how you stop air exiting his nose is an issue. Probably some sort of face mask is better.
Your major issue is pressure difference. Without compensation, this causes the air in the lungs to expand and rupture the internal tissues (worse now we have a breathing device), and causes the water on your skin to sublimate. In the space suits used by NASA this is dealt with by pressurising the air around the person (inflating the space suit), but more modern concepts have had a form-fitting space-suit that applies pressure directly. Of course, the suit should still be air-tight over most of the surface.
The final issue is temperature. Your survivor needs both heating and cooling. Think about how hot you get standing in the full sun. Now imagine that there wasn't an atmosphere to attenuate the sunlight. But on the side in shadow you probably need heating. 100W over a 2m black body sits at 172Kelvin - well below freezing. But given that your guy is has a face mask and is wearing special clothing, why not just put him in a (slightly futuristic) space suit.

In the book 'Stealing Light' by Gary Gibson, the main protagonist has alien tech implanted that caused a thin black film of handwavium to cover their entire body (including interior of mouth, throat and presumably lungs) that would auto-deploy on exposure to vacuum. (And it also auto-deployed to absorb large kinetic impacts). So I suppose the other option is to throw in nanobots, biotech, or some other handwave mechanism.

You may also want to read up on the sorts of failures that occur on spacecraft. To my knowledge there was only one case of sudden fatal decompression - the Soyuz 11. In that case it was a valve to a jettisoned part of the capsule that had become stuck open, not any sort of 'hull breach'. In any case, sudden depresurisation is considered something of a design flaw in spacecraft.


Coordinates of the extra dimensions

Question: If we live in more than three spatial dimensions, is it not right to conclude that all matter observable to us shares almost the same coordinates of extra dimensions. Or is it just that ordinary interactions (like electromagnetism) are simply independent of these extra dimensions?
Answer: In some extra-dimensional models, such as brane cosmology, the fields (except gravity) are indeed confined to a lower-dimensional surface, which is sort of like "sharing almost the same coordinates in the extra dimensions".
In Kaluza-Klein theory with compact extra dimensions, the fields are basically spread evenly across the entire size of the extra dimensions, so you can't probe them directly by, say, sending wave packets around them. (Maybe in a sufficiently high-energy experiment you could—this would mean exciting higher "Kaluza-Klein modes". Some people thought the LHC might find such modes, but so far it hasn't.)

Coordinates of the extra dimensions


Benefits of Varanamayiram

Question: Varanamayiram composed by Kodai Nachiyar is a classic one. What are the benefits a devotee can obtain by reciting this? Can selected slokas be recited every day?Answers not from wikipedia or divyadesam. Purana reference is must.
Comment: Since Andal is after the Puranas we won't find reference in them about her.
Comment: I'm voting to close this question as off-topic because it is impossible to answer this question since Andal alwar was born after the time of composition of Puranas by Veda Vyasa.
Answer: In general, you won't find Puranic references to Andal ormthe Alwars except in the forms of prophecy, since most of the Alwars were born after the Puranas were written.  So if you want to know the benefits of reciting a particular Alwar pasuram, your best bet is to turn to the works of Sri Vaishnava Acharyas, not the Puranas.  Now thankfully the first Sri Vaishnava Acharya Nathamuni, who as I discussed in this question compiled the Alwars' poems into the Naalayira Divya Prabandham, composed a Phala Shruti for each poem outlining the benefits of reciting it.  Here is the Phala Shruti for Andal's Vaaranam Aayiram poem:

AyanukkAha tAn kaNDa kanAvinai
  vEyar puhazh villiputtoor kOn kOdai Sol |
  tooya tamizh mAlai eeraindum vallavar
  vAyu nan makkaLai peTTru mahizhvarE ||
This decad of pure Tamil verses by famous Villiputtur-king's daughter Goda, describes her dream of marrying the cowherd-Lord. Those who sing it will be blest with good progeny.

That is why this poem is recited so often in weddings.
But that's not the only benefit of reciting it.  Ultimately the purpose of reciting the Alwars' poems is that they encourage devotion to Vishnu and thereby can lead a person to being united with the lotus feet of Sriman Narayana.
Let me also quote a Taniyan or invocatory verse  which the first Sri Vaishnava Acharya of the Vanamamalai Matham (the Sri Vaishnava Matham I belong to) composed about the Nachiyar Thirumozhi, the collection of Andal's poems that Vaaranam Aayiram is a part of:

kOlasuri Sangai mAyan sevvAyin guNam vinavum
  seelattinaL ten tirumalli nAdi, sezhunguzhal mel
  mAlait toDai ten arangarukkeeyum madippuDaiya
  sOlaikkiLi, avaL tooya naRpAdam tuNai namakke
This taniyan states emphatically that only the sacred feet of ANDAL, whose sweet words resemble those of a garden parrot, and who brought greatness to the vEyar kulam of periyAzhwAr, are the refuge for us (today, tomorrow and for ever).

In any case, to answer your other question, yes, you can recite any Alwar Pasuram at any time; they don't have caste restrictions or other restrictions unlike the Vedas.
Comment: @KS-- Thanks for your effort. I was expecting in the following fashion--1. Reception of the bride groom (mApiLLai azhaippu, jAnavAsam)
2. Announcement of wedding ceremony (niscayatArtham)
3. Elders' consent and Sister-in-law (nAttanAr kodi uduttal) to dressup the bride
4. Tying the holy string on hand (kAppu kaTTal or rakShA bandan)
5. Removing the obstacles (piDisuRRudal)
6. Holding the hands together (pAnigrahaNam)
7. Walking seven steps together, wedding vows (agni pradakShiNa, saptapati)
Comment: 8. Stepping on the stone (shilArohaNam, ammi midittal)
9. Offering of puffed rice (lAja hOmam, pori iDudal)
10. Sprinkling yellow holy water (manjaL nIr teLittal)
I needed the slokas how kodhai nachiyar has composed the hymns.
Comment: Nobody is  answering Vaishnavite type question except you. Why is it so?
Comment: @ParthasarathyRaghavan Well, there's lots of Vaishnavas (and Shaivites and Smarthas) on this site, but some of the Vaishnavas are Gaudiya Vaishnavas rather than Sri Vaishnavas.  As far as I know there are only three Sri Vaishnavas who are currently active on the site: me, you, and the user [Krishna](http://hinduism.stackexchange.com/users/808/krishna).

Benefits of Varanamayiram


Stuck in Ubuntu login loop (14.04.5 LTS)

Question: This seems to be similar to Ubuntu gets stuck in a Login Loop and Ubuntu Login Loop but nothing suggested at either of those two has worked.
I get the login screen. Whether I attempt to log in as myself, another user, or the Guest user, the screen goes black momentarily and returns to the login screen.
Here are the contents of my ~/.xsession-errors:
Script for ibus started at run_im.
Script for auto started at run_im.
Script for default started at run_im.
init: gnome-session (Unity) main process (2548) terminated with status 1
init: unity-settings-daemon main process (2538) killed by TERM signal
init: Disconnected from notified D-Bus bus
init: logrotate main process (2446) killed by TERM signal
init: update-notifier-crash (/var/crash/_usr_lib_ibus_ibus-ui-gtk3.1001.crash) main process (2495) killed by TERM signal
init: xsession-init main process (2535) killed by TERM signal
init: hud main process (2542) killed by TERM signal
init: unity-panel-service main process (2553) killed by TERM signal
init: window-stack-bridge main process (2475) killed by KILL signal

As I noted, I tried pretty much everything I found at the referenced questions and nothing has worked - changing permissions and ownerships on .Xauthority and .ICEauthority, installing linux-headers-generic, reconfiguring/uninstalling/reinstalling lightdm, etc.
I'm kind of at a loss on how to proceed. Any ideas?
(Edit; the next day) One thing I hadn't tried was switching to gdm as described at Ubuntu gets stuck in a Login Loop. That was no help at all. After running dpkg-reconfigure gdm the login screen did not change at all, so I tried rebooting. After that, I got only a couple of seconds of display / active keyboard with each press of ctrl-alt-F2, and it took me about 10 minutes to successfully reconfigure for lightdm. I don't know if that's helpful to anyone reading this....
(Edit) Here is the output of sudo lshw -c video:
*-display
   description: 3D controller
   product: GM107GLM [Quadro M1000M]
   vendor: NVIDIA Corporation
   physical id: 0
   bus info: pci@0000:01:00.0
   version: a2
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list rom
   configuration: driver=nvidia latency=0
   resources: irq:16 memory:dc000000-dcffffff memory:b0000000-bfffffff memory:c0000000-c1ffffff ioport:e000(size=128) memory:dd000000-dd07ffff
*-display
   description: VGA compatible controller
   product: Intel Corporation
   vendor: Intel Corporation
   physical id: 2
   bus info: pci@0000:00:02.0
   version: 06
   width: 64 bits
   clock: 33MHz
   capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
   configuration: driver=i915_bpo latency=0
   resources: irq:128 memory:db000000-dbffffff memory:70000000-7fffffff ioport:f000(size=64)

I can find some info on these drivers with lsmod:
$ lsmod | grep i915_bpo
i915_bpo             1306624  3
intel_ips              20480  1 i915_bpo
i2c_algo_bit           16384  1 i915_bpo
drm_kms_helper        151552  2 i915_bpo,nvidia_drm
drm                   360448  5 i915_bpo,drm_kms_helper,nvidia_drm
video                  40960  3 i915_bpo,dell_wmi,dell_laptop

$ lsmod | grep nvidia
nvidia_drm             45056  0
nvidia_modeset        765952  1 nvidia_drm
drm_kms_helper        151552  2 i915_bpo,nvidia_drm
drm                   360448  5 i915_bpo,drm_kms_helper,nvidia_drm
nvidia              11489280  1 nvidia_modeset

So I'm not sure the nvidia video driver belongs?
modinfo returns some info about i915_bpo:
modinfo i915_bpo
filename:       /lib/modules/4.4.0-47generic/kernel/ubuntu/i915/i915_bpo.ko
license:        GPL and additional rights
description:    Intel Graphics
author:         Intel Corporation
author:         Tungsten Graphics, Inc.
firmware:       i915/bxt_dmc_ver1.bin
firmware:       i915/skl_dmc_ver1.bin
firmware:       i915/kbl_dmc_ver1.bin
firmware:       i915/skl_guc_ver6.bin
srcversion:     A0AA67E6671AC7D4B380BAA
alias:          pci:v00008086d0000593Bsv*sd*bc03sc*i*
[etc.]

... but there is no info returned from modinfo for any of the nvidia.* drivers. I am thinking that the invidia drivers are either corrupted or do not belong, but I'm not sure what to try next. Thanks anyone for any help.
Comment: Those solution didn't in my case also but removing incompatible graphics driver worked just fine. Please check if you have installed any incompatible graphics driver recently.
Comment: I haven't installed any graphics drivers, unless they came with an update pushed to me. Where can I look to make sure?
Comment: Added a couple of edits; see above.
Comment: remove nvidia driver if install any `sudo nvidia-settings --uninstall` and
`sudo apt-get remove --purge nvidia*`
Comment: There is no _--uninstall_ option for _nvidia-settings_. However, I ran the _apt-get remove_ command and that seems to have done the trick. Thank you **so** very much for your help!
Comment: I'm glad it worked out. I'll write an answer then.
Answer: Incompatible graphics driver causing this problem. Try to remove them using,
sudo nvidia-settings --uninstall
sudo apt-get remove --purge nvidia*


What is the Arithmetical complexity of determining whether a 2-ary computable predicate has exactly one infinite column

Question: Let $W_e$ be the $e$th computably enumerable set in a standard enumeration.  For $A\subseteq \omega$, let $A^{[i]}:=${ $ a : \langle a,i\rangle \in A$}.  What is the arithmetical complexity of {$e : (\exists ! i) W_e^{[i]}$ is infinite }.  Specifically whether it is $\Pi^0_4$-complete or so.
Answer: Definitely not $\Pi^0_4$-complete.  Note that it can be expressed as the conjunction of a $\Sigma^0_3$ formula and a $\Pi^0_3$ formula:
$\exists i \forall n \exists m, s [m > n \wedge \langle m, i\rangle \in W_{e,s}]$ and $\neg \exists i, j \forall n \exists m, k, s [i \neq j \wedge m > n \wedge k > n \wedge \langle m, i\rangle \in W_{e, s} \wedge \langle k, j\rangle \in W_{e, s}]$.
In fact, it's complete for such sets.  Given quantifier free $\phi(e,i,n)$ and $\psi(e,i,n)$, let $\langle 3i, n\rangle \in V_e \iff \phi(e,i,n)$, and let $\langle 3i+1,n\rangle \in V_e \iff \langle 3i+2, n\rangle \in V_e \iff \psi(e,i,n)$.  Then $V_e$ has a unique infinite column precisely when $\exists i \exists^\infty n \phi(e,i,n) \wedge \neg \exists i \exists^\infty n \psi(e,i,n)$.
Edit: As Joel observed, we need that for each $e$, there is at most one $i$ with $\exists^\infty n \phi(e,i,n)$.  Fortunately, there's a trick for that.  Given $\phi$, we'll define $\phi'$ with this property.  To aid us, we'll also define a function $f(e,i,n)$.  We begin by setting $f(e,i,0) = i$ for all $e$ and $i$.  We then proceed recursively in $n$.  We define $\phi'(e,f(e,i,n),n) \iff \phi(e,i,n)$, and we define $\phi'(e,k,n)$ to be false for all $k$ not in the range of $f(e,-,n)$.  If $\phi(e,j,n)$ holds for some $j < i$, we define $f(e,i,n+1) = f(e,i,n)+1$; otherwise we define $f(e,i,n+1) = f(e,i,n)$.
The idea is that we're going to copy column $i$ of $\phi$ to column $f(i)$ of $\phi'$, but $f(i)$ can grow with $n$ (it also varies with $e$, but that doesn't play any role).  Every time an earlier column shows up with another entry, $f(i)$ gets pushed one step to the right.  So the least infinite column can only be pushed finitely many times, by the finitely many finite columns before it, while all later columns are pushed infinitely many times, and thus no later column of $\phi'$ can receive more than finitely many elements.
Comment: Dan, regarding your completeness claim, couldn't your relation $V_e$ have two infinite columns, just if there are two $i$'s with $\exists^\infty n\phi(e,i,n)$, irrespective of $\psi$?
Comment: Good catch.  I've edited to address that.


Reference request: Grassmannian and Plucker coordinates in type B, C, D

Question: Grassmannian $Gr(k,n)$ is the set of $k$-dimensional subspace of an $n$-dimensional vector space. What are the Grassmannian in types B, C, D? What are the analog of Plucker coordinates and Plucker relations in these cases? Are there some references about this? Thank you very much.
Answer: What these have in common is that they are of the form $G/P$ for $P$ a maximal parabolic. As such each has a minimal projective embedding of the form $G/P \hookrightarrow \mathbb P(V_\omega)$ where $V_\omega$ is a fundamental representation (the analogue of the Plücker coordinates). The two coordinate rings, of $\mathbb P(V_\omega)$ and $G/P$, are $Sym(V_\omega^*)$ and $\oplus_n V_{n\omega}^*$ respectively. The kernel of the ring map $Sym(V_\omega^*) \twoheadrightarrow \oplus_n V_{n\omega}^*$ is generated in degree $2$ by Ramanathan's theorem (whose proof you can read in the unique book by Brion + Kumar), i.e. the analogue of the Plücker relations is the complement to $V_{2\omega}^*$ inside $Sym^2(V_\omega^*)$. I don't know enough about that representation theory in the specific $BCD$ cases to tell you more.
Answer: In type $B$ and $D$ these are orthogonal isotropic Grassmannians $$OGr(k,n) \subset Gr(k,n),$$ that parameterize isotropic $k$-dimensional subspaces in a vector space of dimension $n$ endowed with a non-degenerate quadratic form.
In type $C$ these are symplectic isotropic Grassmannians $$SGr(k,n) \subset Gr(k,n),$$ that parameterize isotropic $k$-dimensional subspaces in a vector space of dimension $n$ endowed with a non-degenerate symplectic form.
Answer: It might also be worth mentioning that the Type A Grassmannians are minuscule varieties, meaning they are $G/P$ for a maximal parabolic $P$ corresponding to a minuscule node of the Dynkin diagram. Minuscule (and also cominuscule) varieties tend to behave a bit better than arbitrary homogeneous spaces $G/P$. At least, their combinatorics can be described quite explicitly, like with the Grassmannian: see e.g. https://arxiv.org/abs/math/0608276 or https://arxiv.org/abs/1306.5419. Note that outside of Type A not so many of the nodes of a Dynkin diagram are minuscule.
Answer: For the orthogonal case (B and D), this was developed in great detail in Elie Cartan's "Theory of Spinors" (Dover Publications Inc, Mineola N.Y., 1981); see also:
Claude Chevalley, "The Algebraic Theory of Spinors and Clifford Algebras" (Springer, 1996, Vol. 2 of collecteed works). Of special importance are the "maximal" isotropic Grassmannians, which are related, in Cartan's approach, to "pure spinors". The analog of the Plucker relations are the "Cartan relations", or "Pfaffian Plucker relations".
Further details and developments may be found in:
J. Harnad and S.Shnider,  "Isotropic geometry and twistors in higher dimensions
I. The generalized Klein correspondence and spinor flags in even dimensions,"  J. Math. Phys. 33, 3191-3208 (1992) and
J. Harnad and S.Shnider, "Isotropic geometry and twistors in higher dimensions II. Odd dimensions, reality conditions and twistor superspaces",
J. Math. Phys. 36 1945-1970 (1995).
For the symplectic case (C), again, the "maximal isotropic" case is of special importance, or "Lagrangian Grassmannians".


Napili Template. Record Banner not respecting page layout changes on Account or presenting custom object page layouts

Question: I basically want to customize what fields are displayed on the Record Banner.  Documentation says change the page layout but when I do, nothing happens.  Any suggestions
Answer: To customize the banner of the record you will need to change compact layouts for the object .
Every object has a compact layout .A sample compact layout for Account is shown below


Any alternative text labels for a "Race/Ethnicity" dropdown?

Question: The phrase 'Race/Ethnicity' or "Race/Ethnic Origin" is used throughout various data reporting.  It just looks so odd with a '/' slash.  Any alternatives?  Here are a few examples of the slash in 'real life'

Cancer.gov
New York State School Report Cards.
Comment: I think this rather belongs to [English Langusage & Usage](http://english.stackexchange.com).
Comment: Why not just use one or the other if you don't like that slash? "Ethnic origin", though, it probably more appropriate since race is not really a well-defined construct.
Comment: @brian, consider rephrasing the question to ask if there is a better label for web forms or reports. The way you have it now does point to a question of English Usage.
Comment: Agree, it's more of an English Language & Usage question, but the mods on that site aren't interested in having it migrated. Unless you have data showing that it's significant problem, I don't think it's worth worrying about.
Answer: Trying to be clever can sometimes be confusing.
If people are conditioned to see race, why break the convention?
Deferring to the Census Bureau, and how they present race:
http://2010.census.gov/2010census/popmap/ipmtext.php?fl=24
Comment: For our certified emr, we had to list Ethnicity and Race separately, using those exact census descriptions.
Answer: Ethnicity is the proper term. But, to be perfectly honest, many people don't know what 'Ethnicity' means. Race is a far more common (if less accurate) word used to describe this. Combining the two words reaches the broadest audience, despite it's clunky nature.


In a complex metrizable topological vector space, $d(0,\alpha x)\neq |\alpha|d(0,x), \ \alpha \in \mathbb C.$

Question: Let $(X,\tau)$ be a complex metrizable topological vector space with the metric $d$. Does the following hold:
$$d(0,\alpha x)=d(0,x),\ \forall \alpha \in \mathbb C, |\alpha|=1 \ ?$$
In general, the following holds: $$d(0,\alpha x)\neq |\alpha|d(0,x), \ \alpha \in \mathbb C.$$
Comment: Which examples did you check?
Answer: Absolutely not. One can easily find counterexamples, but it seems more important to understand why one should not expect such an equality. "Metrizable topological vector space" just means that the topology generated by the metric satisfies certain conditions (namely making the vector space operations continuous). This leaves plenty of room to break your proposed equality without changing the topology.
For a concrete example take $\mathbb{C}$ and let
$$\phi\colon\mathbb{C}\to\mathbb{C},\,z\mapsto \operatorname{Re}z+4 \mathrm{i}\operatorname{Im} z.$$
This map is clearly continuous with continuous inverse, thus
$$
d\colon\mathbb{C}\times \mathbb{C}\to [0,\infty),\,d(z,w)=|\phi(z)-\phi(w)|
$$
induces the Eucliean topology on $\mathbb{C}$ (which is of course a vector space topology). However $d(0,2)=2$, while $d(0,2i)=8$.


how to fix We could not parse the JSON body of your request

Question: const express = require("express");
const https = require("https");
const cors = require("cors");

const app = express();

app.use(cors());
app.use(express.json());

const OPENAI_API_KEY = KEY;

const system_prompt = {
  "instruction": "You are a multilingual AI assistant called Foodion. Please provide a 1-day diet plan based on the following grocery list. The diet plan should include breakfast, lunch, and dinner. Each meal should have at least two recipes. The diet plan must be returned as a JSON object in the following format: {diet: {breakfast: {recipe1: '', instructions1: '', recipe2: '', instructions2: ''}, lunch: {recipe3: '', instructions3: '', recipe4: '', instructions4: ''}, dinner: {recipe5: '', instructions5: '', recipe6: '', instructions6: ''}}}. The response must be a diet plan, and it must not exceed one day. If the user requests a diet plan for more than one day, respond with  JSON object that says {'error_message': 'Max 1 günlük diet programı isteyebilirsiniz.'}",
  "user_profile": {
    "gender": "Male",
    "age": 18,
    "height": 180,
    "activity_level": "active sport life"
  },
 "grocery_list": [
    "3600 gram makarna",
    "4500 gram pirinc",
    "500 gram salca",
    "500 gram mantar",
    "500 gram zeytin",
    "500 gram turşu",
    "500 gram ekmek",
    "10 adet yumurta",
    "500 gram peynir",
    "1000 gram tost ekmeği",
    "1000 gram un",
    "500 gram tuz",
    "250 gram tereyağı",
    "200 gram salam dilimi",
    "200 gram sucuk dilimi",
    "300 gram pastırma dilimi",
    "500 gram sosis",
    "200 gram domates",
    "300 gram salatalık",
    "200 gram biber",
    "1000 gram yoğurt",
    "1000 gram sogan",
    "100 gram sarimsak"
  ],
}

app.post("/generate-text", async (req, res) => {
  const messageContent = req.body.message;

  const data = JSON.stringify({
    model: "gpt-3.5-turbo",
    messages: [
      { role: "system", content: system_prompt},
      { role: "user", content: messageContent },
    ],
    max_tokens: 2048,
    temperature: 0.5,
    top_p: 0.8,
  });

  const options = {
    hostname: "api.openai.com",
    path: "/v1/chat/completions",
    method: "POST",
    headers: {
      Authorization: `Bearer ${OPENAI_API_KEY}`,
      "Content-Type": "application/json",
      "Content-Length": data.length,
    },
  };

  const request = https.request(options, (response) => {
    const chunks = [];

    response.on("data", (chunk) => {
      chunks.push(chunk);
    });

    response.on("end", () => {
      const responseBody = Buffer.concat(chunks);
      res.send(responseBody); // Send the raw response body as is.
    });
  });

  request.on("error", (error) => {
    console.error("Error with OpenAI request:", error);
    res.status(500).send("Error with OpenAI request: " + error.message);
  });

  request.write(data);
  request.end();
});

const PORT = process.env.PORT || portnumber;

app.listen(PORT, () => console.log(`Server started on port ${PORT}`));

with this code i was expecting to able to send system_prompt to openai gpt to get answer in the specific way i wanted. But i keep getting this error. While in another project i tried to do almost same thing and i didn't get any error i was using same model just different prompt that is structured in the same way but while that one is working this one is refusing to work
I tried to send prompt as string and js object both attempts failied but if i simply change
 { role: "system", content: system_prompt}

to
 { role: "system", content: "You are helping AI"}

or anything similar to code works fine
Answer: You did not provide the error message, so I assume its a unexpected character json.parse error. This is what I got when I entered your system_prompt into a online JSON parser. It seems like you have a , after your grocery_list array. Once you've removed the , the JSON should parse fine. See image below.


How should I extend the drywall around a shower remodel?

Question: After removing a fiberglass tub unit and replacing it with a four piece shower unit, is it best to just piece in the drywall from where you cut out the unit or remove the drywall up to the ceiling and put in a solid piece?  More specifically, from the top of the shower wall to the ceiling there is about a 22" area (including the shower wall flange). The space of the cut out is 5" (including the shower wall flange). There is a 6" cut out down the sides (including the flange).  The ceiling height is 8'.
Comment: It would probably be helpful to post a picture. If your rep is too low, just post a link and someone will embed it.
Answer: It's really up to you; there are pros and cons to either choice. Piecing in would be easier and quicker, but then you'd have a butt joint all around the shower to feather out. Tearing the rest of the drywall into the corners would look nicer (no butt joints), but would be plenty more work.


What services do you use to research European stock markets?

Question: I would like to know what are the best services to research stocks on the different European stock markets, I would like to cover all EU member states, if possible.
Answer: I'm not familiar with your resources or work situation, but the Bloomberg Terminal is best in breed for market research/pricing/data on pretty much any security.  Works great for European equities.  The downside: it runs about $1,500 a month if you have to pay for one on your own.
Comment: Unfortunately, I have no access to a Bloomberg Terminal :) If you know what is the next best thing, but a littlebit cheaper please, let me know! Thanks for the recommendation anyway
Answer: Besides Bloomberg and Reuters, I would recommend WorldCap, which is not a terminal but a mobile solution to research stocks in the US, Europe and Asia. While Bloomberg and Reuters run about $20,000 per year, WorldCap has a significantly lower price tag.
Disclosure: I have used Bloomberg and Reuters terminals in the past and I am affiliated with WorldCap.
Comment: Mind telling us your association with WorldCap?


Recovering only deleted partition(not formatted nor overwritten)

Question: I have an external hard disk and by mistake I only removed its partition. But after that I understood my mistake and stop doing anything on that. I ejected it immediately.
It has 1TB capacity. It is Western Digital my passport.
I want to know, is there any possibility to recover everything with folders as it is not overwritten?
What is the best way of recovering for this situation?
Answer: There are plenty of partition recovery tools out there, some of them even let you use the whole thing for free.
Minitool Patition Recovery and Acronis Recovery Expert Wizard
are two good ones that'll let you do it, preferably run them from a different hard drive or from a usb
Minitool : https://www.minitool.com/free-tools/minitool-partitionrecovery.html
Acronis Recovery : https://www.acronis.com/en-eu/articles/partition-recovery/
Comment: I used those two previously. I don't remember, is there any possibility to recover with file hierarchy?
Comment: If you recover the partition itself, the file index will be intact, if you recover files directly then you'll have to manage them manually.


Part of window is inaccessible

Question: As you can see, I am unable to access the "Export Video" button at the bottom of the window. I managed by using Tab to cycle over all the fields. I would like to know if there is another way around, a better way to solve this problem.
Answer: It's not a great work-around, but if you press alt-space, the submenu allowing resize and moving windows appears.  You could then resize the window vertically, to be able to access the whole window and get to the buttons.

Part of window is inaccessible


Can you weaken a stud by drilling too close to the edge?

Question: I wasn't exactly looking for a stud, was hanging a frame so I just used anchors. Drilled 3/16" holes for the anchors, but I am pretty sure I hit a stud. If I did indeed hit a stud, and somehow drilled at the edge of it, could I weaken it or do anything that could matter? What would be the biggest hole you can drill through the stud near the edge without weakening it?
Comment: Does this answer your question? [Will removing shelving screws from studs damage the studs?](https://diy.stackexchange.com/questions/172106/will-removing-shelving-screws-from-studs-damage-the-studs)
Answer: Any hole will weaken it. That sized hole is unlikely to weaken it enough to matter (I've see bigger knotholes on the edge of graded framing lumber, for instance.) Particularly if drilled to proper depth (you should not be drilling more than 1-3/4" into a wall, so 1.25" into framing with typical 1/2 sheetrock, without knowing EXACTLY where your hole is going, due to the way plumbing and electrical codes are written for wire and pipe protection.)
Always a good idea to look for studs when drilling walls, whether to hit them or miss them.
Answer: About 1/2 inch for a notch, 1/3 of the thickness.
Usually no problem for a stud.
There can be a big problem if drilling into a wall and hit an electrical cable/wire, which can be near/on/in a stud.
Electrical cables or pipes closer than an 1 and 1/2 inch to the face of a stud should have a steel plate protecting them from screws/nails. Electric cables going on the side will not have this protection.
Comment: Electric cables going along the side are supposed to be located at least 1-1/2" from the face, for that reason.


Tarjan's lowest common ancestor algorithm explanation

Question: I am having a tough time understanding Tarjan's lowest common ancestor algorithm. Can somebody explain it with an example?
I am stuck after the DFS search, what exactly does the algorithm do?
Answer: My explanation will be based on the wikipedia link posted above :).
I assumed that you already know about the union disjoint structure using in the algorithm.
(If not please read about it, you can find it in "Introduction to Algorithm").
The basic idea is every times the algorithm visit a node x, the ancestor of all its descendants will be that node x.
So to find a Least common ancestor (LCA) r of two nodes (u,v), there will be two cases:

Node u is a child of node v (vice versa), this case is obvious.
Node u is ith branch and v is the jth branch (i < j) of node r, so after visit node u, the algorithm backtrack to node r, which is the ancestor of the two nodes, mark the ancestor of node u as r and go to visit node v.
At the moment it visit node v, as u is already marked as visited (black), so the answer will be r. Hope you get it!
Comment: When you find node `u`, how do you know node `r` is the ancestor of node `u` and node `v`?  Does not make sense to me how you know where to backtrack to find node `r`.
Comment: @lololololol Do you know about union disjoint structure? The algorithm is based on that.
Answer: I will explain using the code from CP-Algorithms:
void dfs(int v)
{
    visited[v] = true;
    ancestor[v] = v;
    for (int u : adj[v]) {
        if (!visited[u]) {
            dfs(u);
            union_sets(v, u);
            ancestor[find_set(v)] = v;
        }
    }
    for (int other_node : queries[v]) {
        if (visited[other_node])
            cout << "LCA of " << v << " and " << other_node
                 << " is " << ancestor[find_set(other_node)] << ".\n";
    }
}

Let's outline a proof of the algorithm.
Lemma 1: For each vertex v and its parent p, after we visit v from p and union v with p, p and all vertices in the subtree of root v (i.e. p and all descendents of v, including v) will be in one disjoint set represented by p (i.e. ancester[root of the disjoint set] is p).
Proof: Suppose the tree has height h. Then proceed by induction in vertex height, starting from the leaf nodes.
Lemma 2: For each vertex v, right before we mark it as visited, the following statements are true:

Each v's parents pi will be in a disjoint set that contains precisely pi and all vertices in the subtrees of pi that pi has already finished visiting.

Every visited vertex so far is in one of these disjoint sets.

Proof: We proceed by induction. The statement is vacuously true for the root (the only vertex with height 0) as it has no parent. Now suppose the statement holds for every vertex of height k for k ≥ 0, and suppose v is a vertex of height k + 1. Let p be v's parent. Before p visits v, suppose it has already visited its children c1, c2, ..., cn. By Lemma 1, p and all vertices in the subtrees of root c1, c2, ..., cn are in one disjoint set represented by p. Furthermore, all newly visited vertices after we visited p are the vertices in this disjoint set. Since p is of height k, we can use the induction hypothesis to conclude that v indeed satisfies 1 and 2.
We are now ready to prove the algorithm.
Claim: For each query (u,v), the algorithm outputs the lowest common ancester of u and v.
Proof: Without loss of generality suppose we visit u before we visit v in the DFS. Then either v is a descendent of u or not.
If v is a descedent of u, by Lemma 1 we know that u and v are in one disjoint set that is represented by u, which means ancestor[find_set(v)] is u, the correct answer.
If v is not a descendent of u, then by Lemma 2 we know that u must be in one of the disjoint sets, each of them represented by a parent of v at the time we mark v. Let p be the representing vertex of the disjoint set u is in. By Lemma 2 we know p is a parent of v, and u is in a visited subtree of p and therefore a descendent of p. These are not changed after we have visited all v's children, so p is indeed a common ancestor of u and v. To see p is the lowest common ancestor, suppose q is the child of p of which v is a descendent (i.e. if we travel back to root from v, q is the last parent before we reach p; q can be v). Suppose for contradiction that u is also a descendent of q. Then by Lemma 2 u is in both the disjoint set represented by p and the disjoint set represented by q, so this disjoint set contains two v's parents, a contradiction.


How do I get slanted text (\sl) with a different font (Times New Roman)?

Question: I came across the \sl command to slant certain fonts. With the default CMU Serif font, it looks nice. However, one of my professors uses Times New Roman to do his CV (in LaTeX), and I want to mimic that style. However, when I try to use \sl with Times New Roman (using setmainfont{Times New Roman}), it just uses the standard italics for TNR. Is there a specific command that I'm missing or some style that I need to add? If a picture would help, I can add one. Thanks!
Comment: This should answer your question: https://tex.stackexchange.com/questions/128562/how-to-use-fakeslant-as-slanted-but-not-italic-font-with-fontspec
Comment: @DonHosek yes, that did solve it. Thank you!
Answer: Not all fonts are available in all variants. (La)TeX (through the New Font Selection Scheme, NFSS) knows about families (general shape of the font), shapes (upright, slanted, italic), series (bold, regular). Not all (essentially independent aspects) of a font family are always available (e.g. the computer modern family was carefully designed so that frobbing all knobs independently is possible, others are redoing historic fonts which just didn't have all variants, or even any). For example, Times New Roman is (surprise!) the new roman (upright) font in use by the newspaper The Times. A more detailed discussion in the answers to this question.
Comment: Then... it makes me wonder: how exactly did he accomplish this? Here's the CV I'm referring to: https://www.uncg.edu/cmp/faculty/srtate/TateVita.pdf - take a look at the running header starting on page 2: "Stephen R. Tate". How is it slanted like that in TNR?


RMS Amplitudes of voltage

Question: I am looking here at the course of current fluctuations and have calculated the RMS values, but somehow it seems strange to me: with the black line there are small fluctuations, but the RMS value is still comparably large with, for example, the blue...
The RMS values are:
red:0.83mV
blue:0.44
green:0.52
black: 0.31mV
compare with the picute
Comment: Root mean square is just the... Root of the mean square of the sample. Dynamics like "the black squiggles less than the blue" don't play a role. Why do you think they should?
Answer: RMS includes the mean. If you want a metric for "variation" use the standard deviation instead or subtract the mean first (which is basically the same thing).
For the black curves moves slowly, but it still moves by a good amount. If you want a metric of the "fuzziness" than you can apply a high pass filter first that gets rid of the slow "drift" movemenent.

RMS Amplitudes of voltage


Not getting output in first Y86 program

Question: I'm trying to learn Y86, so I made a very simple program. It has an array of three long integers, and each block is filled by asking the user for an input through rdint.
The compiled(?) program asks for three inputs, but is not able to print them out.
Code:
Main:   irmovl  Array, %edx
rdint   %eax
rmmovl  %eax, 0(%edx)
rdint   %eax
rmmovl  %eax, 4(%edx)
rdint   %eax
rmmovl  %eax, 8(%edx)

irmovl  $10, %edi
Print:  irmovl  Array, %edx
    mrmovl  0(%edx), %eax
    wrch    %eax
    wrch    %edi
    mrmovl  4(%edx), %eax
    wrch    %eax
    wrch    %edi
    mrmovl  8(%edx), %eax
    wrch    %eax
    wrch    %edi

    halt

    .align 4

Array:
    .long 0
    .long 0
    .long 0

My input:
0
1
2

Output:
(three blank lines below)

Stopped in 22 steps at PC = 0x47.  Exception 'HLT', CC Z=1 S=0 O=0
Changes to registers:
%edx:   0x00000000      0x0000004c
%edi:   0x00000000      0x0000000a

Changes to memory:
0x0004: 0x024008f2      0x00000001
0x0008: 0x00000000      0x00000002

Changes to memory: 0x0004: 0x024008f2      0x00000001 0x0008:
0x00000000      0x00000002

Answer: There is a classic problem with the program: Lack of new-line in the ys file, causing YAS to misbehave.
The first problem is due to an error in YAS.   If you look in the yo file produced by YAS you will see that the last .long 0 statement never gets defined.  You will probably also see that the first line opcode in the yo file is 0x00, i.e. nop (when YAS encounter a final instruction without an associated newline, it wraps it around, screwing up the yo file)
This means that you loose the first irmovl  Array, %edx (it becomes some sort of nonsense, probably 0x00000000, i.e. 4 nops,) and so you write the first read character x'30' (ascii for '0') to the location pointd to by edx (which is probably 0x00000000,) is in the first instruction (which was 4 nops -- remember that you read a character, but it ends up in a 4 byte register and is saved as such.) So you are writing 0x00000000 to and address that was 0x00000000, which to YIS means that the register was not changed and therefore it is not shown in the "Changes to Memory" dump section.
You repeat this with the second read, writing 0x00000001 in the second word (overwriting the instruction in that location,) and with the third read, writing 0x00000002 in the third word (overwriting the instruction in that location.)
Now, of course, you are completely hosed!  You reset the pointer to the array (using edx,) and attempt to print the content, but Array(0), Array(4), and Array(8) contains 0x00000000, because that is what you defined it as (using your .long 4 statements for Array(0) and Array(4) and automatically for Array(8) since the default set-up for undefined memory in Y86 is 0x00000000.  And so, the program prints x'00' (because you print one character from a 4 byte word,) which, of course, is junk.
You will note that this fits with the dump from YIS.  eax does not show as it is unchanged from 0x00000000, its initial value.  edx and edi look A-OK, with edi pointing to Array(8).  The only memory that has changed is the second and third word of the program (which have been overwritten with 0x00000001 and 0x00000002, respectively)
So, in summary.  YAS makes a mistake.  You must overcome this problem by adding a new-line after the last .long 0 statement.   YIS misleads you because, critically!, it does not throw exceptions when you overwrite code with data.
Comment: You have not indicated that the links you posted were from your own website, which is required. I have removed them, as they are not necessary, anyway.

Not getting output in first Y86 program


Hamiltonian cycle in tournament

Question: I am new to graph theory and I've just learnt about Hamiltonian cycle in a graph which is a NP-complete problem. But I have to find a Hamiltoninan cycle in a graph with N*(N-1)/2 edges which I believe it is called a tournament. I saw an algorithm on Wikipedia which I din not understand properly( the one in which you have  v1, ... , vk ham path and when you add a vertex v you search for two other vertexes and reverse something ). So can someone please explain me an algorithm with has the time O(N^2) and which finds a hamiltonian cyclein a tournament ( I believe that in the ham cycle the last vertex and the first one must be connected ).
Comment: Then you should have an assumption that the graph is strongly connected, otherwise it's not Hamiltonian.
Comment: The tournament with vertices $\{1,\ldots,n\}$ and an arc from $i$ to $j$ if $i<j$ does not have a Hamilton cycle.
Comment: Is your graph directed or maybe undirected?
Comment: it is a directed graph
Comment: It is strongly connected
Answer: Well, I am not sure about which algorithm you are talking about (there's no link and I could not find it at Wikipedia's tournamet page, nor Hamilton cycle page), but you can do something like this:

Remove any vertex $v$ from $G$.
In each strongly-connected component recursively calculate Hamilton cycles.
If there are at least two SCCs, let $G_\top$ and $G_\bot$ be the top and bottom respectively; find vertices $u_\top \in G_\top$ and $u_\bot \in G_\bot$ such that $u_\bot \to v \to u_\top$ (we know that such vertices exist because $G$ was strongly connected).
If there is exactly one SCC, find two vertices $u_\top, u_\bot \in G\setminus \{v\}$ such that
$u_\bot$ is a successor of $u_\top$ in the Hamilton cycle of $G \setminus \{v\}$ we previously found, and $u_\top \to v \to u_\bot$ (again, we know that such vertices exist because $G$ was strongly connected).
Patch it all together.

This might take $O(n^3)$ time, but if you were to go backwards, i.e. constructing the graph, rather than deconstructing it, then SCCs calculation can be done on-line using find-union, and then it would take about $O(n^2\alpha(n))$ which is almost the same as a square.
I hope this helps $\ddot\smile$
Answer: This can also be done in O(n+m) time with n vertexes and m edges using depth-first search (DFS).

take a non-discovered point and create a DFS tree
after processing all child vertexes, put the parent vertex in a stack
repeat the process until all vertexes have been been discovered
finally, pop the items from the stack to get the required order

Why is this O(n+m)? Each vertex is processed no more than once and each edge - no more than twice.
Why is it correct? Let's analyze vertex post-processing in the DFS tree:

all vertexes from outgoing edges are in the stack, the top-of-the-stack being one of them (by induction)
both undiscovered and the parent vertex are from incoming edges (because this is post-processing)
since the parent vertex will be put in the stack before any other vertex from the DFS, the current vertex can be correctly be placed in the stack
if there are vertexes left after a DFS tree is processed, they will all have outgoing edges to all vertexes in the stack
Answer: A tournament is a complete directed graph (hence $n(n-1)/2$ edges). You can think about it as $n$ teams where each one played against each other and there is an edge going from $v$ to $w$ only if $v$ beat $w$ in the match (other wise a there is an edge in the reverse direction).
Now, we can construct an Hamiltonian path (not cycle) where each vertex "beat" the adjacent vertex on the right (and so the graph indeed as a corresponding directed edge). If we can "line up" the vertices  in such way then it corresponds to Hamilonian path.
Start with a single vertex - a path of length 1. For each remaining vertex travese the path from left to right, trying to find a place where you can fit it in, kind of like insertions sort. If the vertex beat the leftmost vertex in the path, place the new vertex as the new leftmost. Otherwise it lost to it, so you can go on to the next vertx and check again if it can fit in. The only case you wouldn't find a place between existing vertices in the path is if the new vertex lost to every one of them - hence you can put it rightmost.
Following this idea, you can easily write a "formal" proof by induction for the statement.
Comment: I need a path in which there is an edge between any two consecutive vertexes there is an edge and THERE IS AN EDGE BETWEEN THE LAST VERTEX AND THE FIRST ONE!

Hamiltonian cycle in tournament


Good example of a non-continuous function all of whose partial derivatives exist

Question: What's a good example to illustrate the fact that a function all of whose partial derivatives exist may not be continuous?
Comment: I removed the tag "math-education" (and replaced it by "examples").  Remember: this whole site is math-education in the sense that people are asking math questions and hoping to learn from the answers.  The tag should be saved for questions with an explicit pedagogical component.
Answer: I feel it's more informative to have the thought process that leads to the example rather than just be told some magic formula that works, however simple that formula might be.
Here is a way of explaining it. We'll decide that our function is going to be discontinuous at (0,0). In order to ensure that the partial derivatives there are defined we'll try the simplest thing and make the function zero on the two axes. How can we make sure that it is discontinuous at (0,0)? Well, a simple way might be to make the function equal to 1 on the line x=y. (If you object that that step was unmotivated, then read on -- it will become clear that I could have chosen pretty well any function and the argument still works.) How are we going to make sure that the function has partial derivatives everywhere? We could do it by trying to give it a nice formula everywhere. We care particularly about how the function behaves when you keep x or y constant, so let's see what happens if we try to choose the nicest possible dependence on y for each fixed x. If we do that then we'll be tempted to make the function linear. Since f(x,0)=0 and f(x,x)=1, this would tell us to choose f(x,y)=y/x.
Unfortunately, that doesn't work: we also need the function to tend to zero for fixed y as x tends to zero. But at least this has given us the idea that we would like to write f as a quotient. What properties would we need of g and h if we tried f(x,y)=g(x,y)/h(x,y)? We would want g(x,0)=g(0,y)=0, g(x,x)=h(x,x), and h(x,y) is never 0 (except that we don't mind what happens at (0,0). We also want g and h to be nice so that the partial derivatives will obviously exist. The simplest function that vanishes only if (x,y)=(0,0) is $x^2+y^2$. The simplest function that vanishes when x=0 or y=0 but not when $x=y\ne 0$ is $xy$. Multiply that by 2 to get 1 down the line x=y and there we are.
Now suppose we had wanted the value to be, say, $e^{1/x}$ at (x,x), so that the function is wildly unbounded near (0,0). Then we could just multiply the previous function by $\exp((2/(x^2+y^2))^{1/2})$.
The main point I want to make is that we could just as easily have chosen many other functions. For example, $\sin(x)\sin(y)/(x^4+y^4)$ vanishes on the axes and clearly does not tend to zero down the line x=y (in fact it tends to infinity).
Answer: The standard example I have seen is: $f(x,y)=\frac{2xy}{x^2+y^2}$.
Comment: Define it to be 0 at (0,0) and it's discontinuous there, although the partial derivatives exist.
Comment: However you define f at the origin, it will be discontinuous since its limit along the coordinate axes is zero, whereas it is 1 along the diagonal of $\mathbb R^2$. You get wilder example by starting with any antisymmetric function on the unit circle (say non-measurable) and extending it linearly on all (vector)lines of the plane i.e. defining $f(ra)=rf(a)$  for $r \in \mathbb R$ and $a$ on the circle.
Comment: But surely that's continuous on its domain of definition.
Comment: In George's "wilder example", further conditions on f will be needed to make the partial derivatives exist *everywhere* (is that what the proposer wanted?)
Comment: Bjorn is right, of course: the example was only meant to show that a function can be quite pathological and yet have directional derivatives in all directions at the origin. The construction is the source of a few amusing exercises: e.g. the extended function is continuous at the origin iff the function on the circle is bounded.
On the other hand even if you start with a  $C^{\infty}$ function on the circle (seen as submanifold of $\mathbb R^2$) the extended function on the plane will NOT be differentiable at the origin in general ( think bump function on the circle).
Comment: No, I'm quite happy with an example where the partial derivatives exist at some non-continuous point.
Answer: I was travelling when this came up.
With the same results as Georges Elencwajg's comment and Marco's recent answer, take
$$ f(x,y) = \frac{2 x^2 y}{x^4 + y^2} $$ and set to $0$ at the origin $(0,0).$  Along any line  through the origin $ x = a t, \; y = b t$ the limit is 0, as
$$ | f(a t, b t) | \leq a^2 | t / b | .  $$ However, along  the parabola $y = x^2$ the value is 1, and along the parabola $y = - x^2$ the value is $-1.$
To get "directional derivative" 0 in every direction through the origin switch to
$$ g(x,y) = \frac{2 x^3 y}{x^6 + y^2} $$ as
$$ | g(a t, b t) | \; \leq \; t^2 \; | a^3 / b |   $$ when $b \neq 0,$ but then if $y = \pm x^3$...the directional derivative  generalizes to the Gateaux derivative in other settings.
Answer: Consider $f(x,y)=1$ on the set $\lbrace{(x,y):y=x^2}\rbrace\backslash\lbrace(0,0)\rbrace$ and $f(x,y)=0$ on any other point.


HELP - Ford Focus Oil Change

Question: So the oil in my 2008 Ford Focus needs changed. Usually no problem, but the last shop I took it to over torqued the bolt and stripped it as well. I've tried using "Liquid Wrench" as well as various sizes of wrenches and its not moving at all. I've even tried removing the drain bolt when the car was cool and when it was warmed up a little. I'm starting to lose my mind over this and just getting so frustrated. Any suggestions will be appreciated!
Comment: When you say 'stripped it' , presumably you mean they rounded the head of the bolt, not stripped the threads?
Comment: Are you getting a good grip on the plug, or are your tools slipping?
Answer: You have three options; work on the bolt to remove it (possibly drilling it out, etc), remove the entire sump and order a replacement (they are surprisingly inexpensive) or change the oil with a pela style suction pump that extracts the old oil without removing the sump plug.
Answer: It sounds wrong, but the best solution is to take it to a dealer for an oil change. The cost isn't that much (often, cheaper than the oil change stores out there), and they'll get that plug out. They will then put a new plug in if needed; yes, you'd have to pay for it, but you'd have to buy one anyway if the old one was destroyed.
Answer: Try something like this. They've worked for me.
(https://i.stack.imgur.com/VIIp5.jpg)
Comment: A bit more explanation may be helpful...

HELP - Ford Focus Oil Change


Can the original Age of Empires II be played online with the HD version on Steam?

Question: My friend has an original copy of the game and was wondering if he could play online with me if I buy the HD version on Steam.
Comment: The HD version of Age of Empires has had its networking code rewritten to use the Steam matchmaking service.  It is incompatible with the original as far as I know.
Comment: @jw013 That does work as an answer...
Answer: According to the developers, the game's multiplayer mode will not be compatible with the original:

I have the original Age of Empires 2.  Can I play multiplayer matches with my friends who have the new HD version?
Age of Empires 2: HD Edition uses a different multiplayer service than the original version, so cross-platform matchmaking is not possible. You will need to have the same version as your friend in order to play together.
Answer: Old question but it seems no one has mentioned Voobly.
Voobly is social gaming network, see more here
Voobly AOE2 can be installed if you have either the HD Steam version or the original CD. Voobly has it's own servers to play the game.
Comment: Yep. When the question was asked, there was no conversion for Voobly yet, but today, the answer is you can play together on Voobly with different versions of the game if you use WololoKingdoms.


Usage of "against"

Question: What word is more preferable (or even correct) in following context:

Application is locked against modifications.

or

Application is locked from modifications.

Or, may be, both usage (against and from) are correct)?
Answer: My intuition says against is better than from.
However, I was surprised when I checked out what people really use in books. It seems like both (against and from) could be used. Here are some sentences I found:

If the application is locked against change, however, the Options menu cannot be installed, ...
That system'Il be locked up against any move I try to make.
  In Lock Read mode, the file is locked against others reading it.
... (although it can't hurt and might help to avoid keeping the file uselessly "locked" against modification in some operating systems and settings).
Processes that attempt to read or write a file region locked against reading and writing by another ...
The application is locked from the user until the printing process completes.
In essence, your application is locked from closing completely until all of its shared objects are no longer needed in any other client application.
Individual data items or sets of data are locked from concurrent access if they are involved in a transaction.
When a templatized file is locked from an edit, both the generated page and the data content record (DCR) are locked.

However, when I tried searching for locked * changes and locked * access on Google Ngram, it's clear that the normal usage is "locked against changes (or access)", which confirms my intuition.
So, I believe that you could use either (locked against modifications or locked from modifications); though if I had to choose, I would choose against. However, if I may, I'd like to suggest these instead:

This application is locked, and no unauthorized modifications can be made.
This application is locked to prevent unauthorized modifications.1
1) This sentence was suggested by Nice in our chat room. All credits go to him.

Also note that we should write a determiner this or the article the, depending on the context, before the word application.
Answer: Not sure if the second one is incorrect, but

Application is locked against modifications.

against, sense 1 is better because "locked" and "modifications" have opposite meanings. When its locked you can't do modifications.
Also you may wish to say "The application..." depending on the context.

Usage of "against"


Is there a way to see a D7200's serial number on screen to quickly check authenticity?

Question: We can see the serial number of some cameras on the LCD display while it's on. That is a hard thing to fake.
Does the Nikon D7200 (or any model similar to this one) have this same capability of having the serial number available in one of the displays?
Answer: There is no way to see a Nikon's serial number on screen.
However, the serial number is embedded in the EXIF data of photos taken by their DSLR, mirrorless, and bridge cameras (I'm not sure if the serial number is also in their compact cameras). You can extract this EXIF field (either Serial Number or Camera Serial Number) using the excellent exiftool software by Phil Harvey. (I am sure there are other tools that will display this EXIF tag as well).
Comment: Indeed, that's the `exiftool` I was referring to
Comment: Thank you,  @scottbb. Is this what you referred to?
 http://owl.phy.queensu.ca/~phil/exiftool/
The camera I am thinking about buying is D7200 (so I can use some of my old lenses)
So once I see the metadata of a picture, will I be able to see the Serial Number? Thanks a lot. This is what I was looking for.
Answer: Not on screen but, I have a D7000 and serial number for that camera is in the EXIF data of each image it takes. GIMP can view/edit metadata. For my D7000 camera...

Open JPG/RAW image in GIMP
Menu --> Image/Metadata/View Metadata
Select "Exif" tab at top
Look in "Exif Tag" column
Scroll down and look for "Exif.Nikon3.SerialNumber"
The number in the "Value" column is the serial number.
That number should match the number on the base of the actual camera body. If it doesn't then you have a fake.

Hope that helps.


Is it possible to construct and deconstruct magnetic waves?

Question: If I have two magnetic waves whose crests and troughs line up, will the two 'cancel' out similar to sound waves?
Comment: All waves will undergo constructive and destructive interference when the interact.
Answer: Any magnetic field has a source and the field lines which represent the magnetic field are closed lines, going in and out of this source:

If you approach two sources with the same poles together, you will get an area where both fields are zero. The fields cancel each other out.
If you approach two sources with the opposite poles together, their field will be united and the field lines are closed lines through both sources.

If I have two magnetic waves whose crests and troughs line up...

If you for sample switch on and of an electromagnet or rotate a permanent magnet you get a swelling magnetic field strength. But even in this case the magnetic field does not leave the source and to talk about this swelling magnetic field as a magnetic wave is misleading. The energy, you loose by your operations, is electromagnetic radiation and not a magnetic wave.

...will the two 'cancel' out similar to sound waves?

No, the magnetic field is attached to it source and can be displaced by another magnetic field, but not dissipated nor canceled out.
Answer: If you have a compass then they will appear to cancel at that point in time and space but be very careful because the energy of these 2 waves is still present.  They will eventually travel apart and be measurable again.  Just like water waves, 2 opposite moving waves appear to cancel when they collide but if you continue to observe you will see them remerge once they have passed each other.  The terms interference and superposition are used in physics and it gets confused sometimes.


Custom slide library feature for SharePoint 2013

Question: My customer is looking for the custom slide library feature for SharePoint 2013. Since the original feature (SP 2010) is being deprecated what would be the level of effort to recreate it as a custom solution?
I would highly appreciate any feedback, suggestion or guidance on how to implement it.
Answer: This feature is discontinued, but as always you can still create it using a direct link
<code>http://siteurl/_layouts/15/slnew.aspx?FeatureId={0be49fe9-9bc9-409d-abf9-702753bd878d}&ListTemplate=2100
</code>
Note - I have no idea how long this hidden feature will be there. But you can use this as an immediate solution till you create custom solution.
Answer: What we are doing is utilizing an html page and xps documents.
We created an html page, non-SharePoint page that is imported into SharePoint.  We have links (buttons) across the top and bottom that are hyperlinked to XPS documents.
We save each PPT slide(s) as an XPS document (Office 2013).
When you click on a link, the respective office's XPS document is rendered in the page.
A couple of benefits, you can hyperlink and open other types of documents as well(if needed)  without the clunkiness of having to leave a presentation.  It works fine with multiple page PPT/XPS documents.
Answer: If you really have the need to customize the library, it can be prepared using JavaScript components, just by looking at the information in the library.
 And it's not very time consuming.
https://msdn.microsoft.com/en-us/library/office/jj163201.aspx
Answer: Due to design limitation in SharePoint 2013 this feature is depreciated.even you access the feature by url hack but looks like it is not worth.
As per MSFT as workaround:
Users are still able to insert slides from PowerPoint files (see Copy and reuse slides from another presentation file.)
you can use the 3rd party tools i.e from DYNAPOINT


Change the size of the featured image for post?

Question: Is there a way to change the size of featured images on posts? When I click on one of my blog posts, I can see it's extremely large and inefficient.
https://graduateinvestor.com
Answer: You can try this CSS In Customize -> Additional CSS:
<code>.post-single-img {
        width: 500px;
        margin: 0 auto;
}
</code>
margin: 0 auto is used to center the image
Answer: The answer by Bruno is one way of doing it (by CSS) and that certainly works. The only thing to consider with this approach is that you're making the image fit the size, not making it smaller.
This is relevant when you consider the size of your web page in terms of the amount of Bytes being transferred. So for example if the source image is 1500px wide and 1MB in size, restricting the output size in CSS means the image is still 1MB to download.
So the other route is to select a different output size.
By default, Wordpress creates several copies of all Media Library images at different sizes, e.g. Thumbnail. So you could, within your code, select a smaller size source file, then use CSS to make precise changes.
You can also adjust the default size, and create your own custom sizes if you always need a version of specific dimensions - though note that you may need to regenerate your images if you change or add sizes as this isn't retrospectively applied.
This is a useful resource for you.


Compiler executable file csc.exe cannot be found in .NET 4.5 Azure deployment

Question: I have a site which was and works:

ASP.NET 4
MVC 3
Entity Framework 4.3
Running in an Azure web role (i noticed it was osFamily="1" which is weird as I expected it to be 2 -  but anyway...)
Azure SDK 1.7

I have upgraded my entire codebase to be up to date with the plethora of new toys. So now it is:

ASP.NET 4.5
MVC 4 (Razor 2)
Entity Framework 5
Azure config set to osFamily="3"
Azure SDK 1.8 (with Storage Client Library painstakingly upgraded to 2 not 1.7)

When I access the site in staging I get a yellow screen of death saying Compiler executable file csc.exe cannot be found. My question is Why?
It works fine locally, in Release mode too. I remoted in and the instances are definitely running Windows Server 2012 (therefore .NET 4.5?? I've seen it's hard to tell since .NET 4.5 replaces .NET 4 assemblies in the .NET 4 folders).
According to the response headers it is definitely running IIS 8 but interesting it claims X-ASPNET-VERSION is 4.xxxx. Is this normal for a ASP.NET 4 site?
UPDATE:
I targeted the .NET 4 framework and changed the osFamily to 2 and it now works. So I now suspect that I have a 3rd party assembly that uses .NET 3.5 or 2 (infact I'm certain I do) but surely when targeting a .NET framework higher than ones referenced in imported assemblies the higher version of the framework is used??
osFamily="3" only has .NET 4 and 4.5 installed so I guess this is the reason for the error but am I not right about the targeting thing? I want to use osFamily="3" what can I do here?
Stack trace
[InvalidOperationException: Compiler executable file csc.exe cannot be found.]
   System.CodeDom.Compiler.RedistVersionInfo.GetCompilerPath(IDictionary`2 provOptions, String compilerExecutable) +8675071
   Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames) +739
   Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources) +3293761
   Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources) +64
   HibernatingRhinos.Profiler.Appender.Util.GenerateAssembly.Compile(String fileName, String[] sources, IEnumerable`1 assembliesToReference) +1252
   HibernatingRhinos.Profiler.Appender.Util.GenerateAssembly.CompileAssembly(IEnumerable`1 sourcesResources, IEnumerable`1 assembliesToReference, String assemblyName) +118
   HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.SetupDatabaseDefaultConnectionFactoryIfNeeded() +929
   HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.SetupEntityFrameworkIntegration() +80
   HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.Initialize(EntityFrameworkAppenderConfiguration configuration) +47
   HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.Initialize() +73
   Web4.MvcApplication.Application_Start() +17

[HttpException (0x80004005): Compiler executable file csc.exe cannot be found.]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12864673
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

[HttpException (0x80004005): Compiler executable file csc.exe cannot be found.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12881540
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12722601

Answer: I had similar issue. Make sure that you are targeting correct compiler.
I was targeting v4.5 (but there shoul be v4.0 as there is now 4.5 compiler)
In web.config check
<system.web>
 <compilation debug="true" defaultLanguage="c#" optimizeCompilations="true" targetFramework="4.0">
</system.web>

Answer: Yes, if you have Server 2012, you're definitely running Fx 4.5 and not 4.0, as it's an in place upgrade.
To answer your question in bold, a given ASP.NET app can only use one framework at a time. If you're running as a 4.5 site, then any 2.0/3.5 assemblies should just run as is under framework 4.5.
So my suspicion is that those older assemblies are not the root of your problem.
That being said, I can't explain the csc issue. It might help to include the exact error message that you're getting as well as some of the stack trace.
Comment: Ah yes, the stack is interesting as we see csc is not being launched by ASP.NET but by HibernatingRhinos. And I see you found a thread on their forum relating this this. Thanks for the bounty points :)
Comment: Thanks David. Okay my suspicions are correct about the .NET version but now I'm running out of ideas. I've added the Stack Trace as asked. I notice Hibernating Rhinos stuff so wonder if it is to do with EF Prof. I can't see why but I can try getting rid of it
Comment: David Ebbo! You Save me! I've also HibernatingRhinos that generate me this error! Thank You!
Answer: Okay David Ebbo pointed me in the right direction and I started scrutinising Entity Framework Profiler. There is a thread here about it.
Something about it creating an assembly at run time and it would seem osfamily="3" (Server 2012) wont allow that (it worked on osfamily="2" (Server 2008 R2)). Not going to debug anymore than that since I don't want the profiler on my live environment anyway. Removing EF Profiler made it work.
Answer: I'm posting this in the hope that it helps someone. We were dynamically compiling code with the version 2 of the framework and on a .net 4 only server we got the error message. It was simply because we hard coded the framework version:
var provider = new CSharpCodeProvider(new Dictionary<String, String> { { "CompilerVersion", "v3.5" } });

So it was just a matter of removing that - presumably so it compiles with whatever version of the framework is in use at the time.
var provider = new CSharpCodeProvider();

So the error is just about code needing to be compiled but the compiler for the required framework version is not present. The other option was just to make sure .net 3.5 feature is installed.
Answer: I had a similar issue with an AWS windows server 2019 image.
The CSharpCodeProvider was set to .Net version 2.0 for compatibility reasons:
 new CSharpCodeProvider(new Dictionary<String, String> { { "CompilerVersion", "v2.0" } });

I've installed the ASP 4.7 feature, my app worked fine except for this issue.
It turns out that .Net 2.0 wasn't installed on the machine.
Solution - Install the .Net 3.5 feature from the Windows server management console.
.Net 3.5 comes with .Net 2.0


iPad USB-C Internet Connection: Tethering to Macbook

Question: I have an iPad Pro (2018 3rd Gen) with a USB-C Port and a 2018 Macbook Pro with a USB-C Port. Can I tether the iPad to my Macbook's Internet connection using a USB-C cable?
Answer: Yes, you can use a USB-C cable to share Macbook's Internet connection with the iPad just like the USB to lightning cable does on iPhones and older iPads.
Benefits:

The USB-C cable powers the iPad directly from the Macbook reducing the number of mains sockets you need to just one.
WiFi & Bluetooth can be completely turned off on the iPad.
Traffic is proxied to the iPad via the Macbook (which has a firewall in front of it).

Negatives:

Airdrop and Sidecar will not work with your wireless interfaces down.

Parts Required:

Standard USB-C charging cable that came with your iPad will work
Or this short (and tidy) Anker USB-C cable I've found works well

Internet Connection:
You Macbook should have a non-802.1x Internet connection to share, ie: straight WiFi.  If your WiFi connection is secured using EAP-TLS (with certificates) or other 802.1X security to stop this sort of thing, the USB-C Internet connection sharing won't work.
Configuration:
On Macbook Pro: "System Preferences" > "Sharing" > "Internet Sharing" and tick "iPad USB" as below:

Connect the USB-C cable between them and you're done.

It's a tidy, secure solution.


Why update before commit?

Question: I have heard this several times, that one should always update before committing to a version control system. Why is that ?
Answer: If you don't update you risk facing a conflict if someone else has edited any of the files you want to commit while you were editing them.
In source control systems like Subversion you won't be allowed to commit before you update even if changes belong to different lines - you will have to first do an update then possibly resolve conflicts, then you'll be allowed to commit. It works like this: you start committing, the Subversion repo server checks whether any of your changes conflict with recent changes, if any of them does conflict the commit is rejected as a whole.
In older systems (I can't name an example) that perhaps could cause serious problems like overwriting changes or doing an incomplete commit (some files committed, some not).
Comment: But what happens if you have missing files that you don't want anymore?
Comment: @jwize When you update you either get a "tree conflict" or those files are restored in your working copy.
Comment: But, if it doesn't create a tree conflict you will get a bunch of files back that you don't want. Seems like it could cause some annoying issues.
Comment: @jwize Not if you "vc delete" them locally.
Answer: So that you are in sync with the repo and if any conflict happens it happens in your local checkout files, which you can resolve and then commit.
Answer: You need to update so that you can get the latest changes before you check in. If you don't take an update, when you come to check in then the VCS will tell you that you need to update.
you can then effectively know your changes are fully integrated with others before you check in

Why update before commit?


Is a real number the limit of a Cauchy sequence, the sequence itself, a shrinking closed interval of rational numbers, or what?

Question: I've been studying a collection of analysis books (one of them Bishop's Constructive version) and contemplating the reals. Correct me if I'm wrong, but I feel that I have seen the Cauchy sequence itself in some places and its limit in other places described as the real number. I do understand that nested closed intervals have a point as the limit of their countably infinite intersection. I can visualize an arbitrarily small interval of rationals, any of which has an equal claim (its seem to me, at least until other considerations are brought in) to being an "approximation" of this point. Unless we know the limit point (via the geometric series, for instance), what are we approximating if not a yet better approximation of a yet better approximation? (Maybe the "approximation" terminology works better for cuts.) I suppose I'm asking not only for the clarification of the dominant convention but also for "real talk" about the mathematical imagining of real numbers.
Comment: There is a need of a formal definition of real number, though presumably in solving a problem, everyone or almost everyone starts from an intuitive notion. Depending on the formal definition one adopts, a real number is an equivalence class of Cauchy sequences, or a cut in the rationals. (These are the most popular, there are others.) I do not think anyone defines a real number as a Cauchy sequence of rationals, after all there are infinitely many Cauchy sequences that, intuitively, produce the same real number.
Comment: It's can't be the sequence itself, or else $\{1, 1.4, 1.41, 1.414, 1.4142,\ldots\}$ and $\{2, 1.5, 1.42, 1.415, 1.4143,\ldots\}$ would be different real numbers.
Comment: Bishop likes to drop the equivalence classes and define every Cauchy sequence as a real number, but then defines equality in a similar way (more or less the same.) He definitely writes that the sequence is the number also. I see the need for a formal definition, absolutely. Along the same lines, I value algorithmic/constructive approaches precisely because they are mechanized, exact.
Comment: Or what. ${}{}{}{}$
Comment: That's just it. I experience something like a clash of intuitive notions. The curve x^2 does not intersect the curve 2, right? We connect the imaginary dots when we plot functions, but most of the real points are limits of sequences we don't know the limits of, right? Or if they are equivalence classes, they are something like the mutual limit of equivalent sequences. I suppose that, for the counting-discrete part of my intuition, the real number is never finished, though in some cases we can compute the limit of an infinite series, for instance.
Comment: It's as if rational numbers are zero dimensional points and irrational numbers are shrinking 1-dimensional lines. In that sense a plot of real numbers would be full of overlapping intervals rather than dotted.
Answer: Real numbers are the "equivalence class" of Cauchy sequences of rational numbers. You take the set of all Cauchy sequences of rational numbers and put an equivalence relation on it. When do you say two Cauchy sequences of rationals say $x_{n}$ and $y_{n}$ are related? They are related if for every given $\epsilon > 0$ ($\epsilon$ is rational here), there exists a $n_{0}$ such that $n > n_{0}$ implies
$$ |x_{n} - y_{n}| < \epsilon $$.
Now you say that each equivalence class is a real number. How do you see the reational numbers inside real numbers then? So, suppose $r$ is a rational number, then the constant sequence $x_{n} = r$ is a Cauchy sequence and the equivalence class it belongs to is the rational number $r$ in the set of real numbers. This is the identification of rationals inside the reals.
This is one way of thinking about the real numbers. The other way is through Dedekind Cuts. You will find a wonderful exposition to Dedekind cuts in Walter Rudin Principles of Mathematical Analysis.
A yet another axiomatic way to think about the real numbers is that it is a complete ordered field, the natural numbers is the smallest inductive subset of real numbers, the integers are the subroup generated by natural numbers, and the rationals are the field of fraction of integers.
Pick and choose which you like. Any further discussion is welcome.
Comment: @s.z. The intuition is not so complicated.  The idea is that a real number, say $\sqrt2$, divides the rationals into two sets: the rationals that are bigger and the rationals that are smaller. And each real does this in a different way.  So you let the division itself stand in for the real number.  If all you have is the rationals, you can still specify a real value by cutting the rationals into a greater set (say, $\{x\mid x^2>2\}$) and a lesser set ($\{x \mid x^2 < 2\}$) and saying that the real value you are talking about is the one that divides  the rationals *that* way.
Comment: Thanks. I do have Rudin and I looked into cuts as well. What I didn't find in Rudin is examples of the multiplication of cuts. It was all on such a painfully abstract level, aesthetically pleasing perhaps but like digging a hole with a spoon when wants an intuitive/metaphorical grip first. I know that the "cut" can be thought of as the lower set, for instance, but then you have a giant set from negative infinity to the cut as a real number. I believe that it works, but where is the concept there? An isomorphism, I suppose, but that's not satisfying.
Comment: @MJD thanks for the edit.
Comment: That makes sense to me. I find the basic notion of a cut intuitive. I suppose I would like to see some examples of cut multiplication, which I'm sure I could look up. I just find it a little frustrating that the books I own don't do that to drive the concept home. Seems to me that abstractions are "cooked up" in the mathematical imagination via exposure to particulars.
Comment: @s.z. cut multiplication (and division) is tricky when working with negative cuts.  The easiest fix I've found for dealing with that is to construct "$[0,\infty)$" using cuts.  Here multiplication of two cuts $\alpha$ and $\beta$ is easy: $\alpha\beta = \{ab \in \mathbb Q \mid a \in \alpha, b \in \beta\}$. It's a nice semifield and once its properties has been established, we can then mimic the construction of $\mathbb Z$ from $\mathbb N$ to produce $\mathbb R$ from "$[0,\infty)$".
Comment: It's all clear and beautiful now. Thanks.
Comment: Is it then, strictly speaking, false that $\mathbb Q\subseteq \mathbb R$?
Answer: We have this Platonic ideal in mind when we think of the real numbers: Numbers on a line, densely ordered like the rationals, and like a line it doesn't have "any holes", i.e. some kind of completeness property (see the article Real Analysis in Reverse by James Propp).
It's easy to show that any two ordered fields, $R$ and $R'$, with the least upper bound property, say, are uniquely isomorphic, i.e. there exists a unique order-preserving field isomorphism $\varphi: R\to R'$. This guarantees that if we only use that the reals are an ordered field with the least upper bound property, then any statement we make using only those facts will be true for any set representation that has those properties as well.
In short: It doesn't really matter. All that matters is that there is some set representation and you're free to pick whichever one you like the best. I'm personally partial to the "equivalence classes of rational Cauchy sequences" and I've outlined a proof of existence and uniqueness in another answer of mine.
Comment: Thanks. I suppose the completeness property formalizes our intuition of continuity. On the other hand, I think our notion of continuity clashes with our notion of the discrete (counting). Anyway, calling the real number an equivalence class of c.s. is still vague IMO when it comes to using that real number in the presence of rationals. Perhaps that's what disturbs me. Use is not well defined. Also the question of what is being approximated? A real number is a set, a sequence, a limit, for instance, but how, exactly, does that connect to use?
Comment: I have some extra reading for you: http://math.stackexchange.com/questions/119763/what-are-the-primitive-notions-of-real-analysis and http://math.stackexchange.com/questions/261074/true-definition-of-the-real-numbers
Comment: I guess it's hard for me to believe that the number line has no holes. It's as if the irrationals are visualized as if already created, which makes sense in the concept of the unit diagonal but maybe not in the light of the positive integers as a foundation --admittedly not a mainstream choice, but one that fascinates me. Along these lines, let's say that a person integrates with an irrational as an upper limit, the integral is, I suppose, itself a representative of an equivalence class,  but what value does one use for x when giving some non-mathematician an number for applications?
Comment: I like your "primitive notion" concern. Yes, I'm interest in primitive notions. Integers are clear. I don't feel that arithmetic needs a foundation. I even find limits and shrinking intervals clear. I just think the orchestration of these various foundational moves within the context of their application leaves something to be desired. For instance, the exp function is a function of n as well as x, sort of, because we can't actually compute an "infinite" number of terms. So if we integrate exp(x) from 0 to y, with x and y real numbers, we have 3 entangled classes of sequences.
Comment: How far out do we go out on the series expansion of exp? Which term of which representatives of classes x and y do we plug into this series expansion? It's as if we have to boil it all down to rationals at some point, but this boiling-down is not something I see addressed much.