I want to show some payment method option if grand total amount greater than 3000 in checkout page

Question: Need to show one checkbox in product details page and if customer choose these checkbox then need to show only one payment method option in checkout page.
Condition is:
if grand total amount greater than 3000 and customer choose checkbox.Is it possible in magento?
Answer: Create a module with an observer on "payment_method_is_active" event.
You should then check if this is the payment method you want
<code>$MethodInstance    = $observer->getEvent()->getMethodInstance();
$paymentMethodCode = $MethodInstance->getCode();

if ($paymentMethodCode == 'cashondelivery') {
    ...
}
</code>
Get the total from the quote,
<code>$quote = $observer->getEvent()->getQuote();
</code>
Set the isAvailable flag on the payment method you with to limit.
<code>$result = $observer->getEvent()->getResult();

if ($result->isAvailable) {
    $result->isAvailable = $this->isTotalOverThreshold();
}
</code>
Here's a similar module I wrote for filtering payment methods by shipping country.
https://github.com/peacockcarter/magento-filter-payment-methods-on-shipping-address
This is actually a very good idea for a module. Might write it later in the week.
Comment: Thanks.I already implement.My logic is: 1)First i create custom option checkbox(name is "Avail EMI Offer") from manage product->my product->custom option. 2) Then copy this custom attribute for all products which products price greater or equal 3000. 3) If customer check this checkbox when he/she add to cart. 4) In checkout page, I receive this custom option in a variable and implement logic if variable=='1' then only show EMI payment method else show  cash on delivery payment method.
Comment: But i need to implement custom option pragmatically. Is it possible ? I am Beginner
Answer: My suggestion is , for your condition better set the checkbox in checkout page instead of product detail page. Just check for the Grand total from the quote on the checkout page , if Grand total > 3000 makes the check box to be visible else let the checkbox be hidden
Comment: Thanks.I already implement this logic.But i need to add  checkbox in product details page pragmatically.


Hebrew in lyx 2.1 (using MiKTeX 2.9)

Question: Recently I've upgraded my OS to windows 8.1 and I had to reintsall lyx and LaTeX. After finished the installation, I ran the culmus-miktex-0.2.1 file but when I want to compile my document I get the well-known yet annoying message Font LHE/cmr/m/n/10=jerus10 at 10.0pt not loadable: Metric (TFM) file not found. Is there a new version of culmus for lyx 2.1? does it has connection to the upgrade of the OS?
Comment: This is not an answer, but might hint at one: I'm pretty confident that message means that there is a problem with your LaTeX installation, not with LyX.
Comment: I don't think it's a problem with LyX. I use LyX and can compile all of the Hebrew examples and documentation in LyX.
Answer: I had the same problem, reinstalling Lyx wasn't enough, I needed to return to the previous version of MikTex too, thankfully I found and old installation of Lyx 2.0.6 on my computer with the older version of MikTex, after complitlt reinstalling it, and installing culmus again it worked like it used to, couldn't find it online so I uploaded it to google drive and here is the link https://drive.google.com/file/d/0B-5BLb6KSWUVU0UyRndLWGk0blk/edit?usp=sharing

Hebrew in lyx 2.1 (using MiKTeX 2.9)


Amonium perchlorate

Question: I want to make amonium perchlorate, having amonium chlorate. If I have a solution of sodium chlorate and I add amonium chlorate, will precipitate into amonium perchlorate? Or it is with a solution of sodium perchlorate?
Comment: Chlorate won't magically transform to perchlorate.
Comment: > having amonium chlorate | And you are still in one piece? How that?
Comment: Ammonium chlorate becomes nonexplosive when "ammonium" is spelled with only two rather than three "m"s.  -1.
Comment: Why would you want the sodium perchlorate?
Answer: Note: Ammonium chlorate is a unstable oxidizers and decomposes violently. Handle with care. Ammonium perchlorate is also known for its toxicity. You should have enough laboaratory experience for handling such chemicals.

If you think that
$$\ce{chlorate + chlorate -> perchlorate}$$
then you are wrong. There is no common ion effect occuring. You will need a perchlorate salt and an ammonium salt that have a  displacement reaction and precipitate ammonium perchlorate. This reaction will suffice
$$\ce{MClO4 + NH4Cl -> NH4ClO4 + MCl ~~~~~~~~~~~ M = Na,K}$$
Or even electrolysis of a perchlorate salt. According to this patent:

Ammonium perchlorate is generally produced by a series of steps which include the electrolysis of an aqueous sodium chloride solution
  to sodium chlorate, which is in turn electrolytically converted to
  sodium perchlorate. The sodium perchlorate is then reacted with
  ammonium and chloride ions to produce ammonium perchlorate and the
  by-product, sodium chloride.
reacting the sodium perchlorate with ammonium chloride
sodium perchlorate might be reacted with ammonia gas in the presence of carbon dioxide, to produce ammonium perchlorate. This
  alternative procedure has been generally unsuccessful because of the
  difiiculty of separating the resulting sodium bicarbonate from the
  product, ammonium perchlorate.

Process 2 is described in another patent. Read more to know the purification and the precautions needed.

... the reaction is carried out by mixing aqueous solutions of the
  reactants. The concentrations of the solutions are such that the
  resultant ammonium perchlorate precipitates out of the aqueous medium.
  The ammonium perchlorate crystals recovered therefrom contain 5% to by
  weight of the mother liquor. The product is usually contaminated with
  the Water soluble alkali salt, the byproduct of the reaction, in the
  mother liquor.

Note: direct electrolysis of ammonium chlorate would not yield ammonium perchlorate as there would be chlorate contamination. In fact, there should be no chlorate as reactants. (Here)

Amonium perchlorate


qtnx delete session

Question: From the graphical interface, when you connect to a host, it is possible to create a new session, but not to delete an existing one. Where is that information kept (in which file) in my computer, so that I can manually delete it ?
Thanks.
Answer: The files of each session are stored on the remote host in the hidden .nx directory in the owner home directory.
Usually you can find within the sub-directory cache-gnome or cache.kde, you can remove or rename these sub-directories in order to reset sessions.

qtnx delete session


Increment data in codeigniter

Question: Here's my code
    $receipt = $_POST['receipt'];
    $invid = $_POST['invid'];
    // $receipt = intval($receipt);
    // $invid = intval($invid);

    $newreceipt = 0;
    $GTextension = 'GT-';
    $UTextension = 'UT-';
    $rec_type = array(1472,1416,9752,1417,1500);
    $last_receipt = $this->ion_auth->getLastReceipt($receipt);
    if($last_receipt->num_rows() > 0){
        if($receipt == 1){
            $newreceipt = $last_receipt->row()->inv_cno+1;
        }
        elseif($receipt == 2){
            $newreceipt = $last_receipt->row()->inv_cno+1;
        }
        elseif($receipt == 3){
            $newreceipt = $last_receipt->row()->inv_cno+1;
        }
        elseif($receipt == 4){
            $newreceipt = $UTextension.(++$last_receipt->row()->inv_cno);
        }
        else if($receipt == 5){
            $newreceipt = $GTextension.(++$last_receipt->row()->inv_cno);
        }
    }

    $this->ion_auth->update_receipt($invid,$receipt,$newreceipt);

    $return = array('dr_no' => $newreceipt);

    echo json_encode($return);

Now the output of this code is like this
if i choose ==4 then it it is like this
UT-1418 it's correct.
then if i choose again ==4 the problem exist because it is now like this
UT-UT-1419. It's incrementing also the extension. All i want to increment is the data which is -1419
Can someone help me please. Thank you.
Answer: Done it like this
$prefix = 'UT-';
elseif($receipt == 4){
       if (substr($UTextension, 0, strlen($prefix)) == $prefix) {
                $UTextension = substr($UTextension, strlen($prefix));
                $newreceipt = $UTextension. (++$last_receipt->row()->inv_cno);
       }
 }

Thanks Lorenzo S
Answer: If $receipt === 4 you are executing this:
$newreceipt = $UTextension.(++$last_receipt->row()->inv_cno);
and then you are saving the value in the DB with $this->ion_auth->update_receipt($invid,$receipt,$newreceipt);.
So, now, the database contains "UT-something".
Now, if you execute this simple code in PHP, you will probably get the point:
$test = "UT-10";
++$test;
echo "$test\n";

It will output UT-11.
You can take a look at some official documentation to understand why this works like this.
So, what happens is that the next time that $receipt === 4, you perform the same code:
$newreceipt = $UTextension.(++$last_receipt->row()->inv_cno);
that is equivalent to "UT-" . "UT-*something*".
And so the unwanted result.
Now, the solution is up to your needs:
If inv_cno has to be an integer, you just save the integer and you calculate back the "prefix-" . inv_cno in the code.
Otherwise, you should just check if the $last_receipt->row()->inv_cno already has a prefix in it, in order to understand if you have to add/change it or not.
EDIT --- after user comments.
Now that we now it is a varchar, assuming that the prefix is always a 3 characters string ("UT-", "GT-" and so on), you can create something like this.
According to your example, I assume that inv_cno can already have or not have a prefix.
And I assume that the admissible prefixes are "UT-" and "GT-".
I will write you an example here to make you understand my point, then you will have to integrate it in your code :)
<?php

function get_new_receipt($inv_cno, $extension) {
  $prefix_len = 3;
  $admissible_prefixes = array("UT-", "GT-");
  $inv_cno++;
  if (strlen($inv_cno) <= $prefix_len) {
    return $extension . $inv_cno;
  }
  $current_prefix = substr($inv_cno, 0, $prefix_len);
  if ($current_prefix === $extension) {
    return $inv_cno;
  }

  return $extension . substr($inv_cno, $prefix_len);
}

$test = "UT-10";

$test = get_new_receipt($test, "UT-");
echo "$test\n";

$test = get_new_receipt($test, "UT-");
echo "$test\n";

$test = get_new_receipt($test, "GT-");
echo "$test\n";

P.S.: Anyway, as a side note, it's not so safe to perform this kind of math over strings. But that's another story.
Comment: `inv_cno` is a varchar sir.
Comment: i'll be honest. It's kind of hard to implement . I'm sorry but I will try.
Comment: and could you explain the code more sir so i can understand it clearly

Increment data in codeigniter


Bypassing Enrollment Server Reinstalling MacOS

Question: I have an iMac from my organization to be used at home. I'd like to reinstall its MacOS, however, when I reinstall it, it takes me to "enrollment server". I guess I need to either take it to my company or somehow connect with VPN. But, Is there a way to bypass that?
Answer: No, you shouldn't bypass the Enrollment Server option. I am pretty sure it is related to the MDM setup that you have in your iMac from the company.
Once your company's MDM is connected with Apple Business Manager of your company, it rollout Enrollment in the beginning once it hits the internet.
Your IT department must have something like this that enroll your devices to MDM.

Either your IT admin can give you the password if needed else, it should enroll in the company server without authentication once you hit the internet. Better to reach out to your IT department in this context.
I suggest not to look around to bypass as it is an MDM tool for inventory from your company with company policy.


