Symmetry element in the coversion of cyclopent-2-enyl anion to pentadienyl anion?

Question: I'm trying to draw the state correlation diagram for the reaction of cyclopent-2-enyl anion to pentadienyl anion but I don't know which symmetry element is preserved in this reaction. What could it be?
Answer: Let's look at the back reaction, the closure of the pentadienyl anion to the cyclopentenyl anion.  Once you understand this you'll see that the exact same reasoning applies to the reverse reaction that you asked about.  So here's a picture of the reaction we're talking about.

And here is a picture of the 5 molecular orbitals for the pentadienyl system

Since the pentadienyl anion has 6 pi electrons, the first 3 molecular orbitals (from the bottom up) are filled, each with two electrons.  That makes the third molecular orbital (the one in the middle of the diagram), let me call it $\ce{\psi}_3$, the highest occupied molecular orbital (HOMO).  The HOMO is so important because it is the orbital that will control our process.  If we look at the symmetry of the $\ce{P}$ orbitals on $\ce{C_1}$ and $\ce{C_5}$ in $\ce{\psi}_3$, we see that in order to get constructive overlap (overlapping the parts of the $\ce{P}$ orbitals with the same sign) as we rotate the $\ce{P}$ orbitals on these two carbons to form the bond that forms the cyclopentenyl ring, we must rotate the tops (or bottoms) of these two $\ce{P}$ orbitals towards each other.  If we were to rotate the top of one and the bottom of the other towards each other we would overlap a plus side of one $\ce{P}$ orbital with the minus side of the other $\ce{P}$ orbital and this would not result in constructive or bonding overlap.  The type of rotation that leads to bonding overlap in this example is termed "disrotatory".  It preserves a plane of symmetry bisecting the pentadienyl system (e.g. it contains $\ce{C_3}$) and is perpendicular to the plane of the screen.  This is the symmetry element that is preserved during the ring closure.  The exact same arguments also explain the ring opening of the cyclopentenyl anion to the pentadienyl anion.
Comment: I would suggest that you phrase your answer in terms of overall symmetry of the state wave function (capital \Psi) rather than the individual molecular orbitals (lowercase \psi).  Also, upon change in geometry, the molecular orbitals themselves also change, and so the frozen orbital approximation may not be appropriate.
Comment: Thank you for the suggestion, but orbital symmetry, Frontier Molecular Orbital theory, the Woodward-Hoffman rules - whatever name you choose - focuses upon the transformation of the HOMO during the process under consideration, so focusing only upon $\ce{\Psi_3}$ seems appropriate. You are correct that the orbitals transform during the process.  In this case the 3 MOs of the allyl system and the 2 MOs of the newly formed sigma bond are created.  For brevity I left out the MO's of the final product.  Although it is nice to view them, they are not necessary to explain the transformation when
Comment: you start from the pentadienyl side.  Just google "Woodward-Hoffmann rules" for more detail.
Comment: Maybe you should have done the same.  A quick look through "Woodward-Hoffman Rules" on Wikipedia reveals: "However, as reactions do not take place between disjointed molecular orbitals, but electronic states, the final analysis involves state correlation diagrams."   That is state (capital Psi) and not molecular orbitals (lowercase psi).  Your answer does not correct symbology; and given that there are MO considerations and state symmetry considerations, this could be confusing.
Comment: Please post an answer so that I can better understand your comment.  As to correlation diagrams, in MO theory they show how each of the pentadienyl MOs transform (correlate) into their respective cyclopentenyl MOs.  Again it would better help me understand your comments if you posted more detail.
Comment: PS The thing orbital symmetry has going for it is that it is a relatively simple and straightforward method that allows for the accurate prediction of reality, e.g. the disrotatory closure of the pentadienyl anion and the conrotatory closure of the pentadienyl cation, etc.
Answer: The allyl anion is delocalized and planar.  You have a mirror plane through its middle carbon normal to the plane of the ring, or a ${C_2}$ axis through that carbon depending on how the other two carbons are canted.


Uniqueness and symmetry of unbounded Poisson equation

Question: To find the electric potential $\phi: \mathbb{R^3} \to \mathbb{R}$ of a uniformly charged sphere with total charge $Q$ $S=\partial B_0(r)$ of radius $r > 0$ one needs to solve the Poisson differential equation
$$ -\Delta \phi = \frac{Q}{\sigma(S)} \delta_S$$
 on $\mathbb{R^3}$, where $\sigma$ is the surface measure. The $\delta_S$ denotes the surface dirac distribution of $S$, such that in integral form the equation becomes
