Android splashscreen backstack

Question: I am implementing a splashscreen for a android application. I only want to show the splashcreen once when the app is newly started. After i've done some work I want to go on to the app. If the user then presses the back button I don't want it to return to the splashscreen, I just want the app to exit. How can I implement this in the best way? How do I clear the backstack of the first activity.
Answer: If you want to show splash screen only for first time when app launches,
then you can use above solution of share preferences.
But i guess you want to go through following scenarios:

You start the app you get splash screen.
Then you navigate though the app.
Then you come to home screen of you app.
Then you want to exit but splash screen comes.

If you are having this problem then you need to finish splash screen
when you start home activity and also at the end you need to logout or finish the app home activity.
Also try android:launchMode="singleTask" in splash screen activity tab in android manifest.
Answer: When you are going to the second activity after the splash screen, call finish()
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
if (preferences.getBoolean("firstTime", true)) {
    // Show splash screen
    // Wait a few seconds.
} else {
    // Nothing to do here. Go straight to the second activity.
}
SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(
            getSupportActivity()).edit();
editor.putBoolean("firstTime", false);
editor.commit();
startActivity(MainActivity.this, ...)
finish();

This way when the user presses back, there wont be any activity in the stack.
Comment: But i only want to show the splashscreen once. If the user closes the app and comes back I want him directly to the second activity.
Comment: use shared preferences
Answer: Use shared preeferences in android and store the value 1st time.. from second time check if value present dont display splash screen
Edit for preferences follow  this
Answer:
Hi, try this code it will help you but it will show the splash whenever you open the app.

public class spash_scr extends Activity {

ImageView t;
//LoginButton b;

@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.spash_scr);
    // bm1=drawable.shineme;

    t = (ImageView) findViewById(R.id.textView1);
    t.setImageResource(R.drawable.shineme);

    RotateAnimation r = new RotateAnimation(0, 360,
            Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
            0.5f);
    // r.setStartOffset(1000);
    r.setDuration(2000);
    r.setFillAfter(true);
    t.startAnimation(r);

    new Handler().postDelayed(new Runnable() {

        @Override
        public void run() {
            // TODO Auto-generated method stub
            Intent i = new Intent(spash_scr.this, MainActivity.class);
            startActivity(i);
            finish();

        }
    }, 3000);

}

Answer: You weren't clear in the exact behavior, so here are some options:
A: You want it to show the splash activity every time the task (app) is restarted, such as after phone reboots, user's manual task closing, or when Android drops it for memory reasons. (This is usually used for branding or licensing logos.) In those cases, launch the splash from the main activity's onCreate(), then Finish() the splash screen to allow the user to return to the main view. That way navigating back won't bring the splash activity back, since it is not in the navigation stack anymore.
B: You want it to show the splash screen the first time the app is launched after installation, but never again. (Usually used for 'welcome' or 'get started' help views.) Use a SharedPreference setting as described in other answers here, or in the Using Shared Preferences documentation. In the case it should show the splash, I still suggest option A for the simplest way to not show the splash screen again for after it is first dismissed after the first launch.
C: An even more, unknown complex navigation? Learn about Tasks and Back Stack and you can make it do pretty much whatever you want.
Answer: After opening the new Activity this.finish (); You should do
Intent intent = new Intent(this, HomeActivity.class);
startActivity(intent);
this.finish ();

Answer: For that you should use SharedPreferences ,
 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
    if(!prefs.getBoolean("first_time", false))
    {
        SharedPreferences.Editor editor = prefs.edit();
        editor.putBoolean("first_time", true);
        editor.commit();
        Intent i = new Intent(splash.this, otherSplash.class);
        this.startActivity(i);
        this.finish();
    }
    else
                // Not firsttime Direct it as you wish
    }

Android splashscreen backstack


Caching data in PHP

Question: I'm developing a site in PHP which has some complex SQL queries and I would like to implement a caching feature to reduce the load on the database.
I'm just wondering would it be better to write and read HTML directly to a file or perhaps create something like a YAML file with a delimiter to separate records then wrap it in HTML with a function?
My thinking is that this would allow user options (for example, number of records to display) to be applied to the request.
Any advice / suggestions appreciated.
Thanks.
Answer: Use any of these for caching backends:

http://php.net/manual/en/book.apc.php
http://memcached.org/
http://xcache.lighttpd.net/

and use Zend_Cache for a unified interface to them

http://framework.zend.com/manual/en/zend.cache.html

Whether to use full page caching or partial caching depends on your specific UseCases. Usually, your application will have a mix of both.
Answer: Although I've never personally used it before, there is a PEAR package for caching. Consider it amongst other options like Zend_Cache.
Answer: You can implement caching on multiple places in your application:

you can implement conditional GET (ETag and Last-Modified HTTP headers)
do data caching with the mentioned solutions (Cache_Lite, Zend_Cache, APC) with multiple backends (file, memcached, shared memory)
you can cache the template files as you said (Smarty)
Answer: You might want to take a look at Zend Cache
http://framework.zend.com/manual/de/zend.cache.html
I usually store the result of the SQL queries somewhere (depending on what you are looking for, i.e. sometimes is caching it in $_SESSION ok (user related data), sometimes it's not (big resultsets for not user dependant queries) and then my class just checks if the cache exists and continues accordingly.

Caching data in PHP


Inheritance for File Associations under Windows XP?

Question: Is there something like "inheritance" for Windows file associations? I have a file type called rrx that is just a XML file. Now if I open explorer's context menu for a rrx file, I would like it to show all actions registered for XML files (Open in IE, XML Notepad etc.) as well as my actions written especially for rrx files. Is there a way to tell Windows: Handle files with extension rrx as XML files plus this additional stuff?
Comment: Apparently somebody downvoted me. Could you tell me why?
Answer: I found this in Windows help:

To associate a file name extension with a file type:

Open Folder Options in Control Panel.
Click Start, and then click Control Panel.
Double-click Folder Options.
On the File Types tab, click New.
Type a new or existing file name extension, and then click Advanced.
In Associated File Type, select a different file type to associate with the extension.

If you click New and type in rrx, you can associate that with XML document, so you can then use the XML document default programs.
Comment: Thank you for answering. Maybe I don't see the obvious, but doesn't this miss the "plus my actions" part?
Comment: You can add your own actions there for the rrx files. I think that your custom actions for .XML Documents should be carried over too, but I'm not sure.
Comment: AFAICT I can associate .rrx with "XML Document" and then edit the actions for "XML Document" which changes the context menu for .xml files, too, OR detach .rrx from "XML Document" again. I wasn't able to say "all from 'XML Document', plus this one".
Answer: I think you will like Nirsoft FileTypesMan.
Create a new entry for your .rrx file and do not fill out any of the entries, then right click and choose Replace File Type For Selected Extension and choose XML File, you should not have every option for your .RRX file as you would have on any .XML file.
Answer: There are a couple of advanced file association editors available. They might do the job.
http://www.angelfire.com/biz/rhaminisys/fileasoc.html
http://www.xs4all.nl/~wstudios/Associate/index.html


What is too high of a pressure for irrigation systems

Question: I purchased a home four years ago where the owner installed an irrigation system. I noticed the valves were leaking then and replaced four of eight.  I figured they were old, and wear and tear took it's toll.  Now four years later I replaced the same four again for leaking and found out the owner never put in a pressure regulator. The readings at the street is 90psi, do I need an irrigation pressure regulator? The old valves were 3/4in RainBirds.  They were replaced with 3/4in Orbits.
Comment: 90psi sounds too high ... the rating should be printed on the box  .... or check the orbit website
Comment: Many sprinklers have a max pressure of 60psi. The drip systems are usually 25psi or less.
Comment: @EdBeal -- My Netafim TechLine CV drip system's tubing has a maximum rated pressure of 58 psi.  During actual operation, its typical pressures are 15 - 25 psi.  According to page 35 of Netafim's [Drip Irrigation Handbook:  Understanding the Basics](https://www.netafim.com/499749/globalassets/products/drippers-and-dripperlines/drip-irrigation-system-handbook.pdf), various drip lines have various max operating pressures.  Some are as low as 11 psi; others as high as 58 psi.
Answer: Update:  Sounds like your irritation is fed from the main spigot that is before the house pressure reducer valve, in which case 90psi is normal but may be too much for some irrigation systems.  Depends on how the system was designed and how the pressure is diversified.  You could easily put on a pressure reducer and see if that helps while still maintaining good overall pressure.
Comment: there is NO pressure reducer according to the OP. The leaky valves are the control valves not spigot. Are you referring to your system because nothing matches what the question is asking.
Comment: Ahh, you're right. I missed some of the details in the OP and jumped to the wrong conclusions.


Context sensitive grammar for $\{a^{2^n}\mid n\geq 0\}$

Question: I want to build a context sensitive grammar for the language $\{a^{2^n}\mid n\geq 0\}$.  I think it should be something like this
\begin{align*}
S &\to aA \mid a\\
aA&\to aaaA \mid aa
\end{align*}
Comment: Not a duplicate, but [Raphael's answer to another question](https://cs.stackexchange.com/a/48148/) is relevant here and mostly answers this question.
Comment: What had you tried?
Answer: This is from Hopcroft and Ullman's book,
Example 9.4, pg 220:
$$ S \rightarrow ACaB $$
$$ Ca \rightarrow aaC $$
$$ CB \rightarrow DB $$
$$ CB \rightarrow E $$
$$ aD \rightarrow Da $$
$$ AD \rightarrow AC $$
$$ aE \rightarrow Ea $$
$$ AE \rightarrow \epsilon $$
Update: in fact given grammar is unrestricted which can be modified as a context sensitive.
But if your ultimate goal is to prove that the given language is a CSL, then it is enough to create a linear bounded automaton - a TM whose computational ability is restricted to the portion of input. In other words, the head of the TM cannot move beyond the input area. LBA's and CSG's are equivalent.
You can just erase one input symbol at a time starting from the right, and each time you erase one symbol increase a counter by one (binary symbols 0 and 1) which are stored in place of erased symbols. When you erase all input symbols check if the counter is of the form 100...0. If yes then accept, otherwise reject). 100...0 means it is a power of 2.
Comment: can you show me how to transform the given grammar in context sensitive ?
Comment: Is this really context sensitive? There is CB -> E which i think should not be in context sensitive grammar
Comment: No, what I have sent is unrestricted grammar. But you can modify it and rewrite as CSG (which is given in the example 9.5 on pg. 224 of the same book), which is not trivial. Note also "Almost any language one can think of is context sensitive; the only known proofs that certain languages  are not CSL's are ultimately based on diagonalization"
Comment: See original post's update.
Comment: But the language should accept also the word a, when n is 0
Comment: Add a new rule S -> a
Comment: How can I transform now this grammar to type 0 grammar with only 4 production rules?
Answer: I just had this as a homework and would like to share an IMO much simpler and more intuitive solution than the one from the textbook.
$$
\begin{align*}
S&\rightarrow EAE\ |\ a\ |\ aa\\
EA&\rightarrow E2A\ |\ TA\\
2A&\rightarrow AA2\\
2AE&\rightarrow AAE\\
TA&\rightarrow aaaaT\\
TAE&\rightarrow aaaa
\end{align*}
$$
$E$ marks beginning and end. $2$ marks that we do another doubling of our number of $A$s and whenever a $2$ is inserted, it then "walks" over the whole string, doubling all $A$s it passes. $T$ is used to translate the $A$s into $a$s. We translate $A$ to $aaaa$ instead of $a$, so that our grammar is context sensitive.
Answer: The shortest non-contracting grammar we could come up with is:
\begin{align*}
S&\rightarrow a\ |\ LR\\
L&\rightarrow LD\ |\ D\\
Da&\rightarrow a^2D\\
DR&\rightarrow aR\ |\ a^2
\end{align*}

L marks the left side of the word, produces the doubling symbol D, and can only be eliminated by conversion to a D.
D is moved through the word from left to right, doubles each a and can only be eliminated on an R.
R marks the right side of the word and also acts like an a, to accomplish non-contraction in the rules. It can only be eliminated with a D.

The shortest non-trivial derivations are:
\begin{align*}
S\rightarrow LR\rightarrow DR\rightarrow a^2\\
S\rightarrow LR\rightarrow LDR\rightarrow DDR\rightarrow DaR\rightarrow a^2DR\rightarrow a^4
\end{align*}
Hence, the number $i$ of D's produced with the rule $L\rightarrow LD$ determines which word $a^{2^i}$ is generated by the grammar.
Answer: How do you express the rule $Da\rightarrow aaD$ in terms of valid rules of CSG?
I mean, rules like $\alpha A\beta\rightarrow\alpha\psi\beta$.
Comment: When you want to ask a new question, use `Ask Question`, not *Your Answer* /`Post Your Answer`.


How do I modify a small blower motor to be variable speed?

Question: I have a small blower motor 120 v, 1.87 amps, and I want to make it variable speed. I hooked up a dimmer switch for a light bulb but it did not work very well. I went to a electronics store and they wanted to sell me a $150 item but could not tell me why the dimmer switch would not work. A friend told me I needed a variable resistor good for 0 to 3 amps not 0 to 15 like the one I am using. I have no idea. Can someone at least tell me why the dimmer switch doesn't work, in layman's terms?
Comment: Were they trying to sell you a VLT, a frequency converter? Those are expensive (but brilliant and really cool). You can vary all properties of the mains supply with them. For your application a simpler solution must be possible though.
Comment: Tell us more about the blower motor.  Does it have brushes?
Comment: This question is very similar to this one: http://electronics.stackexchange.com/questions/28692/ac-fan-speed-control/30285#30285
Comment: I used a ceiling fan speed control to make my A/C fan variable.
Answer: For an electric motor to function, it has to alternate the voltage applied to its coils twice in each turn, so the electromagnetic force can produce a torque in the right direction always, given that half the time the magnet is behind the coil (and needs to be pulled), half the time ahead (and needs to be pushed).
There are two ways to do that alternation. For DC motors, you have to put some mechanism to do it; usually there's a set of brushes that touch the rotor to make electric contact, and the rotation itself makes the inversion happen (and there are brushless motors that use an electronic circuit to do the same thing). For AC motors, since the power source is itself alternating, you can rely on it to do that, and that's probably your case.
A dimmer with a variable resistor won't solve your problem because it'll reduce the output voltage, but not the AC frequency, the standard 60 Hz (50 Hz in Europe) the power grid provides, and the motor rotation is necessarily proportional to that frequency.
A more modern dimmer will cut the power periodically for a fraction of the time, using the same base frequency (thus 60 times a second). The more you turn its knob, the least the proportion of power mantained (and the least average voltage provided). But you still have 60 Hz, no matter what, and so your motor still won't be throttled down.
To control the speed of an AC motor you'll need something that can change the voltage AND the frequency provided to it, and that's a much more complex circuit.
What your friend mentioned is valid but is not the entire solution. It is true that you have a dimmer more powerful than you need; its maximum current needs to be higher than it's required by the motor (and with a good safety margin), but if it is, it doesn't matter if it's 50% higher or 200% higher. So a 15A dimmer has too much, unneeded current capacity.
Nonetheless, it'll perform exactly as the one you have, and won't work either.
Comment: Does anyone still make dimmers based on resistors??
Comment: From what he said, I understood his dimmer was one of them. But agreed, that's old stuff.
Answer: Dimmers are not reducing the voltage, they ignite triac (or ssr -solid state relay) (like an electric switch) at some point of the sine wave (60Hz). if they ignite at 0 deg. (beginning of the sine wave) the load will get the full power. if they ignite at 180 deg. , the load will get 0 power. at 90 deg. - half the power and so on.
all the dimming will be in between the 0 to 180. the triac turn off when there is no current through it, so it have to get ignited in every cycle. you can't see that the light is off for a part of the period, but the average of the power (and the light intensity) is less.
as said, motors are frequency dependent, and in order to slow it down you have to change the frequency. I think that there are limits on the high and low frequency that a motor can stand.
Comment: Triac based dimmers _do_ reduce the RMS voltage at the load. When you say 'ignite' I think you mean 'trigger'. Please use proper capitalisation to make your answer more readable.
Answer: Your dimmer switch doesn't adjust the voltage; it adjusts the on-timing of the existing voltage.  And your motor isn't controlled by voltage; it is controlled by the line frequency (assuming it is an induction motor).
Comment: Induction motors are controlled both by magnitude (Voltage) and frequency. The V/Hz ratio needs to be maintained if you want to achieve torque at speeds other than nameplate, and if you want to get torque at very low speeds you need to either use more complex control algorithms or boost the voltage higher than the V/Hz ratio suggests in order to provide enough magnetizing force to move the rotor.


Is there a way to Make sure all active sessions in App pool are closed before recycling

Question: I need to recycle a IIS application pool for once a week and before recycling need to make sure all active sessions in App pool are closed.
Is there a way? using .net.
Answer: The IIS recycling is usually "overlapped", meaning that requests aren't cut off: running requests are allowed to continue, while new requests are served by the new pool-instance. See here.
But this doesn't help you for sessions (which span multiple requests). An InProc Session will be abandoned by a recycle. You could however store the session-state out-of-process, with StateServer or SqlServer, so it is safe from recycles. See here.
Answer: How might that be possible? A session can take many minutes to be shut down. So it is impractical to wait for them.
I think you are asking the wrong question. You should ask "Can I prevent all sessions being destroyed on a recycle?". Answer: Yes. Use StateServer mode.


Turning a painting into a .png file

Question: I've been asked to scan one of my paintings and then turn it into a .png.  I don't have photoshop.  How might  do this with the regular programs on my PC?
Comment: It seems somewhat unlikely that png would be the preferred format for a painting by the way, although of course you might have a reason it HAS to a png (or it might be a low tone variation painting)
Answer: You don't need Photoshop to scan images, or to change file formats.  All scanners come with software for scanning, and you can use almost any image editor to open an image then save it as a PNG, even Microsoft Paint can do it.

Turning a painting into a .png file


What ETF or other security tracks closest to 30 year mortgage rates?

Question: Is there any ETF, fund, security that closely tracks 30 year mortgage rates in the USA?
Comment: I suggest you post that as another question, presuming it isn't a duplicate.
Comment: Or which ETF or security do 30 year mortgage rates track?
Comment: long term rates generally track stuff like the appropriate 'prime' rate.
Comment: So what determines this 'prime rate'?
Answer: Mortgage rates tend to track the yield on the 10-year Treasury note.
The CBOE Interest Rate 10-Year T-Note, TNX, is a security directly related to this rate. Divide the CBOE price of TNX by 10 to get the yield.
One can also track the  10Y T-Note yield at yahoo finance using ticker symbol (^TNX).
Answer: TBF - Proshares short 20+ Year Treasury  The TBF fund is designed to track (hopefully) 100 percent of the inverse daily returns of the Barclays Capital 20+ Year U.S. Treasury Index.
there's some risk of tracking error, and also a compounding effect if it's down several days in a row.  (invest with care)
There's also a TBT fund, but the risks are even greater since it is leveraged,  potentially you could make the right long term call, but lose a lot in the short term due to tracking error and effect of compounding) (that would tend to make this one more appropriate for short term 'bets' on interest rates, and less so for a long term investor)
There are also quite a few floating rate closed-end funds (Click here, then click on "loan participation funds") that should do well in a rising rate environment. Just beware that these funds seem to incorporate a substantial amount of credit risk as well as floating interest rate exposure.
Closed end funds trade a lot like securities, since the fund is closed, you have to buy shares from another owner that is selling (just like with stocks), that means the shares can sometimes trade above or below the underlying value of the actual assets held by the fund depending on buying/selling pressure and the relative liquidity of a given fund.
Comment: So why didn't you just ask what's a good source of interest rate info?
Comment: In that case, I'd suggest maybe this page at bankrate.com  http://www.bankrate.com/rates/interest-rates/libor.aspx  it has some useful indexes, and there's an overnight rates table buried amongst ads on the right side also..  (yeah the ads are annoying, but it pays the bills and makes the content available)
Comment: I'm refinancing and want to follow mortgage rates, and am looking to get daily quotes from someplace other than the .com lenders.
Comment: Because I want to get to the same source those 'good sources' go. Where do bankrate et. al.get their information? I am assuming it is tied some governmental security that is available for all to see.
Comment: Bankrate explains their methods on their site, they are continually doing surveys.  They are gathering the data themselves, not just repeating data from some other source.


What is the determinant of an English native speaker?

Question: It could be argued that only native speakers of English from England are true native speakers. Other countries that have adopted English as their primary language (America, Australia, Canada) have cultural and language differences, spelling, pronunciation etc.
Comment: What is your definition of "primary language" and "native language"? Do you mean English is the native language of England, but not that of Australia, for example?
Comment: And let's extend Rathony's question. Is the OP suggesting Scots, Irish, Welsh, Manx are non-native speakers? Obviously that's ridiculous.
Comment: Can you, please, clarify your question?
Comment: Anyway agree it's a duplicate
Comment: You could just as well argue that about most of England itself. Spelling differences are so minuscule as to be insignificant. Cultural differences do not affect whether something is a different language or not. And pronunciation isn't a very reliable guide either—standard RP or Estuary English is much closer to many Australian and South African dialects than it is to a thick Scouse accent, both in terms of vocabulary, grammar, and pronunciation.
Comment: This question appears to be an exact copy of [this answer to a different question](http://english.stackexchange.com/a/338409/47827)… which doesn't exactly make things clearer.
Answer: One's country of origin has less to do today with the language one is brought up to speak as one's first language than ever before in history. Thus, if one is brought up to speak English as one's first language, then that person is a native speaker of English -- with all of its wonderful regional variants.
Answer: All over the world there are countries where the native language is English.
You can look the list here
The English language is almost the same, If you understand English from London, You can understand the English of Australian native speaker too (and everyone speaks English).
There are a bit of differences in every type of English, like slang, accent and some words.
Example: In American a lot of people use "What's up", In England almost nobody does it. In American everyone says "color", in British "colour".
I can't explain every differences, You can search on Google Difference between english and [other english language, like Scottish etc.] for get a lot of differences between English and other types of English.
I link  you this article "What Are The Differences Between American And British English?"
But in the web you can found more thing about it!


Overlapping confidence interval

Question: If we had two confidence intervals overlap for two parameters, can we say that these two parameters are equal to each other? I read in some articles that this doesn't always hold, so what would be the proper confidence interval construction?
Comment: [This page](https://stats.stackexchange.com/q/18215/28500) discusses this issue extensively. [This answer](https://stats.stackexchange.com/a/18259/28500) has a table illustrating, under reasonable assumptions, the approximate relationship between non-overlap of confidence intervals and p-values for the significance of differences between means. For example, non-overlap of 95% confidence intervals could represent p < 0.005 for the difference in means.
Comment: Thank you for the suggestions given. I'll go over them and check.
Answer: Suppose you have $n=20$ observations from $\mathsf{Norm}(\mu = 1,\sigma=1.2),$
as sampled in R below:
set.seed(307)
x = rnorm(20, 1, 1.2)
a = mean(x); a
[1] 0.8973074
s = sd(x); s
[1] 1.218098

Commonly used 95% CIs for $\mu$ and $\sigma,$ respectively, are
$(.327,1.467)$ and $(.926, 1.799),$ which overlap
even though $\mu= 1 \ne \sigma = 1.2.$
CI.mu = t.test(x)$conf.int;  CI.mu
[1] 0.3272197 1.4673950
 attr(,"conf.level")
[1] 0.95

CI.sg = sqrt(19*var(x)/qchisq(c(.975,.025), 19));  CI.sg
[1] 0.9263522 1.7791201

However, for $n = 200$ observations, both confidence intervals
are shorter. For my choices of $\mu$ and $\sigma,$ the following
sample gives non-overlapping CIs (on either side of $1.1.$
set.seed(2021)
x = rnorm(200, 1, 1.2)
a = mean(x); a
[1] 0.8943602
s = sd(x); s
[1] 1.252382

CI.mu = t.test(x)$conf.int;  CI.mu
[1] 0.7197301 1.0689903             # below 1.1
attr(,"conf.level")
[1] 0.95

CI.sg = sqrt(199*var(x)/qchisq(c(.975,.025), 199));  CI.sg
[1] 1.140497 1.388797               # ab0ve 1.1

Answer: I'm not sure exactly what you are trying to do. Your asked for a 'proper' kind of CI. I think what's below may be better than comparing two CIs. I'll put this in a separate
answer in case it misses your point, and we'll want to delete it.
If you are trying to get a CI for the difference between the two
parameters, you might consider a 95% parametric bootstrap confidence
interval for the difference and see whether it includes $0.$
Specifically, to distinguish between normal $\mu$ and $\sigma,$
you might do something like the procedure below:
#sample of size n
set.seed(1234)
n = 150
x = rnorm(n, 1, 1.2)
a.obs = mean(x); a.obs; s.obs = sd(x); s.obs
[1] 0.8825818
[1] 1.151906
d.obs = s.obs - a.obs;  d.obs
[1] 0.2693245

# parametric bootstrap CI for d = sg - mu
set.seed(4321)
B = 3000;  d.re = numeric(B)
for(i in 1:B) {
 x.re = rnorm(n, a.obs, s.obs)
 d.re[i] = sd(x.re)- mean(x.re) }
q = quantile(d.re, c(.025,.975));  q
      2.5%      97.5%
0.04791377 0.48916711

hdr = "Simulated Dist'n of D (SD - Mean)"
hist(d.re, prob=T, col="skyblue2", main=hdr)
 abline(v = q, col="red", lwd=2, lty="dotted")

Note: For the normal case there may be a suitable CI or test for the difference
between $\sigma$ and $\mu$ that I don't know about. But something similar to the bootstrap above might work, and might work even for non-normal distributions with more than one parameter.
This is almost the most elementary type of bootstrap, and for various
kinds of data other styles of bootstraps might be more appropriate

Overlapping confidence interval


Are there no italic fonts in Print Composer?

Question: QGIS 1.7 doesn't seem to have an 'italic' choice when annotating a map in Print Composer, only 'regular' or 'bold' fonts, a rather surprising omission if correct.  Is there some other way to create an italic font in Print Composer?
Answer: In 1.7.4 version, when I click Item tab on the right of print composer and select font button i get options to change to italic,bold and regular. Except for "System" font, i see the italic options for every other font. See screen below.
Are you using any versions prior to this?
Answer: Are we talking about grid labels here? For italics try changing the font to one that includes italic characters. Arial, for example :) Nick.
Comment: Changing to a different font worked.  Many thanks for both your responses and suggestions!


Add Title field after import from Access

Question: I was imported some list from ms asscess table and I see that dosn't create Title field and user cant watch list item on click in record. How I can fix that without created simular list and transfer data to them?
Thanks!
Answer: I think part of your question was lost in translation.
When creating list from import, the first column typically becomes the "title" column allowing users to click on it to edit item. As test try to export your table from MS Access to MS Excel and than use "Import Spreadsheet" option.
Also make sure that you are displaying "fieldname(linked to item with edit menu)" in your view.


Error due to assumptions taken to derive the formulae for interference pattern in young's double slit experiment

Question: The screen is far away. So we assume w/D << 1 where w is the distance between the slit and D the distance between screen and slit. But if this assumption bring about error which is comparable to the wavelength of light which is quite very small, wont the formulae become wrong. For example if we are using a red laser light, and the error due to our assumption while calculating the difference between the path length travelled by the light from both source comes around 300nm (around half the wavelength of red light) or any other multiple of this, than the anticipated bright fringe will become light and the light fringe dark. How can we make sure this isnt happening?
Answer: The exact path difference is:
$$ \Delta = \sqrt{D^2 + \big(\frac w 2\big)^2} -D $$
$$ \Delta = D\big[ \sqrt{1 + \big(\frac w {2D}\big)^2} - 1\big] $$
$$ \Delta = D\big[ \sqrt{1 + \epsilon^2} - 1\big]$$
with
$$ \epsilon \equiv \frac w {2D}$$
as a small parameter under $w/D \ll 1$.
Now Taylor expand around $\epsilon = 0$:
$$\Delta = D\big[ 1+\frac 1 2 \epsilon^2 -\frac 1 8 \epsilon^4  \big] $$
so the criterion for smallness is that the 2nd order term (in $\epsilon^4$) is less than some fraction of a wavelength:
$$ D \frac 1 8 \epsilon^4 =\frac D 8 \frac {w^4}{16D^4} \ll \lambda / n$$
Some ppl use $n=4$, some like $n=10$. Take your pick:
$$ \frac{w^4}{D^3\lambda} \ll \frac{128}n $$
For a 1 cm width and 300nm light, that means $D$ needs to be bigger than 20cm ish.


Lightroom/Photoshop pricing confusion

Question: I am considering getting Lightroom (and/or Photoshop) priavtely as I use them at work and really enjoy them. I am, however, evry confused by the pricing on the adobe page. In particular, how can the bundle of both programs be half as expensive, e.g., as Photoshop alone? Is there any catch in the bundle? Less features in the programs, etc.?
Comment: I'm voting to close this question because this has absolutely nothing to do with photography.
Answer: No, there is no catch. PS is the same software you will find in Photo subscription. The only difference is Photo subscription include as you can see LR Classic, LR, PS with 20GB of cloud space. And LR subscription is with 1TB cloud space (and by my understanding include only LR and not LR Classic).
IMHO PS subscription follow the price formula of Adobe for single application plans.
Maybe there is some difference about number of included Adobe Stock images in different subscriptions.
P.S. Some time ago there was text that the price of Photo package is temporary and as far as I remember there was try from Adobe to raise the price but customers voices stop them from doing it.
Comment: Thanks. Not sure what you mean by LR Classic, though, don't see a product of that name on the page. Still, don't get why PS alone costs 23,79€, but together w Lightroom only 11,89€. Why would ever get it standalone then?
Comment: @EluciusFTW, you can check this link for the difference between LR Classic and LR CC: https://www.adobe.com/products/photoshop-lightroom-classic/lightroom-cc-vs-lightroom-classic.html

Lightroom/Photoshop pricing confusion


Reduce number of points in polygon

Question: I have a set of points (one to many) in polygon. The middle polygon has a lot of concentrated and correlated points. Looking to see if there is way or an algorithm within QGIS to reduce the number of points, for lack of a better word reverse interpolations.
Comment: I would buffer by a small amount, perhaps 1km or 1 mile, the exact number would depend on your data on a trial and error basis, dissolve the polygons and then use the centroids as points.. any instances closer than 2xbuffer become one... be careful though, you can easily over simplify using this method. As each one is weighted the same there is no way to promote or discard. You could intersect the points with the buffer before extracting centroids to obtain the count of points so you can later show the number of individual records the points represent.
Comment: How do you decide there is too many points? Why is this causing a problem? You could use some sort of cluster grouping but without knowing your data intimately I cannot guide on how to reduce the number of points - what are the points? How does one point become less or more important than the others?
Comment: Thanks for your reply. The above vector is a polygon with point representing pizza restaurants. Is there a way in qgis i can group cluster and more of less consolidate,
Comment: http://gis.stackexchange.com/questions/159285/how-to-group-points-in-qgis
Comment: Do you want it only for visualisations?

 Then check the Rendering tab of Layer Properties.
Answer: You could try the SAGA tool named Points thinning which is accessible in QGIS Processing Toolbox | SAGA | Vector point tools | Points thinning.
A picture below shows (a) randomly distributed (100) green points , which then (b) be reduced to (48) red points by Points thinnging tool.
There is a parameter to be set, Resolution (default value: 1.0). In this example I set Resolution to 500. The meaning of this Resolution will be  understood looking at (c)  green circles (250m radius) underlying the thinned red points.
Comment: Looking at image (c), in both the bottom left and bottom right corners, there are points that overlap the buffers showing that Points thinning is not doing what I might expect in regards to the 500m resolution (It's not respecting the 250m buffer). I'm guessing this has to do with those points being isolated and perhaps the density is still within the parameter because those points aren't close to other points. Is this correct?

Reduce number of points in polygon


Normally well behaved 5 year old is starting to act out

Question: My 5 year old daughter is #2 out of 4 she is the oldest of 3 girls.  Recently she has started doing things really out of character for her.  She is usually a very sweet, respectful, obedient child.  However she has started fighting a lot more with her older brother, she has cut her own hair, colored on my walls, and just today poured a bottle of water down the heating vent.  I am very confused, I don't believe she is crying out for attention, she gets plenty as well as one on one time with mommy and daddy.  Feeling Lost.
Answer: Did you try and ask her why she does it ? If you ask her each time she done something without too much trying to making it feel like an interrogation, maybe you'll get somewhat of a similar answer between the acts.
Make sure you let her know that what she did was wrong, but that you are also trying to help her and be on her side. If you are 100% sure she is not trying to get more attention, maybe that's her own way of calling for help.
Also, try to know if there has been any noticeable change (at school, at home, with her friends, etc.) in her life that she might be responding to.
Answer: We had a similar issue at a similar age with our normally well behaved son, the second of three children and the first of two boys.
The issue appeared to be that our son was getting old enough to want to do more things independently, rather than just following the lead of his older sister.  Doing things independently meant that he had to handle more conflicts with his younger brother trying to get in on whatever he was doing; previously he could depend on his older sister to handle his younger brother, but that was no longer the case when he was playing independently of his older sister.  This desire for independence might have been increased due to influence from full time kindergarten at school.
Our solution mostly amounted to recognizing his increased maturity and independence.  We treated him more as an older sibling of the younger child rather than just as the one of the younger siblings of the older child.  He got some responsibility for and authority for defending himself against the younger child as long as he exercised the restraint appropriate to an older sibling.  We also gave him some 'older sibling' responsibilities, such as being an authorized person for his younger sibling to hold hands with in parking lots.  With respect to his older sibling, we made it clear to her that his participation in her play sessions was voluntary:  he was allowed to turn down opportunities to play with her when he wanted to, as he was no longer just the minion she had previously treated him as.
We also gave him more one on one time than he had been getting, though from your question you already seem to be doing that.
Now, a year later, this approach seems to have worked pretty well.  There are still conflicts, but he's back to being the well behaved child.


Computing the Fourier transform of a distribution of electron charge (represented by atomic positions in space)

Question: I am computing a nested loop operation using OpenCL (open computing language). My main question is, given the code outlined below, how might I optimize the speed and efficiency of using the GPU, for instance by using local memory calls instead of global ones?
Given some input vector \$V=(v_x, v_y, v_z)\$ (in math terms, the input vector is a point in reciprocal space where we evaluate the Fourier transform),  the desired computation involves iterating over a collection of atoms in space (of different species, like Hydrogen, Oxygen, etc.) and using the input vector to compute a function. Each atom is described by a 4-tuple, consisting of 3 spatial coordinates, \$A=(a_x, a_y, a_z)\$, and 1 species identifier, species_id, which ranges from 0 to the number of unique atom species.
The iterations look like this (in pseudocode):
for V in input_vectors:
    ft_magnitude = 0
    for (A, species_id) in atoms:
        ft_magnitude += get_scale_factor(V, species_id) * exp( -i * dot(A,V))

where i in the exponential is the complex number \$i=\sqrt{-1}\$, the term dot(A,V) is the dot product of two vectors \$A \cdot V = a_x \cdot v_x + a_y \cdot v_y + a_z \cdot v_z\$, and get_scale_factor(V,species_id) is a lookup operation which returns the correct, pre-computed scale factor, which changes with each vector V and species_id.
The idea of using a GPU for this problem is to let each GPU worker compute the output for one vector V. I wrote a kernel posted below to be used with OpenCL, after following several examples I saw online.
The inputs to the kernel are the following:

input_vectors which has length 3*n_vectors, 3 per input vector
atoms which has length 4*n_atoms, 4 per atom
scale_factors which has length n_species * n_vectors , 1 per atom species per input vector
outputs which has length 2*n_vectors, 1 complex number per input vector, representing the Fourier transform magnitude

Here is the kernel (note the use of cosine and sine to evaluate the complex exponential using Euler's formula) :
__kernel void compute(
__global float *input_vectors,
__global float *atoms,
__global float *scale_factors,
__global float2 *outputs,
const int n_vectors,
const int n_atoms){

int i_v = get_global_id(0);

if ( i_v < n_vectors) {

    float vx = input_vectors[i_v*3];
    float vy = input_vectors[ i_v*3+1];
    float vz = input_vectors[ i_v*3+2];

    for (int i_a=0; i_a< n_atoms; i_a++){

        float ax = atoms[ i_a*4];
        float ay = atoms[ i_a*4+1];
        float az = atoms[ i_a*4+2];
        int species = atoms[i_a*4+3];
        float factor = scale_factors[ species * n_vectors + i_v ];

        float dot = vx*rx + vy*ry + vz*rz;

        outputs[i_v].x += factor*native_cos(-dot);
        outputs[i_v].y += factor*native_sin(-dot);
        }
    }
}

I am using PyOpenCL to wrap to the kernel but could be convinced to switch to something else if it would get speedups. To give a sense of scale, typically, n_vectors is on the order of 1,000,000, and n_atoms is on the order of 100,000, with about 10 different atom species.
Here is the GPU information for the machine I am using:
81:00.0 3D controller: NVIDIA Corporation GK110BGL [Tesla K40m] (rev a1)
Subsystem: NVIDIA Corporation 12GB Computational Accelerator
Physical Slot: 4
Flags: bus master, fast devsel, latency 0, IRQ 64
Memory at fa000000 (32-bit, non-prefetchable) [size=16M]
Memory at 27800000000 (64-bit, prefetchable) [size=16G]
Memory at 27c00000000 (64-bit, prefetchable) [size=32M]
Capabilities: <access denied>
Kernel driver in use: nvidia
Kernel modules: nvidia, nouveau, nvidiafb

Answer: The most immediate optimization is to use coalesced reads by switching to array of structs form to structure of arrays.
Comment: Welcome to Code Review! May be you could summarize the content the content of the link and embed it into the answer? Links can go down, so StackExchange tries to keep everything self sufficient


Beat Ornstein and Smough in NG+

Question: I would like some advice on how I can beat Ornstein and Smough in NG+. I didn't intend to finish NG+ so I didn't prepare myself before killing Gwyn (Just pyromancy flame +5 with Fireball e.g.).
I have Great Scythe +14, Uchigatana +15, Claymore Fire +9. I did not receive the large ember yet.
I tried killing smough first and I tried with and without Solaire (kind of useless, just speeds up the first half of the fight).
Any tips? Should I leave Anor Londo and make Queelags Furysword? Should I level my Pyromancy Flame and get some better Pyromancys (I did not go to Queelana after the Chaos of Bed to receive the gift)?
Vit 45, Dex 45, Str 16, End 35
Thanks in advance!
Comment: I personally find it easier to kill Ornstein first, because he has less health, so the transition comes faster, and the enhanced Smough is slower. You won't get Leo's ring this way though.
Answer: Patience is going to be your best shot. I've almost exclusively used the Great Scythe for all my fights against O&S so I've got quite a bit of experience there. It's tricky because you can't do locked attacks on Smough otherwise your scythe will just hit his hammer and you can only do one attack at a time otherwise you run out of stamina for dodging. I recommend using Solaire as he is great for pulling one if not both of them long enough for you to get some dps down. I prefer killing Smough first because I feel that Ornstein's second fight phase is much easier than his first. He does gain some of Smough's AOE but he still has much narrower hitboxes and you can easily fight right underneath his spear. The only time you need to get out is when he does his electric belly flop, then use the Scythe's 2h r2 attack as a gapcloser to get back in fighting range.
In regards to your comment about Quelaag's Furysword, I would recommend against using it for O&S for the sole reason that its hitboxes are really funky. I've tried using it and Smough wound up passively blocking most of my swings with his hammer. Couple this with its low-ish base damage and lower scaling than the scythe and you're in for a long fight. I would stick with your Uchigatana and Great Scythe for this fight depending on which you are more comfortable with. The nice thing about those two is that you can also enchant them for extra damage (darkmoon blade/sunlight blade if you have faith, crystal magic weapon if you have int, and charcoal pine resin/gold pine resin if you don't have either of the previous options). I've always gone for glass cannon builds, using crystal magic weapon and power within to significantly boost my dps in fights but it all boils down to how patiently can you fight. Pay attention, learn their attack queues, and don't burn up all your stamina.
Comment: Thank you! Patience was indeed key, I went solo and defeated Ornstein first, after that it was waiting really long for an opening, landing a quick hit and again waiting. Toughest fight so far.
Comment: Good luck with manus if you have the DLC ;)
Comment: I do have the DLC. Missed a lot of it on my original playthrough so I plan on finishing it on NG+. I also missed the painted world. Wonder what else I missed.

Beat Ornstein and Smough in NG+


does SDK disk images of APIs for windows and mac differ?

Question: I have started developing on a windows machine, I use the ADT with Eclipse, my SDK is updated with all the possible Android APIs, ie, (1.6-4.4). The windows machine is pretty slow so lately I got a Mac (Mavericks), so I am confused between ADT for mac and windows.
Is the APIs updated with the SDK work with mac(can i copy and paste the version images to mac sdk from the windows sdk)? or should I update the SDK (APIs) for mac?
thank you for any suggestion!
Answer: Some parts of the SDK are the same between Windows, Linux, and Mac, and some are not.
The developer tools, such as adb, fastboot, and hprof, are native binaries so they're different for each OS. The emulator too is different for each OS.
The Android system images for the emulator are the same between the different host OSes, so you don't need to download these again.
The android.jar files containing the Android framework library itself are also the same between the different host OSes. It has to be this way because the JAR files are compiled into your app.
If you're not sure what to update, it's probably best to just start a fresh installation of ADT. That way you're sure to end up with a working version, and there's no risk of failing to update something you should have, or mimatched versions. It might seem that you're wasting time by downloading some of the same things again, but at least you'll be able to trust your tools. If you try and Frankenstein your installation to save downloading, then even if you manage to do it right, you'll suspect it's broken every time you have an unusual bug, and you'll waste more time in the long run.
Answer: I know its a late reply but here is the answer.
Some parts of the SDK are same except the SDK manager AVD manager ADB etc.
all the system images jar are common
Remember Java is a platform independent language.
In real life, I use the same SDK library for Windows, Mac and Linux.
The files are kind of intact for Windows and Linux. But for mac, you have to download some other files too.
And ya, you don't have to copy-paste. Just share via a network.  That the best so that both copies will be same. download New version of android in Linux will reflect that in Windows.
I use the same SDK for:

Android Studio Windows
Android Studio Linux
Android Studio Mac
Xamarin Studio in Windows
Visual Studio in Windows (Xamarin development)
Xamarin Studio in Mac

All works cool. Only thing is you have to give write access for both Linux and Mac users.
Thank you!
Please comment for any doubts.
Comment: the avd does not link up can you tell me how to perform it
Comment: you need separate avd because the executable extensions are different. just simple download all missing stuffs.
Answer: The list of folders that you can share between Linux & Windows file system as they are the same files for Android SDK are below. You can just copy & paste these folders between any OS you use:
add-ons,
docs,
extras,
ndk-bundle,
platforms,
skins,
sources,
system-images,
tools
Apparently, you will need to download the below folders i.e. SDK Tools differently for each OS, as they are platform dependent tools which rely upon OS like Linux, Windows & Mac OS differently:
build-tools,
platform-tools
These two folders don't eat up much of a download bandwidth. So you can easily download it as per the OS you are working on.
I have tested and tried this successfully so far and all worked well with full support. This will save a lot of disk space as well as download bandwidth & time for sure!


Applicability of the concept of voltage in electrodynamic circuits

Question: In electrostatics, we have $$\nabla \times \vec{E} = 0$$. Hence, we can define a scalar potential $V$, where $$\vec{E} = -\nabla V$$. We know from Faraday's law that $$\nabla \times \vec{E} = -\frac{\partial \vec{B}}{\partial t}$$. In situations involving constant currents(D.C.) the rate of change of the magnetic field is zero, so we can continue to use the concept of scalar potential, also known as voltage in circuit theory, for analysis of DC circuits. However,in practice, in the literature, we find the concept of voltage being used to study alternating current circuits as well. Further, it is also used in the study of high frequency alternating current circuits used for generation of electromagnetic waves. In such situations $$ \oint \vec{E}.\vec{dl} \neq 0$$. So strictly speaking, we cannot use the concept of voltage to study alternating current circuits, especially in the high frequency applications. Yet, in practice we find that it continues to be used in the literature. So is it really justified to use this concept outside of its realm of validity, and why or in what way?
Answer: Yes, it is possible to use the concept of voltage and related tools in AC circuits. The fact that the contour integral of $\vec E$ isn't zero isn't a problem. It would only be a problem if you first, "gradient" equation were right in this context. However, it's not. The correct equation needed for more general electromagnetic setups is
$$ \vec E = -\nabla \Phi  - \frac{\partial \vec A}{\partial t} $$
The identity for $\vec E$ implied by this definition isn't simply ${\rm curl}\,\vec E=0$ but the full Faraday's law Maxwell's equation you wrote down
$$ \nabla \times \vec{E} = -\frac{\partial \vec{B}}{\partial t} $$
because $\vec B = \nabla\times \vec A$. The equations above are fully consistent with one another and compatible with the fact that $\Phi$, the vector potential, is a well-defined field even in general situations involving time-dependent fields and magnetic fields.
There is an ambiguity in the choice of $\Phi,\vec A$, the gauge invariance, but useful conventions may be assumed to fix this ambiguity in the case of AC circuits. When it's done, the non-magnetic parts of the circuits work just like before or in DC circuits. The voltage may be calculated as the differences of $\Phi$ just like in the DC case.
For coils, one has to appreciate that the integrated electric field isn't the only relevant contribution. Instead, one finds the electromotive force, EMF, a modified sibling of "ordinary" voltage which has to be added to coils (and batteries) for the total sums of voltages over closed loops to vanish.
One may also study harmonic time-dependence in which all quantities depend on time as $\cos\omega t$ which is usually complexified to $\exp(i\omega t)$.
Comment: hi, you mentioned that 'useful conventions may be assumed to fix this ambiguity in the case of AC circuits. When it's done, the non-magnetic parts of the circuits work just like before or in DC circuits.'. Can you specify exactly what these conventions are? In other words, are you suggesting choice of a specific gauge, and if so, then which particular gauge are you suggesting?
Comment: Yes, @guru. Vasiliy's answer below sketches some of the logic. For ordinary circuit, the pieces are separated, so the magnetic field is confined to the part of the circuits with coils (except for the negligible electromagnetic waves that are being emitted). So the gauge choice has to agree with the $\vec A=0$ outside the vicinities of the coils. This doesn't really fix the gauge completely and it's completely unfixed inside the coils but it doesn't really matter because the voltage of the coils is treated separately by the magnetic flux, a quantity that is gauge-invariant and gauge-insensitive
Comment: Hi @LubosMotl, if $\vec{E} = -\nabla V$ we know that any two potentials can atmost differ by a constant. Hence, potential difference is an absolute and hence the voltage specification in any D.C. power suppy makes sense. However, the situation is more complicated for changing magnetic fields. Now there is no guarantee that any two potentials will differ by atmost a constant because $\vec{E} = -\nabla V-\frac{\partial \vec{A}}{\partial t}$ So any gauge transformation $$\vec{A} ' = \vec{A} + \nabla \psi$$ and $$\phi' = \phi - \frac{\partial \psi}{\partial t}$$ is valid.
Comment: So this means that any two potentials need not differ by just a constant so when you say that a particular power supply is say 100V A.C., then shouldn't you also mention which gauge?
Comment: If not, then the choice of gauge for the potential would be different in different parts of the circuit which would lead to a complicated situation.
Answer: In the framework of EE theory there is widely accepted assumption of "lumped circuit".
Lumped circuit is the circuit where all the elements are "infinitesimal" (size less), and the whole circuit is "infinitesimal" too (zero area). The above means that even in presence of time varying magnetic field, the magnetic flux through circuit elements and through the area of the circuit itself is assumed to be zero.
Just like any other physical model, the lumped model has its limitations too. The rule of thumb is that lumped model breaks when the wavelengths involved are comparable to circuit's dimensions (or shorter). However, even in these high frequency cases, the lumped model may still be applied if the high frequency effects are accounted for by adding to the circuit additional components (transmission lines, parasitic inductances and capacitances, etc...).
When the lumped model may not be applied (due to very high frequencies involved), the simple notations of EE theory may not be used anymore. In these cases one must build a physical model of the circuit and solve Maxwell's equations. However, to my best knowledge, these cases are treated by physics doctors in a specialized facilities, not by electrical engineers.
Comment: @LarryHarson, If you assume zero magnetic flux through all circuit's components, why do you care about changing magnetic fields?
Comment: This doesn't answer the question, which asked about the applicability of voltage in circuits where there's changing magnetic fields
Comment: All circuits possess large finite areas with a changing magnetic field through it. Don't forget the interconnecting wires between components.
Comment: @LarryHarson, I don't understand what you're trying to say. Do you?
Comment: You need to link the components with interconnecting wires, so you'll end up with a circuit loop. And as the current in this loop changes, so will the magnetic flux in the loop.
Comment: @LarryHarson, read my answer carefully. If, after this, you still don't understand what "lumped circuit" means - ask a question on the forum and somebody else will explain it to you.
Comment: This answer does lend some perspective though a complete explanation still evades me!
Answer:
we cannot use the concept of voltage to study alternating current circuits, especially in the high frequency applications.

This is a common misconception, usually on part of physics teachers and students, electrical engineers seem to get this right more often.
What is going on here is that voltage, in its basic meaning used in AC/DC circuits and Kirchhoff's voltage law, is difference of the Coulomb potential, or equivalently, line integral of the Coulomb electric field from one point to another. The Coulomb field is a function of all charges magnitudes and  positions' and is conservative; any line integral of it over closed curve is zero. Thus the integral from one point to another does not depend on path, only on the endpoints. All this is true regardless of what total electric field looks like; voltage only cares about the Coulomb field.
When you see electric field written as
$$
\mathbf E = -\nabla \Phi -\partial_t \mathbf A
$$
this does not by itself fix $\Phi$, but in practice, in working with AC/DC circuits where radiation is negligible, the most natural way to fix $\Phi$ is to fix it to the electrostatic definition
$$
\Phi(\mathbf x, t) = \int K\frac{\rho(\mathbf x',t)}{|\mathbf x - \mathbf x'|}d^3\mathbf x'.
$$
Then, $-\nabla \Phi$ is the Coulomb field, and $-\partial_t \mathbf A$ is the rest of the field; in DC circuits this contribution is zero, but in AC circuits, it is not, and we call it induced electric field.


"Alternate background colors"

Question: A level IV parallel universe is a universe that may have different laws of nature than our own, but still work out to be mathematically true.
I'm thinking about a level IV parallel universe where, instead of adding color with light (like the display on your computer, its default color with no light added is black), there could be color added to subtract light (like a painting, if you apply paint to the paper, it takes away color from the default white color). Would it be possible to have an alternate universe with the subtractive color system? (Ex: the stars would take away light from a "white color" universe)
Answer: The frustrating answer with Level IV worlds is that it's always "why not?"  What you have described is so removed from physics that the answer is "sure."  There's even a famous thought experiment where the sky is actually green, but everyone uses the word "blue" to describe it.
What you describe is color perception.  Colors are an incredibly complicated system.  They go from the spectrum of EM radiation into 3 colors, working through component processes, and eventually come out the other end as a qualia.  There's a lot of slop room there!  With the freedom of a Level IV alternate universe, that's easy!  Arguably it can be achieved in THIS world, with a sufficient application of LSD.
Now as you add in more effects that are like those in our universe, you can run into consistency issues.  If you assume light is modelable with our equations for electromagnetism and if you assume color perception in this Level IV universe can only possibly match that of our own and if you assume energy is a conserved concept and if you assume quantum mechanical rules that suggest that the addition of light must be a linear function, then you might start getting into inconsistencies dealing with the energy of photons.
But sure.  It's Level IV.  Virtually anything is possible.
Comment: Fun fact: in Japanese they actually do say that it is green (because the same word means "blue" and "green").
Comment: @Alice: The sky in Ancient Greece was described as 'copper' for much the same reason.
Comment: "*There's even a famous thought experiment where the sky is actually green, but everyone uses the word "blue" to describe it.*"  Who needs thought experiments, since people define the language: "the sky is blue" *vs.* "el cielo es azul".  Is the sky blue, or is it azul?
Comment: then it's a poor lead in, since if **everyone** (who speaks a specific language) says that the sky is green, then that's the definition of that range of wavelengths.  A better example is Synesthesia.
Comment: @RonJohn The thought experiment was actually a lead in to a general discussion of how our senses are subjective, not objective.  The color of the sky was one of the simpler examples to start from.
Comment: @RonJohn Perhaps.  When we're talking about Level IV multiverse, the majority of the challenge is not in thinking of something crazy that might exist in that universe.  It's unlearning all the basic assumptions about how we speak and think.
Answer: We already add color, or things that absorb and reflect given light frequencies. The added color subtracts light, by absorbing certain frequencies and transmitting or reflecting others.  You point out the case of paint: we have that.  Leaves do that: they absorb a lot of light but mostly reflect green, so they look green to us.   One could have colored light of a single frequency, but most cases of color entail absorption of certain spectra from multi spectrum light, with the non absorbed spectra reflected and so producing the color we see.  Color is the subtraction of light.
Comment: Whoever downvoted you Will should have their head examined.  Paint and the pigments that give it color are on-point examples of color-subtractive behavior.
Comment: @JBH - And cited by the OP, no less.  I wonder if maybe I missed the whole thrust of this parallel universe concept.
Comment: This is pretty much what I would have posted. The only difference would have been that knowing me, the answer would have been longer. :) Good one, @Will
Answer: I can see a few different ways to interpret this.
One is that the universe naturally produces a certain distribution of background wavelengths of some phenomenon which can be usefully analogized to our inverse's light, and stars and other "light sources" actually emit something which suppresses production of or removes particular wavelengths from the background radiation environment. Something like this can sort of happen in our universe, where light waves can destructively interfere with each other. It's rather difficult to get that to happen coherently on a large scale, though, and you always end up with additive interference somewhere--there is no generic "dark beam"--and I would not like trying to figure out how to design a universe where that would work out. I can see, however, two alternate possibilities for how such a system might be made to function, without relying on quantum interference.
The first is that the universe constantly generates some background radiation spontaneously, out of free space, which is directly perceived as light. Apparent "light sources", like stars, would then emit some second form of radiation whose presence suppresses the background production of light, but which is not directly perceivable. "Laser beams" in such a universe would in fact be visible off-axis in empty space, since they would produce a corridor in which the omni-directional production of perceptible radiation is suppressed, and "light sources" would produce visible haloes, rather than emitting colors only directly from their surfaces. I imagine it would take some time for the inhabitants of such a universe to figure out that their "light" is in fact two separate, but interacting, phenomena.
The second option merely requires some background radiation field, whether it is continuously produced from free space or is simply primordial, like our microwave background. They key is that the energy of this background field is of opposite sign to that emitted by other light sources. Positive and negative "light" would only interact via the normal interference processes in free space, but the color-subtractive effect would come into play in their interactions with matter (i.e., retinas, cameras, and everything else). Where a single photon/luxon/whatever of "light", whether positive or negative, may be capable of triggering an electronic-or-analogous transition, thus causing detection, the simultaneous absorption of luxons of opposite sign would result in no effect--so a light source that emits luxons of a particular color/wavelength would prevent anyone who can "see" it from seeing luxons of the same wavelength from the opposite-signed background radiation. In this sort of universe, there would still only be a single type of particle/field which makes up "light", and lasers, as in our universe, would not be visible off-axis.
Another interpretation is that rather than producing "light" at all, objects like stars merely absorb the background light, and images are typically formed by the dark patches on a bright background rather than light patches on a dark background. That's easy to do: either provide a steady-state radiation field sourced from the vacuum, or a primordial background radiation field similar to our own cosmic background many billions of years ago (when it was warmer, and in the visible rather than microwave range), and tweak things so that "stars" tend to be mostly-translucent (rather than dense and opaque). Depending on what other features you want for this universe, there's a wide array of options for explaining why large objects like stars interact with "light" so relatively little, and what happens to the energy they absorb. The functional equivalent of stars in such a universe might be more analogous to our black holes (point-like cold sinks, with a hot background, rather than a cold background with point-like heat sources), or you might come up with some more exotic method of keeping the temperature down. (For comparison, "stars" in Greg Egan's Orthogonal universe incidentally produce light, but their light is not used to supply energy to planetary biospheres--rather, "plants" can spontaneously produce all the energy they need, with heat as a byproduct of inefficiencies, and starlight merely serves as a source of low entropy.)

"Alternate background colors"


Finite abelian group with common nontrivial subgroup $H_0$ is cyclic.

Question: let $G$ be a finite abelian group such that it contains a subgroup $H_{0}\neq (e)$ which lies in every subgroup $H\neq(e)$, prove that $G$ is cyclic. what is order of $G$?
i try to solve this problem, but i can not finish..kindly help me, or give any other solution.
I try, since $G$ is finite abelian group, so it isomorphic direct product of its sylow subgroup, $G\thickapprox S(P_{1})*S(P_{2}*)....S(P_{k})$ since $H_{0}\subset S(P_{i})$ and $S(P_{i})\cap S(P_{j})= \phi$ this imlies $k=1$ i.e. $G\thickapprox S(P_{1})$,
from here how i conclude $G$ is cyclic?
Answer: Actually the intersection of two distinct Sylow subgroups is $\{e\}$ rather than the empty set. A finite abelian group is a product of cyclic groups. If there is more than one group in the product, you again get a pair of subgroups with trivial intersection $\{e\}$, and therefore they couldn't both contain $H$, giving the required contradiction.
Answer: Here is a proof that only uses the Sylow decomposition, not the decomposition into cyclic groups. Your argument reduces us to the case that $G$ has order $p^n$ for some prime $p$. Let $x$ be an element of maximal order, say of order $p^n$. Then $H_0$ must be the group generated by $p^{n-1}x$, since there can only be one order $p$ subgroup. Now let $y$ be some element not in the subgroup generated by $x$ of minimal order, say $p^m$. Then there must be some $0 < k < p$ with $p^{m-1}y = kp^{n-1}x$. Then $p^{m-1}(y - kp^{n-m}x) = p^{m-1}y - kp^{m-1}x = 0$. Since the order of $y - kp^{n-m}x$ is smaller than $m$, minimality gives $y - kp^{n-m}x \in \langle x \rangle$. So $y \in \langle x \rangle$. So $G$ is cyclic.
Comment: This is really nice!
Answer: Let's start with $o(G) = p^n$. From Sylow theorem, there exist an element $x \in G$ of order $p$. Thus $H_0 = \{x^i|i\in[1,p]\}$.
Now we will prove that, if for each two cyclic  subgroups $H_a,H_b$ of orders $p^s,p^t$ (with $s\geq t$) generated by $a,b$ respectively we have $ o(H_a\cap H_b) \geq p^{t-1} $,
then, $$H_b \subset H_a$$
\begin{align*}
a^{p^{s-1}}&=b^{p^{t-1}} \\
(a^{p^{s-t}}b^{-1})^{p^{t-1}}&=e \\
a^{p^{s-t}}b^{-1} &= b^p (\text{or any } b^{kp}, k<p)\\
a^{p^{s-t}} &= b^{p+1}
\end{align*}
We know that $o(b^{p+1}) = p^t$
Hence, $$H_b \subset H_a$$
When you apply induction using above lemma, we see that $G$ is cyclic.


Accidentally shutdown system while Bitcoin Core client was synchronizing

Question: My computer was accidentally shutdown while Bitcoin Core was synchronizing and it is now giving the error fatal error please see error log. Please tell me what is the solution to this problem.
Comment: What does the debug.log say?
Comment: You must back up the wallet before doing anything. Don't lose the private keys. If you have your private keys you can re-install everything back anytime.
Answer:
giving an error as ' fatal error please see error log' ... what is the solution to this problem.

Step one is to do as it suggests. The location of the error log depends on the platform (Windows probably %APPDATA%\bitcoin, Linux probably ~/.bitcoin)
If all else fails, just install some wallet software elsewhere and re-import the private key you carefully backed up for just this sort of situation.
Answer: It's possible that the blockchain data is corrupt, in that case you should delete the blockchain files on your computer and let it sync again. Might take a while though, as Bitcoin's database is quite large.


How to make Ubuntu Desktop 18.04 accessible from the outside?

Question: I have installed Ubuntu Desktop 18.04 on my parents computer but want to be able to administrate it from the outside (install updates, fix issues etc). I need access to the main desktop (:0), not create a new one.
The first thing I tried was using TeamViewer. Sadly, TeamViewer is completely broken on Linux and it regularly crashes the window manager, no matter if I use X11 or Wayland in the "gdm3/custom.conf". This also freezes almost all other processes so the only way to fix this is to reboot the machine. Other users have reported the same issues to the TeamViewer support, but they don't care.
Next thing I tried was using VNC. So I installed a VNC Server on the machine and have it start on startup on display 0 with X11 enabled / Wayland disabled. This also didn't seem to work, because I couldn't share the Display:0 for some reason.
( https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-18-04 )
x11vnc doesn't work because it cannot be started before a user has logged in.
Next thing I tried was the built in "Desktop Sharing" function of Ubuntu. Sadly, this VNC server seems to only be started once a user is logged in. And even though I have disabled the password and enabled auto login in the system settings and "AutomaticLoginEnable=true" "AutomaticLogin=username" in the "gdm3/custom.conf", sometimes Ubuntu just ignores these settings and sits at the login screen waiting for a user to click on their username to login.
Since I don't want anybody else to be able to access this I am using a simple VPN (ZeroTier) with a static IP address so that only I can connect to the computer.
It seems like there is no reliable way to have Ubuntu login automatically every time? Sometimes it works, sometimes it doesn't, makes no sense to me. Rebooting the system seems to make the auto login work, shutting it down and starting it then seems to make it sit at the user selection screen.
So what are the options left, what am I missing?
Is it really this difficult/impossible to make Ubuntu Desktop accessible from the outside?
Comment: Perhaps have you triend something like ThinLInc from Cendio?
Answer: I use Anydesk for my parents Ubuntu 18.04 and it works like a charm.


First use of "judge, jury, and executioner"

Question: I was wondering when the expression "judge, jury, and executioner" was first used. It appears in "A Study in Scarlet" (1887), but I don't know how to look for earlier usage.
Comment: Nice first question.  Welcome to English Language & Usage.
Comment: OED has "judge and jury" going back to at least 1646 (there's also a 1576 reference which is in verse and slightly different).
Answer: The earliest I can find is Daniel Defoe, "Memoirs of the Church of Scotland" (1717)...

...make every private Sentinel, every Musquetier, both Judge, Jury, and Executioner.

For future reference, OP might like to hang on to this Google Books link. Enter the target phrase "in quotes", then use Search Tools to keep whittling down the date range until you've got the earliest one. Re-search without quotes, to find any earlier instances phrased slightly differently.
Comment: Thanks for the link! I had tried to use ngram before asking the question, but failed, and I now see that Books is a more useful resource.
Comment: @John: Glad you found the link useful. You might also consider clicking on the "up arrow/triangle" icon above my pitiful ***0*** score, above the tick indicating you've *accepted* the answer. I must admit I didn't actually follow my own advice and re-search pre-1717 for any earlier references that might have been relevant. I'm guessing Defoe was probably the first for this exact form, but it's such an obvious thing to say it could have been used centuries before and simply not written down in any surviving indexed digitised form we can easily access.
Answer: Slightly earlier than the Defoe reference, we have William Congreve's play, The Double-dealer, published in 1706 but first produced in 1693. It contains the lines:

But in this Court, what Diff'rence does appear!
  For every one's both Judge and Jury here;
  Nay, and what's worse, an Executioner.
Comment: Hoist by my own petard! In my own answer text I suggested searching for just the key words "unquoted", but admitted in a comment I hadn't bothered to do that in this case. Since Robusto rarely if ever posts answers these days, I guess that makes you the site's top "citation archaeologist".
Answer: Contemporary with the quote from Defoe is this from a political monthly:

"...the King issued out a printed Order, for all Whigs to shoot or destroy, by the Way they would, any that should be charged with Concern in any Riot in Time to come; which constituted any malicious Man, the Accuser, Judge, Jury and Executioner of his Neighbour;." - The Political State of Great Britain, for October 1717 (Vol.XIV:398)
Answer: Published a year before Congreve's The Double-dealer, but evidently written 12 years after Congreve's play was first produced is William Grimston's play, The Lawyer's Fortune: or, Love in a Hollow Tree (1705), which includes these lines:

Florida. Oh! Thou wild Monster of Mankind, whose Venom Breaths it self thus to the Destruction of they Betters!
Friendlove. Peace, Madam, If I had Kill'd him it had been but Justice.
Florida. And must you make your self Judge, Jury, and Hangman? tho' the last might be a proper Office for you, yet I am sure you have no Right to the former; Oh, thou Villain!

This formulation—with a hangman in place of an executioner—thus appears to have reached print first, but not to have been presented to audiences first. A note in the Dictionary of National Biography (1903) observes that Grimson's play was "ridiculed by Swift and Pope," suggesting that it may have provided "judge, jury, and hangman" less of a boost into popular usage than Congreve's play may have done for "judge, jury, and executioner."
Answer: Normally you find information about when a word appeared for the first time in the online etymological dictionary etymonline.com.
For judge (noun and verb) the information is around 1300. But the word has a history back to Romans times. Latin judex, genitive judicis gave French juge and English judge.
Jury and executioner also have Latin sources.
Answer: I suspect that the original source is in literature from before 1850, because the themes of many Shakespearean (e.g. Othello) and Greek tragedies considered the hubris of the power of judge, jury and executioner in a single person or entity.  However, I haven't a literary source yet.
Looking at legal decisions, I found the phrase used by the Supreme Judicial Court of Massachusetts in 1858 in the tort case of Brown v. Perkins, 12 Gray 89, 97 (Mass. 1858).  There the court said:

Whenever that which is a common nuisance obstructs, injures or annoys a person under such circumstances that he cannot wait for the slow process of the law for his remedy, he may do that which relieves him from the impending peril, and which results in an abatement of the nuisance, but which is not technically an abatement of the nuisance. If we go farther than this, and say that any person may go beyond what the law authorizes him to do, and himself execute the law; then we are under a government of men and not of laws; and the legislative, instead of entrusting the execution of the laws to the executive and judicial departments, makes every individual to be judge, jury and executioner in his own case. A nuisance is not different from any other illegal act; a person injured may not execute the law, but he may relieve himself from impending peril. Is it a greater offence to commit a nuisance than to murder a man? Could the legislature say in case of murder, that any one might make hot pursuit and kill the offender? Yet he would be doing no more than the law would do.


Multilingual flask application

Question: Is there a preferred way to make a Flask application multilingual? Ideally, the solution would enable to @app.route the same view to use different urls for each languages, like @app.route(en='/staff/', fr='/equipe/). I'm pretty confident I could hack something like that together, but an existing library would sure save me some time. Thanks.
Answer: I believe that Flask-Babel is what you are looking for.
Comment: Unfortunately, a Flask-Babel doesn't handle multi-language routes.
Comment: Thanks, It looks very promising.
Answer: You can achieve this by creating a decorator that decides which route to use.
def lang_route(en, fr, *args, **kwargs):
    # Find out the user's language
    lang = "en"
    if lang == "en":
        return app.route(en, *args, **kwargs)
    if lang == "fr":
        return app.route(fr, *args, **kwargs)

@lang_route(en="/staff", fr="/equipe")
def staff():
    return "staff"

Multilingual flask application


Comment form above comments?

Question: Is there a simple way to move the comment form above the comments in Drupal 6?
Answer: You can use the Comment form above comments module which adds option to place comment form above the comments thread.
Comment: Haha, what an aptly named module.
Answer: This is a very simple thing to do in your theme so if you don't want to install another module just to do it you can override the comment-wrapper.tpl.php template file in your theme.
Just copy that file to your theme from the comment module (or if your theme is a sub-theme you there might be one in your base theme, in which case use that one - in this case the example coe below may not exactly match your base theme's code).
Then move this part:
<?php if ($content['comment_form']): ?>

<?php print t('Add new comment'); ?>

  <?php print render($content['comment_form']); ?>
<?php endif; ?>

So it is where you want it.
In this case probably just above the line:
<?php print render($content['comments']); ?>

You can do this for a specific node type by renaming the file to comment-wrapper--node-NODETYPE.tpl.php, where NODETYPE is replaced with the machine name of your content type (with any underscores changed to dashes).
Answer: The simplest way I found was with CSS
Note: I only want to do this with a specific Content type with the class ".node-chat-with-a-character" the height/padding of 200px was specific to my solution, and was a number I arrived at after removing a lot of extraneous things from the comment form.
/*put comment submit above comments*/

.node-chat-with-a-character #comments {
   position: relative;
   padding-top: 200px;
}
.node-chat-with-a-character #comments .comment-form{
   position: absolute;
   height: 200px;
   top: 0px;
}
Answer: Put this in a block; it is the best and easiest method.

Comment: How is this the best method?  You've got code in a block for starters - this is the start of a downward spiral to a totally unmanageable site.

Comment form above comments?


- Fail Error on FBX Export, Cannot Export Model

Question: Keep getting this error when I attempt to export the FBX, this model doesn't have any UV's. All it has are basic materials assigned (no textures) and rigging. I tried removing parts of the model and when I remove the highlighted segment type (in orange in the SS) the export works. But I don't understand why that segment is causing a problem. I have never had an issue like this before. This is on Blender 2.91. Does anyone know how to fix this?
Comment: Please show your FBX export settings
Comment: added FBX export settings and extra details
Answer: Just a guess here:
I suspect this was based on something like the cube mesh, which comes with its own UVs even if you don't do anything with them, and that is what's causing this. Or maybe you built that side from scratch so it really doesn't have any UVs but everything else does, and FBX export is looking for a UV even though it won't end up being used.


QGIS new version on UBUNTU 14.04 Nvidia Jetson TX1

Question: I had tried to install the latest QGIS following the commands listed on QGIS Documentation ; But they seem not to work for the arm architecture of Nvidia Jetson TX1 & i get a clash of the version number.  Then i had reflashed my board Nvidia Jetson TX1 and installed QGIS old version.  As anyone tried to install QGIS on arm64 Nvidia Jetson TX1 ?
Here is the result of uname -a
Linux tegra-ubuntu 3.10.96-tegra #1 SMP PREEMPT Tue May 17 16:29:05 PDT 2016 aarch64 aarch64 aarch64 GNU/Linux

My terminal output:
ubuntu@tegra-ubuntu:~$ sudo apt-get install qgis
[sudo] password for ubuntu:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 qgis : Depends: qgis-providers (= 2.0.1-2build2) but it is not going to be installed
        Depends: qgis-common (= 2.0.1-2build2) but 2.8.3-0~trusty1 is to be installed
        Recommends: qgis-plugin-grass but it is not going to be installed
        Recommends: qgis-plugin-globe but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I tried to compile Grass according to Grass wiki
But, i am not understand how to specify for grass build, the system type
ubuntu@tegra-ubuntu:/usr/local/src/proj$ ./configure  &&  make  &&  sudo make install
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking build system type... ./config.guess: unable to guess system type

This script, last modified 2007-03-06, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
and
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub

If the version you run (./config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <email@example.com> in order to provide the needed
information to handle your system.

config.guess timestamp = 2007-03-06

uname -m = aarch64
uname -r = 3.10.96-tegra
uname -s = Linux
uname -v = #1 SMP PREEMPT Tue May 17 16:29:05 PDT 2016

/usr/bin/uname -p =
/bin/uname -X     =

hostinfo               =
/bin/universe          =
/usr/bin/arch -k       =
/bin/arch              =
/usr/bin/oslevel       =
/usr/convex/getsysinfo =

UNAME_MACHINE = aarch64
UNAME_RELEASE = 3.10.96-tegra
UNAME_SYSTEM  = Linux
UNAME_VERSION = #1 SMP PREEMPT Tue May 17 16:29:05 PDT 2016
configure: error: cannot guess build type; you must specify one

Comment: You can use the https://ubuntu-mate.org/download/ (raspberry pi) for your Nvidia Jetson TX1 then use PPA https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-unstable to install the latest version.
Comment: @Mapperz the problem is the nvidia hardware features only work with 14.04 Ubuntu version, i need to stick with it; although i am not  sure if they will be releasing or supporting ubuntu-mate !
Comment: There was Ubuntu 16.04 release recently, but the error is the same.  I tried using the QGIS 2.8 Version but it crashes in the middle, when i try to download Sentinel 2 data.
Answer: As can be seen from the FTP linked on the official [docs] you mention, there are no builds for ARM. Not even for 32-bit ARM. So you'll either have to build it yourself or find someone to crosscompile it for you. I'd start by looking at Raspbian package repositories, since it included QGIS and other GIS software in the past (and RPy uses ARM).
Comment: I tried to build from source following the [tutorial](https://htmlpreview.github.io/?https://github.com/qgis/QGIS/blob/master/doc/INSTALL.html#toc3). But i got the error of not finding the GRASSConfig.cmake file.  Which i don't know how to find it.  As i searched in the git repository, still no luck
Comment: It's probably from GRASS sources. Did the Raspbian package not work for you?
Comment: I tried the Raspbian in terminal & got command not found error for
`deb http://archive.raspbian.org/raspbian wheezy main contrib non-free
deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free`
Comment: You could use one of the mirrors then, but it also seems rpy uses a 32-bit arm ... so back to compiling.


Can the Yongnuo YN622C & YN622C TX be used with the Alien Bees B800?

Question: Can the Yongnuo YN622C TX be used with the YN622C controlling the B800 like the Radio Poppers and Pocket Wizards?
Answer: Depends on what you mean by "controlling."
If by "controlling" you mean firing in sync, as manual triggers, no sweat. The YN-622C has a PC sync port that you can use to hook it up to an AB800 as a radio receiver, and the Bee will fire in sync.
If by "controlling" you mean firing in sync and letting you remotely set the power level on the AB800, then no. The YN-622C/662C-TX combination only controls the power on Canon eTTL-compatible flashes and requires that the flash have all the pins on a Canon flash foot. The AB800 is a manual studio strobe that doesn't do eTTL and has no flash foot, let alone one that's compatible with the Canon signaling protocol. A PC sync connection is always manual-only.
The PocketWizard AC9 adapter and the RadioPopper capability for controlling an AB power level is doing something different. I think (could be wrong) that they're taking advantage of the built-in power control that the AlienBees have for the Buff CyberCommander triggers.
Answer: I'm trying to use Yongnuo YN622C II on Alien Bees with a Pocket Wizard AC9 to set the power... It seems to work... :-) even if it's just a short house test and the Alien Bee makes some strange sounds...
Answer: Well 1st off yes you can use the YN622C 11 with the Alien Bees but you have to manually change power setting not able to do it by way of remote
Comment: Your answer isn't very clear. Can you elaborate ?
Answer: Ok, if you use the YN622C TX on camera and the YN622C on the YN flash you can control the flash with the TX, but when you use the YN622C with the b800 and the YN622C TX, you have to manually change the power output by hand not the TX


What protocols did the ARPANET use?

Question: The ARPANET is often mentioned as the Internet's precursor.  But what protocols did it run with if not TCP/IP?
Answer: One of the greatest treasures produced by DARPA is probably the collection of early RFCs IENs and other public documents that record the development of the Internet. Try getting equivalent free documentation for ISO OSI or for proprietary technologies like Netware IPX/SPX. In part this is one important reason why Internet Protocols prevailed over the competition. The early RFCs were mostly concise, clear and easy to read and understand (this isn't so much true of later RFCs).
See RFC1
<code>   Information is transmitted from HOST to HOST in bundles called
   messages.  A message is any stream of not more than 8080 bits,
   together with its header.  The header is 16 bits and contains the
   following information:

           Destination     5 bits
           Link            8 bits
           Trace           1 bit
           Spare           2 bits
</code>
Comment: @grawity: Yes, the IENs are also interesting. For example IEN2 "We are screwing up in our design of internet protocols by violating the
principle of layering. Specifically we are trying to use TCP to do two
things: serve as a host level end to end protocol, and to serve as an internet packaging and routing protocol. These two things should be
provided in a layered and modular way. I suggest that a new distinct
internetwork protocol is needed"
Comment: The protocol went through *many* changes since RFC 1. One would need to read at least the first 1k RFCs (up until the NCP→TCP migration) to see how it looked at the end.
Comment: Thanks for that answer.  I've looked into the early RFCs but could not identify a name for the protocols described therein (other than IMP software).
Answer: http://en.wikipedia.org/wiki/Network_Control_Program
NCP was used in ARPANET before TCP/IP
It was fully replaced with TCP/IP in 1983, replacement started in 1981, https://www.rfc-editor.org/rfc/rfc801
Comment: That's what I was looking for

What protocols did the ARPANET use?


Windows 10 lock-out

Question: With Windows 10, how can I turn off 'Lock-out'?
If I am away from my computer for one minute, I have to re-enter my pin #. I would like to turn this off completely, or extend the time before it locks.
Answer:
Click the Start button.
Select Settings, then Personalization.
Choose Lock screen from the left pane.
Scroll the right pane down and click Screen saver settings.
Change the screen saver timeout. If no screen saver is selected, computer will just lock after this timeout.

Windows 10 lock-out


Optimization of Filter Coefficients to Given Word Length

Question: It seems to me that this is a difficult mathematical problem where research is still carried on:
Is there an efficient way to find fixed-point coefficients whose zeros are closest to those calculated from the given floating-point coefficients?
Comment: uh, that problem seems as old as DSP; I'd assume it's probably well-researched and available in literature. I'm no filter design expert, though, so I don't have great references.
Comment: @MarcusMüller, the OP can just break out a good textbook like [O&S](https://www.amazon.com/Discrete-Time-Signal-Processing-3rd-Prentice-Hall/dp/0131988425).  doesn't look real cheap, but maybe the OP can find one used because EEs taking this course in the 80s or 90s, some of them may have this book in their bookshelf collecting dust.  we all die eventually and i hope some appreciative EE gets my copy.  and there are libraries.  look up *"the effect of coefficient quantization"*.
Comment: Sebastian, probably the first thing to consider is the Direct I or Direct II forms and stick to 2nd-order (biquad).  look at the numerator and denominator of $H(z)$ separately and figure out where the poles and zeros are, as a function of the coefficients.
Comment: @robert bristow-johnson It seems that in O&S the subject how to round coefficients with respect to their zeros is not covered. [link This article] (http://link.springer.com/article/10.1007/s10958-012-0842-z) is probably nearer to the subject I'm investigating.
Comment: the effect of poles on the response of an LTI system is, of course, different than the effect of zeros.  but the effect of quantization of coefficients in the numerator of a transfer function is similar the same effect that quantization of denominator coefficients have on the pole locations (there are only two degrees of freedom in the denominator and three degrees of freedom in the numerator).  and with your transfer function factored down to biquads, that effect is as easy as solving the quadratic equation.
Comment: one more thing, the effect of quantization of coefficients on either poles or zeros depends a great deal on the filter topology.  like the lattice filter will have different ranges and quantization issues than a direct form filter.
Answer: It is definitely a difficult mathematical problem (integer programming), but I don't see much research going on in the DSP community. I do not know about the maths community. There were some important papers in the early 1980's on the optimum design of FIR filters with quantized coefficients:

D. M. Kodek, "Design of Optimal Finite Wordlength FIR Digital Filters Using
Integer Programming Techniques," IEEE Trans. ASSP 28, 304-308 (1980).
D. M. Kodek and K. Steiglitz, "Comparison of Optimal and Local Search Methods
for Designing Finite Worldlength FIR Digital Filters," IEEE Trans. Circuits Systems 28, 28-32 (1981).

But as far as I know none of the published methods developed into a standard design method for filters with quantized coefficients, unlike for the design of filters with infinite precision coefficients (e.g., Parks McClellan).
I think there are two reasons for that: first, optimum methods use integer programming techniques, which are computationally inefficient, and which will only compute a local optimum that can be arbitrarily bad. These problems become aggravated for large filter lengths. Second, there is not so much need anymore for the optimum design of filters with quantized coefficients. This has to do with the fact that more and more systems are implemented in floating point, and - if fixed-point is needed - the word length is usually large enough such that suboptimal heuristic design methods are sufficient. Such methods iteratively design the filter assuming infinite precision, quantize the coefficients, check the filter properties and, if necessary, adapt the specs (including the filter length, error weighting, etc.), re-design the filter according to the new specifications, and so on, until the requirements are met.
For IIR filters, the optimum design for quantized filter coefficients is even more difficult than for FIR filters due to the rational transfer function. I haven't seen any useful optimization methods in the DSP literature, only heuristic methods such as the one described above. Note that different filter structures will result in different possible pole locations in the complex plane after coefficient quantization. The possible pole locations for the direct-form structure are relatively sparse at small pole angles, i.e., for low cut-off frequencies, whereas the pole locations of the coupled-form structure are evenly distributed on a rectangular grid.
Comment: @LaurentDuval: Thanks for pointing that out; I haven't heard of those methods yet, so I don't know if they are applicable to IIR design with integer coefficients.
Comment: Could the reference I gave in the comment to the question be a starting point to investigate for such an optimizer or am I completely wrong?
Comment: @SebastianGutzwiller Sure it could. It's probably rather theoretical and not directly applied to the filter design problem, but obviously a FIR transfer function is a polynomial. I'm not sure, however, if the paper deals with any optimization strategies or if it just describes the change in zero locations due to coefficient quantization. If you're looking for efficient strategies, I guess resorting to heuristic methods is a good starting point.
Comment: Recently, optimization methods based on a hierarchy of semi-definite programming relaxations have been shown to handle "rational fraction functions" under polynomial constraints. The latter may treat discrete variables.  Do you have  knowledge on their applications to IIR design with finite-word-length?