Origin of Virtual Molecular Orbitals in Hartree-Fock equations

Question: Let's look at scheme
Do I understand correctly, the origin of Virtual Orbitals is a solution of (for, exampre, restricted) HF equation eigenfuncions?
Answer: Yes, they result from the HF equations just like the occupied orbitals. The diagram should also be show them as present in the initial set of equations, unless the basis  (used for the LCAO) was changed between the two states shown. The number of occupied orbitals plus the number of virtual orbitals is equal to the basis set size because they are the eigensolutions of
$$
 \mathbf{F}\mathbf{C} = \mathbf{\epsilon}\mathbf{S}\mathbf{C},
$$
where $\mathbf{F}$ is the Fock matrix, $\mathbf{C}$ is the matrix of orbital coefficients, $\mathbf{\epsilon}$ are the eigenvalues which are the orbital energies, and $\mathbf{S}$ is the atomic orbital overlap matrix (because the basis set used is typically not orthogonal). The dimension of all matrices involved is determined by the size of the basis set, which will be finite because otherwise the computational effort becomes infinite.
Comment: Can you, please, clarify (may be, it is need some math) why the number of occupied orbitals plus the number of virtual orbitals is equal to the basis set size, because I thaught the sum is infinite, as any problem for eigenvalues and eigenfunctions.
Comment: @Sergio I have extended my answer.
Comment: It seems, I understend.The virtual orbital in H2 molecule is a unbonding orbital. Am I right?
Comment: That depends on the basis set. Assuming the minimal basis set of two hydrogen-like orbitals, you are correct.
Comment: Yes, I mean minimal basis set.  Are there virtual orbitals if the HF method is applied to atoms? Or this is a feature of HF with MO LCAO?
Comment: The number of atoms makes no difference, only the size of the basis set vs. number of electrons. So typically, yes, there are virtual orbitals in single-atom calculations.
Answer: Let's start with HF equations (we omit the procedure for their derivation), and  obtain the pseudo eigenwertproblem:
\begin{equation}\label{Fock}\tag{Fock}
    \hat{F}_i\phi_i' = \varepsilon_i\phi_i'.
\end{equation}
The number of such equations is equal to the number of electrons $N$ (we do not consider such methods as RHF, ROHF in general), so $i = 1 \ldots N$ and $\phi' = \{\phi_1, \phi_2, \ldots, \phi_N \}$ This equation is actually only well defined for the orbitals that give the lowest energy.
The next step to find an approximation to actually solve these still pretty complicated systems.
In this approach we map the solutions $\phi_i$ in the form of linear combination of some basis functions:
\begin{equation}\label{fLCAO}\tag{fLCAO}
        \phi_i'(\mathbf{x}) = \sum_{a=1}^{\infty} c_{a,i}\chi_a(\mathbf{x}).
\end{equation}
The number of such basis functions is infinite.
But in reality, taking into account the savings in computer computing power, the number of basis functions should be reduced to $M$, thus, we already approximate:
\begin{equation}\label{LCAO}\tag{LCAO}
        \phi_i'(\mathbf{x}) = \sum_{a=1}^{M} c_{a,i}\chi_a(\mathbf{x}).
\end{equation}
The basis functions are known to us, but only the coefficients in the expansion remain unknown. The problem of solving equations is reduced to a purely algebraic one. How are these coefficients found?
Substitute \ref{LCAO} into \ref{Fock} and multiply left by $ \left\langle\chi_a\right| $:
\begin{equation}\label{}
    \sum_{b = 1}^M  c_{ib} \langle\chi_a|\hat{F}_i|\chi_b\rangle = \varepsilon_i \sum_{b=1}^M c_{ib} \langle\chi_a|\chi_b\rangle.
\end{equation}
or in a more expanded form
\begin{equation}\label{sys}\tag{sys}
    \begin{cases}
        c_{i,1} (F_{11} - \varepsilon_i S_{11}) + c_{i,2} (F_{12} - \varepsilon_i S_{12}) + \ldots + c_{i,M} (F_{1M} - \varepsilon_i S_{1M}) = 0, \\
        c_{i,1} (F_{21} - \varepsilon_i S_{21}) + c_{i,2} (F_{22} - \varepsilon_i S_{22}) + \ldots + c_{i,M} (F_{2M} - \varepsilon_i S_{2M}) = 0, \\
        \vdots \\
        c_{i,1} (F_{M1} - \varepsilon_i S_{M1}) + c_{i,2} (F_{M2} - \varepsilon_i S_{M2})  +\ldots + c_{i,M} (F_{MM} - \varepsilon_i S_{MM}) = 0.
    \end{cases}
\end{equation}
The coefficients $ c_{ib} $, the number of which is $ M $, will now be unknown. But we still have $ \varepsilon_i $ unknown. To find them, we must use the fact that non-trivial roots must meet the condition:
\begin{equation}\label{}
    \left|
    \begin{matrix}
        F_{11} - \varepsilon_i S_{11} & F_{12} - \varepsilon_i S_{12} & \cdots & F_{1M} - \varepsilon_i S_{1M} \\
        F_{21} - \varepsilon_i S_{21} & F_{22} - \varepsilon_i S_{22} & \cdots & F_{2M} - \varepsilon_i S_{2M} \\
        \vdots               & \vdots               & \ddots & \vdots               \\
        F_{M1} - \varepsilon_i S_{M1} & F_{M2} - \varepsilon_i S_{M2} & \cdots & F_{MM} - \varepsilon_i S_{MM}
    \end{matrix} \right| = 0.
\end{equation}
This equation is $ M $ -th degree with respect to $ \varepsilon_i $, so there must be solutions to $ M $ of$ \varepsilon = \{\varepsilon_1, \varepsilon_2, \ldots, \varepsilon_M \} $. Substituting one of these values into the equation \eqref{sys} (for example $ \varepsilon_2 $), we obtain as a solution the coefficients $ \{c_{21}, c_{22}, \ldots, c_{2M} \} $ .
And knowing these coefficients, from the formula \eqref{LCAO} we get the orbital $ \phi_2 $. Similarly, we get all $ M $ orbitals
$$\phi' = \{\phi_1, \phi_2, \ldots, \phi_N, \phi_{N + 1}, \ldots, \phi_M \}.$$
Next is the self-consisting procedure, which improves coefitients.
That is, if we had $ N $ electrons, and at the same time had to have $ N $ orbitals, then by introducing $ M $ pieces of basic functions, we expanded the number of orbitals to $ M $, and hence some of these orbitals ($ M-N $ ) will not be occupied. These orbitals are called virtual.
From these orbitals, one can construct a Slater determinant by discarding the $ M-N $ virtual orbitals, thus we have
$$\phi' = \{\phi_1, \phi_2, \ldots, \phi_N \}$$
When approximating a bounded basis by $M$ functions, it is difficult to give a physical meaning to virtual orbitals $\phi'_{virtual} = \{\phi_{N + 1}, \phi_{N + 2}, \ldots, \phi_M \}$. But if we choose the expansion in the form of \eqref{fLCAO}, then theoretically, they would mean the real excited states of the system (see Configuration interaction).


Send native tokens without running node

Question: is there any library or proper guide to send custom/native tokens in NodeJS?
i don't want to run full node (cardano-node/cardano-wallet), just want to build and sign a transaction and submit it via Blockfrost's API?
want something like this: https://github.com/blockfrost/blockfrost-js/blob/fb9a55fee07927f8d7c8b0a5aa9efd2d3daf6c77/examples/simple-transaction/src/index.ts
but with Native token option. thanks!
p.s: I want to do it in MAINNET if matters.
Answer: Yes, you can use libraries like lucid & mesh.
Comment: this worked: const { AppWallet, BlockfrostProvider, Asset, Transaction } = require('@martifylabs/mesh');
Comment: hey, thanks for suggesting these. i have already tried Mesh, but I was not really able to use it, because it was more like TS friendly (import style), and I was not able to import "type" in my node js backend, and I did not find any example for this in lucid. mesh's examples: https://mesh.martify.io/apis/transaction/basic
Comment: Regarding _"import style"_, did you try [this](https://stackoverflow.com/a/45854500/20330802)?
Comment: yeah, didn't work. can't really find a way to convert "import type { ... } from '...'" to require format
Answer: You could try Helios.
Here is a guide to building transactions: https://www.hyperion-bt.org/Helios-Book/api/building/index.html
The following links will help you define a UTxO containing native assets:

https://www.hyperion-bt.org/Helios-Book/api/reference/utxo.html
https://www.hyperion-bt.org/Helios-Book/api/reference/txoutput.html
https://www.hyperion-bt.org/Helios-Book/api/reference/value.html
https://www.hyperion-bt.org/Helios-Book/api/reference/assets.html
https://www.hyperion-bt.org/Helios-Book/api/reference/mintingpolicyhash.html

If you're struggling with using ES imports, then you can try the following import style:
<code>import("/path/to/helios.js").then( helios=>{
   const tx = new helios.Tx()

   ...
})
</code>
Note: Helios is more low-level than Lucid/Mesh because you need to take care of calling the Blockfrost API yourself.
Comment: Thanks! figured out how to import via mesh tho
Comment: How did you end up doing it? (might be helpful for others who are struggling with the same issue)

Send native tokens without running node


How to edit lock screen Cinnamon?

Question: In my Linux Mint 17.2 Cinnamon, the lock screen and the login screen are vastly different (unlike in Ubuntu Unity). I like aspects of both. For the login screen, I like the pretty design and the shifting backgrounds, and the options given for me to shut down/restart or change the background but I wish it had the time and date being displayed. On the other hand, for the lock screen, I don't really like much of it at all. It doesn't have the background shifting and nice password prompt as the login screen does. However, it does have the date and time. How can I essentially merge these two together to create a login and lock screen for myself? I'm assuming I would have to do some tinkering in the source code, and that is why I'm posting, as I do not know how to do so.
Answer: In Menu:System Settings:Login Window you can chose your theme. Assuming you have 'Mint-X', you can edit the settings of this theme:
sudo gedit /usr/share/mdm/html-themes/Mint-X/slideshow.conf

and edit the list of images randomly used at the login screen
cheers
Answer: I'm afraid it won't be easy to harmonise your lock screen and your login screen. There has been some initiative to add this kind of functionality, but no real progress appears to have been made:
https://github.com/linuxmint/Cinnamon/issues/4322
https://blueprints.launchpad.net/linuxmint/+spec/login-screen-lock
I guess we should find more like-minded people, so our voice gets heard.
Comment: In my case, I want the lock screen background and login screen background the same, and the desktops screen background different. I thought Linux was all about customization :/
Answer: Menu > Preferences > Scroll down to screensaver. Click on screensaver on bottom left you will see lock screen when screen saver is active. Uncheck the box.

How to edit lock screen Cinnamon?


Generalising a formula that calculates the area of a four-centred arch given only its width and height.

Question: Problem: To generalise a formula that calculates the area of a four-centred arch given only its width and height.

Root of the problem: As you all know better than I, the area of a circle, an ellipse, or a segment of both, as well as the arc lengths of these shapes, can be calculated with only the width and height known. While I was reading something about arches, I came across different kinds of arches: four-centred, ogee, and gothic. There is material on how to draw certain arch types, but I couldn't locate anything on how to use parametric equations to compute their length and area. If these arches can be drawn by parameterizing, I reasoned that they might be expressed to determine their area and length given their width and height, similar to an ellipse.

My background on the subject: I am not a student, architect, mathematician, or any other type of professional. I graduated from university 17 years ago, and I appear to have forgotten a lot about circles, triangles, and trigonometry. For me, this was simply a challenge, similar to learning how to write LATEX commands for this question, however it has now turned into an obsession:)