$$ \int_{\Omega} - \Delta  \phi(x) d\lambda^3(x) = \delta_S(\Omega)Q,  $$
for any sufficiently regular  $\Omega$.
Now in physics classes I have seen the following argument (although with different notation):
(i) We write $-\Delta \phi = -\operatorname{div}(\nabla \phi)$, and first find $-\nabla \phi =: E$ (the electric field). With this it follows for any $\rho > r$ that
$$ Q = \int_{B_0(\rho)} \operatorname{div}(E)  d\lambda^3 = \int_{\partial B_{0}(\rho)} \langle E,  \nu \rangle d\sigma,$$
where $\nu$ is the surface normal on $\partial B_{0}(\rho)$. So far so good.
(ii) Then a "symmetry argument" is invoked stating that since the sphere is rotationally symmetric, it should follow that its electric field $E$ is as well and so $\langle E, \nu \rangle  =     \| E \|$. Furthermore, by the same argument $\| E \|$ is constant on $\partial B_{0}(\rho)$,  so the surface integral evaluates to $\sigma(\partial B_{0}(\rho))\| E \|,$ so in total we have
$$ E(x) =  \frac{Q}{\sigma(\partial B_{0}(\|x\|))} \frac{\partial}{\partial r}(x)$$
for any $x$ outside of $B_0(r).$ The potential then can easily be found from this (up to an additive constant). This is not entirely clear to me:
What we have shown is that there exists a radially symmetric solution to the  Poisson equation. Is this solution unique? Or in other words, does  the symmetry of the solution follow from the equation itself or do we need to maybe specify them as additional boundary conditions?
What results are there for uniqueness of the Poisson equation on unbounded domains? In my PDE class we only covered the bounded case.
Answer: $$\epsilon >0$$
$$\text{if the boundary condition }\lim_{r \to \infty}|\nabla\phi(r,\theta,\varphi)| \le \frac{1}{r^{2+\epsilon}}=0 $$
$$\text{ is required, then the electric field $E=\nabla \phi(r,\theta,\varphi)$ is unique}$$
let the two solutions be $\phi_1$ and $\phi_2$ and let $\phi=\phi_1-\phi_2$
Apply Divergence theorem between a sphere of radial vector $r'$  centered on point $r$ with surface $S_1$ and another with radial vector $R$ also centered on point  $r$ with surface $S_2$,$ V$ is the space between $S_1$ and $S_2$, $|R-r|>|r'-r|$
$$\int_V \nabla^2\phi dV=0=-\int_{S_1} \nabla\phi dS+\int_{S_2} \nabla\phi dS$$
$$\int_{S_1} \nabla\phi dS=\lim_{|R-r| \to \infty}\int_{S_2} \nabla\phi dS=0$$
$$\lim_{|r' - r|}\int_{S_1} \nabla\phi dS=0$$
$$\text{using continuity of }\nabla\phi \text{ it follows $\phi_1=\phi_2$}$$


What special powers does cabinet have in Australia?

Question: A serving member getting a position in cabinet is often talked about in the media. What does it actually mean?
Comment: Please research before asking questions. Questions that can be answered by a Google search are not good questions for Stack Exchange.
Answer: This Wikipedia article explains it all rather nicely. It was also the first hit when I googled "Australian Politics Cabinet".
Sorry about the rather short answer, but the most basic research would have answered it.


Under what assumptions can vector orthogonality be preserved when interpolating onto a refined mesh?

Question: I am considering a two-grid finite element scheme for eigenvalue problems arising from PDEs. The toy problem I am addressing first is the 2D Laplace eigenvalue equation
$$\Delta u(\mathbf{x}) = \lambda u(\mathbf{x}), \quad \mathbf{x}\in\Omega$$
$$ u(\mathbf{x}) = 0, \quad \mathbf{x}\in\Gamma,$$
where $\Omega = [0,1]\times[0,1]$, with boundary denoted by $\Gamma$. I am using two uniform triangular meshes $\mathcal{T}_H$ and $\mathcal{T}_h$ (coarse and fine, respectively), such that $\mathcal{T}_h$ is obtained by one uniform refinement of $\mathcal{T}_H$. Denote the corresponding piecewise linear finite element spaces by $V_H$ and $V_h$, respectively. The associated matrix eigenvalue problems are then
$$A_H u_H = \lambda_H M_H u_H \quad \text{and} \quad A_h u_h = \lambda_h M_h u_h,$$
respectively. Here $A_H$ (resp. $A_h$) is the stiffness matrix given by:
$$ a_{ij} = a(\phi_i,\phi_j) = \int_{\Omega} \nabla\phi_i \nabla\phi_j dx dy,$$
and $M_H$ (resp. $M_h$) is the mass matrix given by:
$$ m_{ij} = (\phi_i,\phi_j) = \int_{\Omega} \phi_i \phi_j dx dy,$$
where $\{\phi_1,\dots,\phi_{N_H}\}$ (resp. $\{\phi_1,\dots,\phi_{N_h}\}$) are the standard linear basis functions.
For this particular problem $\{A_H,M_H\}$ and $\{A_h,M_h\}$ are symmetric positive-definite pencils, and consequently the eigenvectors of the coarse-grid problem are both $A_H$- and $M_H$-orthogonal (by which I mean, e.g., $u_{i,H}^{T} A_H u_{j,H} = 0$, whenever $i \neq j$), and similarly for the fine-grid problem.
Suppose I have two "exact" (machine precision) eigenpairs $(\lambda_{1,H},u_{1,H}) \in \mathbb{R}\times V_H$ and $(\lambda_{2,H},u_{2,H}) \in \mathbb{R}\times V_H$ for the coarse problem, so that $u_{1,H}$ and $u_{2,H}$ are $A_H$-orthogonal, and $\lambda_{i,H}$ taken to be the generalised Rayleigh quotient of $u_{i,H}$ with respect to $A_H$ and $B_H$. I want to construct two approximate eigenpairs, say $(\mu_{1,h},v_{1,h})\in \mathbb{R}\times V_h$ and $(\mu_{2,h},v_{2,h})\in \mathbb{R}\times V_h$, for the fine-grid problem by taking
$$ v_{i,h} = I(u_{i,H}) \quad i=1,2,$$
where $I(u_{i,H})$ denotes some interpolation of the coarse-grid solution onto the fine grid. $\lambda_{i,h}$ would then be taken to be the generalised Rayleigh quotient of $v_{i,h}$ with respect to $A_h$ and $B_h$.
Question: What assumptions are required on the interpolation method, in order to ensure that $v_{1,h}$ and $v_{2,h}$ are $A_h$-orthogonal?
My thoughts:

Having looked at the simple 1D scenario, it seems intuitive to me that linear interpolation will yield the required orthogonality, due to the fact that the coarse-grid solution is piecewise linear (so, $I(u_{i,h})$ is essentially $u_{i,H}$ sitting in $V_h$). In a similar manner, I can deduce that the Rayleigh quotient approximations $\mu_{i,h}$ are exactly equal to $\lambda_{i,H}$.
It does not seem obvious to me that the same will hold for higher degree interpolation. In particular, I am interested in using a cubic interpolant, as this gives far superior approximations, but my a priori error bounds are dependent on this orthogonality.
Having implemented all of the above in MATLAB, both linear and cubic interpolation seem to preserve the orthogonality. This suggests that I am overlooking something with the cubic interpolation.
Comment: What is M? Is it a projection/prolongation operator? (don't recall which meant what)...
Comment: @Emil M denotes the mass matrix in this case. Sorry, this was not clear in my post - I have edited it to include the proper definitions of both A and M.
Answer: Actually, if you consider $y_{h,i} = P y_{H,i}$ and take the scalar product
$$
(y_{h,i}, y_{h,j})_{A_h} = y_{H,i}^T P^T A_h P y_{H,j} = 0
$$
then you see that fine-grid vectors will be always orthogonal if you take coarse-grid matrix $A_H$ to be related to fine-grid matrix by
$$
A_H = P^T A_h P
$$
which is quite a standard thing to be assumed in multigrid methods.
So, it is more about "how to define properly coarse-grid operator after choosing the interpolation" than "how to define interpolation for given $A_h$ and $A_H$".


Can you infect a SSD firmware with malware?

Question: Are the updates signed? Or can anyone make a piece of software to do this?
Comment: Does this answer your question? [Is it possible for the firmware of an SSD be infected by malware/malicious rootkits via the internet?](/questions/196610/), [Has there ever seen a recorded case of a M.2 infected SSD firmware?](/questions/260592), [What are the dangers of a firmware malware in 2021 and is it possible?](/questions/242848/) ...
Comment: @SteffenUllrich I think this mean it is possible but not for M.2 drives. I knew it was possible, but I was not aware M.2 was a limitation.
Comment: @SteffenUllrich I saw that before. In the link posted there they physically install a chip on the drive. I have not yet though seen any data on whether this is possible through just software means. You could potentially do it, but it would be much harder if the updates are cryptographically signed and the drive checks for it (which I can't find if they are or aren't).
Answer: I believe the update process for firmware is specific for the manufacturer or even model. While one would expect these updates to be cryptographically signed in this times, there is no guarantee that it actually is done properly (or even at all) nor that the signatures are validated properly nor that there is a working downgrade protection. It is too easy to make bugs in this area, as shown in Flaws in self-encrypting SSDs let attackers bypass disk encryption a few years ago.
Apart from that, even if the signature is properly done and verified this still leaves the problem that the key used for the signature might get compromised and the attacker might be able to create a new firmware. While this is less likely for "normal" criminal attackers it probably is in a range of what government agencies can do - especially government agencies from the same country as the manufacturer.
In other words: don't fully rely on the manufacturer. The risk of broken firmware or broken firmware update process can be mitigated with adding encryption and integrity checks in software outside the disk and by doing backups.


Placing RESTful calls to the CiViCRM demo

Question: I do not wish to go down the road of installing the CiViCrm CRM but I do have a requirement to place REST calls to the API. Ideally I would like to do this (for simplicity) against the public accessible demo site. Can this be achieved? Presumably I would need need to generate an API Key?
Answer: This isn't possible, sorry.  Could you say a bit more about what you're trying to achieve?  I'm not sure how useful it is to do REST calls against a demo site.
Answer: While REST isn't available (the demo DB is reset daily, and the demo account does not have a publicly accessible API key), you can explore the CiviCRM API using the API explorer once logged in.

http://d45.demo.civicrm.org/civicrm/api/explorer


Why my TVS Scooty Pep+ 90cc stops when it slows down?

Question: Driving in traffic is worst as as whenever I stop vehicle, the engine stops and it needs to be restarted again. What can be the issue? Facing this problem since an year now.
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Answer: Perhaps the carburettor needs cleaning, in particular the slow running jet. There are Youtube videos you can find, such as this one.
Absolute cleanliness is essential, as well as a clean tray to keep the parts in.
The bottle probably contains petrol. Don't use metal things to clean it, only soft things. In the video, petrol is squirted through the jet. I used to use (literally) a cat's whisker to clean it.
No naked flames.


Meaning of the root "ject"

Question: What does the root "ject" mean? It occurs in words such as "subject", "object", "project", "injection", "surjection", "bijection". As far as I know these words came to English from French and, in turn, from Latin. Prefixes "ob-", "sub-", "pro-" also came from Latin as Wiktionary says.
Answer: The root is Latin iaciō (throw, cast), whose supine is iactum.
Because of Latin ablaut (vowel change), prefixes like sub-, ob-, pro- trigger a vowel change to *-iectum.
Comment: This isn't ablaut, as the term is usually used, but unstressed vowel weakening.
Comment: @jogloran This is about eight and a half years late, but yes, it is unstressed vowel weakening. The weakening happened at a pre-Latin stage when the language had fixed initial stress; so _ˈprōiaciō, ˈprōiactum_ become _ˈprōiciō, ˈprōiectum_ just like _ˈprincaps, ˈprincapes/-os_ (from _*ˈprīmo-cap-_) becomes _ˈprinceps, ˈprincipis_. Then later on, stress distribution changed to the Classical paenult-or-antepaenult position, but by then the vowels had already changed.
Comment: More grammatical terms (many used in mathematics as well) and their [Latin derivations are available here](http://www.umich.edu/~jlawler/wow/grammar.latin.html).
Comment: I'm not actually sure what the literature calls it -- possibly vowel mutation. But it's not called unstressed vowel weakening -- for one, the changed vowel in *proiectum* is actually stressed...
Comment: Naturally, it's not ablaut, no prefix triggers it, it's the very fact of derivation that does, it's just a historical vowel alternation. The rule for this **a** > **e** change is: Short **ă** in a closed non-final and in a closed final syllable of a multi-syllable word changes to short **ĕ**. E. g.: Princĕps < *prim-căp-s (primus + căpio 'first taking'), here in a closed final syllable ă > ĕ.
Comment: All of these "rules" are not so straight-forward. You have prō-icio, -iēcī, -iectus, but capio, cēpī, captus.

Meaning of the root "ject"


How to re-size hard drive partitions

Question: I am struggling to divide my hard drive into two or more partitions. Evidently, I made a mistake when installing Ubuntu and now I have only one disk which takes the the whole space. I tried to use GParted but it could only make it 48 Mb less. Is there a way to correct it? Also, why are there two disks with the size of my whole drive?
Answer: You won't be able to edit your filesystem from a local boot - you'll have to use livecd if this is root hdd, which it appears to be.
The reason that there are 2 partitions of the same size is because sda2 is the root partition for sda5.  In other words, just as sda1 and sda2 are subpartions of sda, sda5 is a subpartition of sda2.  sda2 contains sda5.
Comment: Ok, but will I need to install the system again if I change the size of the main partition?
Comment: Theoretically, no, provided you are shrinking to a size larger than the data on the disk.  Practically, ALWAYS BACK UP YOUR DATA.  The risk is just too high of losing it.
Answer: You can't resize a partition while it's mounted. You have to unmount it first. One simple way to do that is to boot from a live USB and use a tool like GParted to resize your partitions.
The arrow at the left suggests that sda5 is a child partition of sda2. think of it as a folder inside a folder.

How to re-size hard drive partitions


Why using finite automata in implementing lexical analyzers

Question: I studied the subject of building a lexical analyzer using finite automata, through the classical way: Regular Expression -> NDA -> DFA. And I found it elegant, and a more solid approach for building a lexer.
Now my question is, what are other benifits from building a lexer this way, rather than the "ad hoc" way?
Comment: Actually, it's not obvious that you are asking about performance. Even if it was clear, performance questions can easily be off-topic/inappropriate for this site. Importance is not a factor for whether a question is appropriate for this site. There are many important questions that are off-topic or not a good fit for a Q&A format.
Answer: Speed and simplicity. A regular expression is a compact and declarative specification of lexemes. For most realistic regular expressions, simply writing code to mimic that specific regular expression would likely be something like an order of magnitude longer and less clear. This is especially true if you want high-performance.
A regular expression, on the other hand, can be compiled to very efficient code and is relatively simple to understand. You also get guarantees that are difficult or impossible to verify of code.  For example, a regular expression is guaranteed to be implementable using only a fixed, finite amount of memory and matching is, of course, guaranteed to terminate. This is very similar to the reasons we use primarily SQL to query relational databases rather arbitrary code.
So far this has been an answer to the question of modeling/implementing lexical analysis with regular expressions, and not to why we would implement regular expressions with DFAs. Again, the main reasons are speed and simplicity. There are however, many other options including: directly interpreting the regular expression operators, compiling regular expressions to machine code, differentiating regular expressions, NDAs clearly, converting a regular expression to a CFG and applying CFG techniques. Many of these approaches are arguably "inherently" slower than DFAs, e.g. using CFG techniques suggests that there will be overhead to support a degree of flexibility that is not used.
There are two obvious ways of implementing a DFA at least when the alphabet is reasonably small. One is to have a two dimensional table indexed by state and character. This approach is modular in that you can write the matcher once and just change the language by providing a different table (perhaps dynamically). Matching involves incrementing a pointer, one 2D table lookup, and a highly predictable jump. A second approach is to "store the state in the instruction pointer/program counter" by having each state be its own block of code. Matching in this case involves incrementing a pointer and a(n unpredictable) indirect jump. Ignoring instruction/data caching and branch prediction effects, it's hard to conceive of a more efficient approach than these. You are looking at two or three machine instructions per character of input. In the latter case, we can improve on the instruction caching and branch prediction performance by combining blocks of code together. Again, all this can be handled by a tool that takes a regular expression as input. There's no real way to beat this latter approach to implementing DFAs in performance except by improving instruction caching or branch prediction.
Comment: One caveat: translating a regular expression to a minimal DFA is computationally intractable. It doesn't scale.
Comment: @Thumbnail You don't need minimal DFAs, but you are correct: the exponential explosion of states going from NDA to DFA can make using a DFA completely infeasible. There's a trade-off between code-size and performance between NDAs and DFAs. This trade-off can be potentially overcome by moving outside of these models, e.g. by having parameterized families of states/transitions. For the purposes of lexical analysis, this exponential explosion tends not to happen for realistic lexers.
Comment: @DerekElkins Lexical analysis produces a parse, not just a tick. Combinator parsers that use Brzozowski derivatives, such as [Instaparse](https://github.com/engelberg/instaparse), optimise away the regular expressions but keep the non-determinacy of the equations/productions intact. This seems to be a workable compromise, and extends to CFGs.


Is there a way to get a list of updates in my sandbox?

Question: When developing in my sandbox, I want to get a list of items (custom objects, LWC, Role, Permission Set, Email Template, etc.) that have been updated.  How can I get a list of updated items?  Basically, I want to see the difference between production and sandbox so I can be sure that everything gets deployed.
Answer: There's not really much you can do aside from checking the Setup Audit Trail. There are apps out there, such as GearSet, that allow you to diff between orgs automatically. (note: I am not affiliated with GearSet, just familiar with their features. Make sure you do proper research before making any purchasing decisions.)
If you really wanted to step up your game, you might consider leaving Sandboxes entirely and start using Scratch Orgs. Scratch Orgs are "tracked", meaning that you can easily pull any changes using force:source:pull, then deploy those changes to another org with a simple command. This is, by far, a much better solution than Sandboxes for most use cases. You can even use Unlocked Packages to ensure that your changes are exactly as you expect.
Answer: You can compare the sandbox to production, i.e. by using this service: https://sforgcompare.herokuapp.com/

From a infosec perspective - keep in mind that this is not a service developed by Salesforce, even though i have no doubts about the level of professionalism of the the guy who's behind it.

OR, what i would recommend, do your changes in a scratch org that's designed for tracking development changes.
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_status


Completely removing scene (including all objects/materials it contained)

Question: I'm working on a Blender addon that will render multiple versions of a scene by altering node input parameters. To leave the scene unchanged, I want to render a copy of the current scene, which I successfully do. The problem is that when doing a full copy of a scene using ops.scene.new(type="FULL_COPY") it creates a copy of everything that existed in the original scene. When I later delete the new scene using bpy.ops.scene.delete() all those copied objects and materials still exists! How do I remove a scene and everything that was contained in it?
Answer: Maybe you can consider starting with a new blend file (empty), then you pass to addon the source blend file. The addon can link the scene/collection from the source file, render and remove linked. Then repeat the process.
Or, to follow your initial setup, you could put the whole scene in a "root" collection and then call bpy.ops.outliner.collection_delete (hierarchy = True). In theory with hierarchy = True it should delete all the objects contained.


How to pass a UserControl with CommandParameter?

Question: I have using a DelegateCommand and i want to pass the UserControl with Command.
#region OpenViewCommand
private DelegateCommand<UserControl> _openViewCommand;
public ICommand OpenViewCommand
{
    get
    {
        if (_openViewCommand == null)
            _openViewCommand = new DelegateCommand<UserControl>(new Action<UserControl>(OpenView));
        return _openViewCommand;
    }
}

public void OpenView(UserControl ViewName)
{
    UserControl ctrl = (UserControl)ViewName;
    JIMS.Controls.Message.Show(ViewName.ToString());
}
#endregion

Command in XAML
<Button Name="btnStockGroups" Command="{Binding OpenViewCommand}" CommandParameter="JIMS.View.Stock.StockGroups">stock group</Button>

Comment: Why do you need access to the control in your ViewModel? The general MVVM appraoch would be to bind your control to the ViewModel and read data from the properties that it is bound to.
Comment: Is the OpenView command intended to cause a particular type of UserControl to be instantiated and shown to the user?
Answer: If you give your UserControl an x:Name (e.g. "MyView"), you should be able to do something like this:
<Button Name="btnStockGroups"
        Command="{Binding OpenViewCommand}"
        CommandParameter="{Binding ElementName=MyView}">

Comment: How can you do it without naming the element?
Comment: the element is not in the window.. its a UserControl file


How to reference column name instead of e.ColumnIndex in WinForm DataGridView event handlers?

Question: Some event handlers for the WinForm DataGridView have DataGridViewCellEventArgs as a parameter and a ColumnIndex as a property of that argument.
ColumnIndex is a number representing the column's ordinal #.
Is there a way to reference a column name from that argument instead of column index?
So instead of doing:
if (e.ColumnIndex == 1)

I prefer something like:
if (e.ColumnName == "CustomerName")

because if a column changes its position, it will break the code.
Answer: Sure. It's of course not directly in the DataGridViewCellEventArgs, but it's easily obtainable. In your event handler:
DataGridView dgv = (DataGridView)sender;
string columnName = dgv.Columns[e.ColumnIndex].Name;

Comment: string columnName = dgv.Columns(e.ColumnIndex).Name; if you are using VB.NET instead of C#
Answer: if (e.ColumnIndex == dgv.Columns["CustomerName"].Index )
{
    and so on....
}

Comment: On my RadGridView I need the UniqueName="CustomerName" set
Answer: The answers above works great but if you have to reference cell index a lot then I will just add private int members to the form, name them "idxMeaningfulColumnNameHere", then initialize these members in Form's constructor. I found it much easier this way.
idxMeaningfulColumnNameHere =
    this.YourDataGridViewNameHere.Columns["ColumnNameHere"].Index

Answer: Here is a custom method to be added to your DGV.
<Extension()>
Friend Function getColumnIndexByName(ByRef dgv As DataGridView, ByRef colName As String) As Integer
    For Each column As DataGridViewColumn In dgv.Columns
        If column.Name = colName Then Return column.Index
    Next
    Try
        Throw New Exception("Column Name not Found")
    Catch ex As Exception
        MessageBox.Show(colName & ": " + ex.Message)
    End Try
    Return -1
End Function

With that you can do something like:
If dgv1.getColumnIndexByName("SOME_COLUMN_NAME") = e.ColumnIndex Then Do_something()


What Should Be The Precautions While taking Care of pneumonia patient?

Question: What precautions should I follow while taking care of a pneumonia patient?
Comment: Welcome to health SE :-). Are you asking about precautions to prevent getting infected or precautions for the patient (so as not to cause harm)? In general, it is a good practice to include some of your own research in questions on SE as well as provide as many details as possible. For more information on how the site works, please take our [tour] or visit the [help]. Thanks!
Answer: Pneumonia-causing germs can become airborne and hence spread easily from person to person. While taking care of a patient recovering from pneumonia it is preferred to use a face mask so that there is minimum exposure to airborne droplets from the patient formed as a result of coughing or sneezing. Moreover, use of hand sanitizer is advised before and after visiting the patient as common surfaces e.g. table tops, door knobs and bed covers can be rich of body fluids from the patient. Generally, keeping a distance from people who are coughing or sneezing and washing your hands after every possible interaction can help protect against pneumonia in general.
Comment: A healthy person with normal immunity will unlikely catch pneumonia from another person with pneumonia. Microbes that cause pneumonia are contagious, but pneumonia much less likely. For example, if you are in contact with someone who got pneumonia as a complication of flu, you can get flu, but less likely pneumonia.


adjustViewBounds analogue in Jetpack Compose

Question: I'm trying to make an image take up container width and have height based on image ratio. In XML, I would use adjustViewBounds on ImageView. Is there an analogue in Compose? If not, how can I achieve this?
Answer: Update for Compose 1.0+
SimpleImage is deprecated and replaced by Image which is bit more customisable - at least it allows to set modifiers. The general idea of maintaining image ratio stays the same:
val painter = painterResource(id = R.drawable.android_studio_logo)
val imageRatio = painter.intrinsicSize.width / painter.intrinsicSize.height
Image(
    painter = painter,
    contentDescription = null,
    modifier = Modifier
        .fillMaxWidth()
        .aspectRatio(imageRatio)
)

Old answer for 0.1.0-dev06
I don't think that something like adjustViewBounds is currently supported out of the box in 0.1.0-dev06.
By looking at the source code, SimpleImage doesn't seem to be customizable. All it does is drawing the image over the Box with exact same size as the image:
@Composable
fun SimpleImage(
    image: Image,
    tint: Color? = null
) {
    with(DensityAmbient.current) {
        val imageModifier = ImagePainter(image).toModifier(
            scaleFit = ScaleFit.FillMaxDimension,
            colorFilter = tint?.let { ColorFilter(it, BlendMode.srcIn) }
        )
        Box(LayoutSize(image.width.toDp(), image.height.toDp()) + ClipModifier + imageModifier)
    }
}

But based on that implementation, effect like adjustViewBounds can be achieved by using different size modifier. Instead of specific exact size we can apply LayoutWidth.Fill to occupy entire width and then adjust height using LayoutAspectRatio with the ratio of the image:
val image = imageResource(R.drawable.android_studio_logo)
val imageRatio = image.width.toFloat() / image.height.toFloat()
val imageModifier = ImagePainter(image).toModifier(scaleFit = ScaleFit.FillMaxDimension)
Box(LayoutWidth.Fill + LayoutAspectRatio(imageRatio) + imageModifier)

Of course for better reusability and readability we can wrap it in a function.
Here is how the result looks like:
Comment: Staring with beta01 imageResource is now an extension function on Image Bitmap. So...
bitmap = ImageBitmap.imageResource(id = R.drawable.android_studio_logo)
Comment: Can anybody suggest what would be the equivalent way of specifying the modifier based on the latest version of compose. The constructs LayoutWidth and LayoutAspectRatio have been deprecated and removed in the latest version of compose, https://developer.android.com/jetpack/androidx/releases/compose-foundation
Comment: but adjustViewBounds would consider available height for image, this solution doesn't do it, bottom content won't be visible if there is no scroll, image will take the whole space
Answer: At the time of version 1.0.0-alpha06, it's similar to the accepted answer.
For example, for vector resources, the code is as follows.
@Composable
fun VectorImage(asset: VectorAsset) {
    val imageRatio = asset.defaultWidth.value / asset.defaultHeight.value
    Image(
        asset = asset,
        contentScale = ContentScale.Fit,
        modifier = Modifier.aspectRatio(imageRatio).fillMaxWidth()
    )
}

Answer: You can accomplish this without needing to calculate the image ratio
Image(
    painter = painterResource(id = R.drawable.test),
    contentDescription = "test",
    modifier = Modifier.fillMaxWidth(),
    contentScale = ContentScale.FillWidth
)

Comment: While this code snippet may be the solution, including an explanation really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion.


Is Lord satyanarayana avatar of Vishnu and mentioned in puranas?

Question: People in Maharashtra and Andhra celebrate sathyanarayana puja on full moon day. Puja will be made  and a story will be told for 45 minutes. Even I did twice in Shirdi Sai Sathya Vratha. Is Lord satyanarayana avatar of Vishnu and mentioned in puranas?
Comment: I think Satyannarayana is Lord Vishnu Himself not avatar. Satyannarayana is usually depicted with four hands.
Comment: Wikipedia says "This puja is first mentioned in Skanda Purana, Reva Kanda by Suta Puranik to the rishis in Naimisharanya. The details are part of the Katha (Story) that is usually read along with the puja."  But I'm not sure if that's accurate or not.
Comment: @the Des--You belong to Andhra  you can inquire and give the info which will be useful. I have a big photo in my house and from my ancestors period doing a small puja and kesari as neivedyam will be done. He has four hands. One king couple will do the puja and narada will stand by Lord's sode with Tambura.
Comment: What I have heard from some upanyaskaras is that Satyanarayana vratham is normally done when some one seeks some material upliftment like good job, marriage, wealth etc. SriVaishnavas, especially those who have done saranagathi need not do Satyanarayana vratham or for that matter any Kaamya vratham. Again don't mistake me. I am just saying what SriVaishnavas acharyas have told. If some one does some vratham for material well being, no body would stop it or discourage it. In principle, Satyanarayana vratham is done for material well being.
Comment: @Krishna-Noted the unknown contents.
Comment: @Krishna--My parents undewent the baranyasam with HH  srimad azagiyasinar before 2 years.but continued to do satyanarayana puja bcoz the practice  came from our ancestors. It is not vratham but doing kesari as thaligamsai every pournami.
Comment: @KeshavSrinivasan Yeah. I searched for Skanda Purana but SkP we have doesn't mention this.
Answer: No, it isn't because it's a late invention in Hinduism based on the Satya Pir Cult of 16th century Bengal.
"Satya Pir" over time became "Satya Nārāyaṇa" and came to be associated with Viṣṇu. So, any references to the Satya Nārāyaṇa pūjā in the Purāṇas are most likely late additions.
From The Islamic Syncretistic Tradition in Bengal by Asim Roy:

Satya-pir added a whole new dimension to the syncretistic process of pirification. Pirification, in this particular instance, seemed to relate more appropriately to the phenomenon of sanskritization, which applied to the Hindu society, than to Islamization. On close scrutiny the Satya-pir myth and cult emerges as a brāhmanical device to absorb the increasingly popular pir cult. The popularity of the cult seemed to have been greater among Hindus than Muslims, for the large majority of writings on the pir were Hindu contributions. As was the case with other popular pirs, the identity of Satya-pir seemed rather obscure, indeed even more than others. Although a few shrines bearing the name could be found, an examination of the relevant literature and tradition on the pir categorically rejects the historicity of the pir. Some traditions quite arbitrarily linked Husain Shāh, a fifteenth-century sultān of Bengal, with the introduction of this cult. Other commentators on the subject idealized it in general terms as a symbol of Hindu-Muslim syncretism. In the absence of hard historical evidence we attempt to offer a possible explanation of its origin on the basis of an internal analysis of its literature.
The literary tradition on the pir adopted either of two motifs, the brāhman or the merchant motif, both aiming at vindication of the pir in the same way as the Hindu mangalkāvya literature proclaimed the glory Of particular popular divinities. The first motif involved a brāhman who was advised by God to worship Satya-pir, appearing in the guise of a Muslim mendicant. The brāhman's refusal to accept a Muslim divine led to God's reappearance in the form of Kriṣṇa—a feat which finally convinced the brāhman. The second motif concerned a Hindu sea-merchant and his son-in-law, who, despite their initial scant regard for Satya-pir, were able to save their entire fleet from a storm, thanks to the steadfast devotion of the merchant's daughter to Satya-pir and the final submission of the whole family to the pir. Both these versions may be interpreted as underlining a process of upper-class Hindu acceptance of the Satya-pir cult. The process was closely paralleled by the gradual recognition of popular Hindu deities by the hieratic brāhmanical order. The growing popularity of pir and the pir cult in Bengal was at once a challenge and an opportunity for the brāhmanical priestly class. The brāhman answer, consistent with their past tradition, was to create a cult of pir in abstraction in Satya (eternity/truth)-pir and to establish an essential identity of and a continuity between old and new beliefs, with a view to its final absorption. It was not without significance that there were more Hindu writers on the Satya-pir tradition than Muslim, that God appeared before the brāhman in both Hindu and Muslim guises, and, finally, that there was also a clear attempt to divest the cult of its Muslim associations, Vidyāpati, a brāhman writer, called Satya-pir God's incarnation in the present age (kali-yug) "in a faqir's guise.' An old Sanskritic text, the Skanda-purān, was interpolated, and Satya-nārāyan emerged to dislodge Satya-pir. The brāhmanical acceptance of the pir cult was not easily achieved. The orthodox brāhmanical reaction was positively hostile to it, as evidenced by the life of Kanka, the author of Satya-pirer-kathā. A brāhman of Mymensingh, Kanka was allegedly brought up by an outcaste chandāl couple, both of whom died while he was a boy of five. He was recovered by a kindly and scholarly brāhman, Garga, in whose care he grew up into an intelligent young man, well versed in all learning. He earned a good reputation as a poet, and was later attracted to a pir, becoming his disciple. On the pit's instruction Kanka wrote a ballad on Satya-pir, which was "well received by both Hindu and Muslims devoted to Satya-pir." But when Garga proposed to restore Kanka to his brāhman caste, in a gathering of the brāhmans at his place of birth, the orthodox brāhmans led by Nandu vehemently opposed, on the ground of his chandāl upbringing and also for his receiving spiritual instruction from a Muslim. They accused Kanka of being a Muslim, and copies of his popular work on Satya-pir were "torn" and "burnt."
Despite what may, perhaps, be taken as the initial opposition of the Hindu orthodoxy, the syncretistic objects of the Hindu authors of Satya-pir tradition were clearly achieved. Their attempts did not, however, meet with success, if they intended total absorption of Satya-pir into Satya-nārāyan. Satya-pir and Satya-nārāyan remained with the masses of believers as one and the same. One Muslim writer combined them both into one "Satya-pir-nārāyan" or "Ghāzi Satya-nārāyan." Another found "Pir-nārāyan" sitting in Mecca. A third addressed Satya-pir as Ghāzi and added: "Thou art Brahmā, Viṣṇu, and Nārāyan."

In Sacred Tales of India, Dwijendra Nath Neogi offers a different theory:

Our own idea of Satya Pir pujāh is that, under the persecution which the Hindus suffered at the hands of the Islamites in India, the Brāhmans and their folk carried on their own religious rites under colours slightly false, and in this way Satya-Nārāyana came to be called Satya Pir. The rites of worship are not many. These, again, are not at all attractive. Simple in their character, they may be gone through within the privacy of the Hindu home. The name, therefore, was in such a case everything, the object being to delude Mussulmans into a belief that it was no Hindu deity, but a Mussulman saint who was being worshipped. No image, be it noted, is made of Satya Pir. The low class Mussulmans also worship him. They, however, set up an emblem which consists of an umbrella rolled up and a brazen stick with a circular plate at its top. Both the rolled-up umbrella and the stick are planted in the earth.
The other theory is that low class Hindus began to actually worship Mussulman pirs or local saints. This went on for some time, till the Brāhmans slightly changed the name of Satya Pir into Satya-Nārāyan. This was easy, considering that no image was set up of the deity worshipped. The great Chaitanya, on the other hand, was for some time worshipped by many ignorant Mussulmans under the name of "Pir Gorāchānd." Gorāchānd is a name of Chaitanya. His sanctity entitled him to the rank of a pir in the estimation of Mussulmans.
Answer: To the first question of whether Lord Satyanarayana is an 'avataar' of Lord Vishnu, the answer is no. To the second question of whether the same is mentioned in the puranas, the answer is also no, he is not mentioned in any of the scriptures. This vrataam has started around 100 or 200 years ago. The chapter that gets mentioned in the story is not there in 'Skanda Purnam' and moreover god is not a business person to hold grudges if something is not done properly or with mistakes.
Even now there are many traditional families who doesn't follow this ritual.


Why don't we say Al HaNisim on Pesach?

Question: Why don't we say Al HaNisim on Pesach? Aren't the miracles performed at that time far more overwhelming (and explicit) than the miracles for which we do recite this?
Comment: Isn't there already enough extra stuff to say on Chol HaMoed? :P (The page flipping...the PAGE FLIPPING!)
Comment: There's plenty of literature about why not to say a blessing SheAsah Nisim... like we do on Chanukah and Purim. But I don't know of any about this.
Comment: Perhaps Al Hanissim was only enacted so that there would be a mention of the day in the Amidah.  The biblical holidays, which when the beth hamikdash is around have special korbanoth, are already commemorated in the Avodah (yaaleh v'yavo), so an additional prayer is unnecessary.
Comment: @Loewian I hear you.  I was thinking along those lines.  The tephilah we have for the Yom Tov defines the קדושת היום.  The Al Hanisim is not defining the קדושת היום.  It is simply expressing acknowledgement and thanks to Hashem. That is why it is placed in the מודים section.
Answer: Elleh HaMitzvot (#486) writes that we don't say a blessing of SheAsah Nissim LaAvoteinu... on biblical Mitzvot because we would have been obligated in those Mitzvot even if the miracles hadn't happened. It so happens that the miracles did happen in order for us to be able to use the Mitzvot to remember them. He writes "שמצות התורה לא הקבעו מחמת הנסים, אדרבה הנסים נתלו במצוות the Mitzvot of the Torah were not established because of the miracles, on the contrary, the miracles were hung on the Mitzvot." This could also explain why there is no Al HaNissim prayer.
Keter Shem Tov (vol 3 pg 142) suggests that Al HaNissim was enacted by Geonim and they didn't want to add something to a Mitzva Deorayta.
Comment: Al HaNissim was enacted by Geonim?
Comment: @ShmuelBrin His footnote references himself in an earlier volume http://hebrewbooks.org/pdfpager.aspx?req=14392&st=&pgnum=550&hilite=
Comment: I understood him to mean that the (long modern) *text* was established by the Gaonim, not the prayer itself. https://he.wikisource.org/wiki/%D7%A9%D7%91%D7%AA_%D7%9B%D7%93_%D7%90
Answer: "Ya'aleh v'yavo" is an addition to the bracha of "R'tzei," which discusses our plea that HaShem desire us & our prayers enough so as to re-institute the karbanos which they represent.
"Al hanissim" is a specific addition of thanks to the bracha "Modim" which is a general bracha of thanksgiving.
We only say Al hanissim when we have no ability to request that we reinstitute the karbanos. Purim and Chanukah have no specific karbanos for us to plea for. So Chazal found another method to mention them in Shmoneh Esrei. This shows their importance, despite not having karbanos.
As to mentioning the miracles of Yetzias Mitzrayim, we do! Chazal felt that they were so important that they require us to mention them many times in davening every single day! The daily brachos of "Emes v'yatziv" [in Shacharis] and "Emes v'emuna" [in Ma'ariv] [both, until "Ga'al Yisroel"] go into great detail about these Nissim (miracles) based on the last passuk of Shma, "I am HaShem, who took you out of Mitzrayim.
And then there are the paragraphs that were added later, such as the end of the book of Ezra-Nechemia, Kapital 9/ pesukim 5 or 6-11, (after Va'yevorech David"), which speak generally about those Nissim and then the addition of "Va'yo'sha" and "Az Yasher Moshe" which goes into great detail.
Then, on the actual Yom Tov, there is, of course, Hallel, which dedicates an entire paragraph to those Nissim (Perek 114), which we refer to on every holiday, showing the overwhelming importance of the miracles of Yetzias Mitzrayim.
Finally, in the Yomtov Amidah, we refer to these Nissim as well as our special relationship to HaShem, again, in a context of expressing our desire to bring those karbanos in the Bais haMikdash which would bring to our mind our great thanks "Al haNissim"(about the miracles) of Yetzias Mitzrayim!
Comment: "We only say Al hanissim when we have no ability to request that we reinstitute the karbanos." Why? Why not say both?
Comment: As I said at the bottom, when we bring korbanos, that is our "Al haNissim," as inherently we are "Thanking" haKadosh Baruch Hu for his kindness to us, in that He took us out of Mitzrayim.
Comment: On Pesach, we retell the story with the [Korban] Pesach, Matzah and Marror in front of us (Rabban Gamliel, quoted in the Haggadah). This "Sippur" is analogous to the Hoda'ah of "Bimei Mattisyahu" or "Bimei Mordechai." See Seder HaChinuch, Mitzvah 21, Sippur Yetzias Mitzrayim " "To relate the story ...each accd'g to his way of speaking, and to Praise His Name." See also Mitzvah 5, "The Shechita of the [Korban] Pesach." "The details...the reciting of Hallel (by the Levi'im, Minchas Chinuch) & the blowing of the trumpets (by the Kohanim, ibid) show the Hoda'ah aspect that accompanied the Korban.
Comment: With the Bikkurim (first fruits) ,which were best brought from Shavuos until Sukkos time, we thank HaShem for all the Nissim of Mitzrayim in a formal statement (Devarim, 26/4-8) before thanking-admitting to Him for coming to E.Yisroel & being blessed w wonderful crops. S. HaChinuch says, "Since a person awakens his thoughts and constructs truth in his mind w the power of speech, therefore, when HaShem, Blessed be He, bestows good to him and blessed him and his land to bear fruit, and he merited to bring them to Our G-d's House, it is fitting to arouse his heart to think "ALL is from Him, etc."
Comment: Interesting idea. Is it your own?

Why don't we say Al HaNisim on Pesach?


How do you turn off all scene lighting in the game view like you would with the scene view button?

Question: In the scene view, there's a control bar with a 'lighting' button that lets you toggle scene view lighting. This turns off all shadows and all light sources, i.e. makes it so that all objects are seen as fully bright on all sides.  How do I do the same for the game view?
Comment: Can you give us some context about why you want the game to look like this? Depending on your application, different solutions might present themselves, like using an unlit shader material, or setting up lights in your scene in a particular way...
Answer: The scene lightning button doesn't just disable scene lights, it activates another lighting mode or adds hidden lights to the scene.
If you would just turn of all lights, all objects would apear black.
I don't know how exactly the scene is illuminated while the lights are off in the scene view.
According to this (very old) post, the scene lighting is done with a directional light that is parented to the camera.
It's about 0.75 itensity and of gray color.
It looks the same way as the camera.
The scene lighting might have changed, as that post is from 2008.
Another way how to do it:
Blender does something similar.
It adds 4 lights to the scene and attaches them to the scene camera.
This adds some more smoothing to the light while still giving a sense of shading and direction.

Screenshot of Blender settings for the scene lighting.


Data Copy between ADLS Instances

Question: Copying data between various instances of ADLS using DISTCP
Hi All
Hope you are doing well.
We have a use case around using ADLS as different tiers of the ingestion process, just required you valuable opinions regarding the feasibility of the same.
INFRASTRUCTURE: There will two instances of ADLS named LAND & RAW. LAND instance will be getting the file directly from the source while RAW instance will be getting the file once validations are passed in LAND instance. We also have a Cloudera cluster hosted on Azure platform which will have connectivity established to both the ADLS instances.
PROCESS: We will have a set of data & control files landing in one of the ADLS instances (say landing). We need to run a spark code on Cloudera cluster to perform count validation between Data & control file present in Land ADLS instance. Once the validation is successful, we want distcp command to copy data from Land ADLS instance to Raw ADLS instance. We are assuming that Distcp utility will be already installed on the Cloudera cluster.
Can you guys suggest if above approach looks fine?
Primarily our question is whether DISTCP utility will support data movement between two different ADLS instances?
We also considered other options like ADLCopy but Distcp appeared better.
NOTE: We haven't considered use Azure Data Factory since it may has certain security challenges though we know Data Factory is best suited for above use case.
Answer: If your use case requires you to copy data between multiple storage accounts, distcp is the right way to execute this.
Note that even if you were to encapsulate this solution in data factory, the pipeline with copy activity will invoke distcp.

Data Copy between ADLS Instances


Are you able to place Wind Turbines and Large Solar Panels onto large Storage on vehicles in Astroneer?

Question: I started a new game and while creating a rover to find a solar array I wondered if I was able to place wind turbines onto large storage fit onto trucks, if anyone can help please do!
Answer: Yes, you can place wind turbines on large storage.
In fact you can place any Tier-2 item on a Paired Double Connector Node - research artifacts, large solar array, seat, etc.
http://astroneer.gamepedia.com/Attachment_Slot
Comment: Thank you, I was wondering this because I was unable to place down turbines on regular storage and so I was wondering if I could place it on large storage as well
Comment: Right, the storage shelf/table (http://astroneer.gamepedia.com/Storage) only has single connector nodes like the backpack. Large storage, modules, and vehicles have paired connectors which you need for Tier-2 items like turbines.
Answer: Using a large turbine or solar panel may not be the best choice).  Kinda depends on your needs.
I generally build the large rover.  I put 1-seat module on it from the medium printer (NOT! the one from the vehicle bay as it can't be removed later).  Then I add the large storage on the back which then provides 4 2x slots.  Then I place a medium storage next to the 1 seat on front.
I put 1 small solar and one small wind on each face (front and back) in the top row of that medium panel.  That way at least one is always facing the sun or into the wind whatever direction I am driving.  I also typically place 2x organic on the back and 1x on the front with a small generator.
That one panel then serves as the power supply for the vehicle and harnesses all forms, light, wind and organic.
This leaves the rear configurable for what I want (expect) to haul.  For exploring, I typically put 2x medium panels and leave 2x of the double slots free for unknowns and provides 16x storage for harvested ore.  If I am not expecting unknowns, then I can load up with medium panels yielding 32x storage.  Then you can lift the whole panels off and drop them on your smelter for refining.
Using a large turbine or solar consumes a double slot.  So that takes up the place for an unknown or a medium panel and loosing 8x storage.
By using the 1-seat from the medium printer (instead of vehicle bay) you can remove the seat and gain another double slot for unknowns or add another medium panel for 8x storage and then tow it with another rover.


my cookie dough was in the fridge overnight and now its rock hard can I microwave it?

Question: Can I microwave the hard rock hard cookie dough that was in the fridge overnight?
Comment: Well I tried putting the bowl is a sink full of hot water and its working!
Comment: What type of cookies are you trying to make?
Comment: Deb, welcome! You can actually answer your question if you want to, it seems you found a good solution already.
Answer: I'm going with a tentative "yes, but" here.
First let's have a look at what happens in your dough and why most recipes recommend refrigerating the dough before baking.
A "basic" cookie dough consists of fat, flour and sugar (plus a few extras, obviously) that form a delicious, crumbly substance after baking. The secret to the way the cookie crumbles (pun intended) lies in the way the fat separates the flour and any kind of liquid involved to inhibit gluten formation - which would translate to a tough and rubbery cookie. But the fat must remain in small, yet coherent pieces (even if we don't see them in the cookie dough), which will melt during baking and create tiny "shards" or the delicious buttery crumbs of our cookie. A very extreme example of the mechanism is puff pastry: layers of dough separated by thin layers of fat.
A dough with lots of fat will be soft at room temperature (perhaps even too soft to work with) and firm when cold. So when a dough is too firm, letting it warm up a bit is the obvious and correct choice.
But if you use your microwave, you could easily warm it up too much - making the dough hard to handle and you might have to cool it again. There is another issue if you warm your dough just a bit more: Did you ever heat butter in the microwave? It melts quickly and it does so unevenly. Some parts are still soft, others runny. This can easily happen to the fat in your dough as well. But if you get liquid fat, it can't fulfil the "form pockets and later crumbs" requirement stated above, affecting the cookie texture negatively.
So my conclusion:

The safest method is to take the too-firm dough out of the refrigerator and simply wait until it's soft enough. If you want to speed the process up a bit, choose a warm spot. Shaping the dough into a disk instead of into a ball before refrigerating will help the dough warm up more consistently, but not all doughs are firm enough to be shaped (but I suspect it's possible in your case).
If you absolutely must use the microwave, do so very carefully, on the lowest setting and in short intervals to prevent the fat from melting.
Comment: Given how the hot spots form, I'd think overheating would be more likely to spot-cook the dough than "just" melt the butter out (given that that melting out happens in a narrower band of temperatures, it's easy to overshoot).
Comment: @Megha that would be even worse.
Comment: See https://physics.stackexchange.com/questions/307541/what-makes-cheese-so-effective-at-absorbing-microwaves for more about why fatty foods can quickly get very hot when microwaved.
Answer: I would do it,
BUT
Slowly, 20, 20 seconds at a time, take it out, try to roll it and see how it goes.
If you go all out and nuke the dough, then you will cook it.
Answer: I always do the metal bowl in a bowl of hot water, it can melt the chocolate chips a bit if your not careful so maybe keep a bit extra on hand.
Comment: I like this better than the microwave plan. Heating is usually uneven in a microwave , with stuff on the bottom melting first. Then there are oils and chips, which heat much faster than floury or wet stuff. With hot water, you get to control the hottest anything is going to get. -Not so in a microwave.
Answer: If I were in your situation I would either place it in the microwave for periods of 10 or 20 seconds, or you could try putting it in a bowl and then placing that bowl in a bigger bowl of hot water.
Answer: Saturday 10 Oct 2020. 10 second intervals worked like a charm to bring the cookie dough to a workable texture. In all, I nuked the dough in three 10 second sets adding up to 30 seconds total for about 3 cups of homemade chocolate chip/walnuts cookie dough. The cookie dough was flawless


Chuck Norris entry in Expendables 2

Question: In Expendables 2... the scene where Chuck Norris enters. There are villains everywhere. They all suddenly get machine gunned down and a rocket takes out a tank. Since no character really cares to ask how the bullets and rockets came from everywhere, is this a part of the Chuck Norris joke as well?
Comment: So.....? What is the question?
Comment: edited the question
Answer: The bullets and rockets didn't come from "everywhere".  If you watch the clip, Booker (aka Norris) is walking out from a cloud of smoke.  if you recall, there was a building just behind that smoke.  You can tell because the car he walks out from behind can be seen at 1:20 in the clip below.  So, it's very possible (probable) that he was on the roof of the building.  From that vantage point, he could have easily seen and hit every soldier and the tank.
Comment: looks like the video won't play outside of youtube. but thanks for that @Johnny Bones, somehow in my head... I remembered fire coming from everywhere. It seems to be coming from one direction only. So looks like that was not part of the Chuck Norris joke :)
Comment: In the bottom right corner, there is a youtube logo.  Just click on that and it will take you to youtube and the clip.  Sorry about that.

Chuck Norris entry in Expendables 2


Pages: "Spelling and grammar" option disappeared

Question: I am writing a document in French and I can't change the spelling language from English to French. I usually manage to do that (Edit > Spelling and grammar), but it isn't working this time around: The "spelling and grammar" option seems to have been replaced with "spelling", and when I click on "spelling" the window that opens up doesn't allow me to change the language. It only allows me to specify whether I want to check the spelling in the entire document or in the main text body. I hope you can help.
Answer: Start up Pages on its own and create a new blank document and then go to the Edit menu and see if it is correct, with Spelling and Grammar.  If so, try going to Pages > File > Open and see if your French doc also can be opened and works right.


Another elevator question..?

Question: I read in a book that if a lift descends with an acceleration of more than 9.8 metre per sec squared , the person would strike his head on the ceiling of the lift . I did the calculations and yes the reaction force is negative (in the same direction as weight) . But I don't quite understand how that works. I mean can't our body go down too? Not feeling very intuitive with this :/
Comment: Yes, you would fall. But the elevator apparently would fall faster. Hence, you'd bump your head.
Comment: #Glen , I don't get the concept of negative reaction force. Does it mean that the normal force is assisting us to go down??
Comment: Take a cup of coffee in your hand and accelerate it downward very quickly (faster than it would fall if you just dropped it). Would the coffee stay in the cup? Hopefully this will give some you some intuition as to why you would hit your head on the elevator. Disclaimer: don't actually do this experiment!
Answer: Reaction force arises when the earth tries to accelerate the person with $g$ but the elevator stops the person by exerting the reaction force. When the elevator itself is falling faster than $g$, it cannot prevent the person from falling with $g$ and so reaction force is non existent. Since, the person is accelerating slower than the elevator, he goes upwards with respect to the elevator. And when he strikes the top, he is again prevented by the elevator from going any further by giving a reaction force in the downward direction.
Answer: If a lift suddenly began accelerating downwards (i.e. with an infinite jerk) at the same rate as $g$ then the person and the lift would fall together and the person would not hit their head on the ceiling of the elevator. They would feel weightless, but their feet would remain in contact with the floor until they pushed off from it. The elevator would have to accelerate faster than $g$ for the person to strike their head.

Another elevator question..?


Frac function losing precision

Question: I have a TDateTime variable which is assigned a value at runtime of 40510.416667. When I extract the time to a TTime type variable using the Frac function, it sets it to 0.41666666666. Why has it changed the precision of the value and is there a workround to retain the precision from the original value ie. to set it to 0.416667.
Answer: TDateTime is a floating point number. Some numbers can't be represented exactly as a floating point number. 0.416667 / 0.41666666666 would seem to be another one.
You can round to 5 or 6 digits for display. That gets you accuracy to around 1 second.
Answer: What Every Computer Scientist Should Know About Floating-Point Numbers should help, as should SO's own Precision of Floating Point - that will give you some detailed information to go with Jeff's answer.
Answer: One of the reason for the loss of precision is that TDateTime is a double, and Frac's parameter and return value is of type Extended.
When converting floating points from one type to another, some precision can be lost. (Same goes when doing arithmetic on them).
To compare float value correctly, you should use the CompareValue function from the unit Math.
Answer: Thanks for all your help on this, much appreciated. To get round my problen that was arising due to the change in precision I used the CompareTime function instead of the >= or <= operators for comparing the times.

Frac function losing precision


How to scale player as they travel between 2 points

Question: I'm doing a VR Project where the player walks down a hallway.
The player starts with a size of 10 and is supposed to scale down to a size of 0.5 (well the GameObject in which all the player stuff is inside is supposed to do the scaling). The script below is on the GameObject which has all the player things like the camera, hands and so on are inside it.
I'm not very good at coding so I'm pretty much failing on managing to write this script. this is how far I have gotten:
public class ScalePlayer : MonoBehaviour
{
    public GameObject minDistance;
    public GameObject maxDistance;

    public Vector3 maxScale;
    public Vector3 minScale;

    Vector3 posStart;
    Vector3 posEnd;
    Vector3 curDistance;
    Vector3 distance;

    void Start()
    {
        posStart = minDistance.transform.position;
        posEnd = maxDistance.transform.position;

        maxScale = transform.localScale;
    }

    void Update()
    {
        distance = posStart - posEnd;

        curDistance = transform.position - posEnd;

        transform.localScale = Vector3.Lerp(maxScale, minScale, curDistance);
    }
}

In my logic I have an invisible object for the start point and one at the end to save where the player is supposed to be big and where they should be small.
I don't know though how or where to put my scaling values (10 -> 0.5) and the script itself is throwing errors (probabaly because I really am not sure how to get the current position of my player compared to the start and end of the hallway).
But what I hope for, is that when the player walks down the Hallway and gets closer to my invisble end point, they smoothly shrink down to the size of 0.5 on their way there, and when they decide to go back, they scale up gradually on the way to the start to 10 again when they reach the beginning.
Working with Unity 2019 and C#.
Halfway solved my problem but I am Stuck with VRTK4. But thank you for the Edit DMGregory.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ScalePlayer : MonoBehaviour
{
    public GameObject minDistance;
    public GameObject maxDistance;

    float StartScale = 10;
    float EndScale = 0.5f;

    Vector3 posStart;
    Vector3 posEnd;
    float curDistance;
    float dist;

    public Transform movingPlayer;

    // Start is called before the first frame update
    void Start()
    {

        posStart = minDistance.transform.position;
        posEnd = maxDistance.transform.position;

    }

    // Update is called once per frame
    void Update()
    {

        dist = posStart.x - posEnd.x;
        curDistance = movingPlayer.position.x - posEnd.x;
        float shrinkProgress = Mathf.Clamp(curDistance, 0, dist) / dist;
        float scale = EndScale + ((StartScale - EndScale) * shrinkProgress);
        transform.localScale = Vector3.one * scale;
        //movingPlayer.transform.position = preScalePos;
        //Vector3.Lerp(Vector3.one * StartScale,Vector3.one * EndScale, curDistance);
        //Vector3 preScalePos = movingPlayer.transform.position;
        //transform.position = child.transform.position;

    }
}

Was my first time posting anything anywhere, so sorry for not getting it 100% right the first time with how things are supposed to look.
If anyone has tried something like this with VRTK and has any idea how to scale the player, I would appreciate the help.
Comment: "the script itself is throwing errors" if you want help fixing an error, you should *always* include the text of the error. Not to mention tagging your question with the engine you're using and formatting your code legibly, which I've fixed for you this time.
Comment: It's unclear to me in your edited code what specific problem you're having with VRTK that you need help with.
Answer: One solution could be to scale it over the remaining distance since you start at 10 then running back and forth would auto scale back up also. You would have to adjust to your needs.
using UnityEngine;

public class ScalePlayer : MonoBehaviour
{
public GameObject maxDistance;
public Transform movingPlayer;

void Update()
{
    //moving transform example to show movement remove this if you have a move already.
    transform.Translate(Vector3.forward * 2 * Time.deltaTime);
    //distance is the remaining distance before Moveplayers position and the end position.
    var dist = Vector3.Distance(movingPlayer.transform.position, maxDistance.transform.position);
    //set the scale to be the remaining distance
    transform.localScale = new Vector3(dist,dist,dist);
}


Is it realistic to learn UX design and web development at the same time, on top of school?

Question: I have a strong passion to learn both UX and web development, but on top of school it seems like a burdensome task. I am studying computer science.
Comment: UX isn't something you 'learn', because that implies that there is a final end result. You can 'learn' how to do a rubiks cube, but you *study* UX. It's an ongoing thing. You can study as much or as little as you want based on the time you have available and the desire to gain more knowledge.
Comment: Yes, it's realistic. Beneficial, even. A CS degree certainly will help any UX endeavors down the road.
Comment: Learning the basics of UX should not be burdensome. And use this board and others to fill in the gaps as they arise. Anyone involved in web development would benefit from some UX knowledge.
Comment: Yep, I was in a similar boat. What I found helpful was to not invest to a big chunk of time on top of your school study but to continuously learn both subjects in small chunks (that should be adjusted according to your school work load).
Answer: With so much going on, I think you need to narrow what are very broad fields and focus on certain topics within them.
"Learning UX design" is not something that actually defines your goals very well. UX practitioners themselves will argue (to little effect) what UX design actually consists of (See image below). I suggest you find a topic from the image below that sounds like it might be of interest and start by focusing on that, so that:

you do not feel swamped by what turns out to be a huge field
you can more easily define your goals
divide and conquer smaller chunks at a time
assess your own interests in a topic and perhaps move on to another

I can't really speak for web development, but a similar approach might also work here.
I would also add that knowing more about UX is an excellent grounding not just for web development but development of software, products and services generally as they all involve people!
For example, reading The Universal Principles of Design allows you to dip in to many different design principles that provide a great foundation for designing and creating pretty much anything.
If you want to stay abreast of what's hot, check out the programme for popular ux and web conferences, looking for talks that sound interesting to you and just read around and investigate them. And for past conferences, videos are very often available.

Infographic by Envis Precisely
Answer: Some say it takes 10 years (or 10,000hrs) of deliberative practice to develop expertise in any area.
Others say that some (usability) testing is infinitely better than none.
Becoming an expert in both fields simultaneously could delay both. However, if your priority is to be an engineer, pick up a few UX books to get the concepts. It will make you more well rounded and a better programmer.
Answer: Definitely, yes! If your curriculum allows, you can fill in "gaps" by taking up classes in Industrial Design, or Psychology, or even choose a minor in one of those fields. This way, you can combine "official school time" with your own study time. UX is a multidisciplinary field, you would profit a lot from picking things up alongside your main study.
Here's a popular blogpost about "fattening up your T": good to have a speciality, but in UX, you need to broaden as well: http://markdotto.com/2011/04/15/fatten-up-those-ts/
Moreover, you can also consider to do one of those educational programs that focus completely on UX's multidisciplinarity, such as: http://www.3tu.nl/sai/en/programmes-and-tracks/usi/ -- So you do not necessarily have to do it "on top" of school: it could just be your school-time!
Comment: thanks for the post. at this point of my education I'm still in community college but at the very least they have some classes in Psychology, Web Page contruction, Photoshop, and Illustrator to um.....fatten that T lol


AF Nikkor 50mm 1.8 stopped being recognized by D3500

Question: My lovely bride, of 40 years, bought me a new Nikon D3500 bundle. Loves me. I own a Nikkor AF d 50mm 1.8. Think it is about 13 years old. I have used it about 200 shots with the D3500 and worked great. Went to use it today and my D3500 says it is not recognized and the screen shows a blinking f_ _ _ in the aperture set area. The 50mm still works great on my D40. I reset my D3500 settings back to default. Any thoughts about what happened to my beautiful 50mm? I love it more than any other of my 8 lenses.
Answer: Put D3500 back into Manual and it still shows no aperture setting because it is on the lens ring. Took picture. Dah. Always used D40 in Manual so did not have to set it.
Comment: @scottbb Fair enough. I misunderstood it based on the rather casual syntax.
Comment: Alas, she was not to know that the D3500 had lost the feature of preceding D3x00 bodies that let them use AF and D lenses with auto exposure and control of aperture via command dial. Nikon is to be criticised for this intentional omission.
Comment: This doesn't seem to be an answer to the original question. You can edit the question to add more information.
Comment: @EricShain disagreed. This does answer the question. The original asker answered their own question.
Answer: Try to re-mount your lens to the camera but before that, rotate the aperture ring back and forth a few times.


Ohm's law and rheostat relation

Question: According to rheostat by increasing length potential increases and when potential increased then current also increases...but according to ohm,s law current decreases by increasing  voltage
Comment: Current certainly does NOT decrease when the voltage is increased, according to Ohm's law. Sorry, but your question is totally unclear to me.
Comment: Your question is unclear. Horrible spelling mistakes need to be done away with. The rheostat simply provides the resistance. The increase in the length of the wire increases the resistance offered by the rheostat. What does that have to do with voltage or current?
Answer: By Ohm's law, the current flowing is directly proportional to the potential difference. Not inversely.

Ohm's law and rheostat relation


'Always Trust' wifi network not working

Question: This is more of an annoyance than anything...I have a MacBook Pro (latest Retina 15") and a Mac mini (latest model) both running Mac OS 10.8.4 and whenever I connect to my company's wifi network, I get prompted with a 'Verify Certficate' warning message. is there a way to permanently trust the newtork to avoid that warning?  There's an option to show the certificate which prompts with checkbox to 'always trust' and I have it selected, but whenever I connect I get the same message.   Is there something that I can do to avoid the warning message?
Answer: From your description, one of two things is likely happening.
Here's what's supposed to happen, your IT department should package the certificates you need to "trust" their servers and networks and they should provide them and hopefully not change the certificates every few weeks or months. Better, they could pay for a real certificate that's signed by a trusted broker and your Mac would just know it was a valid certificate and not just something the IT department self-signed.
Your Mac should take the certificate needed and enter it into your keychain when you tell it to "always trust" the certificate, but that isn't working as well.
So - you could troubleshoot your keychain (start with the help menu in keychain access program) or learn more about how that works. You could ask IT to point you to the actual certificates and learn how to store them in your keychain or the system keychain. You'll want to run the Certificate Assistant from Keychain Access if you choose to store the certs locally since it will help you know if you have a good chain of trust and to debug things, since this usually takes several tries if you're not in the habit of installing custom certs into OS X.
Comment: Thank you very much for the response. Just want to be clear on what I need to ask of my IT as they're not the most receptive to mac related questions...I can see that there is a cert added to my keychain. I can also see that Keychain Access states the 'This certificate is marked as trusted for this account'.

You're saying that I should ask them for the location of the actual certificates or for them to send me/allow me to download them so that I can add them as custom certs to my login keychains?
Comment: I get it - I put that in for the general case. In your case, you can pull the certs from the network and don't need to involve IT at all.

'Always Trust' wifi network not working


Codenamed Products and Visual Studio

Question: Are there any practices regarding using codenames of products in Visual Studio projects and solutions? In that typically, namespaces, assembly names, binary outputs, et al need to be renamed once a product name is chosen: is there any way to deal with this?
Answer: In one place I worked we'd choose an unrelated and inoffensive, and typically systematic name for any given project.. Jupiter, Orca, Feynman whatever... and stick with that namespace forevermore.
Because as you've seen what the marketing/client/board chooses to call a product (hell, even what version number they choose) is so rarely going to be known at the start let alone the same by the end, that it's just so much easier for everyone to be able to have a fixed internal reference they don't have to refactor later.
I can't stress how important it is that the name is simple, one word and inoffensive though.
Comment: Thanks, so I guess there is no getting away from the Refactor issue - if it is going to be used as a public API.
Comment: if the API is the product no, if it's just a part of the product codes can be fine - but at least codes let you refactor just the once
Answer: This will partly depend on the type of product. If it's a client library - or anything that will require users to see the names - then clearly the names matter. I don't think it really matters otherwise. Bear in mind that different versions of the product may have new codenames (e.g. Everett, Whidbey, Orcas for Visual Studio) - you don't want to have to rename the code each time you start a new version!

Codenamed Products and Visual Studio


Can I add a custom button to MetaMask or other Ethereum wallets that can be clicked on to call a custom contract function? If so, how?

Question: I am building an ERC20 token that has special functions that I want the client to be able to interact with. Is there anyway I can do this? I'm pretty sure I have to use web3.js but I don't know where to start. I tried looking it up and have gone everywhere but no one seems to know how to do this.
Answer: Yes of course you can do it. Look what LARVALABS did with they projects :
https://www.larvalabs.com/cryptopunks
https://meebits.larvalabs.com/
Yes web3js is a good choice about it. I advice you to follow basic tutorial for Dapp interaction.
Remix IDE is a good software in browser that can help you interact with your smart contract. Then when it's deployed you have to code your own web3js function to interact with contract.
Comment: Could you please link some tutorials for Dapp interaction? My goal is to be able to have a button alongside "send" in wallets such as MetaMask. Are there any tutorials you could recommend that would help me with this?


Best exterior paint for a guardrail by the ocean?

Question: I noticed the top of the guardrails over looking a dock have begun to peel. Mostly on top and only a few spots. I plan to refinish top and bottom rails and the balusters.  Orbital sand all surfaces with 60 and 100 grit and feather the loose paint. My only concern is that the wood may be Teak which I believe has a high oil content? Is there a special primer to use? Or is a special paint (oil) needed? How do I keep the salt water from damaging the paint?
Comment: Don't really care why this was closed, but it shouldn't be for whom ever thought it was soliciting a brand or company. No where is a product endorsement in the question. Get a grip whomever.
Answer: I would sand the rail down until all traces of your latex and primer are gone. Now prime it with oil based Kilz primer then apply oil based Rustoleum onto that. These are both commonly available in Canada, I'm not sure about US (or wherever you may live.)


Basicity of heterocyclic compounds

Question: Pyrrol, furan or thiophene don't have any bond pair electrons free to release which is why they shouldn't be basic, but the lecturer of organic chemistry is saying that they are basic as they react with hydrochloric acid to form salts. Which one of the two explanations are correct?
Answer: Furan and thiophene are going to be even less basic than their saturated counterparts, which can act as Lewis bases but aren't particularly well known for acting as Brønsted bases (very strong acids can significantly protonate ethers and sulfides, but not weak ones). They do, however, have a free $\mathrm{sp^2}$ lone pair with which they can bind a proton, but only one, unlike the saturated analogues, and an $\mathrm{sp^2}$ lone pair is going to be even less basic than a an $\mathrm{sp^3}$ lone pair because the electrons are closer to the nucleus (i.e. $\mathrm{sp^2}$ is "smaller" and closer to the nucleus than $\mathrm{sp^3}$).
Pyrrole, however, might be expected to be basic, but it also is not, as you rightly expected. This is due to delocalization of the nitrogen lone pair to create aromaticity. The $\mathrm pK_\mathrm a$ of the conjugate acid of pyrrole is $-3.8$, which is lower than that of even sulfuric acid, suggesting pyrrole is a very weak base.
All of those heterocycles are less basic than $\ce{Cl^-}$ or $\ce{H2O}$, so either your lecturer is incorrect or has been misunderstood.
Comment: pKa of HCl is even more negative. Also source for  -3.8? Another thing is pKa can be used as measure of "protonating strength"  only for diluted solutions.

Basicity of heterocyclic compounds


105 BR-5500 an improvement over Sora BR-3400?

Question: I'm currently overhauling a bike with a Shimano Sora 3400 groupset. I've replaced most of the parts with Sora 3500 (notably not the brake levers -- still 3400) and am interested in buying some nicer used brakes, but don't want to spend a ton. Would 105 BR-5500 brakes be much of an improvement over what I have?
Comment: I don't have personal experience with this model of Sora versus this model of 105 (which isn't the current version, and may be several generations out of date - are you sure about the model #?). However, were you aware you can upgrade just the brake pads? Our site policy is no product recommendations, but people violate this all the time for Kool Stop pads, and for good reason - they're an excellent and cost-effective upgrade, especially for lower-quality pads like those on your current group.
Comment: There could be difference in the caliper flex but I do not expect to be significant. There are good pads produced by several companies.
Comment: I replaced my pads with other Sora pads after some years of use when the braking power had gotten pretty minimal, and it basically didn't improve with the new pads, so I assumed the problem was with the brakes. You think the better pads will help?
Comment: The working mechanism of both brakes is identical, I don't think there will be a significant improvement in braking power. Good cables (cable housing) and brake pads (e.g. Koolstop Salmon or SwissStop Green or Blue) are your only hope.
Comment: Decent brake pads on the sora calipers will make a bigger difference than 105 caliper with stock pads.
Answer:
Would 105 BR-5500 brakes be much of an improvement over what I have?

What could the improvement be?
Lighter weight would mean the brake arms are less stiff, causing flex in the brake system. Thus, you cannot reasonably reduce the weight of the brake arms. Besides, most weight reduction "upgrades" are not worth it, giving only few tens of grams of savings at most, the benefit of which is infinistesimal but occurs at great cost.
Stiffer brake arms (less flex) would mean the brake arms are are heavier than necessary. Weight being unacceptable in a bicycle, the manufacturers are reluctant to do this.
Higher mechanical advantage (more power in brakes) would mean the brake lever runs out of travel very quickly, requiring frequent turning of the barrel adjuster, and the free spacing in the brake pads is so low that they cannot track a wheel with a broken spoke. However, do note that current trend of high mechanical advantage in dual pivot brakes with their forced centering and current trend of less than 36 spokes per wheel may mean you may run into problems if you break a spoke anyway.
Higher free spacing (allowing to track a wheel with a broken spoke exceptionally and not running out of lever travel quickly) would mean the brake has little mechanical advantage and would require unacceptably large lever force to stop.
Sometimes, a design is a compromise that has been perfected decades ago.
If you want an improvement in brake technology, there are three options (or actually two really as you cannot find hydraulic rim brakes):

Better brake pad material. The Kool Stop salmon-colored compound works exceptionally well in varying conditions, not picking up pieces of sand that work as an abrasive compound to cause early rim wear. This is the cheapest approach and I highly recommend it.

Better actuation mechanism. Cable actuation can be replaced with hydraulic actuation. However, you probably won't find hydraulic rim brakes easily.

Better brake type. Rim brakes can be replaced with disc brakes. However, disc brakes are heavier (because they do not reuse the rim as the brake disc but rather require a separate brake disc) and require a heavier fork and a more sturdy spoking pattern in the wheel. On the other hand, disc brakes do not have brake lag in the wet, unlike all rim brakes. The cost is more frequent brake pad replacements. I don't recommend this approach because in practice it requires getting a new bicycle, as forks not having disc brake mounts cannot support disc brakes.
Answer: Parts higher up the range typically have a better finish quality, use higher quality materials and hardware and may have special treatments on pivot points. Often they can be lighter due to using a stronger, more expensive material or process. That's the general overview.
Certainly the 105 calipers will have a much better finish than the Sora ones and the hardware (nuts, bolts, qr) should be a better quality.
My experience is that the lifespan of the higher range brake will be longer and the pivots will be less prone to freezing up but this could be a function of how better bikes are maintained and stored.
You should choose whichever you like the look of best if they are in equally good working condition.


Whats the dominant term in 2^n or n^2 for big O notation

Question: I have been looking at Big O notation and have come across an operational count 2^n+n^2. I understand the practice of big O notation is to remove the constants and the low order terms, however I cant figure out which one to make O(n). I think it may be 2^n but have had no luck finding anything to suggest this.
Answer: Look at the growth factor over time. For the first eight values of n, O(n^2) works out to:
0, 1, 4, 9, 16, 25, 36, 49...
O(2^n) produces powers of two:
1, 2, 4, 8, 16, 32, 64, 128...
It should be fairly obvious which one is growing faster.
Note that the general rule applies even with different bases and exponents. O(1.1^n) may have initially lower work than O(n^10) for smaller n, but all exponential growth with an exponent greater than 1 will eventually outpace fixed exponent polynomial growth as n approaches infinity.
Comment: 2 is not a square number.
Comment: @aschepler: *headdesk*. Sorry about that; fixed.
Comment: Thanks for that, it seems obvious now.
Comment: Since when do we call it _geometric growth_ if the exponent is fixed? I only know this as _polynomial growth_.
Comment: @HermannDöppes: Okay, apparently I really need to get more sleep. Also fixed.
Answer: By L'Hopital's rule:
lim_{n -> infinity} (n^2 / 2^n )
= 1/log(2) lim_{n -> infinity} (2n / 2^n)
= 1/log(2)^2 lim_{n -> infinity} (2 / 2^n)
= 0
We have n^2 = o(2^n) which implies n^2 = O(2^n).
If this proof doesn't make sense: By definition, f(n) = O(g(n) if and only if f(n) is bounded within some constant multiple of g(n) after n grows past some constant. And a way to think of f(n) = o(g(n)) is that as n grows to infinity, g(n) will continue to outgrow f(n) faster. In other words:

f(n) = o(g(n)) if and only if the limit f(n)/g(n) becomes zero as n goes to infinity.
o(g(n) is a strictly stronger condition that f(n) = O(g(n)).

Alternatively, you just need to use the definition directly: Find some a and b such that n^2 <= a | 2^n | for all n >= b, which is simple algebraic manipulation.
Comment: It's funny when things like *"2^n is dominant, because it grows faster for larger n"* get upvotes and actual proofs get ignored.
Comment: @Katie.  I like your proof, except for one thing.  If the OP is able to understand this, I feel like he/she wouldn't be asking for this.
Comment: @ndn :) such is life.
Comment: @intboolstring I know right... unfortunately I've come to realize people misuse Landau notation because they've never spent time to understand the subtleties of the definition and end up further in their academic or professional lives mistaking boundedness with asymptotic growth and vice versa. Or they become very surprised to hear that O(n) linear scan can be faster than O(log(n)) binary search and think that the notation fails because of practical matters like cache lines - it is true that cache hierarchy is at play here, but this doesn't imply failure of the notation.
Answer: I really like @ShadowRanger's answer to your question.  But, I want to show one more view of the question.
If you take a look at this graph,  the green portion is 2^n with the red n^2.  If you can see, at the beginning, the line n^2 grows faster than 2^n, but as you get bigger, the lines cross and 2^n starts to become bigger, faster.
So, as n-->∞ (as n gets very big), 2^n is bigger than n^2.
Answer: 2^n is dominant, because it grows faster for larger n.
Answer:

TIL: writing math in SO is pain in the bottoms!
Comment: how did 2^(n0+1) become 2(n0^2)

in the next step?
Comment: @RohanDevaki, oops... I have no idea how nobody noticed up until now. I will fix it later. Thanks!
Comment: your solution is very difficult to understand : \
Comment: @RohanDevaki, I would have written it a bit different if it was on paper/whiteboard, but in general it's standard notation. Let me know where you got stuck so I can attempt to explain it better.
Answer: Reposting my answer here from reddit, where someone asked about this.
You have to start with the definitions. O(n^2) < O(2^n) means there is some N such that for all n > N, a*n^2 < b*2^n, for any choice of positive constants a and b.
In other words, if you increase n enough, then a*n^2 < b*2^n regardless of what positive values a and b are. Remember, this is what the statement O(n^2) < O(2^n) means. The proof is to be shown. Let a, b be positive real numbers. Can we find N such that for all n > N, a*n^2  N implies a*n^2  N, 1 < (b*2^n)/(a*n^2)?
Let's call the right hand side, g(n), so we are now looking for an N such that for all n > N, g(n) > 1.
We can do this by using the definition of limit. Let L be the limit of g(n) as n approaches infinity. If the limit L is infinity, then that means by definition, for any lower threshold M, there exists an N'' such that if n > N'' then g(n) > M. (See the definition here: https://en.wikipedia.org/wiki/Limit_(mathematics)#Infinity_as_a_limit)
In our case, our choice for M is 1. So, if we prove limit L is infinity, then we have proved the existence of N.
How do we prove that L, the limit of g(n) as N approaches infinity, is infinity? We use L'Hopital's rule.
L'Hopital's rule says that we can find the limit of the ratio of two functions by taking the ratio of their derivatives:
https://en.wikipedia.org/wiki/L%27H%C3%B4pital%27s_rule
Well, g(n) is a ratio of functions (b*2^n) and (a*n^2). So, the limit we are looking for is also equal to the limit of: (b*log(2)*2^n)/(a*2*n)
We're still not done, because there's still an n in the denominator. We can apply L'Hopital's rule again to get:
(b*(log(2))^2*2^n)/(a*2)
This is clearly an unbounded function. It's just a constant times 2^n. (You can easily prove 2^n is unbounded.) It followed from L'Hopital's rule that the limit of g(n) as n approaches infinity is the same as the limit of this function.
Thus, we have proved that the limit of g(n) = (b*2^n)/(a*n^2) as n approaches infinity is infinity. From the definition of limit, if M = 1, then there is an N such that for all n > N, g(n) > M = 1. We have thus found N such that for all n > N, a*n^2 < b*2^n, as we had set out to do originally. This is the definition of O(n^2) < O(2^n). QED!!!


What's the word for when two worlds coexist in the same space simultaneously but one is hidden or veiled from the other?

Question: Consider how the wizarding world is hidden from the muggle world in the Harry Potter/ Wizarding World universe.
Or in Hell Boy II. The troll market is hidden under a bridge. Red can see it but it's veiled from the human eye.
Shadow Hunters. Clary can see the runes outside of the nightclub but Simon can't see them.
I have been referring to it as a troll market concept but I feel like there is a better word(s) for it.
Comment: Parallel or alternate universes, maybe? Take a look at the examples here and see if they fit your criteria: https://en.wikipedia.org/wiki/Parallel_universes_in_fiction
Comment: TV Tropes has [Phantom Zone](https://tvtropes.org/pmwiki/pmwiki.php/Main/PhantomZone), [The Masquerade](https://tvtropes.org/pmwiki/pmwiki.php/Main/Masquerade), [Invisible to Normals](https://tvtropes.org/pmwiki/pmwiki.php/Main/InvisibleToNormals), [Wainscot Society](https://tvtropes.org/pmwiki/pmwiki.php/Main/WainscotSociety), and probably more tropes. Not sure any of these is an exact match.
Comment: Wainscot society actually seems to pretty close to what I'm looking for.
Answer: I might be missing something here, but this is describing an "invisible" or "hidden" world, where "invisible/hidden" is usually qualified by such phrases as "to the normal eye/from the normal eye" or "to/from those who do not have the power"; "to/from all but the chosen few", etc. or "except on midsummer's eve" etc...
invisible and hidden have their normal meanings.
Comment: I'm looking for the actual word. Invisible seems to more of a word to describe it. Like the word wet describes a pool. My friend suggested the word realm, but in my head that doesn't quite seem to fit either.
Answer: The following term might be used, as, the most often, those more or less hidden entities are considered to be  unacceptable from the point of view of decent society, or barely acceptable, or at times, just not conferring the idea of people having a pleasant station in life.

(SOED) underworld 4 A sphere or region (regarded as) lying below the ordinary one. Also, a lower, or the lowest, stratum of society.
• T. BULLEN The begrimed … toilers … in the underworld of engines and boilers.
• attrib.: San Diego A playwright … solicits underworld figures to back its latest play.
Comment: The word 'underworld' seems to have a more negative tone then what I'm looking for.


Where is the monero conf file in the portable binaries version?

Question: The installation version has conf files here, but what if you unzipped the portable version from here?
Does it not exist until created manually with monerod --config-file=/etc/monerod.conf? I installed the monero gui and even then no bitmonero.conf exists on my pc nor in the registry.
Answer: You must create it yourself manually according to this answer. I believe I remember bitcoin operating the same way.