Can I use the leftover pickling brine?

Question: I have some leftover brine that was leftover from making canned pickles, it was heated up to put in the canned pickles to make them. Can I use this brine again to make more canned pickles? The brine never touched the pickles or anything else.
Comment: disagree on the dupe - that is for brine that is quite old and had pickles in it. This is for salty and/or vinegary water that was heated up and then cooled. It doesn't have the same risks as brine that has had pickles, herbs, spices etc in it for ages and been exposed to air repeatedly.
Comment: If the brine is no more than 24 hours, go for it, if not toss.  I had a similar question, I believe a while back.  You could reheat the brine, let it cool then put the pickles in it.  If this is the case 48 hours max, but again, reheat, cool then put the pickles in.  My dad used my brine over and over again without doing anything to it once he ate my pickled veges and almost hit 96, but I really don't suggest it.  24 hours, use the brine more than 24 less the 48 reboil, cool, pickle.
Comment: Definitely a dupe of [this](http://cooking.stackexchange.com/questions/54628/using-unused-pickling-juice/54655#54655).  Nutshell: probably safe for fridge pickles if it is just the brine (water, salt, sugar, vinegar).  Heating it more than once may make it not shelf-stable.  I would assume used pickle juice may be ok for quick fridge pickles once or twice, but you should probably just filter it and use it for dressings or marinades.
Comment: possible duplicate of [Reusing pickle brine](http://cooking.stackexchange.com/questions/23539/reusing-pickle-brine)
Comment: What is in the brine?
Answer: Not sure any of the above have read your question completely.  You are asking; can you store extra brine that you made but was not used in your pickling process.  I do this systematically when my  Green Beans are going crazy.  I mix up extra brine and store it in the refrigerator for up to 2 weeks.  The brine is simple pickling salt, water and white vinegar.  Then I can use it incrementally as my produce comes in. Saves me a few steps by simply reheating premixed brine instead of making it each time.  I like this approach because it allows me to put up a few pints at a time while the beans are fresh.  Have never had a problem with my Dilly Beans.
Answer: Yes, if I comprehend correctly, it was part of the brine solution you heated, but it was not actually used in pickling.  There is (arguably) some concern with reuse pickled liquids, on the basis of potential levels of bacteria.
Personally, I have reused pickling solutions - though these have mainly been vinegar solutions based and not brine solutions.  Have yet to delve into natural fermentation 'pickling'.
Comment: You never reuse brine that has been used  on meat
Comment: Veggie brines are ok though

Can I use the leftover pickling brine?


Is it true that any Riemannian metric on cylinder can be deformed to product metric?

Question: Is it true that any Riemannian metric on cylinder $\Bbb S^1\times \Bbb R$ can be deformed to standard product metric?
Are there some standard references about such classifications?
Answer: Yes, this is true. Here is a not-quite-full generalization. Unfortunately, I do not know of any references for such questions.
Proposition. Let $(M, g)$ be a Riemannian manifold of dimension $m$ such that $M$ admits a global orthonormal frame $e_1, \dots, e_m$. (This means that each $e_i$ is a vector field on $M$, and for every $p \in M$ the vectors $e_i(p)$ form an orthonormal basis for $T_p M$.) Then any other Riemannian metric on $M$ continuously deforms into $g$.
Remarks. The cylinder $\mathbb{S}^1 \times \mathbb{R}$ with the product metric is an example of such an $M$. I believe this proposition is true even when $M$ doesn't admit a global orthonormal frame; see my remarks at the bottom of the post.
Proof. If $h$ is some other Riemannian metric on $M$, then we get a map
$$
  \phi_h: M \to GL_m \mathbb{R} / O_m\mathbb{R}
$$
as follows.
Given $p$ in $M$ choose an $h$-orthonormal basis $f_1, \dots, f_m$ for $T_pM$. Writing $e_i(p) = \sum_j a_{ij} f_j$, let $A$ be the matrix whose $(i,j)$-th coefficient is $a_{ij}$.
If $f_1', \dots, f_m'$ is some other oriented $h$-orthonormal basis, then we write $e_i(p) = \sum_j a'_{ij} f_j'$.
Write $f_i' = \sum_j b_{ij} f_j$. Then the matrix $B = (b_{ij})$ is in $O_m \mathbb{R}$, and
$$
  e_i(p) = \sum_j a'_{ij} f_j' = \sum_{j, k} a'_{ij} b_{jk} f_k,
$$
or $a_{ik} = \sum_j a'_{ij} b_{jk}$, which shows that the matrix $A$ is well-defined up to multiplication on the right by an element of $O_m \mathbb{R}$.
The point is that (given our choice of global frame) deformation classes of metrics on $M$ are classified by homotopy classes of maps into $GL_m \mathbb{R} / O_m \mathbb{R}$. But the Gram-Schmidt process shows that $GL_m \mathbb{R} / O_m \mathbb{R}$ is homotopy equivalent to a point. $\square$
Remarks. More generally, one might wish to pay attention to orientation issues in the above; you could ask whether there is an orientation-preserving deformation, in which case you get a map into $GL_m \mathbb{R} / SO_m \mathbb{R}$, which is homotopy equivalent to two points, and the argument goes through as before (assuming the oriented metric you want to preserve has the same orientation as the one you want to deform it into).
Making the deformation above smooth should be straightforward; I just didn't want to think about it.
If $M$ is not globally trivializable, there's still a fiber bundle $E$ over $M$ whose fibers are isomorphic to $GL_m\mathbb{R} / O_m \mathbb{R}$ whose sections classify Riemannian metrics on $M$. I believe it is still true then that the space of global sections of $E$ is contractible (since the fibers $GL_m\mathbb{R} / O_m \mathbb{R}$ are contractible); see this Math:SE post, for instance, though I have not gone through the details myself. It should follow that the assumption that $M$ admits a global frame can be eliminated in the proposition above.


Nilpotent operators and spectrums.

Question: I think that the spectrum of a nilpotent operator is {0} but I don't know how to prove it and that's just an intuition. I think that for b), it's wrong because the only diagonalisable nilpotent matrix is the zero matrix but again I think I need a counterexample here. But I might be making a mistake here, is a nilpotent matrix a nilpotent operator ?
Comment: According to [this answer](http://math.stackexchange.com/a/1022967/307483), you are right about the spectrum of a nilpotent operator containing only zero.
Answer:
is a nilpotent matrix a nilpotent operator ?

A nilpotent operator $f: V \rightarrow V$ can be represented as a matrix through one (or two, if you feel like being tricky) base(s) of $V$. Generally, an operator can be represented as a matrix, as long as a base is provided. If a matrix $M$ represents a nilpotent operator $f$ so that $f^n = 0$, then it satisfies $M^n = 0$. Think of a matrix as one way of representing an operator.
Crappy metaphor incoming: "hola" and "hello" both represent the same thing, greeting, in two different languages. Here, the concept of "greeting" plays the role of the operator, those two words are two representations (playing the role of matrices) of this operator in two different bases, respectively, the Spanish and English languages. Not sure if that's any help.
Proofs of both questions
(a) Your intuiton is right. Let's prove $Sp(f) = \{0\}$ with double inclusion.
First: let's prove, through reductio ad absurdum, that $Sp(f) \subset \{ 0 \}$.
Suppose $\lambda \neq 0$ is in $f$'s spectrum. Let $u \in V$ be an eigenvector of $\lambda$. $f^n(u) = \lambda^n u \neq 0$, which contradicts $f^n \neq 0$. Hence, $Sp(f) \subset \{0 \}$.
Second: let's (directly) prove that $0$ is necessarily in $Sp(f)$.
If $f=0$, that goes without saying. Else, define $m$ as the smallest integer so that $f^m = 0$. $f^{m-1} \neq 0$, therefore, there exists some $u \in V$ so that $f^{m-1}(u) \neq 0$. Any of these non-zero $f^{m-1}(u)$ is an eigenvector for the $0$ eigenvalue. Hence, $0$ is in $Sp(f)$.
(b) Given that $Sp(f) = \{0\}$ seems true, having (b) also true would mean any nilpotent operator is similar to $0$, which sounds weird. Let's find a counter-example: a nilpotent operator that is not diagonalizable. A quick Wikipedia search reveals this simple example:
$
C := \left[ \begin{array}{cc}
0 & 1 \\ 0&0\end{array}
\right]
$
$C$ is nilpotent ($C^2=0$), yet it is not diagonalizable (not over $\mathbb{R}$ nor over $\mathbb{C}$).
Comment: @TZakrevskiy good call. Hadn't thought about it... but my gut feeling is that the person who wrote the question would accept such an answer. I may be wrong.
Comment: And what happens if there are no eigenvectors corresponding to the eigenvalue $\lambda$ (imposssible in finite-dimensioned case, yet possible in infinite-dimensioned case)?
Comment: Thank you very much, that's what I thought ! However, one of my question was is a matrix like C an operator ? It seems that yes.
Comment: @ThéodoreRozencwajg C is a matrix. It represents an operator in a given base of $V$. By abuse of terminology, it could be said that "C is an operator", but technically it is not. However, a lot of properties of matrix or of operators (including nilpotence) are defined so that if it is true for a given operator, it is also true for any of its representations as a matrix.

Nilpotent operators and spectrums.


are Budget and Budgeting tags duplicates?

Question: I just posted a question on this site and attempted to add a tag for budget, only to see that there are two tags "budget" and "budgeting" that as best I can tell are very similar if not identical...and that was a bit confusing to someone who is not a "pro" user of this site. Should these be tag synonyms? One tag appears to have significantly more use than the other tag.
Comment: Isn't one about low cost, and the other one about planning costs?
Comment: See also the tag info pages [budgeting](http://travel.stackexchange.com/tags/budgeting/info) vs [budget](http://travel.stackexchange.com/tags/budget/info) (mouse over them to get the details when adding/editing a question)
Comment: @Gagravarr. I understand the intended difference, but it is at least ambiguous. So a change would be helpful (but to what)
Comment: Our old overseer came up with the tag name budget` specifically for questions seeking cheap(est) / low cost / shoestring prices. At the time I argued it would lead to confusion with people working out a budget for their trip. I lost that argument. Much more recently it was obvious that we were gaining more and more questions about working out how much money to allow for, that were not necessarily about keeping costs to a bare minimum, so the `budgeting` tag was added, perhaps by myself. My opinion is that the two are very different and we need two tags but the old `budget` tag needs renaming.
Comment: @hippietrail Maybe `budget-travel`?
Comment: @starsplusplus: Yes I think `budget-travel`, `low-cost`, `low-budget` are all good and there might be others.
Answer: The distinction is this:

budget is for when you want something inexpensive (as opposed to, say, luxury.) Couchsurfing, free public wifi, using libraries in towns you're visiting, that sort of thing. You want to save money.
budgeting is for the work of figuring out what something will cost, whether it's a luxury cruise, a set of flights, or a backpack-and-hitchhike tour of Europe. You want to plan your costs in advance.

Personally I would roll budgeting into planning since you can't make a reasonable cost approximation without doing a whole pile of planning. This would also eliminate confusion for people who don't use the adjective "budget" to mean low-cost, and see only the noun "budget" when they read the tag. There are only 10 questions tagged budgeting and 8 of those are closed. Making it a synonym feels like a good idea to me.
Comment: Tags merged as suggested. Not sure how we managed t miss this the whole time though.
Comment: Yes merging "budgeting" and "planning" is also not a bad idea. I would still like to see "budget" renamed to something less ambiguous though since we're still going to have both "budget" and "budgeting" though one will be a redirect.


OSX implementation of WinBoard / XBoard?

Question: Is there a Mac OSX implementation (or equivalent) of WinBoard / XBoard?
Comment: xboard can be compiled under OS X if you install XCode (to get gcc) and an X11 implementation (to get the libraries).  I have used it for years.  You will need timeseal if playing online on e.g. FICS.
Comment: Not an answer, but another OSX chess (the only?) which is still supported Kibitz. The version on GitHub is the latest, with the latest commit today.
Answer: You can technically still use XBoard, but you will need to install X11 from MacPorts, since IIRC Apple no longer ships it.
Julien Marcel has a collection of well-compiled OS X chess engines (which do not require emulation).
As for not having a ChessBase client, HIARCS Chess Explorer does fine.
(FWIW, there is a port of XBoard to Cocoa - currently named OSXBoard - but it seems to have stalled.)
Answer: Jin seems like a good option.
Works well on OSX 10.8, and compatible with other platforms as well.
Answer: Jin is the best, also on older macs there was another client "Fixation". I would recommend using a virtualization application such as VMWare Fusion or VirtualBox with a Windows guest to run your preferred Windows chess software - as macs also suffer from not having a satisfactory ChessBase client to review games. Performance is not an issue as chess apps do not need be too powerful for these things.
Comment: "satisfactory ChessBase client" is an interesting phrase. Hiarcs and Shredder come full strength on OS/x, as does Stockfish. All three are quite competent analysis engines.
Comment: Arlen - yes, they are not ChessBase clients though, they are analysis engines, which in my view are quite different!
Comment: True, but as there's never been a satisfactory version of ChessBase on the Mac, I didn't see as how the lack of a client for a non-existent entity was by itself a valid criticism. (And yes, CB once tried to make a Mac version, but it was such a slow, buggy hack job no one in their right mind wanted to use it.)
Answer: There is now a native quartz xboard.app through GTK2.
http://www.open-aurec.com/wbforum/viewtopic.php?f=19&t=52964
Answer: xboard can be installed via macports
<code>sudo port install xboard
</code>
if you run into trouble with your fonts see XBoard page on wiki.bitplan.com


Why don't my fluorescent lights work after a nearby lightning strike?

Question: I was working in the basement during a thunderstorm, with two banks of fluorescent tube lights (like office lights) in two rooms on.  Thunder pealed, power went out.  Every so often there would be a flicker of light, then it was gone again.  Went upstairs, discovered power was on upstairs (although newly installed fluorescent bulbs are much dimmer in one room).  Returned to basement, checked the circuit board, which was fine.  Discovered the incandescent lights and the wall outlets all worked.  Hour later, and still can't get the fluorescent tubing to turn on.  What happened?
Comment: Check gfci receptacles to see if any need reset?
Answer: They all went out at once? It may be a loss of power to the lighting circuit, or it may be a power surge taking out all the fixtures. If the power to the fluorescents is good, then it's one of two things:

the fluorescent tubes ($2-5)
the ballasts ($15-25) -- a ballast is an electrical module inside the fluorescent fixture which controls the power for the tubes.  Fluorescent tubes take specially regulated power, not common mains power.

It's more likely the ballasts than the tubes, but the tubes are easier to swap.  There are Q&A on here which discuss at length identifying and changing ballasts.
Fluorescent tubes are now very good, and no longer give the green flickery sickly looking light they once did.   If it is the ballast, however, you may want to price out switching to LED replacement fluorescent "tubes".  Make sure to get direct-wire types, not the kind dependent on ballasts.
Comment: Or a gfci tripped....
Comment: Definitely, though that will become noticeable if the fixtures have no power.
Comment: Although OP says lights "flickered" several times that can often caused by static in already warmed tubes.


Overleaf template for IEEE journals

Question: The Overleaf website has a LaTeX template IEEE Transactions. Does it fully support the format as desired by IEEE?
Comment: Which template do you exactly mean?!
Comment: Actually i am preparing a research paper for IEEE jounral. I used overleaf online tool which enables to generate Latex documents. A predefined templates is given there. I just want to know does it follow the guidelines given IEEE for document format.
Comment: Which is faster? a) download the template from the IEEE; b) find the template somewhere else, ask on Stack Exchange if it's the right one, wait for a reply?
Comment: @ David Richerby, Overleaf provides simultaneous editing amoung co-authors. I just wanted to conform about its format. Now I got to know that one may directly upload his manuscripts from Overleaf to ScholarOne sumbmission website. You may check it at ScholarOne website. Now you tell, which is faster and better? ;)
Answer: According to Overleaf, yes. The top of their gallery page states:

Here we provide a selection of academic journal templates for articles and papers which automatically format your manuscripts in the style required for submission to that journal.

For what it is worth, the IEEEtran template looks identical to the one that one would download from the IEEE for the Computer Society. Given how easy it is for Overleaf to keep the template file up to date and the loss of users they may suffer from providing invalid templates, there isn't really a strong reason to suspect that they do not have the correct version for use there.
Answer: These are the templates tagged as IEEE Official: https://www.overleaf.com/gallery/tagged/ieee-official, but I also recommend to download the latest LaTeX template from IEEE's website and upload it to Overleaf as a zip.

Overleaf template for IEEE journals


Type(3,) returns an integer instead of a tuple in python, why?

Question: type(3,) returns the int type, while
t = 3,
type(t)

returns the tuple type.
Why?
Answer: Inside the parentheses that form the function call operator, the comma is not for building tuples, but for separating arguments.  Thus, type(3, ) is equivalent to type(3).  An additional comma at the end of the argument list is allowed by the grammar.  You need an extra pair of parens to build a tuple:
>>> def f(x):
...     print x
...
>>> f(3)
3
>>> f(3,)
3
>>> f((3,))
(3,)

Answer: The builtin type() is a function, so the comma is being parsed as an argument separator rather than a tuple constructor.
>>> type(3,)
<type 'int'>

>>> type((3,))
<type 'tuple'>

Comment: Regardless of how many arguments `f` takes, the comma will be parsed as an argument separator.
Answer: I suspect Python ignores a trailing comma in function arguments:
def f (a):
    print a
    print type(a)

>>> f(3,)
3
<type 'int'>

Using comma-separated values without parentheses to create a tuple is a trick that doesn't work everywhere. List comprehensions is a good example:
>>> [a,a*2 for a in range(4)]
  File "<stdin>", line 1
    [a,a*2 for a in range(4)]
             ^

You have to do this:
>>> [(a,a*2) for a in range(4)]
[(0, 0), (1, 2), (2, 4), (3, 6)]

List unpacking works fine, though, so it's a bit variable where unbounded, comma-separated values are allowed:
>>> [(a,b) for a, b in zip(range(4),range(4))]
[(0, 0), (1, 1), (2, 2), (3, 3)]

Answer: In func(bunch_of_args) you are allowed to follow the last arg with a comma, just like in
alist = [1, 2, 3, ]


Is there a mathematical proof that a binary neural network can approximate any function with arbitrary accuracy?

Question: Since the Universal approximation theorem shows that standard multilayer feedforward networks with as few as a single hidden layer, sufficient hidden units, and arbitrary bounded and nonconstant activation function can approximate any continuous function with arbitrary accuracy, does this theory also apply to binary neural networks? Is there a specific mathematical proof that binary neural networks can fit any function.
Comment: What do you mean by binary here.  Do you mean a single output neuron with a sigmoid activation?  Do you mean a two neuron output with some undefined activation?
Comment: @DavidHoelzer Binary neural network is a neural network after the extreme quantification of the general neural network, and the weight and activation in the network are only represented by 1bit.
Answer: Yes, for a broad class, they actually do, with probability 1:
[i] Wang, Yanzhi, et al. "Universal approximation property and equivalence of stochastic computing-based neural networks and binary neural networks." Proceedings of the AAAI Conference on Artificial Intelligence. Vol. 33. No. 01. 2019 https://arxiv.org/abs/1803.05391
[ii] Yayla, Mikail, et al. "Universal Approximation Theorems of Fully Connected Binarized Neural Networks." arXiv preprint arXiv:2102.02631 (2021).


How to load different homepage on Mobile.?

Question: I am looking for a way from 3 days to load different homepage for mobile devices.But did not get any success.
Comment: Based on limited information, I think I can just provide a hint which will give you some direction. You may need to use [wp_is_mobile()](https://codex.wordpress.org/Function_Reference/wp_is_mobile) along with [get_template_part()](https://codex.wordpress.org/Function_Reference/get_template_part)
Answer: This question is pretty vague but I'll give it a shot. A few options:
1) Check out WPtouch - http://www.wptouch.com/ - This plugin gives you the ability to override certain aspects of your primary theme with mobile friendly templates instead.
2) This is not ideal but you could use some basic Javascript to check the screen size of the current device and manually redirect any "mobile" screen sizes to a new page.
3) Finally, if #1 is overkill and #2 is too basic you'll need to go the custom code route. Specifically you need a device detection script or library. This will allow PHP to detect when you are on mobile vs. other devices. Once you know what kind of device you are dealing with you can code some logic into your theme that displays the desired template or content based on that device.
Answer: You could use the template_include action hook combined with the wp_is_mobile() function for this:
function wpse_maybe_load_mobile( $template ) {
    if ( is_front_page() && wp_is_mobile() ) {
        $new_template = locate_template( array( 'your-template-file.php' ) );
        if ( '' != $new_template ) {
            return $new_template ;
       }
    }
    return $template;
}
add_action( 'template_include', 'wpse_maybe_load_mobile' );

Comment: Although this might be useful, it is however to note that `wp_is_mobile()` is very unreliable, so are any theme switcher which switch between devices and screen sizes ;-)
Answer: You need to retrieve the client's user agent. In order to do to this, I usually use the library jenssegers/agent.
First, require the library in your functions.php or add it to Composer if you use it. Then, you can now create instances of objects that get the client's user agent with :
  $agent = new Agent();
    if($agent->is_Mobile()) {
    //this code will be executed if the client send a user agent that's referenced as mobile
    }

I've used it on a number of projects, it's pretty reliable.


Disable streaming of Video and audio on a Linksys WRTP54G Router

Question: Is there a way to disable a Linksys WRTP54G router so that users CAN NOT stream audio or video.  I only want them to be able to send/receive emails and upload or download pictures within emails.
Comment: You left out the most important thing in related to your question. How competent are users and how good are they with computers?  In the wort case with very competent uses, the answer is no, because no matter what you do, they will be able to find a way to circumvent it.
Answer: The default software for Linksys routers doesn't normally provide this level of URL filtering.   You may find that iptables on DD-WRT (http://dd-wrt.com/) or even OpenWRT may work for you.
Netfilter (which we usually see as iptables) helps us filter on:
<code>* Source/destination server or network
* Service/Port
* TOS/DSCP bits
* Pre-defined traffic selectors for IM/P2P applications
</code>
A quick Google search offered up this:
http://l7-filter.clearfoundation.com/
L7-filter is a classifier for Linux's Netfilter that identifies packets based on application layer data. It can classify packets as Kazaa, HTTP, Jabber, Citrix, Bittorrent, FTP, Gnucleus, eDonkey2000, etc., regardless of port. It complements existing classifiers that match on IP address, port numbers and so on.
NOTE that the Layer7 filter HOWTO page's "actually doing stuff" section (http://l7-filter.sourceforge.net/HOWTO-kernel#Doing ) says "Instead of dropping packets you don't like, [use] Linux QoS" to limit their available bandwidth, which it then briefly describes.
(note that I have no connection to L7-filter or clearfoundation.com, nor 1st hand or 2nd hand knowledge of their product - just what I read on the 'net...)


What happens to a Summoner's Eidolon if it is Petrified?

Question: What happens to a Summoner's Eidolon if it is Petrified?  Does it return at the beginning of the next day as if it were killed, or must it be freed of its effect first?
Comment: Though I don't have the book in front of me, I believe the spell Purified Calling will purge the eidolon of conditions such as petrification if you dismiss and resummon using this spell.
Answer: A petrified character is considered unconscious, not dead. To restore the Eidolon back from being petrified, it would need to have the process reversed somehow. Destroying the petrified Eidolon utterly might enable the Summoner to call it back as if it had died.
http://www.d20pfsrd.com/gamemastering/conditions#TOC-Petrified
Comment: Ehh, the Eidolon is a statue at that point. Even shattering it at that point wouldn't kill the eidolon, it would need to have Stone to Flesh cast on it first. (Casting it on the pieces would be an effective way of killing it though)
Comment: That's true. Re-reading the petrified condition, damage to the creature doesn't occur until it's restored to living condition.
Answer: According to the rules:

Eidolons are treated as summoned creatures, except that they are not sent back to their home plane until reduced to a number of negative hit points equal to or greater than their Constitution score.
...
The eidolon remains until dismissed by the summoner (a standard action). If the eidolon is sent back to its home plane due to death, it cannot be summoned again until the following day.

According to the rules on summoning (emphasis mine)...

Summoning: a summoning spell instantly brings a creature or object to a place you designate. When the spell ends or is dispelled, a summoned creature is instantly sent back to where it came from, but a summoned object is not sent back unless the spell description specifically indicates this. A summoned creature also goes away if it is killed or if its hit points drop to 0 or lower, but it is not really dead. It takes 24 hours for the creature to reform, during which time it can't be summoned again.

Because the summoned creature is being reformed on the current plane, I would argue that when an eidolon is petrified, it can be dismissed, and resummoned (incurring the normal one minute penalty to cast the ritual to summon it).
I recall there being some better explanation of how summoned creatures work, but I can't seem to find it at the moment.
Comment: You're missing the small bit in there: "The eidolon does not heal naturally." Which means it would still be a statue, would still have any damage it incurred, including attribute damage.
Comment: @Cthos, now that would be funny. You dismiss that statue and summon the eidolon back... as a statue. After all, it's still considered alive in that state, right?
Answer: Sadly this is not covered by the rules and Paizo has thoroughly refused to say anything on the various forum posts asking about persistent effects and eidolons.  So all answers on this are opinions. The way they've explained eidolons is in a weird grey area between really being a persistent creature like an animal companion and being a completely ephemeral creature like a summon.
I personally rule that you can rid your eidolon of persistent effects by dismissing them for the full day, as if they had been killed. It seems to be a happy medium between having to limp around with a gimpy eidolon and continually pay extra money to get it clerical help, and letting such effects be couple-round inconveniences.
Answer: I can't recall the source of my information, and admittedly can't be bothered to hunt it down right now, but I can say for sure this is what happens.
The summoner becomes unable to magically or naturally sleep or fall unconscious, but can still die. The eidolon can't be forcibly returned to it's home plane in this condition, even through banishment or dismissal. The summoner will gain fatigue and exhaustion as days pass, be unable to rest to recover spells per day, and lose all abilities requiring the eidolon. As the eidolon is remained forcibly summoned, the summoner also can't use their summon monster ability.
It's nearly as detrimental to a summoner as it is to a player who GETS petrified.
Comment: Sorry but without a source this answer may as well not exist.
Comment: Yeah, sorry, we kinda like sourced answers here, "I think I remember something" doesn't really help the poster to get a convincing answer.


Planck's constant and the Uncertainty principle

Question: Why should the uncertainty in measurement of two conjugate variables, say $p$ and $x$, be of the order of Planck's constant or higher and not lower? What is so sacrosanct about $h$? I always think $h$ shows up in discretization of energy in quantum theory.
And even electrical engineering people use uncertainty relations without quantifying them. Should we necessarily quantify it the way we do?
Comment: This is not a *choice*.  It follows from the commutation relations; in the simplest case $[x,p]=i\hbar$ so $\hbar$ comes up quite naturally.  See https://en.wikipedia.org/wiki/Uncertainty_principle#Robertson%E2%80%93Schr%C3%B6dinger_uncertainty_relations
Answer: There's nothing sacrosanct about $h$ (or $\hbar$).
Quite generally, given two self-adjoint operators $\hat{A}$ and $\hat{B}$ (associated with observables $A$ and $B$) such that
$$\left [ \hat{A}, \hat{B} \right ]\neq 0,$$
you can prove the following inequality (Generalized Uncertainty Principle, GUP):
$$\Delta\hat{A}\Delta\hat{B}\geq \frac{1}{2}\left | \left\langle \psi \right|\left [ \hat{A}, \hat{B} \right ]\left| \psi \right\rangle \right |,$$
where $\Delta\hat{A}$ ($\Delta\hat{B}$) is the standard deviation of $A$ ($B$) on the state $\left|\psi\right\rangle$.
If you identify $\hat{A}\equiv\hat{x}$ and $\hat{B}\equiv\hat{p}$, knowing the fundamental commutation relation
$$\left [ \hat{x}, \hat{p} \right ] = i\hbar,$$ you get
$$\Delta\hat{x}\Delta\hat{p}\geq \frac{\hbar}{2}=\frac{h}{4\pi}.$$
So, $h$ doesn't directly come from the uncertainity principle.
Comment: Well, h comes directly from the black body radiation , a measured constant to fit the data and dependent on the quantization hypothesis, so yes, it is the commutation relations that tie it up with the  uncertainty principle. https://en.wikipedia.org/wiki/Uncertainty_principle#History
Answer: To amplify @Vincenzo 's answer, the uncertainty principle is a generic property of Fourier analysis, and has little to say about dimensionfull conversion factors such as h, a mere conversion constant taking your from de Broglie momenta to wavelengths,
$$
p=\frac{h}{\lambda}=\frac{2\pi \hbar}{\lambda}.
$$
So, for your archetypal QM wave, $e^{ipx/\hbar}=e^{i2\pi x/\lambda}$, the uncertainty principle is
$$
\Delta x ~\Delta \frac{1}{\lambda} ~\geq \frac{1}{4\pi},
$$
just like the signal processing Gabor limit you mentioned,
$$
\Delta \nu ~\Delta t \geq \frac{1}{4\pi} ~.
$$
The $\hbar$ in the popular version of the UP is strictly an artifact of your choice of (dimensions/units of) the momentum you substitute in it.
The dimensional Planck constant h quantifies the phase-space area of the fundamental quantum cell and the book of nature (Galileo) does it for us--we don't get to write it ourselves: we are just the book's avid readers. Its size is some basic resolution ability of our measurements. But, when we are dealing with actions, angular momenta, and, yes, energies integrated over time, which are much larger than it, we ignore it in a classical haze. It only becomes apparent and significant for such quantities and terrains comparable to it, basically atomic and subatomic physics, with some notable macroscopic extensions of quantum physics.
Answer: Of course we need to quantify it.
I don't know how uncertainty principles are applicable in electrical engineering, but in Physics, it needs to be quantified so that we get an idea of the "amount" of uncertainty in either position or momentum,when one is known with sufficient accuracy. Heisenberg's principle is like a concept on which the whole of Quantum Mechanics and its branches rests.
The $h$ comes into account due to experiment and theoretical calculations. Mathematical calculations show that the uncertainty can be evaluated in terms of constants $h$ and $\pi$.
Comment: I think the OP means $\Delta k\Delta x\approx 1$ and similar Fourier-type relations.
Comment: Yeah but the Fourier-type ones don't have $\hbar$ in them and follow from more classical arguments.  They are quite different as they not related to incompatibility of non-commuting operators.
Comment: Even then, quantification needs to be done, isn't it?


Solana JavaScript Interaction

Question: Is there any way to interact to solana smart contracts using javascript?
I have tried many APIs pf moralis and quicknode but I need sole interaction between the smart contract and js.
Answer: Yes, there are many libraries that can be used to interact Javascript with smart contracts.
The prominent libraries are Solana/web3js: https://solana-labs.github.io/solana-web3.js/
Also @project-serum/anchor : https://www.npmjs.com/package/@project-serum/anchor?activeTab=versions
You can make rpc calls using @project-serum/anchor to smart contracts
Answer: Yeah you can use a typescript or javascript client to interact with on chain programs
Here is one demo https://github.com/Nagaprasadvr/SolQuotes

Solana JavaScript Interaction


Remotely Verify File Timestamp

Question: I'm working for a professor to build a platform for students to take midterms and finals online. The student downloads the test during class (when the professor makes the test available on the server or passes out the paper copy). However,  because of unreliable internet service, we'd like for students to be able to submit their finals later, when they can find a reliable connection. What I need is a way for a server to check that the student has not modified their answers to the exam in the intermittent period.  How can I do this?
Comment: Possible duplicate of [Is there an algorithm or hardware that can sign/verify natural time?](http://crypto.stackexchange.com/questions/932/is-there-an-algorithm-or-hardware-that-can-sign-verify-natural-time)
Answer: This is exactly the scenario that the Timestamp Protocol has been created for.
You need to provide your students with access to a trusted timestamping authority (TSA). This could be you yourself or someone else (like a CA offering that service). The TSA signes the hash of the document (the test with all answers) alongside the current date and if your student passes that timestamp along to you, you have the guarantee, that the answers were not created later than the signed timestamp says.
Pleas note that while this solution does not require your students to be able to connect to your servers, it does require a short online communication to the TSA server. This requirements holds true for any other alternatives that I am aware of (like tweeting the test's hash or storing the hash in a public blockchain), I do not believe that a completely offline solution exists for your problem.

Remotely Verify File Timestamp


One of my dual royal pistols becomes a scottish flintlock after fast traveling

Question: I got my two royal pistols the double barrel pistols and every time I fast travel anywhere it always changes one of my pistols to the Scottish flintlock pistols but it keeps my other royal pistol how can I keep both of them
Comment: I changed your tags, because the question is about the game, not the game system. The game system tags should only be used if it is a question about the system itself, or if you have a system-specific question related to a game.
Comment: I used to have this issue on PC when the game came out. Re-played the game recently and didn't encounter this issue. Good luck figuring it out.
Answer: This is a known bug. It happened on consoles and even on pc.
It's just a bug that Ubisoft has to patch. But since it's not game breaking it isn't that much of a big deal.
Answer: I have fixed it. It's easy,but it only works on the royal pistol. This worked for all my friends; you just have to go to the manor and select the royal pistol(when you are changing your pistol you should be in the assassin white outfit). Immediately after changing go and change your outfit to achilles first assassin outfit. When you equipped the outfit just immediately shutdown your console/pc and restart. This worked for all my friends who were using pc and ps3. Enjoy the game.


Why is the income limit for Roth IRA contributions for married couples less than double the income limit for singles?

Question: In 2023, you will be able to make a full Roth IRA contribution as a single if you make less than $138,000 per year. However, if you are married and file jointly, you can only make a full Roth IRA contribution if you and your spouse make less than $218,000 per year, which is less than 2 times $138,000 (which would be $276,000). Why is this? It seems unfair to married couples. You can still do a backdoor IRA, right?
Comment: There are a LOT of things different about filing jointly vs. filing individually, some of which seem equally unfair to those of us who are single. They're beneficial for some couples, less so for others. If you think this will make a difference in your case, it's up to you to run the numbers and see which approach makes sense.
Answer:
Why is this?

Because the basic assumption of the lawmakers is that there's a breadwinner and a housewife. Under that assumption, any increase of limits would be beneficial since the income doesn't change with the marital status.

It seems unfair to married couples

Yes. This is called a "marriage penalty". The more the "other" spouse earns - the higher the penalty.

You can still do a backdoor IRA, right?

Yes. You can still contribute to a traditional IRA without claiming deduction, and then if you want - convert into Roth. Use form 8606 to track non-deductible IRA contributions. Worth reminding that there are pro-rata rules for IRA conversion that may make it partially taxable if you have IRA balances with gains or deductible contributions. Backdoor Roth IRA works best if you start and end every year with $0 balance in your traditional IRA (across all the custodians).
Comment: Perhaps it is worth reminding the OP that backdoor Roth IRAs work best if there are _no_ other Traditional IRA accounts (whether with the same custodian or different ones) that are holding deductible contributions from previous years.  If such other Traditional IRA accounts exist, the amount rolled over into the backdoor Roth is prorated between the untaxed value of the Traditional IRA and the nondeductible contribution just made, and income tax is due on the untaxed amount that is rolled over into the backdoor Roth IRA. Moral: don't do this if you have other Traditional IRA accounts.
Comment: @DilipSarwate good call out, added a couple of sentences on that


ArcGIS Pro will not display symbols on map

Question: Using ArcGIS Pro with an imported data file of state plane UTMS.  The file imports nicely, but I can not get symbols to display.  I have applied simple black circle symbols, but they do not display.  If I select a point in the attribute table, the selection will show on the map.  If a apply labels, they are displayed correctly.  If I change the symbol size, the symbols still do not display, but the labels will shift to account for the change in the symbol size.
Comment: What happens if you zoom to layer?  What if you select a few records and zoom to selected features?
Comment: I tried that, it doesn't work.
Answer: It sounds like you have transparency set to 100% for that layer.  Select the layer in the contents pane.  Select the Feature Layer tab.  Set Transparency to 0%.


Sharepoint unique permissions

Question: Today I had an incident where my manager was complaining that someone had access to one of the folder that was confidential. I told him that whenever a site is created, the folders that are created will inherit the root permissions and when someone is added to the root, they will be able to access the folder as well. The way to fix this is by stop inheriting permissions and remove users and add the necessary users for the folder. Is this correct?
Answer: That would be correct unless they're accessing it via a Shared Link; if using a Shared Link, then you'd need to delete that link from Manage Access on that content.
But start with disabling permission inheritance and removing that specific individual's access.
Comment: If the user wants to break inheritance, does he needs to have special permissions or owner permissions is sufficient? I'm confused.
Comment: Needs to have Full Control over the item to break inheritance.

Sharepoint unique permissions


Concerning a previous possible tachyon observation?

Question: A few years ago there was a story about the Large Hadron Collider where a possible tachyon  was supposedly observed. It was later shown it didn't occur yet the incident made me think. If a large experiment using extreme amounts of energy trying to duplicate some processes or events of the 'distant' past , would the intense amount of energy  in this 'early' Universe experiment create a situation where the speed of light was different?? If a particle was observed emanating from this experiment and it seemed superluminal could this be due to a different speed of light measurement due to this phenomenon.
Comment: To be very clear, OPERA involved CERN, but the LHC is not CERN. LHC is *at* CERN, but it is only one of a great many things at CERN. OPERA's neutrino beam was produced by a different accelerator (the SPS).
Comment: Are you talking about the [OPERA neutrinos](http://physics.stackexchange.com/questions/14968/superluminal-neutrinos)? That had absolutely nothing to do with the LHC (and as the answer explains, was shown to be a faulty measurement).
Answer: Unfortunately, this result was later found to be caused by faulty electronics, according to the CERN press release.


What the difference between 'make me' 'get me' 'has me' in meaning 'to force'

Question: In many cases 'make me' 'get me' 'has me' doing something mean 'to force'. What is the difference between them in this meaning? Is there any sense to use one or the other?
Comment: Even my question duplicates another one I think new answers complement this complex area with a lot of nuances.
Answer: "get me" implies that they overcame some resistance.

I finally got my friend to watch Star Wars after bugging her for
  years about it.

means she didn't want to watch it for a long time, and I finally succeeded in convincing her to watch it.
"has me" implies some sort of authority, but not necessarily force.

When I got to the restaurant, I had the valet park my car for me.

mean I was able to "order" the valet to do it because I had money. We use this most commonly with transactions, although it can be used with other types of authority, e.g.,

The policeman had me pull over to a side road to get away from the
  traffic.

"make me" implies more force or authority than "has me"

I didn't want to clean my room, but my mom made me.

means my mom overcame my hesitation using her authority/force as the head of the household.
Comment: +1 for the distinctions.  Sometimes speakers use **get** informally to mean **have**. An executive in a company might say  *I'll get HR to send you the necessary forms.*  The exec's not expecting any resistance from HR and really means that he or she will tell HR to send the forms, have HR send them. Perhaps there's some implication that he or she may have to ask HR nicely or convince them of the need?


21 speed to 12 speed conversion! Is it possible?

Question: I have an entry level MTb with 21 speed gear ratio. I found out that i dont need that kind of complexity while riding. 12 speed seems light and compatible to my riding style. It has Shimano tourney right now so what can I do to convert it to a 12 speed ratio? Which derailer should I choose?
Answer: You'll need more than just a new derailleur. You will need a new rear hub (effectively, this probably means a new rear wheel), a new chain, a new cassette, and a new shifter. Possibly a new crankset.
Buying all this stuff as aftermarket upgrades will be unreasonably expensive compared to the cost of your bike. You'd be better off saving up for a new bike.
Comment: @mattnz yes, one example is the Shimano FH-MT401. FH-MT500 is another. These can be found by navigating to bike.Shimano.com -> components -> MTB -> freehubs -> select technologies -> micro spline and perusing the images for one with a quick release and not boost. Pre-built Wheels are also available without delving into the boutique players.
Comment: I have no idea, can you even get a 12 Speed 135mm QR hub?
Comment: @mattnz 12s cassettes are available for normal HG freehubs.
Comment: A boutique manufacturer like White Industries or Phil Wood could probably frankenstein something together out of parts.
Answer: "shimano tourney" suggests your bike is definitely entry level, so dropping a lot of cash on it may not be a good use of your money.
As an alternative, if you simply want fewer gears, try riding around in one specific front chainring and don't shift the front.  It is possible you might be perfectly OK to ride in the big chainring, or perhaps the middle one.
It is unlikely you'll choose the smallest/grannie chainring, it is too low for most riding.
If you can live in one chainring, then unbolt the other chainrings and store them.  If your chainring is rivetted together, then this will be destructive and going backward is impossible.  You remove the front shifter and wire, and it is possible to remove the front derailleur although you may choose to keep it as a chain guide, locked into position using the limit screws.
This will give you a 7 speed bike for minimal/zero cost other than your time.  Not the 12 gears you asked about, but does achieve the complexity reduction/simplification.


How was Pascal's triangle applied to fairly dividing the pot in an interrupted game?

Question: Just wondering how Pascal used the triangle in the problem where they wanted to determine how to divide the pot when the game ended early. It was the first major probability problem conceived in history. I couldn't really find a simple enough explanation.
Answer: This is called the problem of points. An accessible explanation of Pascal's solution and how binomial coefficients (and hence the triangle) come up in it is given on Probability and Statistics blog, but it is a bit long to be reproduced here, see also Edwards, Pascal and the Problem of Points.
Coughlin and Kerwin in Mathematical Induction and Pascal's Problem of the Points give a simplified explanation for a special case, and show how to perform calculations directly on the triangle.
Suppose we have two players (teams), $A$ and $B$, with equal probabilities of winning each round. The game series was supposed to last until one of them has $5$ wins (points), and whoever does gets the whole pot $M$. Sadly, the game was interrupted when $A$ had only $3$ wins and $B$ had only $2$ wins. At that point, their fair shares of the pot are their probabilities of winning the series, if it continued, multiplied by $M$. To win the series, $A$ needs $2$ more wins and $B$ needs $3$ more wins:

"Pascal may have reasoned as follows. In this case the series would be
decided in at most four games. A four-game series has $2^4$ possible outcomes: $AAAA,AAAB,AABB,...$. Team $A$ can win two games in $\binom42$ ways, three games in $\binom43$ ways, and all four games in $\binom44$ ways. Thus, team $A$ can win two or more games in
$$\binom42+\binom43+\binom44$$
ways. These results represent theoretical
possibilities even though it may not be necessary to play all four games. Consequently, the probability that team A will win the
series is given by
$$\frac1{2^4}\left[\binom42+\binom43+\binom44\right].$$
Using Pascal's triangle, we find
$$\binom42=6,\ \ \binom43=4,\ \ \binom44=1;$$
and hence the probability that $A$ will win is
$(6 + 4 + 1)/16 = 11/16$. Multiplying by $M$,
we get $11/16\,M$..."

The share of $B$, accordingly, will be the complementary $5/16\,M$.
In general, $A$ and $B$ may have unequal probabilities of winning rounds, say $p$ and $1-p$ (no ties), so the sum of binomial coefficients has to be replaced by a weighted sum, with powers of $p$ and $1-p$ as weights. Pascal set up a recursion similar to the one used to construct the triangle of binomial coefficients, but involving $p$ and $1-p$. The idea of calculating the shares remains the same.
Comment: is there a rigorous proof for this?
Comment: @Markvz Yes, see the linked sources.


Why is the wrist hurt when push up with sharp leveraged edge?

Question: I'm starting doing push up at home, leverage for an easy start. When I place my hands on the edge of a sharp edge, like bed edge, my wrists are hurt. When I gripping a round bar, the hurt disappears. I know I shouldn't push up with the sharp edge anymore, but I would like to learn the mechanism behind that, for education purpose.
Comment: What part of your wrist hurts?  Or, is it your palm that causes discomfort?
Comment: The joint inside it. Is that enough information?
Answer: Compare the angle of your hand to your forearm when gripping a sharp edge vs gripping a bar. I think you'll find you are bending your wrist farther backward (maybe even "bottoming out" the joint) when gripping a sharp edge and increasing the strain there.


Joining data points to matching polygons

Question: I have polygon data on coral reefs at great barrier reef and separate point data for areas of coral bleaching. I have created a clip that only includes points that exist with in the reef polygons. However I need to be able to identify polygons that have bleaching points in them from those that do not. So for example I would like to be able to click on a polygon that has a bleaching point in it and it automatically select all the other polygons that do?
Answer: you can use a select by location (from the selection menu) to identify all polygons that contain your bleaching data points. then add a field (options/add field...) to the reef polygon attribute table, and calculate values for the selected features with the field calculator (right click on the field name, select 'field calculator')to assign a value to differentiate between bleached and unbleached reefs (Y/N or 1/0).
Answer: If you want to select all polygons with a bleaching point in them, you can "select > select by location".
If you want to select all polgon with a given characterstic when you click on it, you need to use "dissolve" in order to have multipart poylgon. The first step would be a "spatial join" in order to find out which polygons include a point .


wifi - meaning of deauth reason codes

Question: I'm trying to understand the difference between:
<code>3 - Deauthenticated because sending STA is leaving (or has left) IBSS or ESS.
4 - Disassociated due to inactivity.
</code>
Both sent from a client to the AP, I'm trying to find what triggers them.
Answer: Just as a client will authenticate (verification of credentials) and associate (approve to send data in the Service Set) the client must also deauthenticate (credentials are no longer valid) and disassociate (which terminates the connection).

wifi - meaning of deauth reason codes


Will the performance of calculating the balance for an address degrade over time?

Question: If balances are calculated on the fly by offsetting all the transactions flowing in and out of a public address, will this degrade the performance of calculating such balances in years to come, i.e. when large volumes of transaction history have accumulated? How many transactions would result in a noticeable drop in performance? or is the threshold so high that it's not likely ever to be reached by the vast majority?
Answer: The balance is calculated from something called UTXO, this is a list of unspent coins, it is created on blockchain rescans and updated on receiving of new blocks. It is therefore not dependent on transaction history size but only all current available coins fragmentation.
There are performance issues with this solution also, but they are been worked on...
Comment: I think UTXO stands here for *unspent transaction outputs* in case somebody else was also wondering.
Comment: When the transaction makes it to the blockchain, everycoin in it's input is destroyed and new coins are created - on per each output.
Answer: The calculation of the balance of a public address is not part of transaction validation.  In order for a transaction to be considered valid, it must redeem unspent transaction outputs.  Transaction outputs are always redeemed entirely, so there is no need to calculate the balance of a public address, only to check that these outputs have not been redeemed (spent) before.
So the scalability of balance calculation is not an issue that affects the processing of payments.  That said, each bitcoin node still must remember the list of unspent transaction outputs.


$J(X)$ and exotic spheres.

Question: I read that we can realize exotic sphere as the coker of $J$-homomorphism. SO we can consider the exotic sphere $S^7$ realized using an identificantion of $B^4 \times S^3$ (where I donote the four dimentional ball). How can I realize this exotic sphere as coker of $J$-homomorphism? In particular, can I realize exotic spheres as coker of complex $J$-homomorphism
$$ J:\pi_r(U(n)) \to \pi_{r+q}(S^q) ?$$
Answer: I don't know where you read this, but it is not quite true. What is true is that we have an exact sequence
$$0 \longrightarrow \Theta_{n}/bP_{n+1} \longrightarrow \mathrm{coker}(J_n) \stackrel{K_n}{\longrightarrow} C_n \longrightarrow 0.$$
Here we have that

$\Theta_n$ is the group of homotopy $n$-spheres.
$bP_{n+1}$ is the subgroup of $\Theta_n$ consisting of homotopy $n$-spheres that bound a parallelizable $(n+1)$-manifold.
$K_n$ is the Kervaire invariant.
$C_n$ is a group that depends on $n$:
$$C_n = \begin{cases} 0, & n \not\equiv 2 \pmod 4, \\ \Bbb Z/2 \,\text{ or }\, 0, & n \equiv 2 \pmod 4. \end{cases}$$

We have that $C_n = \Bbb Z/2$ for precisely those $n$ for which there exists an $n$-manifold of Kervaire invariant $1$. Finding which $n$ satisfy this property was a huge open problem in algebraic topology which was settled in 2009 for all cases except $n = 126$. It turns out that $C_n = \Bbb Z/2$ for $n = 6$, $14$, $30$, $62$, and possibly $n = 126$. Hence we have the following:

Theorem. For $n = 6$, $14$, $30$, or $62$, we have an exact sequence
  $$0 \longrightarrow \Theta_{n}/bP_{n+1} \longrightarrow \mathrm{coker}(J_n) \stackrel{K_n}{\longrightarrow} \Bbb Z/2 \longrightarrow 0. \tag{$\ast$}$$
  For $n \neq 6$, $14$, $30$, $62$, or $126$, we have an isomorphism
  $$\Theta_n/bP_{n+1} \cong \mathrm{coker}(J_n). \tag{$\ast\ast$}$$
  For $n = 126$, one of $(\ast)$ or $(\ast\ast)$ holds.
Comment: I read it here: https://en.wikipedia.org/wiki/J-homomorphism in the section: Appplication.
Comment: That article just says $\mathrm{coker}(J_n)$ _appears_ in (the study of) exotic spheres, _i.e._ the cokernel of the $J$-homomorphism and exotic spheres are _somehow_ related. The precise relationship they are talking about is what I said in my answer.

$J(X)$ and exotic spheres.


MOSFET H-Bridge Shunt Resistor position

Question: I am designing a MOSFET based H-Bridge to handle high current. I would like to place a SHUNT resistor in the circuit in order to detect over current. The voltage across the shunt resistor is to be read by a PIC micro controller (so the + voltage side cannot exceed 5V). The only place in the circuit i can think to add the shunt resistor is after the H-Bridge, however this means placing a tiny load on the source side of a MOSFET (as shown in image). Will this be a problem when considering the load is only 0.0001 Ohms? and is there a better place to position the shunt resistor?
Comment: Is this just for testing purposes? You could potentially use a current mirror...
Comment: no this is for operational purposes.
Answer: That is the location where it is commonly placed.
If your shunt is really only 0.1 mohm,  you will need to ensure you use a 'Kelvin' connection to measure the voltage across it. You will have to connect GND of the micro controller at the bottom (GND) connection of the sense resistor, else the additional wiring resistance will swamp your readings.
You will also need to be careful about inductive spikes, and perhaps need a decoupling capacitor on the 24 V to make your whole system work.
Comment: Yes the shunt I am looking to use in the Vishay Dale WSBS8518L1000JK. Any suggestion on what value decoupling i will need?
Comment: depends on the motor current (stalled ?), and the power supply quality.
Comment: 50A stall current with a 24V supply coming from a battery.
Comment: With that high a current, 'just' decoupling isn't sufficient. You'll need to isolate your gate drives, watch for inductive spikes, shoot through currents. If a fault occurs, your PIC won't be fast enough to protect you. When you connect power to the system, you need to ensure the FETs are held off before you start driving the motor -- else capacitve coupling will turn them all on, and they'll burn up. High current, high power drive is tricky.

MOSFET H-Bridge Shunt Resistor position


BitMap Checkpoint-Workaround Please

Question: I need to compare layout of 2 files(pdf). So i used Bit Map checkpoint. When i run using the normal run mode i am getting error message as Expected and actual bitmaps are of different sizes. Then I tried to run via as Update mode and it was working good. Then again i tried to execute via normal run i am again getting same error message.
What is the workaround for this, since I also tried with checkpoint run settings too.
Answer: Do you already try to set up the tolerance? You can go to Advanced Settings and set a RGB and pixel tolerance. Also, you need to make sure that you are using always the same monitor size, for example, if you recorded a bitmap in a 24'' monitor, the image will have X pixels of width and Y of height, if you run your test in a monitor of 15'' for example, the script will try to compare the actual image (that is smaller) with the one that is larger. So, all of this things affects the bitmap checkpoint.

BitMap Checkpoint-Workaround Please


battery is not working

Question: I have a Honda civic 2006 automatic. Whenever I come after driving and park the car, the battery will automatically be empty in some time. I can not start the car until I get the battery charged from mechanic. Could anyone help me out please?
Answer: Two things could be wrong.
First and most likely is the battery will no longer take a charge and needs to be replaced. A battery will usually last about five years. Once dead where it isn't taking a charge, you won't be able to do much without replacing it.
The second thing which could be wrong is the alternator may be dead. You can check this with a multi-meter. If you get a reading of around 13.1-14 volts dc, the alternator is charging just fine. If, after getting a jump start, you take a reading and it continually drops (very slowly), this would indicate the alternator is bad and needs replaced. From your description, I'm suggesting this is not the case.

battery is not working


Noise generated by ball impacting a rigid obstacle

Question: How can I estimate the noise of an elastic non-deformable ball that hits an elastic plate that is simply supported?
Comment: Your friendly neighborhood orchestra percussionist would like to invite you to a half-day masterclass on how different "simple" supports change the sound of a vibrating plate.
Comment: Where is the masterclass?
Answer: Try to figure out the change in the kinetic energy of the ball after the bounce. Here I am assuming that the elastic plate remains motionless. Now this change in kinetic energy is the energy that has been either dissipated as heat, or stored in the deformation of the ball (or plate) or (finally) transferred into the energy of a  sound wave.
Now I am assuming that by "estimating the noise", you mean the "estimating the loudness of noise". Also I assume that you want the loudness in decibels ($dB$). The decibel scale works like this (I am not getting into its details as it would be quite off-topic).
So back to the question. The change in kinetic energy would give you an approximate value of the intensity of the "noise" produced. And on the decibel scale, the loudness will vary logarithmically with the intensity. You will get quite precise results, only if you manage to get a ball and a plate that do not store any energy in their deformations and there is no friction between them and you can measure the change in kinetic energy correctly and there is no dissipation of energy during the collision due to the drag force of the surrounding medium and...
As you can see, practically you are never going to get any precise results.


Create a .NET Windows Service on Windows Mobile 6.x

Question: I would like to create a windows service in .NET that runs on WinMo 6.x....
There r a lot of documentation for how to do that in MFC (and non-MFC)
http://msdn.microsoft.com/en-us/library/ms838599.aspx
but I can't find any pointers for .NET stuff, is it even doable?
Thanks,
Answer: I'm pretty sure (not 100%) you can only create a native service DLL (which means no .Net for this).
A workaround is to create a console app (or a regular app that does everything from its Main method) and drop it in the <code>/Windows/Startup/</code> folder.  Your app will then be started automatically every time the device is reset.  There are good reasons not to do this, however, since a WinMo device is limited in how many apps can be running like this.
Answer: There is no built in support for managed services on the .NET CF (much like other parts of the OS such as today screen panels or software input panels aka keyboards don't support managed code).
As MusiGenesis suggested a good workaround is to simply place a GUI less executable within the startup folder as services on Windows Mobile usually don't have the need for a services manager type application to list available services and their current status etc.
If you're wanting something a little more structured or need some kind of GUI to start/stop your services you could look into the following codeplex project: Managed Services for Windows Mobile - http://www.codeplex.com/managedserviceswm. However it is essentially just adding some additional abstractions around placing something in \windows\startup\ so may not be worth it...


Is the tag info page not available on mobile theme?

Question: I was surfing SO on my iPhone, and wanted to see the info (tag-wiki) page for a tag, but didn't find it. Clicking on the tag always leads to the list of question, and there is no other link to the tag wiki. Is it not available on the mobile site?
Comment: @Oded: I see the list of questions, I don't see the wiki link for the tag.
Comment: Oded: I mean the info link.
Comment: What happens when you try to click a tag?
Comment: The tag _is_ the link. Click _on_ the tag.
Comment: @Oded I can't find any place where clicking on the tag will bring me to anything other than `/questions/tagged/XXX`. Even on that page, clicking on the tag just reloads the page.
Answer: Yes. It looks like you are correct. There is simply no mobile version of tag-wiki pages. Arguably there would be no need to link to a page with no mobile version from the mobile version.
I would be OK with that argument if it was consistent behavior, but there are links to many non mobile compatible views from the mobile version. Revision histories is the first thing that comes to mind. Also your helpful flags are not easily accessible on the mobile version.
There is a related feature-request from @Kevin Y that you might want to support.
Excerpt from the request -

One important thing I feel is missing from the mobile design is the
  ability to view a tag's excerpt directly on the tag page. I find the
  excerpts very useful on the main site when I see a tag on a question,
  but don't exactly know what it's about.
Comment: Good, I upvoted it.
Answer: No, they evidently are not. You can, however, get to the tag wiki page by manually navigating to <code>/tags/tag-name/info</code>. Note that that will give you the full site version.


Stone shape replacement in D&D 4e?

Question: I'm a big fan of of the D&D 3.5 Spell Stone Shape.  Is there any 4e equivalent of it?
Answer: There is not. However, it'd probably be a ritual of around 6th level. Mordenkainen's Joining (which merges two objects) is level 6; similarly, Excavation (which removes stone and earth in a tunnel) is also level 6. Stone Shape is a low to mid level spell; pegging it as a level 6 to 8 ritual allows ritual casters to learn it around the same time 3.5 casters could learn it. Adjust to suit your tastes, of course.
To fit with other level 6 rituals, the cost to learn it should be 300-350 gold pieces, and it should cost perhaps 50 gold or so to cast. If you like cheaper or free rituals it wouldn't be unbalancing to reduce the cost as much as you like.
Comment: @Bryant Stone Shape has now been introduced as a level 8 ritual, as of Dragon #405.
Comment: Where can I find `Excavation`?
Comment: Dragon #366. There's an article with a bunch of random rituals in it; no particular theme.
Answer: I'd actually make stone shape an skill challenge for nature, arcana, and dungeoneering. Complexity of the thing being created informs number of successes and difficulty.

Stone shape replacement in D&D 4e?


What are 'accounts.sqlite3' and 'emergency.recover' and why might I want to back them up?

Question: accounts.sqlite3 and emergency.recover are created in my ~/.lightning/bitcoin when I launch lightningd - they weren't created there some years ago.  What are accounts.sqlite3 and emergency.recover and why might I want to back them up?
Answer: The accounts.sqlite3 file is managed by the built-in plugin bkpr (the bookkeeper plugin). It tracks each individual coin movement that was performed while the plugin was running, and will give detailed information as to where your funds are at any point in time.
The emergency.recover file was introduced in version v0.12.0 and is equivalent to LND's Static Channel Backups (which is more of a emergency recovery rather than a backup, hence the name change). It contains the minimal set of information to know with whom you had a channel, what the funding parameters where, and how to contact them to ask them to shut down the channel. It requires cooperation from the peer, but in absence of a better backup it can be used to recover some funds. It is by no means a replacement for backups, rather a last ditch attempt at clawing back some funds. This file has to be backed up after each funding of a new channel, so ideally set up a cron job to do that for you.
Comment: `emergency.recover` was not generated back in 2021 when my friend funded their channel. They noticed the file some time in late 2022. Is `emergency.recover`'s creation based on the content of `lightningd.sqlite3`? Is `emergency.recover` created for each open channel (even for those channels funded before version 0.12.00)?
Comment: It is indeed recreated each time a new channel gets funded from the `lightningd.sqlite3`, so a single channel opening after the upgrade will create that file.


How to restart the Dock without using the command line?

Question: I know that I can restart the Dock using a killall Dock on the command line. I can also restart the Finder by Alt-right-clicking the Finder icon. Is there a similar way to restart the Dock without using the command line?
Comment: Are you open to creating an Automator action or Applescript applet?
Comment: @bjbk even if the OP isn't - someone will learn from a nice AppleScript answer. I didn't see your comment while I was typing up my Otto the Automator answer. You're clearly thinking in a way with which I agree. :-)
Comment: @bmike good suggestion.  I sometimes hesitate to write answers thinking only of the OP.  I need to think in terms of the actual problem and how others could benefit from multiple solutions.  [Heads back to read Help Center](http://apple.stackexchange.com/help/how-to-answer)
Comment: Curious, why would you want to? You're obviously not command line shy if you already know the command. The answers seem rather complicated compared to opening a terminal....
Answer: You can force-quit background processes using the Activity Monitor utility. Just find the Dock process (either sort the process list by name, or use the search field in the upper right), select it, then click the Quit button (the icon is an "X" in an octagon) in the upper left of the Activity Monitor window. It'll ask if you want to do a normal Quit or Force Quit.
Answer: No - the dock doesn't participate in the Force Quit window so you can't get at it directly.
You could easily take your AppleScript or shell script and wrap it in a launcher. Platypus app is my choice, but Automator also works:

Open Automator
Make a new app
Call it Dock Killer
Add one item to the recipe - Run Shell Script
enter killall Dock
Save the App to wherever you wish.

Now you can use Spotlight, Launchpad, FastScripts or any other manner of automation tools to use the keyboard or shortcut keys to launch your Dock Killer app. The free apps will work just fine, but I prefer LaunchBar for this task.
Answer: Modify the file named 'Info.plist' inside the application's package (i.e. /System/Library/CoreServices/Dock.app/Contents/). Open this file in your favorite text editor and change the following section
<key>LSUIElement</key>
<string>true</string>

to
<key>LSUIElement</key>
<string>false</string>

After killing the Dock.app once with the Terminal/Activity Monitor (see Gordon's answer ;-)) or after a restart the app "Dock" appears in the Dock itself and you can force quit/restart it there or from the Apple menu -> Force quit....
After a system update or upgrade you may have to repeat the edit.
Answer: [Very] Similar to @bmike 's existing answer, but this is my preferred method for making quick Automator scripts key-commandable…

Launch Automator
Make a new Service
Call it [whatever you like] or 'killall Dock'
Add one item to the recipe - Run Shell Script
enter killall Dock
Save using  Cmd ⌘   S  [You can wait until this point to name it if you wish. There's no file picker for where it is stored, with a Service, just a name.]
Open System Prefs > Keyboard > Shortcuts > Services
Scroll down & add a memorable key command to your new 'killall Dock' service
Answer: Why dont you use the free "Onyx" utility (@ Titanium software); a very serious one.
Go to 'parameters" menu where you'll find the "Dock" tab… That's it /
http://www.titanium.free.fr/onyx.html


The server does not support a SSL connection

Question: I cannot SEND any e-mails in Windows 7
I get the above message.
Some advice says change outgoing port from 25 to 587
I cannot find how to do this.
anybody know how to do this or am I just???
Thank you
Derick
Comment: What mail client are you using? Outlook? Outlook Express? Thunderbird? Opera? Something else?
Answer: If this is Outlook / Windows Live Mail, it simply means that you have a tick under "This server requires a secure connection (SSL)".
Go to Tools > Accounts, then double click on the account and go to the Advanced Tab.
Untick this and check what port your provider uses.

(This picture was the first I could find online, it deals with IMAP so ignore that, but it would be very similar)
Answer: Please make sure you have enable My Server requires authentication box, while you send mails this is required field by some of the Hosting providers. Also disable your Antivirus firewall which might be scanning your outgoing connection.


What is this on my false Christmas cactus?

Question: Well, I've been trying to figure out what this strange white cotton, fungus looking thing is, it seems to be a part of the dirt maybe? and I've been looking at some posts but I don't know myself if this is a fungus or just deposits or something. I haven't touched it, planning not to, but I originally thought it might be mycelium since I left some dead, fallen off leaves in the pot. Any advice?
Answer: It looks as if the fungal growth is associated with debris on top of the soil, but it's also highly possible the soil itself is overly damp or wet. Whilst these plants might be thought of as needing little water, they should be watered thoroughly when the surface of the soil feels dry to the touch, with excess water being allowed to drain away freely from the holes in the pot. Excess water left sitting in a tray or outer container should be emptied out 30 minutes after watering to avoid the plant sitting in water.
If you are not watering correctly, adjust your method, and although the fungal growth is not lethal to you or the plant and requires no fungicidal treatment, as it's in the house, remove the debris from the top of the soil (wearing rubber gloves if you like) to reduce fungal spores. https://www.hortmag.com/weekly-tips/christmas-cactus-care-101
Answer: As suspected by you, this looks mycelium to me.
You could use Baking Soda to get rid of them.
ugaoo.com states

You'll need one tablespoon of baking soda, mixed with a gallon of
water and two and a half tablespoons of vegetable oil. Once the
mixture is ready, add it to a spray bottle, shake the contents and
spray the affected areas.

as one of the natural remedies to treat fungus. They also mentions few more other ways. Hope that helps.


Schwarzschild black hole

Question: If law of conservation of angular momentum holds good then how is it possible for a Schwarzschild black hole to exist? Say the momentum of the star initially before the supernova was 1000 kg m/s. Now when this star collapses into a black hole it should spin fast. But a Schwarzschild black hole does not spin. So is conservation of angular momentum violated?
Comment: ...who claims that a true idealized Schwarzschild black hole exists? Also note that a Schwarzschild black hole is by definition eternal and did not arise from the collapse of a star.
Comment: If we talk about black holes we often talk about the Kerr-black-hole solution. Theoretically we can extrcat energy from the rotating black hole (energy of its rotation) and by doing so we reduce its spin. For this see: https://en.wikipedia.org/wiki/Penrose_process
Answer: The Schwarzschild black hole does not spin, true, but as ACuriousMind says, it is an idealized model version of a Black Hole, which probably  does not exist in nature, due to the conservation of angular momentum reason you stated above.
The Schwarzschild black hole was the first solution of a Black Hole using the then brand new General Relativity theory, in 1918.  It is used as a first step in teaching students at least 4 different concepts in the derviation of physical results from the Einstein equation and is simplified in very many ways.
The Schwarzschild metric may be written in the form:
$${\displaystyle ds^{2}=\left(1-{\frac {2Gm}{c^{2}r}}\right)^{-1}dr^{2}+r^{2}(d\theta ^{2}+\sin ^{2}\theta d\phi ^{2})-c^{2}\left(1-{\frac {2Gm}{c^{2}r}}\right)dt^{2}} $$
Note that:
$${\displaystyle {\frac {2Gm}{c^{2}}}=r_{s}} $$
If you compare the above to the line element of real rotating black holes, you will see that the absence of cross terms and the ability to concentrate on the $r$ and $t$ variables, whilst holding $\theta$ and $\phi$ constant, allows the basic manipulations involved, as well as the physical significance of the various terms, to be learnt more easily.
Answer: A Schwarzschild black hole is indeed unrealistic, due to the conservation of angular momentum as you mentioned. However, the Kerr metric can be used to describe a rotation black hole, wherein,
$$ds^2 = \left(1-\frac{r_sr}{\rho^2} \right) dt^2 - \frac{\rho^2}{\Delta}dr^2 - \rho^2 d\theta^2 - \left(r^2+\alpha^2+\frac{r_s r\alpha^2}{\rho^2} \right)\sin^2\theta\, d\phi^2 +\frac{2r_sr\alpha \sin^2 \theta}{\rho^2}dt d\phi$$
where $r_s$ is the Schwarzschild radius, $\rho^2 = r^2 + \alpha^2 \cos^2 \theta$ and $\Delta = r^2-r_sr+\alpha^2$, with the parameter $\alpha = J/M$ dependent upon the angular momentum, $J$ of the black hole. Nevertheless, it is still unrealistic to expect to model any black hole observed in Nature using this exact solution.
Realistically, one would consider perturbations of the metric, perhaps away from this idealised form, to model a black hole, and with perturbation theory one can solve for corrections. However, it is in general a highly non-trivial problem, even numerically, as there are various constraints to consider and gauge issues, as well as the construction of the appropriate initial data.

Schwarzschild black hole


Why does rendering from a view take significantly longer than rendering from a table?

Question: Using QGIS, rendering from a view takes significantly longer than rendering the same data from the source table.  The view is just a select all from source table.  The database is SQL Server 2012.
Comment: The first thing I would try is determine what the queries are that QGIS is sending to SQL Server for each of the view and table.  This can be done using the profiler tool in SQL Server.  Then you can take QGIS out of the equation and determine what the database for the queries and why they differ.
Answer: I believe that the underlying query (used to make the view) will be executed every time you try to access the view, where if you are just using the source table the select will much simpler.
This previous answer and the others on the thread support my reasoning:
https://stackoverflow.com/a/7755497/5982697
I know there is a "materialized view" option that I have used in postgres, which basically creates a new table from the query that defines the view. If there is a similar option in SQL server 2012, maybe that would fast enough. However, you will have to refresh the materialized view when rows change in the source table.
https://www.postgresql.org/docs/9.5/static/sql-creatematerializedview.html
Comment: Yes, Views are merely 'saved queries' that look like tables, but whenever they are queried, will run the underlying SQL each time - so the more data  / logic the SQL behind the view has - the longer it will take to render. But it sounds like your view is hitting a linked server or something similar?
Comment: If the view is simply "create view as select * from table" it is just the same to make queries from the table or from this simple view. I agree with @Jay Cummins when he thinks that the difference is in how QGIS gets the metadata.
Comment: For the postgres spatial views, after QGIS executes the initial distinct count query, then spatial view is really fast after that.  If you are experiencing slowness after the initial load, then its something different than my answer.
Answer: I've noticed the same thing on spatial views that return a large amount of data in PostgreSql and it is caused by QGIS issuing a SELECT count(distinct (id))=count((id)) FROM schema.view to verify the key that is defined for the layer is unique. I assume for an actual table, it checks for the database constraint, trusts it, and moves on.
Same thing probably is probably occurring in SQL Server--you could verify it with SQL Server Profiler.


Wrong internship dates in my CV for graduate application

Question: I am sorry if this is already repeated but it is a very urgent need of mine.
Actually in my CV for graduate applications, I put my industrial internship period as May to June 2016 and research internship period as May to June 2016. Actually it is may to June 2015 for industrial internship period. I didn't notice this mistake till now and I have already submitted my applications. What do I do?
Comment: Step 1: Don't panic.
Answer: Correct the dates on your CV, then check the admissions website to see if there is any information about submitting corrections or amendments to your submitted application.  If there is not, email the corrected CV to the admissions office or department with a very brief line, along the lines of "Hello, I submitted my CV with my applications but later noticed I put the wrong year on one of my internships.  I've corrected it in this version.  Thank you for your time."   Include any relevant reference information to your application.
I honestly wouldn't expect it to get replied to, or possibly even noticed - admissions offices are very busy this time of year.  But this way if it does come up you can refer to your earlier email with the corrected version.
I also wouldn't fret about it over much.  It's remotely possible it could hurt you against an otherwise identically-qualified candidate who didn't make mistakes on their paperwork, assuming anyone even notices the discrepancy.  But even that seems like a very small detail against a good candidate.  The other thing I would suggest is that you proof read the whole thing carefully before you submit it with this correction; if you didn't proof read it well the first time and missed this mistake, it's possible you missed others too.
Good luck!
Comment: That would assume no one notices the error, which I think is a questionable assumption.  Assembling a time line of your activities seems like a reasonable bit of analysis, and the overlap would be clear then.  Mistakes happen in academia; showing you can find and fix them seems like a better signal than making them and having someone else find it later.  But if you feel uneasy about bringing it to their attention I really don't think it's such a harmful error that you couldn't let it slide and offer a revision if asked.
Comment: Thank you. Also, my concern is that it would come across as carelessness on my behalf and hurt my process? The majority of the universities I am applying are Ivy League, so some advised me against emailing and letting this detail pass since the competition is cut throat.
Comment: While making the error implies carelessness, **apologizing and admitting to an error implies sincerity and integrity**.
Answer: I think you should find out how to submit the corrections and then submit them. That's precisely what I would do because it's important to avoid the appearance of lying. The overlapping dates could make you  appear to be a "superstar" when, in reality, you might only be a "shining star". :>)


Draw smooth transparent line

Question: I am trying to draw smooth line following my finger. The problem is in superposition. Left example is array of drawLine, and right is drawPath. Is it way to make it like smooth left example?
Comment: did you try using the ANTI_ALIAS flag on the Paint youre using to draw?
Answer: Construct the line as a solid color, then wrap that line inside of a drawable. Turn this drawable transparent, and then draw it to the screen.

Draw smooth transparent line


Is it possible to apply for Ph. D. program in Physics with a CS background?

Question: Currently i am doing BE in cs. Is it possible to apply for a graduate program in theoretical physics without having a bachelor's degree in physics or mathematics?
Comment: How much time did you spend studying calculus, especially differential equations? Physics, other than electricity? Those questions may not affect whether you can apply. They may affect whether you will be accepted. They will certainly affect whether you would succeed if accepted.
Comment: Would you please clarify  **what made you think you cannot** apply for  theoretical physics PhD program?
Comment: Question is closed so I can't answer. Yes, you can, and yes, you might be successful, even if it's much more likely you'll flounder. A good way to find out is take the 4 practice Physics GREs and see how you do. If you get a solid score, you're probably capable of catching up to other students in the program.
Answer: I don't know if it's possible. It depends on the country. If you live in one of the members of the UE, it is- this is the so called Bologna Process.
But another question is whether you should do it and I strongly advise you not to. You need strong knowledge of Maths and Physics. I highly doubt you will be able to catch up with that. Even if you do, it will take up a major part of your PhD and you won't have time for real work.
Comment: "But another question is whether you should do it and I strongly advise you not to. You need strong knowledge of Maths and Physics." I agree with the second sentence, but how do you know the OP doesn't have this strong knowledge?  Some people have this knowledge independently of what their degree program is...and CS is closely related to physics and (especially) math.
Comment: At my department, I know of 2 guys who changed direction in the sense that they have a BSc in CS, and at MSc they have switched to physics. In order to pursue an MSc, there was two entrance exams, one  in quantum mechanics and the other in classical electrodynamics. I have to say that these two guys have obtained the higher scores at these exams and obtained also a small fellowship, and they continued with the PhD.


Express middleware runs for every imported .js file, is this normal?

Question: so I set up a basic express app that serves a static file from a directory named public.
The public directory contains 3 files "index.html", "script1.js", "script2.js", and "script3.js". The script files are just empty .js files.
index.html
<!DOCTYPE html>

  <title>Document</title>

Middleware

server.js
const express = require('express')
const path = require('path')

const app = express()

app.use((req, res, next) => {
  console.log('middleware was ran', new Date())
  next()
})

app.use(express.static(path.resolve(__dirname, 'public')))

app.listen(3000, () => {
  console.log('listening on port 3000')
})

Whenever I run the server.js file and visit the '/' route I get an additional "middleware was ran" output to the console for each script file that I am including. In this case my out put would be:
listening on port 3000
middleware was ran 2022-06-11T21:45:21.609Z
middleware was ran 2022-06-11T21:45:21.644Z
middleware was ran 2022-06-11T21:45:21.648Z
middleware was ran 2022-06-11T21:45:21.650Z

Why is that happening?
Comment: Middleware runs on every request.  Each
Comment: is there any way to limit that ?
Comment: If you don't want that then maybe middleware isn't what you're looking for.  What are you trying to accomplish?
Answer: Yes, this is normal.  Any imported file (that isn't already cached by the brower) causes a request to your server to fetch that imported JS file.  Since it appears you have your server configured to use express.static() to serve those files, then any middleware BEFORE your express.static() middleware will see those requests.
Since your express.static() middleware will "handle" the request and not continue further routing, any middleware after express.static() will not execute when a static file is served by express.static().  Middleware matches and executes in the order declared until the point where a request handler (middleware or not) sends a response and stops further routing by not calling next().

is there any way to limit that ?

If you put your express.static() middleware first, then it will satisfy these requests for static files first and any middleware following it will not execute.
const express = require('express');
const path = require('path');

const app = express();

// put this first so static files are served first
// and any other middleware after this won't execute
app.use(express.static(path.resolve(__dirname, 'public')));

app.use((req, res, next) => {
  console.log('middleware was ran', new Date());
  next();
});

app.listen(3000, () => {
  console.log('listening on port 3000');
});


What's the target in sequence to sequence model

Question: In neural language modeling, the target for each time step x(t) is the probability of x(t+1). But for sequence-to-sequence model, what's the target at each time step? Or, there is no target until the sentence end? If so, how to propagate error through time? It just propagate error once? I'm could't find the answer from papers since most of them don't introduce these details. Thanks a lot!
Answer: Sequence to sequence models consist of an encoder and a decoder. The encoder takes the input and has no target. The decoder is a language model that is conditioned on the output from the encoder. It's targets are the probability of x(t+1) just like a language model.


Which econometric test applied here?

Question: I have been reading an article about the Phillips Curve. But I got stuck in a part of econometric analysis. I am not good at econometric. Therefore I need help here. In this link you can read the article. If you search 0.97 with Ctrl+F, you can see the first finding that I want to ask about it. She says in there "By applying Equations 5–7 to the data, one need not assume any specific form of nonrationality in expectations. Since the task here is to compare the different models on their own terms, the theoretical restrictions are imposed in the estimated specifications of the New Keynesian models. Thus, in the New Keynesian Phillips curve, the imposed value of β is 0.97 and as seen in Equation 7, the sum of forward- and backward-looking components is restricted to unity for the Hybrid Phillips curve." I confused about if she applied any specific econometric test or not. If she applied, which test did she applied? Please help me.
Answer: As they clearly say on pp 2267:

Alternative specifications were compared using the
specification test by Davidson and MacKinnon and
the Wald test of coefficient restrictions.

So they two tests Davidson and MacKinnon specification test and Wald test.
Wald test is a classic test for coefficient restrictions you can learn can learn more about it in any econometrics textbook, for example Verbeek (2008). Guide to modern econometrics. 4ed.
For Davidson and MacKinnon specification test you can have a look at the original Davidson and MacKinnon (1990) paper.
Comment: So 0.97 comes from Davidson and MacKinnon, right?
Comment: @mfc no that is their imposed restriction. The test works by comparing restricted model to an unrestricted model. You only asked what tests they used. These tests usually work by having several models some of them might be forced to have some coefficients based on theory and then the coefficients between two models are compared using the above mentioned tests. In this case for example they use the test in the NKPC vs. general model to test whether the freely estimated coefficients a,b,c satisfy the restrictions 0,0.97,0. You can learn more about these tests in above mentioned sources
Comment: Thank you very much 1muflon1. You answered my 2 questions since yesterday. You have done me great favors. I'm really grateful to you because you were helpful.
Comment: @mfc you are welcome

Which econometric test applied here?


Peaking Inductance

Question: Could anyone please explain the working of so called 'peaking inductors'? I know they are used to enhance the bandwidth but how do they do this?
Comment: Iq. provide links to relavent material so that bettter information can be provided.
Comment: Well I am sharing the link for a paper which I am reading right now where this peaking inductance has been used.
Comment: http://amsacta.cib.unibo.it/1039/1/GA042711.PDF
Comment: The peaking inductance is used in the design of an active balun for the Gilbert cell mixer.
Answer: This seems to be a way of improving the performance of analog high-frequency (GHz range) integrated circuits. Too bad that all the articles I found about this topic are behind a IEEE paywall. I think I could download them at my former University if there is interest in more details about this technique.
The basic bandwidth limitation of many circuits is the low pass RC filter formed by the resistance of the signal source (which may be a transmission line which "looks" like a resistance) and the input capacitance of an amplifier circuit.
By adding some inductance the input capacitance can be brought to resonance and "neutralized". If you choose the right inductance value you can place the resonant frequency (and the peak of the LC characteristic from which this technique takes its name) near the low pass frequency limit of the original circuit to boost the signal amplitude a little and therefore improve the bandwidth.
Comment: Hey thx a lot! Clears the air a bit!

Peaking Inductance


How to make flag --enable-features=VaapiVideoEncoder persistent in google-chrome?

Question: System info:
Ubuntu 22.04.3 LTS
Release:    22.04
Codename:   jammy
Google-chrome installed from .deb
Version 121.0.6167.160 (Official Build) (64-bit)
chrome://gpu
Graphics Feature Status

Canvas: Hardware accelerated
Canvas out-of-process rasterization: Enabled
Direct Rendering Display Compositor: Disabled
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
OpenGL: Enabled
Rasterization: Hardware accelerated
Raw Draw: Disabled
Skia Graphite: Disabled
Video Decode: Hardware accelerated
Video Encode: Software only. Hardware acceleration disabled
Vulkan: Disabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
WebGPU: Disabled

The flag --enable-features=VaapiVideoEncoder works, makes my VideoEncode in chrome://gpu turn to Hardware accelarated when starting chrome from terminal with this flag. So i want to make it persist, my chrome is in favorite apps list in ubuntu. I have tried chrome-flags.config file but it doesn't work.
Answer: You can make it persistent by replacing the target of the desktop icon:

cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications to copy the icon to a local folder to override it
sed -i 's#Exec=/usr/bin/google-chrome-stable#Exec=/usr/bin/google-chrome-stable --enable-features=VaapiVideoEncoder#g' ~/.local/share/applications/google-chrome.desktop to prepend the new flag to the other arguments on the command line

Now every normal way of opening Chrome will use this new flag. Other apps, start menu, desktop icons, double-clicking .html, and autostart should all use it. Just don't manually run google-chrome-stable in terminal (though xdg-open shouldn't hurt) without having it open with the flag set from the normal methods.


Research Assistant long-distance

Question: Is it reasonable to ask for a research assistant position (field of economics) over email to a professor who doesn't live in my country/city?
Comment: An RA usually implies an employment situation (since most "positions" have a stipend or salary associated with them). But below you say you're just looking for research experience rather than salary. If that's the case, you're just asking to get involved with a professor's research rather than a "position." Could you please clarify your question accordingly?
Answer: I'm assuming that you want to stay where you are if accepted and carry out the research remotely from the professor and any of his/her research groups.
Whether reasonable or not, it is possible to ask. But also expect skepticism. If you don't know the person already then it isn't very likely to be accepted, but again, it is possible. But your mail would need to present interesting reasons why the professor would want to accept you.
A professor who meets regularly in seminar with groups of students would have more trouble with such a plan than one who prefers to meet individually. Computer mediated communication is pretty common now and as the field doesn't require lab work, I see no absolute block. But if the research requires working with human subjects then you have to figure out how and where to do that, complicated also by the rules and regulations, perhaps, of two places, not just one. But a lot of small groups work collaboratively while the members stay in their separate countries, meeting only occasionally.
But, it is easy to send an email, a bit harder to make it interesting, and possibly harder still to be convincing. But not impossible.
It is also possible for people working remotely to meet now and again, whether through travel direct to the other place or at a conference or other professional meeting.
Answer: In addition to Buffy's answer, another important aspect to consider is whether you expect to be paid for this research assistantship. At least in the universities I have worked at, it's fundamentally impossible to hire a student who is, and wants to remain at, a different university. There are so many administrative procedures and details that would need to be sorted out (will they pay out the money or send it to your university, which then handles payment? will their university pay overheads to your university to cover your workspace and other utilities? how will taxation work? etc.). Further, my impression is that administrators may also not be happy about it in general, as it would feel like university money is being drained to support research elsewhere.
That said, an acquaintance in the US actually sat up a paid undergraduate research programme with India, where the undergrads were hired in and stayed in India for the duration of the programme (with remote supervision and one or two on-site visits of their mentor). But this was a significant administrative process, and he ended up funding it entirely through external sponsors. It is unlikely that this could be set up on an individual basis for just one student.
Comment: I don't expect any payment for my work. I just want to gain some research experience.
Comment: @user585380 In that case I would probably talk about a "collaboration", because (at least in my mental model) an assistantship is a paid position (either in form of a salary or stipend).

Research Assistant long-distance