My attempt to solve the problem: First, I draw a 4-centered arch by following this example. Below is the drawing.

From the figure we know that: $\overset{\frown}{AL}=\overset{\frown}{BM}$, $\overset{\frown}{LN}=\overset{\frown}{MN}$, $|AC|=|CQ|=|QE|=|EB|$, $|LK|=|KN|=|JM|$. Now, let the area of 4-centred arch be $\boldsymbol{A}$, total arch lenght be $\boldsymbol{L}$, $|AC|=\boldsymbol{r}$, $|KL|=\boldsymbol{R}$, $|NQ|=\boldsymbol{h}$, $|QP|=\boldsymbol{x}$, $\angle ACL=\theta$, and $\angle LKN=\alpha$ and $|KE|=\boldsymbol{H}$. Then the area and arch length can be calculated using the formulas given below, respectively.
$$
\begin{align}
A & = 2\bigg(\pi r^{2}\frac{\theta}{360}\bigg)+2\bigg(\pi R^{2}\frac{\alpha}{360}\bigg)-2\bigg(\frac{H(r+x)}{2}\bigg)-\frac{2xh}{2} \\
& = \pi r^{2}\frac{\theta}{180}+\pi R^{2}\frac{\alpha}{180}-H(r+x)-xh \\
L & = 2\bigg(2\pi r\frac{\theta}{360}\bigg)+2\bigg(2\pi R\frac{\alpha}{360}\bigg)=\frac{\pi}{90}(r\theta+R\alpha)
\end{align}
$$
Consider $\triangle GCE$, and line $|GQ|$, since $\angle GCE$ and $\angle GEC$ are equal, and $|GQ|$ line bisects $|CE|$ and $\angle CEG$ into two equal sizes, we can conclude that $\triangle GCE$ is an equilateral triangle. Then $\theta=60^{\circ}$, and $H=r2\sqrt{3}$ and $R=5r$ . The only unknow terms are $\alpha$ and $\boldsymbol{x}$. By using law of sines for $\triangle CPK$, we can state that:
$$
\frac{\sqrt{12r^{2}+(r-x)^{2}}}{\sin(60)}=\frac{4r}{\sin(120-\alpha)}=\frac{r+x}{\sin(\alpha)}
$$
I tried to get $\alpha$ or $\boldsymbol{x}$ from equation above but I could not get any further, because it got too much complicated to draw anything meaningfull.

What dis I do before asking the question: didn't just use the sine law, I tried to use the information I know about triangles and trigonometry or the information I found from the sources, but I got mixed results from these attempts. By complex, I mean quadratic trigonometric expressions and impractical results like 3-degree variables. Of course, I may not have seen the connection between the equations or variables, as it is possible that I did not use theorems or expressions correctly. I searched the web using terms that could describe the shape, such as 4-centred arch, Tudor arch, and Persian arch. I searched for a book or article on the subject in libraries with open content. I searched this site using the same terms. The only resources I could find were architectural drawings, a few resources on how to draw a 4-center arc, and videos that explained how to draw a 4-center arc using various software.I may have searched using the wrong terms, but I don't know what the correct term is because it is a subject far from my area of expertise.

A little help: I want to calculate not only the area of a 4-centred arc but also the areas of shapes such as 3 and 5 centred arcs and Gothic arcs, using the height and width of the shapes. Therefore, considering my level in this subject, could you recommend a resource that can help me?
Thank you very much in advance.
P.S.: My native language is not English.

Update (2022-6-9): By using @Suzu Hirose's hint, we can obtain $\alpha$ and $\boldsymbol{x}$. Define $\angle NKE$ as $\beta$ and assume we start at point $\boldsymbol{N}$ and drop perpendicular to a line in the $|KE|$ direction. This perpendicular is equal to $\boldsymbol{r}$. Then $\sin(\beta)=1/5$ and $\beta=\arcsin(1/5)^{\circ}$. For $\triangle KEP$,
$$
\sin(\beta)=\frac{r-x}{\sqrt{(r-x)^{2}+(2r\sqrt{3})^{2}}}=\frac{1}{5}
$$
From this equation, we get that $x=\frac{r}{2+\sqrt{2}}$. Or, from @Suzu Hirose's equation, $x=r-2r\sqrt{3}\tan(\arcsin(1/5))$. From $\triangle KEC$, we know that $\alpha+\beta=30^{\circ}$, then $\alpha=30-\arcsin(1/5)$. Another way to express $\alpha$ is using $\tan(\beta)=\frac{1}{2\sqrt{6}}$ in
$$
\begin{align}
\tan(\alpha+\beta) & = \frac{1}{\sqrt{3}} \\
\tan(\alpha)\sqrt{3}+\tan(\beta)\sqrt{3} & = 1+\tan(\alpha)\tan(\beta) \\
\tan(\alpha) & = \frac{1-\tan(\beta)\sqrt{3}}{\sqrt{3}-\tan(\beta)}\\
\tan(\alpha) & = \frac{2\sqrt{6}-\sqrt{3}}{6\sqrt{2}-1}\\
\Rightarrow \alpha & = \arctan\left(\frac{2\sqrt{6}-\sqrt{3}}{6\sqrt{2}-1}\right)
\end{align}
$$
Finally we can expess equations [eq:area] and [eq:arch] only with $\boldsymbol{r}$ and $\boldsymbol{h}$.
$$
\begin{align}
A & = \frac{\pi r^{2}}{3}+\frac{(4\pi r^{2})(30-\arcsin(1/5)}{45}-\frac{(2r\sqrt{3})(3r+r\sqrt{2}}{2+\sqrt{2}}-\frac{rh}{2+\sqrt{2}} \\
L & = \frac{2\pi r}{15}\left[45-\arcsin(1/5)\right]
\end{align}
$$
Comment: It looks in the Wikipedia diagram that they are using $4r$ for the radius of the inner part of the arch where the "this is carpentry" web site uses $5r$. Wikipedia doesn't explain anything about the differences, I guess you would have to compare to real arches to work it out. But the arch would have to be quite high to extend an actual piece of string as far as the $5r$ radius to measure it.
Comment: I came across at least four different diagrams that show how to draw a four-centred arc. I didn't measure them by drawing, but I expect all of them to have a different radius. I think the radius of each circle will change based on how "depressed" the arch itself is.
Answer: Relabelling your $a$ as $\alpha$ (alpha), define an angle $\beta$ (beta) which is $\angle NKE$ in your diagram's labelling, then
$$\tan(\alpha+\beta)=|CE|/|EK|={2r\over 4r{\sqrt 3}/2}=1/{\sqrt 3},$$ and
$$\sin\beta=r/|NK|=r/5r=1/5.$$
You can then solve for $\alpha$ from these two, and $x=r-|EP|$, $|EP|=|EK|\tan\beta$.
It might be possible to write all of this out with square roots and fractions and so on, but unless you are very keen, I would suggest solving for $\beta$ and $\alpha$ using a numerical solution, that is substituting the numbers like $\sin^{-1}(1/5)=11.53...$ you get from a calculator or a computer into the equations.
Comment: I will try to solve the problem by using your hints, thank you. By numerical solution, did you mean to use MATLAB or any other equivalent software?
Comment: Software or a calculator or a book of sines or something. I mean I don't know if it will all work out into a tidy formula, and you might be better off using numbers. It **might** work out as a tidy result, but I would guess it will just be a huge mess of square roots and fractions.
Comment: OK, I see. Thank you @Suzu Hirose for taking your time to answer. I need to clarify my question, then I will post the "solutions".


GBW of an op-amp

Question: I know that GBW is defined as the product of the open-loop voltage gain and the frequency at which it is measured but I'm still not too sure what it does and how it affects the performance of an op-amp perhaps? If I am given 2 op-amps with differing GBWs, do I pick the higher or lower value?
Comment: Depending on the application circuit you might pick the one with lower GBW or, you might pick the one with higher GBW. And no, you can't say that an op-amp is the different in only one parameter - GBW knocks on to other parameters so pick the one that is most suited to your application (still not mentioned in your question).
Comment: You pick an op-amp that is suitable for the circuit it is intended to be used in.
Comment: What do you mean. What if its 2 identical op-amps, only difference is the GBW
Comment: What are some applications where u need a high/low GBW?
Answer: GBW is useful to characterize the performance of an opamp, because most opamps have a "dominant pole" that causes the open-loop gain to decrease as frequency increases. This frequency response shows as a straight line on a log-log graph, and it can be defined by the frequency at which it crosses unity gain. It turns out that all other points on this line, when you multiply the gain by the frequency, give you the same number, and we call this the gain-bandwidth product. The only place this doesn't hold is at DC, where other factors limit the total available gain.
When you "close the loop" (apply negative feedback), the gain of the circuit cannot ever be better than the open-loop gain at any given frequency, but as long as the closed-loop gain is significantly less than the open-loop gain, the opamp will meet all of the normal expectations, and behave more or less "ideally".
So, for example, if you need gain of 100 (+40 dB) at up to 20 kHz for an audio application, you need to pick an opamp that has a GBW product that is significantly greater than 2 MHz.
Opamps with high GBW products tend to be more expensive, and also can be harder to stabilize, so you really don't want to go overboard and use way more GBW than your application actually needs.
Comment: So does this mean that a GBW of 1Mhz is not suitable for a gain of 50 at 50kHz?
Comment: Do the math! What do you think?
Answer: GBW is not a precise measurement so it must be greater than the needs of your design for Av* f-3dB << GBW. This is especially true on Filters where the Av*f is also multiplied by Q² to determine the minimum GBW required. ( little know fact)
If you study the datasheet and have detailed design expectations or "Specs", you will realize GBW is only 1 of 6 major specs or over 20 total specs.
Please learn to define your expectations using all environmental and component variations with price and availability. Then make an overall design "spec' list before you choose parts for inputs, outputs and process variables or functions.
Since Op Amps are unstable with negative feedback unless they have internal integrator compensation ( often near 10Hz ) the product of gain(G) and -3dB bandwidth (BW) is a constant. (GBW)
"Video" Amps on the other hand are designed for high gain without this compensation, so are defined differently.

GBW of an op-amp


Why are hydrogen-bonded compounds (such as NH3) excellent solvents for most lab reagents?

Question: Hydrogen bonds are said to be one of the strongest molecular interactions in nature. Then why can most substances that interact through hydrogen bondig such as water and $\ce{NH3}$ able to dissolve a large variety of both ionic and covalent laboratory reagents? Does it have something to do with the structure of $\ce{NH3}$ or something else?
Comment: Hydrogen bonds are the *weakest* interactions that still make directed *bonds*. Water is not "hydrogen-bonded", it makes hydrogen bonds to itself and to other substances, in 99% of the cases these are exactly those substances that mix well with or are soluble in water.
Comment: Who says they're "excellent"? Most compounds aren't particularly soluble in them or react.
Comment: @Mithoron Thank you for the point. On research, found that most existing compounds (by numbers) aren't soluble in solvents that interact through hydrogen-bonding. Edited the question to "laboratory reagents" from "compounds".
Answer: Recall that hydrogen bonding interactions result from the polarized nature of bonds between hydrogen and nitrogen, oxygen, and fluorine. This polarized bond results in a hydrogen atom with very low electron density—a property that allows the atom to interact very strongly with negatively charged particles.

Thus, anions and electronegative atoms in polarized molecules have very strong electrostatic interactions with the low-electron-density hydrogen atom in $\ce{NH3}$ or $\ce{H2O}$, for example. Cations and positively charged elements in polarized molecules can also be stabilized by the electronegative atoms in molecules exhibiting hydrogen bonding ($\ce{N}$ and $\ce{O}$ in this case).

These strong interparticular interactions ultimately result in polarized or ionic solutes generally being very soluble in solvents with hydrogen bonding such as $\ce{NH3}$ or $\ce{H2O}$.


How to get rid of OTA software update notification?

Question: I upgraded my Nexus 4 to Lollipop a few days ago but I don't like it. I'll leave out my reasons because they're not relevant here. I wiped my phone and installed a clean stock 4.2.2 version instead. I'm happy with this.
Not long after, Android automatically downloaded the 4.3 upgrade and notifies me with the choices "Later" and "Install". I don't want to do this upgrade.
How do I:

get rid of the notification, and
remove the downloaded update (to free up precious storage space).

I have already tried choosing "Later" but the same notification immediately reappears.
Based on Google search results, I also tried going to Settings > Apps > All > Google Services Framework and unticked "show notifications" but it still appears. Force stop or disable also doesn't seem to help, so I've re-enabled the service including notifications. I didn't see any other apps in this list that sounded relevant - did I just not see it?
Comment: Related: our [ota-update tag-wiki](http://android.stackexchange.com/tags/ota-update/info) / [Is it possible to stop notifications of an OTA update?](http://android.stackexchange.com/q/24210/16575) Guess you chose the wrong place to "disable notifications" – it should be *Settings › Apps › All › Software Update* according to the linked post. Does that work?
Comment: Thank you @Izzy - unfortunately there's no app named "Software Update". I have the list sorted alphabetically and there's nothing between "Skitch" and "Sound Recorder".
Comment: Might be named "slightly different" (manufacturers, you know – and you didn't name your device). I'd check *all apps* to see if there's something that might match. Have you? Maybe it's "OTA Updater", or just "Updater".
Comment: You're right - I forgot to mention that it's a Nexus 4! (How could I have...?) I can't investigate right now but will respond later. I believe I did scroll carefully through the entire list already but I must have missed it if there's really an app with a self-explanatory name.
Comment: Never hurts to check twice :) Please also [edit] your question to include the device name, as it might "get lost" in the comments. Thanks, and good luck!
Answer: You can disable these notifications by unchecking the notifications for Google Play Services [Not Framework]. This fixed my problem on the LG G3 and I assume it will on all other devices.
The best option is to click and hold the notification and then select 'App info', which will take you to desired app info for that update notification. Then uncheck the notification option there.
Comment: `Go to Settings > Application Manager > All > Google Services Framework and then uncheck "Show notifications".` [source](http://android.stackexchange.com/a/54639/16606)
Comment: For Lollipop, it is "Apps" instead of "Application Manager"
Comment: After un-check notification in "Google play service". The notification was still in panel. I did long touch it, then from menu select "app info" and force stop. Will see if it appear again...
Comment: Since my question was marked as a dupe.  This does not work on a Galaxy S5 nor on a nVidia Shield K1.  Both Google Services Framework AND Google Play Services have had notifications unchecked.  The popup upgrade still persists.  Log pressing on the notification takes me to System Updates app and the "Show Notifications" is checked but can not be unchecked.  I have force stopped but it, of course, comes back.


Comparing difference of means due to individual variability

Question: So in our statistical test, we are using a dependent t-test because we are comparing the means between pre and post conditions in a physiology lab. Since there is a lot of variability between two subjects. For instance, one patient has pre/post values of 15.3 and 19.55% respectively while another has 2.74 and 3.02. My question is rather than find the means of both, can I simply compare the DIFFERENCE by making the pre condition always 1 and the post condition the difference between the two (i.e 19.55-15.3) meaning that when I run the test, the mean of pre condition will be exactly 1 and the post condition will be the difference between the two values. Is that appropriate?
Answer: One can use a paired t-test. As you can see in the link, the paired t-test is a comparison of differences, and that is indeed the appropriate test to perform, under one condition. That is, one should check to make sure that the difference between data pairs is not non-normally distributed. The paired t-test calculates the average difference between samples (which is also the difference of averages, but that is actually not as relevant.) Then, that average difference is divided by the standard error to make the t-statistic. That t-statistic is then the deviation from zero difference, so looking up what that statistic means in terms of probability, gives the likelihood of no difference.
If the paired differences are not normally distributed, then one can attempt to transform the data, by taking logs, square-roots, reciprocals and so forth of the original data sets to attempt to find a fairly normal difference histogram, or, one can just use a Wilcoxon signed-rank test, which, as it creates normal conditions by ranking the data, does not need normal conditions in the data itself.
Comment: How does one make *sure* that the difference is normally distributed? I don't know any way to be sure of that. Ranking the data does not produce normality; the ranks are distinctly non-normal; under continuity they only take integer values from 1 to n, each of which appears equally often (where n is the number of pairs; and they're dependent, since we're 'sampling' ranks without replacement).
Comment: @Glen_b True enough, loose language. One must avoid significant non-normality for the difference function of a paired t-test. In practice, known or not, it fairly easy to see when that is. Typically, significant t-tests for non-normality will be less significant than Wilcoxon S-RT, and, significant or not, it is also telling that non-significant t-test are then less non-significant.
Comment: @Glen_b Changed to "not non-normally distributed," which although more correct, is also confusing for the Newbie.


Formally real Jordan algebras

Question: In 1934, Jordan, von Neumann and Wigner gave a nice classification of finite-dimensional simple Jordan algebras that are 'formally real', meaning that a sum of squares is zero only if each term in the sum is zero.  In 1983 Zelmanov generalized this to all simple Jordan algebras, but unlike the original result, Zelmanov's 'classification' is not a neat list.  What about formally real Jordan algebras, not necessarily finite-dimensional?  What does the classification of these look like?
Comment: Welcome. If you put your last name in the search box in the upper right, you'll find a number of questions you may find of interest, as people have invoked your writings. Meanwhile, if you register you can avoid having multiple ID's on MO, that happened to me. Also click on "Users," I think you will recognize some names. Not mine, can't be helped.
Comment: The work by Zelmanov that you refer to appears to be this one: http://www.ams.org/mathscinet-getitem?mr=688595 (MR0688595, for future reference).
Answer: The formally real Jordan algebras include the class of JB-algebras, a class of normed Jordan algebra which is the Jordan algebra equivalent of C*-algebras. From this you might imagine that obtaining a complete classification is a rather non-trivial task. In this class you also find JW-algebras, which are JB-algebras with a predual, thus corresponding to von Neumann algebras. Some of the concepts from C*- and von Neumann algebra theory carry over to the Jordan algebra setting, but this margin is too narrow to summarize what is known. With apologies for tooting my own horn here, in 1984 I coauthored a book "Jordan Operator Algebras" with Erling Størmer which pretty much summarized the state of the art at the time. (Since then I have left that field, so I don't know if a lot has happened since.)
Comment: JB, were you just fishing for someone to mention JB-algebras?
Comment: Heh. Well, JB in this context stands for Jordan–Banach.
Comment: Thanks, Harald. No thanks, Allen. :-) I would really like to see a wild multitude of simple formally real Jordan algebras. I'm not sure I see them yet. Harald, I guess you're hinting that I can get such a thing from any C*-algebra that lacks nontrivial star-ideals. But this reminds me that my question said nothing about a norm, or topology. I know lots of infinite-dimensional C*-algebras that lack nontrivial closed star-ideals, but how about C*-algebras that don't have *any* nontrivial star-ideals?
Comment: John, I was painfully aware at the time that I did not really answer your question. Still, I hoped (and still hope) that at least it did shed some light on some corner of it. Regarding ideals, I am sure you are aware that in a unital C*-algebra (or unital Banach algebra more generally), the closure of a nontrivial ideal is again nontrivial, since a neighbourhood of the unit consists of invertible elements. Non-unital algebras is presumably a whole different kettle of fish.

Formally real Jordan algebras


How do I make a book or series of books that take place in three different centuries make sense and flow appropriately?

Question: I have a vast series of scenes, characters, and stories coming together in my head, which I have yet to transcribe to an actual story on paper. I have notes, and many of them, but I cannot seem to connect the time periods without seeming too cliche and/or predictable. I need advice on how to go about the different timelines while also maintaining the direction and structure of my story.
Comment: I would like to 1) confirm that no time travel occurs; 2) ask you if in your books one book would focus on a particular story/time period, or you have your storyline to "jump around".
Comment: There was a book series I read where each book in the series jumped a generation or 2 of a specific family. It made sense because obviously noone wants to read the boring peace time. Also they covered the gap in time by saying "the son of x is now x years old and blah blah blah" that gives you the information you need to understand this is decades later and the story is picking up again because a new evildoer is harming the lands.
Answer: There is a book here in Brazil called "Batalha do Apocalipse" or "Battle of the Apocalypse" in english. It is a christian mythological book with immortal angels.
This book passes from ancient times until modern days. There is a book series from it called "Sons of Eden" that does almost the same thing. As far as I know, once a mission/objective/journey in one time period is completed,  it passes to the next. For example, he was in WW1 and want to pass to WW2. But what he does in between? The author sumarize the events and how the characters react to it, and he also gives a pretty good historic background.
If there is something important to the characters happening between WW1 and WW2 he creates scenes that "resumes" the importance of that event. For example, the character starts to live in another country, so he narrates his arrival in there, his impressions and his new house.
You must show only the important and tell what is necessary.
I have not read the books, I only know this because of my girlfriend who reads it. I may edit this answer for better understanding and gather some information with her about this.
Also, depending how long the time passes in your book, I think you should see the time passing just as if it was a day or a week. After all, for immortal beings, what is a hundred years? "Nah, it's more like a week."
Answer: You need to make a very clear distinction between imaginary history and story. It seems to be quite common for aspiring writers to construct elaborate imaginary histories and then struggle to write them down because they are not actually stories.
We can't tell from your question if what you have are actual stories or simply imaginary history, but the fact the you describe your attempts as cliche and predictable is an indication that this may be the issue.
A story has a very specific shape. At its heart it consists of a character who values certain things and has a desire for something else. To attain that desire, they must sacrifice something else they value. They are reluctant to make this sacrifice, so they try different ways to attain their desire, but are rebuffed each time, leading them to have to make a fundamental value choice. The story then proves through action that the choice has been made and shows its consequences, for good or ill.
There are a few basic stories, all of which involve this confrontation of a questions of values in one way or another. We retell these basic stories over and over again. In that sense, every story is cliched and predictable.
What makes a story feel fresh and new, or keeps a classic eternally relevant, is not some novelty of storytelling. It is the freshness and perception of the telling. We don't want to see boy get girl because we have never read a courtship before, but because we want to see this particular boy, who we have come to know as if they were a member of the family, get this particular girl, who we have come to know as if she lived next door. We want Spidey to get MJ and Mr. Darcy to get Elizabeth Bennet because we are interested in these characters in particular, not because we are expecting new frontiers in romance to be revealed to us.
Take your imaginary history. Find the stories in it. Write those stories. Include the parts of the history that are relevant to the story you are writing. Omit everything else. If there is no confrontation with values in the the next 20 years of your characters life, gloss over those 20 years in a paragraph and get to the next confrontation. Make sure that your characters are real enough that we recognize them are real people. Make sure you are writing this boy gets that girl, not just boy gets girl.
The rest will take care of itself.


How to execute a series of Python scripts in batch?

Question: I frequently find that I need to run a series of python scripts sequentially. The order and number of these scripts may vary, but instead of executing each script individually and sequentially, is there a preferred way of batch automating a series of Python scripts? My programs require multiple and complex file path and other argument combinations.
Answer: Refactor them into modules, then make a new script that imports the relevant functions from each module and runs those.
The easiest way to do this is to write a main function per module and run all the main function serially.
Answer: I think larsmans' option is the best by far.  But if there is a reasons you cannot or should not turn them into easily imported modules, it is quite easy to just make a .bat file in Windows (or .ps1 if you have powershell) which calls each of them in turn.  In Linux, the same thing can be done with bash or csh as long as you remember to make the resulting batch executable.
If you want another python script that calls them as though they were being called from a command line (in order to pass in the argument combinations without refactoring them into modules) you can readily use os.system or the more powerful (but sligtly more complicated) subprocess module.


Can i use 8 gauge wire with 10 gauge ground with double 50 amp breaker

Question: So i bought 8 gauge 3 wire for my stove but after installing i seen it was 10 gauge ground wire with the wite and black being 8 gauge. Will it make a difference?
Comment: What *type* of 8/3 cable did you buy? NM? UF? AC? MC?
Comment: I was wondering if anyone would catch that.  Typical 8ga cable is only good for 40 amps.  I know some types can go higher, but we need to know the type.  Also, why no neutral?
Comment: @GeorgeAnderson I think the OP means 2-wire plus ground, so white is neutral (USA color code)
Comment: Nathan,  GeorgeA  raises a point:  are you trying to bring 3-phase 240 to the stove, or just  single-phase AC?  You can't use this 2-wire material for 3phase AC
Comment: It would really help if people that post questions of this nature what country they are in. Given that the OP here mentioned a double pole  50 amp breaker, I assumed USA, but could be wrong.
Answer: You can't use #8 on a 50A circuit
You have to read out of the 60C column of 310.15(B)(16), which means you are limited to 40A.
It would be possible with other classes of wire in conduit,  but not possible with the usual types of cable used in America used for this job (which is what you are referring to).
If you really need 50A, then change to #6 cable.
But the ground is fine
Circuits up to 60A are able to use a 10 AWG ground.
The conductors need to carry current continuously.  The ground only needs to carry current long enough to trip the breaker.
Comment: Note that the limitation you talk about is only a thing for NM and UF at these sizes; SER, AC, and MC are not so limited


Filter entries in CP by Author

Question: How can you filter entries in the CP by Author? I assumed entering something like author:tdavis (where tdavis is my username) would do it, but no results returned. I also tried substituting id for username.
Answer: For Craft 3, at least for now.

Make a custom plugin

Add event to modify the query in control panel
// Register element query prepare event
Event::on(ElementQuery::class, ElementQuery::EVENT_BEFORE_PREPARE,
    function(Event $event)  {
        if (Craft::$app->getRequest()->getIsCpRequest()) {
            if ($event->sender->elementType === 'craft\elements\Entry') {

                if(isset($_POST['criteria']['search'])&&strpos($_POST['criteria']['search'],'author')!==false)
                {
                    $email = explode(':',$_POST['criteria']['search']);
                    if(isset($email[1]))
                    {
                        $user = User::find()->email($email[1])->one();

                        if($user)
                        {

                            $event->sender->query->andWhere(['authorId'=>$user->id]);
                            $event->sender->subQuery->andWhere(['authorId'=>$user->id]);
                            $event->sender->search = null;
                        }
                    }

                }
            }
        }
    }
);

So when you type author:[Email] it can fetch in the CMS.
Answer: From the Search page in the docs, it looks like you can't search by author.
It looks, on the face of it, like entries can only be searched on Title, Slug and any of your Custom Fields.

Filter entries in CP by Author


Inserting the fields value to SQL Database

Question: I have Form that i created in infopath and published it to SharePoint 2013
Could it be possible to insert the field value to SQL Database?
Any help is really appreciated. Thanks in advance
Answer: Based on your current settings / requirements you can select the appropriate solution from the following.

Create an Event Receiver on your list at ItemAdded and ItemUpdated to write to SQL Database but this requires coding.

You can check a full example for Item added at Create a Custom List Level Event Receiver For Item Added To SharePoint 2013

You can work with BCS External List to read and write your data from external data source like SQL database , in this case, you can customize your forms via InfoPath as mentioned at an article on MSDN Customize External List Forms Using Microsoft InfoPath but this will need to configuration BCS and recreate your current list as External List.
There's another alternative solution from InfoPath (I didn't try it before) where You can use a secondary data connection to a Web service that works with that database. for more details check Add a data connection to a Microsoft SQL Server database


F150 Rough Idle misfires taking off bad shake at low RPM

Question: I will explain best I can. I am not a shark at this subject. So I lost my dad to cancer in 2016 he gave me a f150 2003 4.2L . It's very high in my miles over 300thousand but it was running very until now. I was told it has to blown valves in the head. I have tried fixing a lot of things my self like injectors oxygen sensor fuel pump. But can't seem to locate the problem. It will fire right up but I have to give it gas to make it stay on. I have drove it in this shape but it has rough and tough ride. Shaking and bucking until passed 2rpm then smoothies out a bit idle high at take off not over heating and no oil mix how can I figure out the problem or is time to put my dads truck to rest. Please help I'm having a baby next month and it's my only transportation.
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Comment: Sound like this ol truck needs a makeover :) your pressing on the gas issue is because your 02 sensor sees too much air, either because the fuels psi isn't high and stable or because there's an air leak, but you could also have a bad PCV, MAP, MAF, Idle control sensor that's malfunctioning
Answer: As has been said, syptoms are a vacuum leak-if you can get a scanner, see if the fuel trims improve when you rev it. Ideally use a smoke machine in the inlet to see if you can find any leaks, or spray propane around all vacuum lines/inlet manifold joints


04 Honda Accord EXL Grinding on cold startup

Question: just bought the car 1 1/5 months ago check engine light was on and diagnosed and now runs off ( I have noticed coolant slowly disappearing as well as small amounts of oil (oil is in perfect condition). Yesterday morning as well as today I have noticed a loud grinding for about 2 seconds after as the engine just got into the on position then goes away for the whole day (even if Parked for a few hours) What could cause this issue?
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Comment: Right after crank/start?  Sticky starter motor staying partially engaged for a bit possibly?
Answer: Just a theory, but I've seen this happen.
When you start your car, you turn the key to the START position, then as soon as the engine catches you release the key and you're assuming that it returns to the RUN position on its own as it always did.
But the ignition switch is old, the dielectric grease in it is thickened from age (and/or from cold weather) and instead of springing back to the RUN position, the switch is sticking in the START position for a few moments. What you hear is the starter remaining engaged after the car has started. This has the potential of hacking up your starter's pinion gear and the flywheel's ring gear.
All ignition switches get a little warm from contact current while the engine is running, and this warms up the dialectric grease and makes it less sticky. Therefore, it only happens on the first start of the day.
To see if this is what's happening, on your first cold start of the day, LOOK at the ignition key and switch as you start the car and release the key as normal. Is it sticking for a moment, accompanied by a grinding sound, then jumping back to RUN and the grinding stops?
If so, you should replace the ignition switch, but you can get by temporarily by consciously, physically returning the key to the RUN position when the car starts instead of just releasing the key to spring back on its own.


Is this a bad question?

Question: One of my question that I asked a week ago is not yet answered. I just wanted to ask if there was something wrong in that question.
Here's the link
Can flames be Frozen?
Answer: Yes, I see three problems with this question.
First, as worded, it's a yes-or-no question. We prefer to have questions that invite in-depth answers which provide context and explanation. (You may see the term "conceptual" thrown around in some places, and that's part of what we mean by it.)
Second, it's a rather vague question. What you appear to be asking is

What if the flames are cooled during the burning state?

But what do you mean by "what if"?

Are you just asking, in general, what happens if the flames are cooled? In this case, we would expect you to have made a good effort to look it up yourself before asking here, or at least look up some relevant information.
Do you have some idea of what would happen if the flames are cooled, and you want to know whether it's correct? If so, what is that idea, how did you arrive at it, and what reason do you have to think it might not be correct?
You mentioned plasma in the question; do you specifically want to know if the flames stop being plasma?

Also, how exactly are these flames being frozen? Depending on what exactly you want to ask, the answer might depend on what physical process takes place.
Finally, I'm not sure it's even on topic. Questions that ask if something is technologically possible tend not to be on topic here. That would be easy enough to get around by rephrasing the question to be more like "what happens to a flame as its temperature decreases?" which is better but still has some of the same vagueness.

Is this a bad question?


Source and Halacha? When does a minyan need to form?

Question: If 10 people gathered for a minyan for the repetition of the amida, but 10 were NOT present for the silent Amida - may a repetition with kedusha be recited or not?
Comment: Maybe I wasn't clear. I'm saying if you had 9 people for the silent and then a 10th arrived - is that considered a minyan that can repeat the amida? Above seems to be saying if there were 10 people to begin and now the chazzan wants to repeat the amida, there is a minimum amount of people required to answer amen. That is not what I'm referring to at all.
Comment: @DanF according to the kitzur shulchan oruch, you need six people that davened with you till now ( 20. 9) אֵין אוֹמְרִים תְּפִלַּת שְׁמֹנֶה עֶשְׂרֵה בְּקוֹל, אֶלָּא אִם כֵּן יֵשׁ לְכָל הַפָּחוֹת שִׁשָּׁה אֲנָשִׁים, שֶׁהֵם רֹב מִנְיָן שֶׁהִתְפַּלְּלוּ עַתָּה. אֲבָל אִם אֵין שִׁשָּׁה אֲנָשִׁים שֶׁהִתְפַּלְּלוּ עַתָּה, אֵין אוֹמְרִים כָּל הַשְּׁמֹנֶה עֶשְׂרֵה בְּקוֹל, אֶלָּא אֶחָד אוֹמֵר עַד הָאֵל הַקָּדוֹשׁ בְּקוֹל, וְאוֹמְרִים קְדֻשָּׁה וְגוֹמֵר תְּפִלָּתוֹ בְּלַחַשׁ. (ס"ט). So you definitely need six, I'm still trying to find a source for 10 people being there when they start the silent one
Comment: Again - I think the kitzur is referring to if you had a minyan of people but not all were davening, 6 is the minimum requirement that are davening together. Again - not this question.
Comment: A belated welcome to Mi Yodeya, Draizy. This is a practical question for me as my shul has this situation, frequently. FYI, even though I thought this was "silly", my shul wants a chazzan to be on the bimah even when there's no minyan. (What's the point of a *shaliach tzibur* when there's no *tzibur*, right?) But the rabbi stated his reasoning was that if a *tzibur* does show up, someone is ready to go, and that avoids *tircha detzibur* when we DO get one!
Answer: Refer to O.C. 69:1. The starting rule is that there were a group of people that didn't hear Kedusha (among other items, irrelevant to your question). It says that one person says Avot, Gevurot and Kedusha assuming that there are now at least 10 people (which is your case.) See the remainder of the paragraph that elaborates that even though you now have 10, at least 6 of them should not have heard Kedusha, previously (I guess this prevents extras that come in to form the minyan but had heard it in a different minyan?)
Also refer to Mishna Berurah commentaries 8 and 9 which elaborate further and offer other opinions.
Comment: I see that this Q has been bumped. If this answer is insufficient, please suggest what else you may be seeking.


How to file tax return when doing a backdoor roth conversion?

Question: I contributed $5,500 to my Roth IRA in this year. Later on I realized I might not be eligible for a Roth IRA contribution so I recharacterized that contribution as a traditional IRA. The market had gone down in the meantime and my custodian deposited $4,900 to my traditional IRA. Now I have converted that money back into a Roth IRA and net present value has changed to $5,100 at time of conversion. How do I file my tax return (specifically form 8606)?
Answer: I wrote an article about this a while ago with detailed instructions, so I'll link to it here.
Here's a snippet about how to use the Roth IRA loophole and report it properly:

You don't have any Traditional/Rollover IRA at all.
You deposit up to the yearly maximum (currently $5500) into a traditional IRA. In your case, you re-characterized, which means you essentially deposited. The fact that it lost money may help you later if you have extra amounts in Traditional IRA.
You convert your traditional IRA to become Roth IRA ($5500 change designation from Traditional IRA to Roth IRA).
You fill IRS form 8606 and attach it to your yearly tax return, no tax due. You have  a fully funded Roth IRA account.

If you have amounts in the Traditional IRA in excess to what you contributed last year - it becomes a bit more complicated and you need to prorate. See my article for a detailed example.
On the form 8606 you fill the numbers as they are. You deposited to IRA 5500, you converted 5100, your $400 loss is lost (unless you have more money in IRA from elsewhere). If you completely distribute your IRA, you can deduct the $400 on your Schedule A, if you itemize.
Comment: The second sentence in point 2 seems incomplete.  Can you finish it?  "... you essentially deposited ..."
Comment: @dg99: Re-characterization means that, for tax purposes, you "pretend" as if it was done a different way to begin with. Here you re-characterized from a Roth IRA contribution to a Traditional IRA contribution. So for tax purposes, you report everything as if you originally contributed to a Traditional IRA on the original date you contributed, and never contributed to a Roth IRA.


'One egg was given to three people'

Question: Can 'one egg was given to three people' mean 'one egg each was given to three people' as 'three people were given one egg' means 'three people were given one egg each'? Or does it only mean the one egg was shared by three people?
Comment: Is this a "real" problem?  Did you read this somewhere?  Because normally this kind of situation doesn't happen with eggs.
Answer: I feel like having the egg be the object of the verb makes it harder to take it as "one egg each". If it were "Three people were given an egg", there would be a stronger case for the "one egg each" interpretation, but even then it would be rather weak, and based mostly on the context; the idea of three people sharing an egg (unless it was scrambled or something) doesn't make much sense. The use of "one" rather than "an" also makes the "each" interpretation harder. It's certainly possible for someone to say "One egg was given to three people" while intending the meaning "three people were given one egg each", but such a person would be acting rather carelessly with regard to ambiguity. It can be rather easy to have a clear meaning in your head, and because you know what you mean, you don't notice that there's another meaning that's more natural, so it's not out of the question that someone might say this, intending the "each" meaning, without noticing that it's poorly worded. If this is an important issue, a careful listener would ask for clarification.

‘One egg was given to three people’


New tags: [OpenEXR], [ExifTool]

Question: I recently had a question relating to video conversion where the input format was OpenEXR and I used ExifTool for diagnostics. I think these would make helpful tags.
Answer: I'm not sure I see enough of a case for ExifTools specifically.  On EXR, is there really enough of a difference between EXR and OpenEXR to make it worth its own tag?  I've not personally worked with EXR, but it sounds like OpenEXR is just one particular implementation of an EXR encoder.  I'm not sure that is worth a specific tag either.
Comment: OpenEXR, as per wiki, is an ILM created image format, with EXR being shorthand. OpenEXR could be created but EXR suffices, I think.
Comment: ah, I thought openexr was the "more correct" name - thanks for the feedback (including re exiftools)
Comment: @d3vid - it might be, like I said, I'm not familiar with the format itself.  If OpenEXR is the actual name and EXR itself has no meaning, then I wouldn't be opposed to changing the existing tag to be OpenEXR, but I'd want someone to verify that first.

New tags: [OpenEXR], [ExifTool]


What's an adjective for someone who doesn't feel sorry for themselves?

Question: To elaborate:
Someone who isn't easily affected by their own emotional distress
Someone who's tough and doesn't make their own problems into everyone else's problem.
Comment: Hi and welcome. For single-word requests, please give a sample sentence showing how you envision the word being used. That is espescially important for this question becaue the title asks specifically for a verb but the text seems to describe an adjective (eta: looked again, a noun)
Comment: nope. i actually meant adjective, but thanks for pointing out my mistake c:
Comment: Welcome Sue. I think you are looking for a noun, instead of a verb.
Answer: It is unclear whether you want a verb or a noun, perhaps the latter.
A stoic is given by the Oxford Dictionary as

NOUN — A person who can endure pain or hardship without showing their feelings or complaining.

With an example

If you are on one end of the bell curve and need minimal drugs to treat your pain, you're a stoic, a good chap.

The Cambridge Dictionary has the slightly different

adjective — determined not to complain or show your feelings, especially when something bad happens to you.

With an example

We knew she must be in pain, despite her stoic attitude.
Answer: I presume you're looking for an adjective. Depending on context, you might use "stoical", "phlegmatic" or "impassive".  A stoical kind of person tends to endure pain or hardship better than others. Phlegmatic implies an unemotional and calm response to external stimuli. Impassive is more related to facial expression.

stoical - "seemingly indifferent to or unaffected by pleasure or pain; impassive": "stoic resignation in the face of hunger" TFD , showing austere indifference to joy, grief, pleasure, or pain; calm and unflinching under suffering, bad fortune, etc. Collins

phlegmatic - "having or showing a slow and stolid temperament" MW , "someone who is phlegmatic stays calm even when upsetting or exciting things happen" Collins e.g. He was a most phlegmatic man, steadily working on as the rain splashed down.

impassive - "If someone is impassive or their face is impassive, they are not showing any emotion" e.g. "He searched Hill's impassive face for some indication that he understood.", "The lawyer looked impassively at him and said nothing." Collins


Only one site in Whole Web application not displaying usage report

Question: Recently customer reported of an issue, where usage reports turns out to be empty. Weird thing is only this site collection in that web application affected. All othe sites within that web app are sucessfully generating usage reports. Where do i start troubleshooting from on this case.
Comment: check the site collection quota if it is maxed out? when this site collection was created? runt he site collection health check from site settings?
Comment: Out of total storage only 49.54% storage has been used. Ran the site collection health check, it says "The following files have been customized from their default and may present some unexpected visuals or behavior after upgrade:" and i have about 25 diffrent document templates (dotx,doc) listed there.
Answer: Check following

permission for the database Wss_logging as described in this article
Actual data is processed during crawling. So if there is no crawler
scheduled for content sources or there is a problem with the
crawlers no actual data is processes.
Only queries and interaction done by "normal" named users are
captured. If you access SharePoint using an administrative account
you queries etc. would not be showmen in the reports.
Check whether the Microsoft SharePoint Foundation Usage Data
Processing and Microsoft SharePoint Foundation Usage Data Import
timer jobs are all running
Make sure WSS_Admin_WPG and WSS_WPG have access to the log folder.
Create a new login in SQL for logging access

Go back to Central Admin -> Monitoring -> Configuring health data collection
use SQL authentication instead of Windows

http://guidesharepoint.wordpress.com/2013/12/13/enabling-usage-reportsharepoint-2013/


Black screen while installing Debian

Question: I tried installing Debian with a netinstall CD-ROM on my custom-built PC. Everything is going fine until I choose any of the install options because then the screen turns black and I get no graphical feedback at all. The screen itself seems to get information though because it doesn't go into stand-by mode. The disk drive doesn't show any activity though. Does anyone know what could cause this and/or how I could keep it from happening?
Specs

Processor: Intel i5-2500K @ 3.30GHz
Mainboard: AsRock Z77 Extreme 4
RAM: 2x 4GB (DDR3-1600), 1x 8GB (DDR3-1600)
Graphics: GIGABYTE GeForce GTX 660 Ti

EDIT: I just tried installing debian again (using "Graphic install") after I set the SATA mode from AHCI to IDE. This is what I've got:
ata1.00: exception Emask 0x52 SAct 0x0 SErr 0xffffffff action 0xe frozen
ata1: SError: { RecovData RecovComm UnrecovData Persist Proto HostInt PHYRdyChg PHYInt CommWake 10B8B Dispar BadCRC Handshk LinkSeq TrStaTrns UnrecFIS DevExch }
ata1.00: failed command: IDENTIFY PACKET DEVICE
ata1.00: cmd a1/00:01:00:00:00/00:00:00:00:00/00 tag 6 pio 512
in res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x56 (ATA bus error)
ata1.00: status: { DRDY }

EDIT 2: I don't know why, I don't even know how that should be a problem, but apparently this error message is connected to me having a DVD-RW drive connected to my mainboard. I managed to install Debian Jessie on another way but every time I tried to start it up (with the DVD-RW drive connected), I got exactly the same error message (with the exception that ata1 was changed to ata7 for some reason). I have no idea what I am doing wrong at all.
Answer: There are 2 guessable reasons:

Compatibility problems with graphics driver used by installer - when installer tries to find out possible desktop resolutions and hangs. To avoid that, just install in Text Mode.
Broken DVD image, DVD disk, DVD-RW or hard disk. Try to install from another DVD, recorded on different computer.
Comment: As much as I'd like to say that helped, it didn't. The problem is not with the DVD itself but rather with the _drive_ that reads it. I just installed Debian Jessie via USB (which worked out fine) but at first it crashed again while the drive was connected. I disconnected it and then it worked fine.
Comment: 2c - DVD-RW, like I said.
Comment: Apart from when I want to install Debian Jessie with it, the drive works fine.

Black screen while installing Debian


Is it against the law to judge you based on your age and marital status when you applying for a PhD position?

Question: A few weeks ago, I sent an email to a professor in a western European country in the hope of getting a Ph.D. position in the field of management. I have 17 years of work experience and 8 years of academic experience at the same time, I am a 45-year-old man, married, from Iran. Although the first round interview was successful, the professor called me on the phone and said that my age and marital status is his concern and the scholarship can only cover my expenses not my wife, I said I have enough money to cover my wife expenses and the evidence which was my life-time saving is available. At first, he said OK, but still do not receive any contact from that university. I have already asked questions that if my age can affect my Ph.D. application? Almost all of my friends said no, and I am almost sure that this is true in The United States and Canada. But I was shocked for the first time when I had such a conversation with that professor. I do not mention the name of the country and the university because it may seem immoral. Another question is whether it is moral to record all the interview by an application or software, and if you are judged by your age or any other personal issue then we can bring the case to the court of law?
Comment: Can you please specify the legal jurisdiction of the university, beyond merely Western Europe.
Comment: @Afshin: That is true, but the details of anti-discrimination laws can vary between jurisdiction in ways that may affect assessment of your matter.  If you can specify a legal jurisdiction then it will be possible to identify the operative laws at issue and see the relevant prohibitions and defences.
Comment: I know the question is about Western Europe, but interestingly, in the US, what has been done may not actually be illegal. As the [U.S. Equal Employment Opportunity Commission](https://www.eeoc.gov/laws/guidance/employee-rights-when-working-multinational-employers) notes, non-US citizens which are not authorized to work in the US are not protected by equal opportunity laws. I think the conduct as described is highly inappropriate, but I think you would have great difficulty in winning a court case given that you are neither a citizen of the EU nor physically present.
Comment: Sorry to say this, but it might be connected to the fact that you come from Iran. It can actually be very difficult to employ you. Not so long ago, a colleague at a neighboring institute (not a university, but still public) tried to hire a person from Iran as a postdoc. Financially, everything was fine, but there was no way to achieve that this person was allowed into the country as an employee. They really tried hard. A family (wife/children) was involved, too. I thought it was really sad, a missed opportunity for all sides.
Comment: From my knowledge, assessing your ability based on your age, race, and sex is strongly prohibited in most western countries and if this happens we can bring the case to the court of law. If the professor simply said no, it was acceptable but when he called me on the phone and left his concerns about my age and marital status, it is another issue. I currently communicate with many university professors in Australia and New Zealand and never heard any remark about my age and other things which may seem problematic from their sides.
Answer: Whether or not something is legal depends very much on the jurisdiction. There is nothing we can help you with without knowing what the country is (and even then it would not be a suitable question for this particular forum). This also pertains to the question of whether or not it is legal to record a conversation without the other person's knowledge -- this is different even from state to state within the US, for example.
As for the actual concern: Whether judging an application by the applicants age and marital status is legal is something that I cannot evaluate, as mentioned above. But from the perspective of a potential employer or student supervisor, it is a concern one could have: If you have a family and the university cannot cover your family's living expenses, it is probably that you might not finish the entire program or stay with the research project. If you have a family, you may also not be able to work as many hours as a 24-year-old single person. I would like to stress that I do not think that these are legitimate concerns to have without concrete evidence -- for example, one could have a conversation with an applicant about these specific points -- but it does not surprise me that some potential supervisors may have such concerns.
Comment: [...] The sentence "The professor [...] said that my age and marital status is his concern and the scholarship can only cover my expenses not my wife" could, of course, mean anything from "The prof said he doesn't want me as a PhD student due to my age and marital status" to "The prof said he'll be happy to have me as a PhD student, but wants to make sure that I'm really completely aware of the financial consequences which my decision might have for me and my family."
Comment: "for example, one could have a conversation with an applicant about these specific points" Hmm, from the OP it seems to me  that this is precisely what the professor in question did.
Comment: @JochenGlueck The way I read the OP is that the interviewer informed the applicant of these concerns, not had a conversation about them.
Comment: Thanks for your reply! Since the OP answered to the interviewer's concerns by explaining his financial situation and the interviewer seemed to be ok with it (at least at first), it seems that there was indeed somekind of conversation. But admittedly, it's impossible for us to tell whether the interviewer entered this conversation with good faith. [...]
Answer: Yes, it is illegal to discriminate based on age in the area of employment and occupation (and often, a European PhD position is a form of "employment"). The legal framework is the same in all European union countries, based on directive 2000/78/EC. Martial status is not covered by any European regulations, but some individual countries do have laws concerning this.
All European countries also have a national equality body that can investigate alleged cases of discrimination (and provide a lower barrier-to-entry than the formal judicial system). They might be able to help you out and provide you with additional information. However, if you did not record the phone call and have no other evidence concerning the alleged discrimination, this will make it much harder to succeed.
Comment: Yes, I agree that these exceptions are unlikely to cover the particular situation described by the OP (assuming that he was indeed denied the position due to his age - which is not completely clear to me from the information provided in the question). I just wrote my comment to point out that the sentence "[in the EU] it is illegal to discriminate based on age in the area of employment and occupation" comes with a number of legal subtleties.
Comment: It is not clear to me whether making access to a PhD position depend on the applicant's age necessarily constitutes age discrimination as specified in EU directive 2000/78/EC. Article 6(1) allows for various exceptions (which might or might not apply to PhD positions).
Comment: @JochenGlueck It allows for "objectively justified" exceptions. It sounds like in this case it was an ad-hoc decision by the professor (since the application was only rejected after the first interview round) based on a hunch that the applicant would be more likely to drop out because of his age rather than some kind of formal policy. The bar for objective justification is set very high and an ad-hoc decision like this would never meet it. Of course it depends on the individual situation, my answer simply provides a pointer in the right direction for OP to further investigate his rights.
Answer: It might not be discrimination from the professor or department but instead legal restrictions and limits on mature students.
Some scholarships do have age restrictions for example the Rhodes scholarship is for 19-25 years. It might not be something in the professor's control.
Additionally, some countries have age limits on student visas for example Switzerland has a 30 year age limit on visa for Master's degrees. They may have another restriction for PhDs.
Comment: Yes it was, fixed!


Move Hair with Armature

Question: I am trying to animate my character right now but whenever I move the head the hair particle system doesn't move with it. Is there a way to make it so that whenever the head moves the hair follows?
Answer: I did some research and I figured out that it was as simple as putting hair dynamics on and making the armature modifier be above the particle modifier.

Move Hair with Armature


Find all uses of a query in an access application

Question: I made a standalone Access 2003 app with a bunch of forms that is beginning to get unruly.  I'm trying to clean it up a bit and I'd like to do things such as find all uses of a query so that I can make some global updates.  I can use ctrl-f to find uses of a query in code but my question is:  Is there an easy way to search the entire app to find where queries are used in the control's properties window such as when they are directly bound to a control?
It would be nice to programatically dump all properties of all forms to text files.
Answer: Right-click on the query in the database window and select "Object Dependencies" This should give you the list of forms that host it as a sub-form.
This only works if you have Track Name Autocorrect Info turned on which is the default. I personally turn this off as it bloats the db.
Comment: What version doesn't do this (btw., 2003 does)
Comment: Name AutoCorrect was introduced in A2000, but I don't know if it had Object Dependencies. I've never used Name AutoCorrect because it's too dangerous and too destabilizing, so I wouldn't recommend this.
Answer: Like DJ writes: this is the way to go.It works pretty good, it detects all queries, even the ones that are used in comboboxes etc. Although I don't think it will find queries that are used in code.
And if you change a query (the name for instance) all references to this query will be updated as well.
Answer: Forms can be saved to text files using SaveAsText:
Sub FormToText()
Dim frm
For Each frm In CurrentProject.AllForms
    Application.SaveAsText acForm, frm.Name, "c:\docs\" & frm.Name & ".txt"
Next
End Sub

You can get a great deal of information from system tables MsysObjects and MsysQueries.
Answer: As a long-term user of Access who makes a living with it, I don't recommend Name AutoCorrect. For these kinds of things I use a search and replace utility. I've been a long-time owner of Black Moshannon's Speed Ferret, but it's been pretty problematic since the release of A2003, since it doesn't natively support more recent versions. Another alternative that I've not really used but that others recommend is Rick Fisher's Find and Replace.
Answer: I know this is a little old, but it looked like an interesting challenge.  If you paste this into a module and run it, it'll produce a text file with the RecordSource for every form and the RowSource for every ComboBox or ListBox with a RowSourceType of "Table/Query".  If I'm remembering correctly, that should get you every property where a query could be used.  If I'm not remembering correctly, you can tweak the code to grab the others or to change the format of the output.
If you wanted to dump all properties of all forms, you could do a for each loop in the properties collection of the form and write that to a file.  The issue there is that forms have certain properties, like PrtMip and PrtDevName, that are structures and therefore break the write or writeline methods, so if you were going to try to write those to a file you'd have to do some special handling first.  Also, I believe the bookmark property can be problematic as well.
Sub ListProperties()
    Dim frm As Object
    Dim ctl As Control

    Dim fs As Object
    Dim file As Object

    Set fs = CreateObject("Scripting.FileSystemObject")
    Set file = fs.CreateTextFile("C:\FormProps.txt", True)

    For Each frm In CurrentProject.AllForms
        DoCmd.OpenForm frm.Name, acNormal, , , , acHidden
    Next frm

    For Each frm In Forms
        file.writeline (frm.Name)
        file.writeline (String(Len(frm.Name), "-"))
        file.writeline "RecordSource" & Chr(9) & frm.Properties("RecordSource")

        For Each ctl In frm.Controls
            With ctl
                Select Case .ControlType
                    Case acComboBox, acListBox
                        .SetFocus
                        If .RowSourceType Like "Table/Query" Then
                            file.writeline Chr(9) & .Name & Chr(9) & "RowSource" & Chr(9) & .RowSource
                        End If
                End Select
            End With
        Next ctl

        file.writeline
    Next frm

    For Each frm In Forms
        DoCmd.Close acForm, frm.Name
    Next frm

End Sub

Answer: There's nothing built in, but you should be able to get the functionality by writing some code that iterates through the CurrentProject.AllForms collection to loop through all forms. For each form, check the properties that might have the query in them and make a list.


How to sort a pandas dataFrame by two or more columns?

Question: Suppose I have a dataframe with columns a, b and c. I want to sort the dataframe by column b in ascending order, and by column c in descending order. How do I do this?
Comment: check this answer http://stackoverflow.com/a/14946246/1948860
Comment: Does this answer your question? [Pandas sort by group aggregate and column](https://stackoverflow.com/questions/14941366/pandas-sort-by-group-aggregate-and-column)
Answer: As of the 0.17.0 release, the sort method was deprecated in favor of sort_values.  sort was completely removed in the 0.20.0 release. The arguments (and results) remain the same:
df.sort_values(['a', 'b'], ascending=[True, False])

You can use the ascending argument of sort:
df.sort(['a', 'b'], ascending=[True, False])

For example:
In [11]: df1 = pd.DataFrame(np.random.randint(1, 5, (10,2)), columns=['a','b'])

In [12]: df1.sort(['a', 'b'], ascending=[True, False])
Out[12]:
   a  b
2  1  4
7  1  3
1  1  2
3  1  2
4  3  2
6  4  4
0  4  3
9  4  3
5  4  1
8  4  1

As commented by @renadeen

Sort isn't in place by default! So you should assign result of the sort method to a variable or add inplace=True to method call.

that is, if you want to reuse df1 as a sorted DataFrame:
df1 = df1.sort(['a', 'b'], ascending=[True, False])

or
df1.sort(['a', 'b'], ascending=[True, False], inplace=True)

Comment: Sort isn't in place by default! So you should assign result of the `sort` method to a variable or add `inplace=True` to method call.
Comment: @renadeen very good point, I've updated by answer with that comment.
Comment: @Snoozer Yeah, I don't think sort's ever going to go away (mainly as it's used extensively in Wes' book), but there has been [some big changes in calling sort](https://github.com/pydata/pandas/pull/10726). Thanks! .. I really need to automate going through all my 1000s of pandas answers for deprecations!
Answer: As of pandas 0.17.0, DataFrame.sort() is deprecated, and set to be removed in a future version of pandas. The way to sort a dataframe by its values is now is DataFrame.sort_values
As such, the answer to your question would now be
df.sort_values(['b', 'c'], ascending=[True, False], inplace=True)

Answer: For large dataframes of numeric data, you may see a significant performance improvement via numpy.lexsort, which performs an indirect sort using a sequence of keys:
import pandas as pd
import numpy as np

np.random.seed(0)

df1 = pd.DataFrame(np.random.randint(1, 5, (10,2)), columns=['a','b'])
df1 = pd.concat([df1]*100000)

def pdsort(df1):
    return df1.sort_values(['a', 'b'], ascending=[True, False])

def lex(df1):
    arr = df1.values
    return pd.DataFrame(arr[np.lexsort((-arr[:, 1], arr[:, 0]))])

assert (pdsort(df1).values == lex(df1).values).all()

%timeit pdsort(df1)  # 193 ms per loop
%timeit lex(df1)     # 143 ms per loop

One peculiarity is that the defined sorting order with numpy.lexsort is reversed: (-'b', 'a') sorts by series a first. We negate series b to reflect we want this series in descending order.
Be aware that np.lexsort only sorts with numeric values, while pd.DataFrame.sort_values works with either string or numeric values. Using np.lexsort with strings will give: TypeError: bad operand type for unary -: 'str'.
Answer: For those that come here for multi-column DataFrame, use tuple with elements corresponding to each level.
tuple with elements corresponding to each level:
d = {}
d['first_level'] = pd.DataFrame(columns=['idx', 'a', 'b', 'c'],
                                         data=[[10, 0.89, 0.98, 0.31],
                                               [20, 0.34, 0.78, 0.34]]).set_index('idx')
d['second_level'] = pd.DataFrame(columns=['idx', 'a', 'b', 'c'],
                                          data=[[10, 0.29, 0.63, 0.99],
                                                [20, 0.23, 0.26, 0.98]]).set_index('idx')

df = pd.concat(d, axis=1)
df.sort_values(('second_level', 'b'))

Answer: sort_values has a stable sorting option which can be invoking by passing kind='stable'. Note that we need to reverse the columns to sort by to use the stable sorting correctly.
So the following two methods produce the same output, i.e. df1 and df2 are equivalent.
df = pd.DataFrame(np.random.randint(10, size=(100,2)), columns=['a', 'b'])

df1 = df.sort_values(['a', 'b'], ascending=[True, False])  # sort by 'a' then 'b'

df2 = (
    df
    .sort_values('b', ascending=False)                     # sort by 'b' first
    .sort_values('a', ascending=True, kind='stable')       # then by 'a'
)

assert df1.eq(df2).all().all()

This is especially useful if you need a bit more involved sorting key.
Say, given df below, you want to sort by 'date' and 'value' but treat 'date' like datetime values even though they are strings. A straightforward sort_values with two sort by columns would produce a wrong result; however, calling sort_values twice with the relevant sorting key would produce the correct output.
df = pd.DataFrame({'date': ['10/1/2024', '10/1/2024', '2/23/2024'], 'value': [0, 1, 0]})

df1 = df.sort_values(['date', 'value'], ascending=[True, False])  # <--- wrong output

df2 = (
    df
    .sort_values('value', ascending=False)
    .sort_values('date', ascending=True, kind='stable', key=pd.to_datetime)
)  # <--- correct output

N.B. We can get the same output by assigning a new datetime column and use it as a sort-by column but IMO, the stable sort with the sorting key is much cleaner.
df3 = df.assign(dummy=pd.to_datetime(df['date'])).sort_values(['dummy', 'value'], ascending=[True, False]).drop(columns='dummy')


Proper CloudTableClient instance lifecycle?

Question: I'm using the new WindowsAzure.Storage 2.0 (might not be a revelant information), and I'm implementing data access using CloudTableClient. Most samples I've seen are instanciating a CloudTableClient in the ctor of an ASP MVC Controller (instanciated per web request).
Is there any performance penalty doing so?
Would it be wise to keep a long running instance in a singleton style?
Answer: You need to create a new instance of CloudTableClient with each request. Instance members are not thread-safe, so you can't share a singleton.
Comment: Weird, because the documentation on https://learn.microsoft.com/en-us/azure/azure-functions/manage-connections says:

"To avoid holding more connections than necessary, reuse client instances rather than creating new ones with each function invocation. We recommend reusing client connections for any language that you might write your function in. For example, .NET clients like the HttpClient, DocumentClient, and Azure Storage clients can manage connections if you use a single, static client."

And CloudTableClient is a "Azure Storage Client"
Comment: To be fair, my answer was 6 years ago. Things might have changed.
Comment: Hi, it looks like the link is broken if you have time to find the equivalent info in the new documentation - although I see the answer is way back in 2013!.
Answer: I came across this question / answer wondering the same thing and whilst looking through the SDK's source code (for something else) I came across something useful:
When executing an operation, the SDK is using a HttpClientFactory, so a single static instance of HttpClient is being reused. Which is good, and corrects the Improper Instantiation antipattern, so the common reason to use a singleton is already sorted for us.
Relevant code can be found on github
During Execution
and the HttpClient factory  is implemented via a static Lazy<T>
Notably the Storage SDK doesn't support Table anymore (instead the Cosmos SDK appears to provide it - I'm learning more), so this is likely a moot observation.
Answer: I think in 2020 you should reuse.
https://azure.microsoft.com/en-us/blog/performance-tips-for-azure-documentdb-part-1-2/
Answer: Looking at CloudTableClient documentation, I realize it's not thread safe.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Hence it is probably required to instanciate it for each request.
Comment: Yep, posted just as you answered. There's no performance penalty with doing it.


How do I get Coco?

Question: I want Coco to move to my town. Is there any way I can make her come? I have no idea what to do.
Answer: Ok, the only way to get villagers to move to your town in Wild World other than by random chance is to talk to them while visiting other towns and have the other player on your Friends List. If you talk to them you might end up encouraging them to move to your town in the future. This is not guaranteed, but it is your best bet.
As for visiting other towns, you can only do this at this time by finding another local player and visiting their town over system-to-system connection between the games as the Nintendo WFC service has been shut down for the DS (meaning, no Internet play).
I hope this helps.

How do I get Coco?


ZedGraph, record position when mousedown x-axis, C#

Question: I'm using ZedGraph to plot some line graphs in C#.
What I'm trying to do is record the on screen x axis positions when you zoom in and out with the mouse as I want to work out the max and min values that are displayed.
Answer: I'm not sure I understand the question very well, but you can get the screen coordinates of the mouse location, then call ReverseTransform to get the location in the graph.


How does Jumper work with Warp in terms of carrying people with you?

Question: Someone with the Jumper (world-jumper) advantage can escort other people with the Jumper (world-jumper) advanatge, according to b. 64. You can also take warp and the warp jump enhancement, to be able to teleport on the world you are visiting. Would this allow you to bring along other people on your warps when you are Warp Jumping? Would you be able to bring Jumpers along on Warps that remain on the same world?
Comment: I've set a reminder for myself to check the wording on this when I'm home with access to my books.
Answer: I think this will make it clear:
B64, near top of center column, "However, if multiple Jumpers of the same kind are in physical contact, when one jumps, the others can "hitch a ride" if they wish -- even if the Jumper who initiates the jump does not want company." (italics in original)
To me, at least, this is clear on two points: the Jumpers who "hitch a ride" must be the same kind of Jumper -- whether this is timejumper, worldjumper, or omni-jump -- and I would interpret this to mean that if the initiating Jumper has Warp, the others must as well -- not just to follow on a jump that uses Warp, but to follow that jumper on any jump.
Of course, your Warp Jumper could carry one other along on any jump they can make themselves, if they have Extra Carrying Capacity sufficient to the additional weight.
All of this is per B64, Jumper section.
Warp, B97-98, lacks the "hitchhiker" feature (that is, others with Warp cannot follow along without having some means to know, well enough to Warp there, where the Warper went); the only to take someone else along on a Warp within the same world or time is if they have Extra Carrying Capacity sufficient for the weight involved.
Answer: If you had warp-world-jump, you would not be able to carry other people without world-jumping or adding Extra Carrying Capacity to Warp as jumping benefits should only affect people who are currently jumping. However, if you had warp-time-jump, you would always be able to carry time-jumpers on your Warp as we are all traveling in time all the time.