Can we do sine , cosine , tan and cot transformation in regression?

Question: Can we transform the variables of a regression in MLR to sine , cosine, tan
Then how to interpret the results if I get a good $R^2$ and good adjusted $R^2$
Comment: To sriram, whenever you undo the edit to your post, do have a reason why you were doing the same and whether it increased the readability further.
Comment: I don't understand what is being asked. Transform which variables? Dependent or independent? Or both? What is meant by "can"? Can you compute $\operatorname{tan}(n + \pi/2)$ or $\operatorname{cot}(n\cdot \pi)$?
Comment: Also, the answer depends on what you want to do with the regression. If you are interested in hypothesis testing over the coefficients, some transformations may possible invalidate the results. So, without further details, this is not answerable.
Answer: Yes. In particular, sine and cosine are not just convenient but often natural as ways of handling predictors in problems with periodic structure, in which at least some variation can be related to time of day (clock), time of year (calendar), or spatial direction (compass). See for example this paper as an introductory review. Interpretation is often straightforward, so that with compass direction in particular, sines and cosines are associated with East-West and North-South effects respectively, assuming that direction is measured conventionally with $0^\circ \equiv 360^\circ$ as North.
If you are modelling e.g. more or less direct or indirect effects of time of year, reflecting climatic variations, you may be lucky to find that even one (sine, cosine) pair of predictors works very well or at least helpfully. Other way round, modelling say effects of seasonality in socio-economic data may require several (sine, cosine) pairs, thus resisting simple interpretation. For that and other reasons people in economics or business may be more inclined to reach for a bundle of indicator variables to match religious or civic holidays, vacation times, and so forth. Time of week, although often obvious in effect, also tends to call for indicator variables, not sines and cosines.
Tangent and cotangent are much less common as transformations in regression in my experience. I would be especially wary about working with tangents if arguments were even close to odd multiples of $\pi/2$ radians or its equivalent. There is a similar pitfall with the cotangent for arguments that are even multiples of $\pi$ radians.
Comment: I'll share anecdotally that using day of the week as a mixed effect *sometimes* has had better test error than a superposition in forecasting resource demand.
Comment: Short but concise thread. I also never come across any motivation of tangent transformation, let alone use of it. +1.
Comment: @quarague (1) Often arctan is used.  Anyone presented with an analysis based on the arctan should therefore feel free to apply the inverse transformation if they feel that would improve the analysis or be more interpretable. (2) Observations are made of the rotation angle of a rotating lighthouse. If you wish to make a feature of the position of the point on shore that is illuminated, you will perform a tangent transformation of the angle. With this example in mind, you will be able to conceive of many other potential applications of a tangent transformation.
Comment: In pure maths tangent and its inverse arctan are sometimes used to get a continuous bijective transformation from the entire real line to a finite length interval. Abstractly that could be useful for regression analysis as well but I don't have a specific example.


How to Build finite state machine that show modulus 4 in binary

Question: Can someone show me how to build a finite state machine that shows modulus 4 in binary?
Answer: Well, a binary number mod 4 is going to be 0 if the last two bits are 00, so that's where you'll want to start. Just think what adding another 1 or 0 to that will do to the last two digits, and do that for each possible state.
Answer: I'll leave you with this (big) hint: think about how many possible results you can have in modulus-4. Once you know that, you'll know how many states your machine can have.


Will newer lenses work completely on a Canon 5D?

Question: I have a Canon 5D and been using older lens on the camera. But I never bought a newer lens since I was afraid that the hardware (image stabilizer, focus, etc..)  on the newer lens won't work with the older software/hardware on the body. Has anyone tried it out? If so can you tell me your experience with the camera.
Answer: All Canon EF (not EF-S) lenses will work with the camera. What kind of experience you are looking for? It is a fine camera. Current 5D series models have faster autofocus, less noise and higher resolution than the original 5D.
Comment: I was just wondering cause I don't want to spend more money into a newer camera when the old one is just fine. Since most of the image quality (from what I understand) comes from the lens.
Comment: The image quality comes from both. Whether camera or lens is a better investment for you depends on the style of photography, your typical print sizes and quality of your current lens. Perhaps you could rent the latest 5D and a lens of your choice, do your own comparison mixing your old and the new and get a feel for the new equipment. You will see what is making bigger difference on your own eyes, which is better than any internet advice or review...


Is there a way to broadcast a bitcoin transaction without internet access?

Question: I am trying to understand if there are ways to do this.
Answer: Yes. An offline device can create transactions as long as it knows about the funds it can spend and has the corresponding private key. Once it's signed, the transaction cannot be changed without invalidating it. Most transactions are fairly small, usually less than 1 kB, but any standard transaction will not exceed 100 kB.
You basically just need to find a way to get it to anyone else with internet access. You could e.g.:

put it on a USB stick, and carry it to a computer with internet
print it on a QR-code, have someone with internet scan and submit it
send it via SMS
send it via ham radio
…

You can even synchronize an offline computer: there is a satellite that streams the blockchain. So if you have a satellite kit linked up to your computer, you can keep your node synchronized with the network without internet.
Answer: Seems nitpicky, but I'm going to distinguish between

the Signing wallet client,
which can be fully "cold", offline and from a security POV should be
air-gapped e.g. a hardware wallet, since it was likely exposed to the original seed, and certainly holds the private keys, and
the Broadcast wallet client,
which by definition needs to be "hot" or Online in order to communicate the signed transactions out onto the peer-to-peer BTC network of participating nodes.

Now, you may be running your own full node instance, but your signed raw transaction is not really "broadcast" in any sense, until it has reached many nodes around the internet, until it gets incorporated into a block.
The mode of transportation of that transaction data string between those two wallet-clients may be via data storage device, USB or SD card. It may use a QR code, which is probably most secure, or a Bluetooth or NFC channel, or indeed satellite, ham radio or SMS, but that data getting put out to the peer-to-peer Bitcoin node network requires connecting to the internet—that is from a practical POV intrinsic to the definition of the broadcasting step.
Comment: Thanks for the improvements Murch!


Caller of action detail in code

Question: I need to check Account of caller action ,as in ethereum we have a concept of msg.sender to get the caller eth_address, similar is there a way to get caller of action details in EOS.
Answer: this question has been asked before.
see the answer in the link below:
Account of caller of action
moderators will have to close this as a dupe

Caller of action detail in code


About Code Density and its definition

Question: I have a conceptual question: What means "high" code density? and why is it so important?
Answer: Code density refers loosely to how many microprocessor instructions it takes to perform a requested action, and how much space each instruction takes up. Generally speaking, the less space an instruction takes and the more work per instruction that a microprocessor can do, the more dense its code is.
I notice that you've tagged your question with the 'arm' tag; I can illustrate code density using ARM instructions.
Let's say you want to copy a block of data from one place in memory to another. Conceptually, your high level code would look something like this:
void memcpy(void *dest, void *source, int count_bytes)
{
    char *s, *d;

    s = source; d = dest;
    while(count_bytes--) { *d++ = *s++; }
}

Now a simple compiler for a simple microprocessor may convert this to something like the following:
movl r0, count_bytes
movl r1, s
movl r2, d
loop: ldrb r3, [r1]
strb [r2], r3
movl r3, 1
add r1, r3
add r2, r3
sub r0, r3
cmp r0, 0
bne loop

(my ARM is a little rusty, but you get the idea)
Now this would be a very simple compiler and a very simple microprocessor, but you can see from the example that we're looking at 8 instructions per iteration of the loop (7 if we move the '1' to another register and move the load outside the loop). That's not really dense at all. Code density also affects performance; if your loops are longer because the code is not dense, you might need more instruction cache to hold the loop. More cache means a more expensive processor, but then again complex instruction decoding means more transistors to decipher the requested instruction, so it's a classic engineering problem.
ARM's pretty nice in this respect. Every instruction can be conditional, most instructions can increment or decrement the value of registers, and most instructions can optionally update the processor flags.  On ARM and with a moderately useful compiler, the same loop may look something like this:
movl r0, count_bytes
movl r1, s
movl r2, d
loop: ldrb r3, [r1++]
strb [r2++], r3
subs r0, r0, 1
bne loop

As you can see, the main loop is now 4 instructions. The code is more dense because each instruction in the main loop does more. This generally means that you can do more with a given amount of memory, because less of it is used to describe how to perform the work.
Now native ARM code often had the complaint that it wasn't super-dense; this is due to two main reasons: first, 32 bits is an awfully "long" instruction, so a lot of bits seem to be wasted for simpler instructions, and second, code got bloated due to ARM's nature: each and every instruction is 32 bits long, without exception. This means that there are a large number of 32-bit literal values that you can't just load into a register. If I wanted to load "0x12345678" into r0, how do I code an instruction that not only has 0x12345678 in it, but also describes "load literal to r0"? There are no bits left over to code the actual operation. The ARM load literal instruction is an interesting little beast, and the ARM assembler must also be a little smarter than normal assemblers, because it has to "catch" these kinds of instructions and code them as a value stored in the object file and an indirect load of that address to the requested register.
Anyway, to answer these complaints, ARM came up with Thumb mode. Instead of 32 bits per instruction, the instruction length is now 16 bits for almost all instructions, and 32 bits for branches. There were a few sacrifices with Thumb mode, but by and large these sacrifices were easy to make because Thumb got you something like a 40% improvement in code density just by reducing the instruction length.
Comment: Excellent answer. Really excellent.
Comment: Don't forget to mention Thumb2, which is an even larger improvement for most applications.
Comment: Very interesting read. I'm learning a lot just reading questions and answers on this site.
Comment: Thank you very much Andrew, excellent answer, it helped me a lot with my doubt :)
Comment: This could also do with a short mention of how code density is affected by RISC vs. CISC (with RISC generally being lower than CISC as CISC architectures tend to have more instructions that can do more but may result in longer/more complex pipelines while RISC is focused on simpler instructions that allow simpler pipelines, thus RISC code density is lower).
Answer: The "code density" of an instruction set is a measure of how much stuff you can get into a given amount of program memory, or how many bytes of program memory you need to store a given amount of functionality.
As Andrew Kohlsmith pointed out, even on the same MCU, different compilers can get different code density.
You might enjoy reading
"Insects of the computer world" by Miro Samek,
which compares a variety of MCUs.

About Code Density and its definition


What are the computer-like objects in the Emperor's throne room?

Question: In Return of the Jedi, the Emperor's throne room contains these clusters of what appear to computer panels. What is the purpose of these? How can they be accessed?

Answer: These are described as "Duty Posts" in the Star Wars: Inside the Worlds - Complete Locations factbook. Apparently they lift up to allow access from underneath.

The Wookieepedia article on Command Sector Duty Posts contains a wealth of detail about their operation, all copied almost verbatim from the Haynes Death Star Manual (which itself seems to have been cribbed from the earlier Death Star Technical Manual, created as a supplement to the Star Wars: RPG)

On the Death Stars, those who man the stations have a rank of
  lieutenant or higher, and two to four can be stationed at any time.
  These served as a "mini bridge" for the commanding officer(s) in
  question. They were extendible at the base to allow access to the
  assigned commanding officer(s).
The duty posts were surrounded by eight control boards, four of which
  were dedicated to the particular tasks assigned to the post, and the
  remainder handled communications, damage and diagnostics, computer
  access, as well as a direct feed to the post's computer access. Within
  the post was a ventilated base. The eight boards specific functions
  included two duty monitor modules, two command interface modules, one
  computer access module, one communications module, one secondary
  computer access module, and one damage control module. On the duty
  monitor module were several instruments, including a security lockdown
  lever. The computer access module possessed several instruments,
  including two viewscreen buttons. The communications module contained
  several instruments, including process state indicators and a secure
  comlink. The command interface module contained several instruments
  including a command authority verifier. Lastly, all of the modules
  have red blinking lights on the exterior edge of the module that acted
  as module status indicators.
Comment: @1252748 - Or selling a phone without a speaker jack?
Comment: @Axelrod - I assumed these were electronic drumkits, for when the Emperor wants to [drop a sick beat](https://www.youtube.com/watch?v=qXp8T097vjc&feature=youtu.be&t=2m1s).
Comment: Interesting. Lifting up is such an odd way to provide access. Still, a better design choice than selling a computer without an escape key. Thanks for the detailed answer.
Comment: Daft Punk Posts.
Comment: @Valorum That was magnificent.
Answer: Control Panels for workstations no longer in use. You would stand in the center, turn to each view screen and either monitor or activate doors/lifts/etc. There is no one there because of the impending confrontation, or maybe the controls are no longer in use, but they were at one time controlling something. One of those panels will slide to the side to allow someone to enter.
Look at the star destroyers or other control panels in different ships. Nothing is exactly like this, but there are some control stations that do look like these.
Comment: Good answer, but can you provide a reference to the source you got it from?
Comment: The tower in which the Emperor had ensconced himself was not designed as a throneroom; it was originally to the be command center for the DEATH STAR, where presumably Moff Jerjerrod would be in charge.  When the emperor took over, the staff who would have been working in the tower were relocated elsewhere.  Sketches showing the original work setup for the tower were shown in the Return of the Jedi Sketchbook, with operators sitting in the workstations.


How to merge the remote branch and ignore the config setting?

Question: I working on a cms project and using a open source cms that hosted on github , how can I fetch the latest commit remotely to my working copy without overwrite some of my local setting ? example my database setting etc ?
Answer: I always recommend a filter driver with:

a template for those setting files (versioned in Git)
some files with the right values depending on the environment
a script able to build the actual setting files (as a 'smudge' script)

See "How to keep different content of one file in my local and github repository?" for more details.
Comment: but i got no control to setup the template file ? since the cms is clone over from github ?
Comment: @Knight: the template and value files are additional files you can add to the repo. You need to have a script able to detect the current environment in which the repo is cloned in order to build the right setting files.
Answer: It's usually best to remove those files from the repo and add them to your .gitignore.  You can then make the app gracefully handle missing configs by generating a default file.  Failing that, you can provide an "example" config file for the user to copy and edit.


Did I cause problems removing outlet?

Question: I removed an electrical outlet by simply disconnecting three wires (ground, hot, and common) and isolating the end of each wire with electrical tape. I have covered the hole and finished the paint work. Now I noticed that a few switches and outlets on another floor of the house stopped working (my non contact voltage detector shows outlets are hot, but connected devices don't work). How can I tell if what I did caused the problem?
Comment: Check any and all GFCI outlets  and check the breaker panel to make sure you didn't accidentally trip another breaker when turning off the one that controlled your circuit.  Are you sure you only disconnected three wires and there were no daisy chained outlets, switches?
Comment: For safety's sake, best practice is to cap each of the wires with a wire nut and then use a piece of electrical tape to hold that securely (since a single wire often doesn't hold securely in a wire nut). If the ground wire is green then treat that the same way, but if it is bare wire then you don't need to tape or wire nut it.
Answer: You disconnected wires that were hot, wrapped them with electrical tape, and buried them in the wall after removing the junction box. You're not allowed to do that.
You can't terminate live wires anywhere but a box.
So you have 3 choices.

Follow the cable to wherever it goes, positively identify that it that same cable, and remove it from there also, pulling the entire cable out of the wall (or at least, as much as it's possible to remove).  That permanently removes the cable from service.
Route the cable to a place where you can put a junction box, bring them into the box nice-n-legal with appropriate cable clamps, secure them, and then put a blank junction box cover on it.  Or a recep if you want.
Use a Tyco style in-wall splice to extend the cable to somewhere you actually do want a receptacle, fit a box there, and fit a recep there.  This may help with the next part.

Every point on a wall must be within 6' of a recep
(that means following the wall and rounding corners, but not crossing thresholds; presuming the person will lay the appliance cord along the wall perimeter.  Standard cords are 6' long).   So what can happen when you remove a recep higgledy-piggledy, is now you leave a significant part of your wall inaccessible to any receptacle.  That's a code violation.
It is even a code violation if your site is grandfathered to before that was a requirement: you're not allowed to make things worse.
As far as the other circuits breaking
I think there's more to this story.  I think there were more wires than the ones you have mentioned.
Answer: If you removed only ONE wire of each color from the receptacle, then it should not have been an issue. But if you removed TWO wires of the same color, they should have been reconnected with a wire nut, otherwise you broke the continuity of the circuit. Sounds like you may have done that with the common (neutral) wire.
If you also just closed up the hole with a patch and painted over it, that was illegal. Once there is a box that has connections in it, you are required to provide access to that box to periodically check the connections. You can put a blank cover plate on it, but you cannot bury the box and connections into the wall and hide it.
Answer: You should be ok and definitely use a wire nut and then electrical tape to terminate the end as suggested. You may want to confirm with building codes on what is the proper way to terminate and cover i.e. face plate, wall board, plaster and paint.
Comment: This should be a comment, you are not answering the OP question.

Did I cause problems removing outlet?


How to use Stoke's theorem to evaluate a line integral that's not in the form $\int_{C}\vec{F}\cdot d\vec{r}$

Question: I'm trying to compute the line integral $$\int_{C}(y-z)\,dx+(z-x)\,dy+(x-y)\,dz$$ where the curve $C$ is the intersection of the cylinder $x^2+y^2=1$ and the plane $x−z=1$. I know how to do this directly by parametrising with $\vec{r}(t)=(\cos t, \sin t, -1+\cos t)$ for $t\in [0,2\pi]$ and then substituting in for $dx$, $dy$ and $dz$, although the solution I've seen says to look at $\int_{C}\vec{F}\cdot d\vec{r}$ but how would I do this and simlilarly how would I use Stoke's theorem if it's not written as $\int_{C}\vec{F}\cdot d\vec{r}$?
From the solution, it looks like they've chosen $\vec{F}=(y-z,z-x,x-y)$ which is obviously taken from the original integrand, but I don't see why this should be true? Wouldn't I have to look at the following integral, work out the right hand side and try to match things up? $$\int_{C}(y-z)\,dx+(z-x)\,dy+(x-y)\,dz=\int_{C}\vec{F}\cdot d\vec{r}$$

Edit: Never mind, I figured it out. I didn't realise $d\vec{r}=(dx,dy,dz)$ as I'd only seen the definition as  $\int_{C}\vec{F}\cdot d\vec{r}=\int_{a}^{b}\vec{F}(\vec{r}(t))\cdot \vec{r}'(t)\,dt$. My bad!
Answer: You can use Stokes' theorem.
The curve $C$ bounds an elliptical disc $E$. The normal $n$  to the plane of $E$ is $(-1,0,1)$, up to sign.
Since  ${\rm curl}(F)=(-2,-2,-2)$ is constant Stokes' theorem gives
$$\int_C F\cdot dr=\int_E{\rm curl}(F)\cdot n\>{\rm d}\omega=\pm(-2,-2,-2)\cdot(-1,0,1)\>{\rm area}(E)=0\ ,$$
so that we don't have to bother about the orientation.


Moving Perforce folder to another server

Question: How do I move a folder to completely different Perforce depot on a completely different server  but preserving history and changes?
Answer: Splitting and merging portions of Perforce depots from separate servers can be done, but you will need the assistance of Perforce technical support, so contact them!
A substantially simpler solution is to retain the two separate servers, and use a Remote Depot definition so that you can access the files in Server A from client workspaces connected to server B. That way, your users mostly see things as though there was a single server, when in fact there are multiple servers.
Answer: You don't really need the help of perforce tech support.  If you have administrators, you may need them to set up a target depot and/or provide access, but the basic task is performed using functions available to the general user.  Here's what I would do (in a nutshell): If you open a P4V session and select the submitted changelists tab, you can filter this set to show only the changes that relate to the section you want to move. This is the change set you will duplicate on the new depot (or even server) that you want to populate. The idea is that you are unraveling the archive files on one side and winding them up in the identical way at the destination. So the process is simply (1) syncing to the first changelist, (2) integrating that set across to the new location, (3) checking that set in, and (4) repeat for all subsequent changelists in order until done. Obviously this can be scripted. I am currently in the process of working a script up in python, but any decent scripting language with Perforce function libraries will work. A couple of complications: The changelists will be sequentially the same as the originals, but the original times will not be preserved - they will be "current". And of course if there are labels, you'll need to map that out in the new location if you want them preserved.


How to show $\sum a_n$ cannot converge absolutely if lim $(\sqrt{n} |a_n|) = L, L >0$

Question: I'm trying to show that if  lim $(\sqrt{n} |a_n|) = L, L >0$, then $\sum a_n$ cannot converge absolutely. I'm trying to work it from the definition of a limit that for any $\epsilon > 0$, there exists an $n$ such that $|\sqrt{n}|a_n| - L| < \epsilon$, but I'm not really sure how to use this. What technique should I be using to prove this?
Answer: There's a general theorem which states: If $a_n \geq 0$, $b_n > 0$ and $\lim_{n \rightarrow \infty} \frac{a_n}{b_n} = L > 0$, then $\sum a_n$ converges if and only if $\sum b_n$ converges. (You should try to prove this).
In this particular setting, you can use the sequences $|a_n|$ and $1/\sqrt{n}$. Then:
$$\lim_{n \rightarrow \infty} \frac{|a_n|}{1/\sqrt{n}} = \lim_{n \rightarrow \infty} \sqrt{n}|a_n| = L > 0$$
Then since $\sum 1/\sqrt{n}$ diverges, so does $\sum |a_n|$
Answer: Your definition of limit isn't quite right: it should be "for any $\epsilon>0$ there exists an $m$ such that $|\sqrt n|a_n|-L|<\epsilon$ for every $n\geq m$.
Hint: use this to show that if $\lim(\sqrt n|a_n|)=L$ then there exists $m$ with $|a_n|>\frac{L}{2\sqrt n}$ for $n\geq m$, then use the fact that $\sum\frac 1{\sqrt n}$ doesn't converge.
Answer: we are given the condition that $\lim_{n\rightarrow\infty}\sqrt{n}|{a_n}|=L>0$.
then for $\epsilon=\frac{L}{2}$, there exists an $N$ such that $n\geq N$ implies $|\sqrt{n}|a_n|-L|<\frac{L}{2}$.
Then for $n\geq N$, $|a_n|\geq\frac{L}{2}\cdot\frac{1}{\sqrt{n}}---(*)$.
Therefore if we sum over $n$ greater than $N$, the RHS of the (*) diverges.
So $\sum a_n$ does not converges absolutely.


web application design strategy on app engine

Question: I'm trying to develop a gaming site. User can add other users as their friends. User will get points as he completes various game levels. Now I need to show the average points of all user's friends who had already played the game on its page(example: When a user plays a game A, average of points earned by his friends shall be displayed on the game A page. Similarly game B average points of his friend's shall be shown when he plays game B).
My approach:

Store user's friend list(Max 1000) as multi-valued property in datastore and load it into
GAE memcache when user log's into site.
Use resident backend to cache all the user's game data(points earned for
each specific game). A cron job updates the backend cache every hour.
When user requests for a game page(eg: game A) for the first time, request handler contacts backend for computing average of friends points via URL-Fetch service.
Now backend gets the friends-list(Max 1000) of user from memcache, fetches game A points of friends from in-memory cache(backend cache) and returns the computed average.
Request handler after getting the average, persists it in datastore and also stores it in memcache so that subsequent requests to game A page fetches data from memcache/datastore without computation overhead on backend. This average is valid for 1 hour and re-computed again after that upon next request to game A page.

My questions :

Is the above mentioned approach a right way to solve this problem ?
How to implement an in-memory cache efficiently and reliably with backend instance (python-2.7) ?
How to estimate memory and cpu required at backend for only this job ? (Assuming 0.1 million key-value pairs have to be stored with "userid/gamename" as key and user-points as value. User friend list max size is 1000.)
If I have to use multiple backend instances as the load increases, how to load balance them?

Thanks in advance.
Answer: Have a look at this blog post from Nick Johnson, about counters : http://blog.notdot.net/2010/04/High-concurrency-counters-without-sharding
Use NDB datastore for :
- automatic caching, instead of your own memcache
- NDB has some new interesting properties like : json property with compression, repeated propeties, which act like Python lists
And have a look at mapreduce for efficient updating.
Comment: Firstly, I thought of own cache for storing all the user points instead of GAE memcache because the later is not reliable(most of user friends data may be evicted). For computation of average score, I need to fetch ~1000(max) friends game points for each user. This is not practical from datastore within time limit(1 min) and if I use GAE memcache,there is possibility that most of data will be evicted as it is not hit frequently. Once I compute avg  I shall persist it in NDB datastore. Subsequent requests fetch average from datastore/memcache without computing.


In linear regression, why is the T-value the same whether or not I standardize the dependent and independent variables?

Question: I standardized my x and y variables by subtracting the mean and dividing the result by their respective standard deviations.  I thought this operation "fixes" (i.e., normalizes) my data, but I noticed the regression t-value that's produced in R is the same using either method.  I'm just curious if anyone can explain the intuition behind that.
Comment: Think of the $t$-value as a measure of deviation from the null $H_0: \beta_i = 0$ in this case. Would multiplicative or additive transformations change those?
Answer: Are you familiar with a typical t test for the difference between a mean and a hypothesized mean? In that test you subtract the mean and divide by the standard deviation to get the T-value.
It's the same in this regression, when you don't standardize your x and y variables the regression t test is doing it for you. If you do standardize the x and y variables beforehand then you've set the mean to 0 and the standard deviation to 1, now when the regression T-value is calculated it involves subtracting 0 and dividing by 1 so it will stay the same.
Your data doesn't actually need "fixing" for linear regression. The fixing can help in cases where, for example, the mean and standard deviation are very large and the analysis would involve numbers larger than the computer can store. The fixing makes all the numbers a suitable size and avoids numerical instability.
Comment: In addition it would be a large drawback of linear regression if such simple data scaling would change the conclusion, it shouldn't make a difference if we measure in euro or dollars (luckily this is not the case)
Answer: The t-value gives the distance in units of standard error between the reference mean and the comparison mean.  It does not matter what actual numbers you have, only the difference between those two numbers.  If you change the units, the distance is the same, so your t-value and the area of the curve excluded by that t-value is the same.


Why does my I/Q data from radar are not centered?

Question: I am working on the IQ raw data from FMCW radar. I plot the I and Q data, they seem to be strongly shifted from the center. And the amplitude of I and Q also varies. I don't understand why it looks like this. I think, they should local on the center and with fixed amplitude.
Thank you very much if someone can help.
Answer: The IQ data from an FMCW radar would have the frequency difference from the delay between the transmitted and reflected signal given the transmitted signal is a changing frequency with time; so the result is what should be expected. Given the ramp rate of frequency the round trip delay from target can be determined from the frequency of this result.
The result here appears to have a stronger higher frequency AND lower frequency tone as the result of two different targets. The lower frequency that is superimposed would be due to the closer target.
Comment: Thank you for your answer.  I still get confused. I understand the distance is measured from the IF signal. But why is the IF signal is not symmetric along x - axis. some of it is shifted up and some down, like a huge wave.
Comment: You plotted the _time domain_ IF signal, which is made out of a superposition of sinusoidals (plus noise). The _frequencies_ of these sinusoidal components correspond to the distances of objects. To see the frequency spectrum, do an FFT of the signal and plot the magnitude. You should see peaks at the frequencies that are in the signal. Judging by the graph you posted, it looks like you have a lower-frequency and a higher-frequency component.
Comment: ok. Thanks. Then I think the shift is mainly caused by noise. I care more about the phase instead of its magnitude. So I wanted to understand, whether the shift in I/ data is normal and how would it affect the phase of the signal.
Comment: @elise I really don't think it is noise but from the effects we stated. Each target will result in a different frequency and typically you would resolve and track targets from an FFT of your IF signal. Each frequency is a linear phase with time, and each frequency would correspond to a different reflected signal at a different time delay.


What exactly is 'osobaya sayanskaya' in House of Cards S03E03?

Question: In the S03E03 of House of Cards, the Russian president brings this vodka for the US president. Is this real or just a made up vodka since I couldn't find any results on google.
Cheers!
Comment: Do you by any chance know how to find a freely available image or video clip of it? I'm guessing the current answer might be based on similar appearances, but I haven't seen the show.
Comment: No image, @Jolenealaska uploaded one in her answer though.
Answer: Nope, it appears to be totally fictional.

It's referred to as $750,000, with a bottle of gold.
That could be real, except that it doesn't appear to be.
You can spend that much on a bottle of Russian vodka, but none of the bottles look like that.
10 Most expensive vodkas
Comment: Wow.. I wasn't expecting to get any answers, I am overwhelmed with the responses.
Yes, he mentions it is worth $750,000. That link, nice find! Thanks!
Answer: Osobaya Sayanskaya literally translates to Sayanskaya Deluxe or Special Sayanskaya, possibly implying that its origins are in the Sayan Mountains region. There is no real brand of vodka like that, although Sayanskaya Kristaljnaya (Crystal Sayanskaya) vodka does seem to exist. It's not at all famous or of known special quality however.
Answer: No, it's not real, but it was probably based on russobaltique vodka.


gridpane resize

Question: I want a gridpane layout as in the attached image. Anyone know how to this or am I using the wrong layout?
Answer: You can control how different rows and columns in a GridPane grow using column and row constraints.
The way to do this is to set the hgrow property of the first column to ALWAYS, and the vgrow property of the first row to ALWAYS - this means the top left cell will always expand. You can either set the other cells to fixed widths/heights, or otherwise they will expand to fit their contents and no more.
I've included an FXML example with the GridPane inside an AnchorPane, and anchored to the top, left bottom and right of the AnchorPane. This means that the GridPane will grow to fill the parent AnchorPane:
<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.*?>

<AnchorPane id="AnchorPane" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml">
  <children>
    <GridPane AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
      <columnConstraints>
        <ColumnConstraints hgrow="ALWAYS" />
        <ColumnConstraints prefWidth="150" />
      </columnConstraints>
      <rowConstraints>
        <RowConstraints vgrow="ALWAYS" />
        <RowConstraints prefHeight="150" />
      </rowConstraints>
    </GridPane>
  </children>
</AnchorPane>

This results in the layout shown here, and expands to fill the parent pane:
Comment: I figured out how to do it without using XML. Thanks for answering my question.
Comment: I used your recommended method.
Comment: Is there a way to set HGrow by java codE??
Answer: Turns out what I am trying to do requires AnchorPane and GridPane.

gridpane resize


How can I execute commands in a text file?

Question: I have a bunch of commands seperated by \ns that I'd like to execute serially (from the command line) in a file called ec2-env-setup. I'd appreciate any help.
Answer: This is called a script.
Right click on the text file, select properties, select permission, mark the "Let this file be executed" text box. Now you can execute it just by double clicking on the file.
You can also do it from the console like this:
sh ec2-env-setup.

Or change the permissions and afterwards execute it:
chmod u+x ec2-env-setup.
./ec2-env-setup.

Answer: You need to make it excecutable:
chmod +x ec2-env-setup

And then run it (this will work if you are in the same directory as it, otherwise, use an absolute path).
./ec2-env-setup

Answer: Just for future reference, and to counter some of the command-line love going on here :-)
you can also open the Properties of the file, select the Permissions pane and enable the Executable flags. If you then double-click the file, it'll let you run it as a script.
You might want to run it in the Terminal though if you'd like to see the output.
You can also create a Launcher. Right click on the Desktop and select Create Launcher to do that.
Answer: well i will answer my own question i posted here before and deleted as i found the answer. my file did not execute but just openend...
if file does not execute you might need to set preferences. for that:
click any folder, go to menu edit, choose preferences,click behavior tab, check "run executable textfiles when they are opened". doubble click the file to execute...


Is Quicktime always pre-installed on the Macintosh OS?

Question: Does the Mac come with Quicktime pre-installed?
If so, what OS version (minimum) could be expected to have come with it pre-installed?
Answer: Every version of Mac OS X has QuickTime. QuickTime Pro is/was an optional paid extra, which included extra codecs and additional functionality.
The situation with "classic" Mac OS was rather more complicated, but I'm guessing you only care about OS X.
Comment: Additionally Mac OS X 10.6 came with QuickTime X installed, but the install disk also came with 7.6 so it was possible to have two versions of QuickTime installed. Can't remember the reason for needing the other version. Something to do with providing compatibility for older APIs or something.
Comment: One reason for the continued existence of QuickTime 7, I'd imagine, is to allow the people who bought the Pro licence and/or the QuickTime MPEG2 plugin to continue to use them -- some of those features have no equivalent in the simpler Quicktime X application.


How can I mount a small front light on my Garmin mount?

Question: I only ride outside during daylight hours, but I like to use a small front flasher light at all times. My current light is the type that attaches to the handlebar with a rubber strap. I recently added a Garmin GPS computer (Edge 530), and the mount is dual-sided. I would love to get a front light setup that uses the bottom Garmin mount attachment point. I've see adapters for GoPro-style mounts, but the only lights I've seen that would work with this are large, nighttime-type lights, not small ones.
Any suggestions?
Comment: "like to use a small front flasher light at all times." - please don't. Solid front light or none at all.
Comment: Does your light's lens still work if rotated by 90 degrees?
Comment: @whatsisname I read it as a "daytime running light" which is designed to be used in the daylight and doesn't necessarily have that horrid sharp flash.
Comment: To clarify the first point above: I plan to acquire a light. I'm not trying to fit one that I already have. For the second and third comments: As a cyclist _and_ car driver, I don't understand the aversion to blinking lights. I ride in an area where cyclists are not that common on the roads, and any means of making one visible to car drivers seems like a good thing.
Answer: There are few rechargeable lights with beam shaping and cut-off that may be mounted upside down. Cat-Eye has two in its G-Volt line that come with GoPro adapters. Lezyne also has a light for hanging mount.
GoPro mounts below Garmin (or other head unit) mounts are fairly common.
Below is a picture of a GVolt 70 mounted to a Sigma mount. No adapters or small parts were needed. Both were compatible out of the box. For beam characteristics and review (in German) see Boissier-Mohr's webpage
Comment: Hi @gschenk, this is what I am looking for in terms of how the light is mounted, but I am seeking a "safety" light to use in the day for sport riding/training, rather than a headlight to use at night. I simply do not ride at night.
For Cateye (e.g. GVolt 70), I did not see any such lights except the ones that use the typical rubber strap (which is what I am trying to get away from).
For Lezyne, the only light I found with a hanging mount is an "e-bike light", a bright, focused light that runs off the e-bike motor. Perhaps you could provide a different link?
Comment: As far as I know all CatEye lights with screw-on clamp use the same mount shoe. Maybe one of the small lights without shaped beam will fit it. The GoPro mount is an aftermarket part.
Comment: Since you need a light for _all times_ I suggest one of the larger ones however. A larger light, like mine, is also good during the day, but unlike a tiny one good at dusk or night. With the mount out there it's not in the way and I take it with me also for daytime rides.
Answer: I've built this mount out of some aluminium sheet I had lying around:

It uses the two existing holes in the bottom of the Garmin mount for two small screws. The heads of the screws are inside of the mount (they barely fit in the space below the topside mounting mechanism). The blue stuff is threadlocker.
Answer: Sometimes it is impossible to find exactly the combination of features you need in a small part.
Presumably you need a "quarter turn lock" receiver on top to mount with the underside of your garmin mount, and then below that some kind of round "bar" for the light to strap onto ?

But instead of the gopro mount in this picture, you want a round bar?

EDIT: I threw together two options:
https://www.tinkercad.com/things/3JgP5cwb8DF-garmin-to-strap-on-blinky-light-horiz

https://www.tinkercad.com/things/4mAmG1TMFpb-garmin-to-strap-on-blinky-light-vert

In this vertical one I'd suggest you use a ziptie or similar to stop your light dropping off the bottom on a bump.

I had something similar when trying to mount an airzound on drop bars to use from the hoods.
In the end I designed and printed my own mount.
https://www.tinkercad.com/things/iBoeeBqNPGq-stub-mount-for-drop-handlebar-for-airzound-horn-235-and-24mm
Comment: I'm not positive I got the correct lugs for a garmin underneath-connector.  Checking now...
Comment: Hi @Griggie, yes, the first picture is what I was thinking of. I'm trying to find a solution that does _not_ use the rubber-strap approach.
Answer: What about a Garmin mount/light combo?
On top is a Garmin quarter-turn mount with a small rechargable front light integrated inside the body.

Moon MX GPS Center Mount Rechargable Front Light
Comment: This is probably my favorite suggestion so far. See this made me also interested in the Cerberus rear light with a wireless link to the Moon front unit. However, the link only supports turning both on with one switch. I would still have to adjust the blinking on both separately. And the Cerberus appears to require removal of the rubber strap for recharging (another no-no from my point of view).


Flash overlay in IE

Question: I have a flash player on my website and I would like to add an overlay where I can insert HTML. The idea is that the div containing the flash will animate its opacity to 0.5 before display the HTML. I got this working great in Google Chrome and Firefox, but as always, IE is giving me a headache. I set wmode to opaque (and also tried transparent), but IE is behaving strangely. To make my div show on top of the flash video, I set its position to absolute and give it higher z-index than any other element.
The problem is that IE9 does not show the HTML I append to my div from jQuery. Fair enough, I can live with adding it from PHP in a hidden div. However, the big problems are that IE will not let me animate the flash player's opacity unlike Chrome and Firefox (and possibly other browsers) as well as let me interact with the flash player. When the overlay is displayed, the player is no longer responding when I click on it.
Some workarounds are needed for IE, but I have not been able to find a workaround for the opacity fading so far. Now for the code.
DOM:

    This is the overlay container

You don't have flash

JavaScript (jQuery): -- simplied for illustration purposes
// Animate opacity to 0.5
$('.videoWrapper').animate({ opacity: 0.5 }, { duration: 1000, queue: false, complete: function() { showOverlay(); } });

function showOverlay() {
    // Show overlay text
    $('.videoPaths').html('
This is the overlay text I want to show
');
}

CSS:
.videoPaths {
    position: absolute;
    top: 100px;
    text-align: center;
    width: 590px;
}

In the code above, the HTML that I append with jQuery is not shown, but like I said, I can fix that by adding it directly into the DOM, because then IE displays it. However, I would like the opacity animation to work, but IE9 does not appreciate it. Also, when doing like this, I cannot click on the player to start/stop the playback.
Any ideas? Any suggestions are greatly appreciated. Thank you in advance!
Answer: "When the overlay is displayed, the player is no longer responding when I click on it"
Yes, this is what happens when an html element is positioned on top of a swf; the swf is obscured so it can't be interacted with.
"IE will not let me animate the flash player's opacity unlike Chrome and Firefox"
IE is in general really bad at animating opacity, particularly IE8 (in my experience). The rendering engine actually seems to have gotten worse with later versions.
Comment: Yes, but it also stops responding even at the areas where the overlay does not cover, which I found quite strange. I agree with you on the last part; I could write many pages on how horrible IE is, but unfortunately many people use it, so it's a requirement to make it work. Luckily jQuery has helped us out a lot. :-)

Flash overlay in IE


Internal component Linking on outbound email

Question: I want to use existing components(Like News component, campaign components etc) for my newsletter mailings, and these components should point to the pages(respective detail pages) on which they have been linked as main components. Do I need to have custom link resolver for mailings?
Answer: If you track the Component Link (e.g. implicitly through the Post-processing TBB or explicitly by calling the GetLinkTrackingURL function), it will be resolved once people click on the link.
Basically, the link in the e-mail will point to the tracking URL you have configured on your Publication; said page will track the click action, call the Content Delivery Linking API to resolve the Component Link and redirect to the correct URL.
If there's a problem resolving the Component Link, it will instead redirect to the URL configured as the "ErrorResolvingLink" setting in cd_audience_manager_conf.xml.
Comment: Ok we are doing the tracking on links. Will test this. Thanks.
Comment: Hi Peter, I also have to use component linking in newsletter. I am able to redirect to the component URL by using GetLinkTrackingURL function. But while I am using tracking implicitly. Then I think there should be no use of adding this function. But it is not working. I have verified I am using XHTML in my newsletter. Please suggest me I don't want to use  GetLinkTrackingURL function?
Comment: Are you saying that when you just set the Post-processing TBB to track all links, your Component Links are not working? Could you clarify what the problem is? Does it not change the Component Links at all? Or does it correctly point to the Tracking page, but then redirect you to the error page?


Are there any cultures in which the "thumbs up" hand gesture is offensive?

Question: In the USA it's common to give a thumbs up to say "Yes, this is good" or "Thanks" or convey another appropriate positive meaning.
Are there cultures in which the "thumbs up" gesture a) would not be understood, or b) would be offensive to the local people?
Comment: I should tell my story when I did a thumbs up to a group of Iranian people, most of them were religious people or covered women. Man that was a story
Comment: @MeNoTalk Do tell..
Comment: Interesting question, but I fail to see how this is on-topic. Would be a better fit for: http://area51.stackexchange.com/proposals/66612/.
Comment: Among scuba divers it means lets go to the surface.
Answer: You can probably use Wikipedia to determine the exact implications of the gesture.  From the information:

In Afghanistan, Iran and parts of Italy, the gesture is regarded as an obscene insult equivalent to what the middle finger signifies in most of Europe, especially when combined with a sweep of the arms. In these places, it roughly means "Sit on my phallus" and carries the same stigma as does raising the middle finger in the west. The sign has a similarly pejorative meaning in parts of West Africa, South America, Iran and Sardinia, according to Roger E. Axtell's book Gestures: The Do's and Taboos of Body Language Around the World." In southern Sardinia, where this gesture is noted for being particularly obscene, a hitchhiker would be well advised not to wave his thumb in the air expecting a car to pick him up, or he may find himself under the wheels of a large truck.

Though it states that it may be offensive in Israel I haven't found this to be the case.
EDIT
As per the latest edit to the quoted Wiki page:

The sign has a pejorative meaning in parts of West Africa, Iran, and Greece according to Roger E. Axtell's book Gestures: The Do's and Taboos of Body Language Around the World. In practice, most Greeks nowadays recognize the positive connotation of the sign due to international exposure. Any perceived pejorative meaning of the past is lost in contemporary use. Despite that, the sign is still very rarely used by native Greeks for its positive meaning (and never for the pejorative).

The information may still be subject to change at a later date.
Comment: As an Italian, I've never heard of this being inappropriate in any part of Italy.
Comment: Good thing Facebook is blocked in Iran then, I guess. Wouldn't be so nice if the "Like" symbol meant "sit on my phallus." Afghans, I guess, will have to get used to it.
Comment: Update: I have asked two friends from different towns in southern Sardinia (both in the area around Cagliari) and they have never heard of that either.
Comment: @FedericoPoloni As I have mentioned to one of your countryment the only place mentioned is Sardinia.
Comment: I have lived in Venice and friends of mine have a picture of the pope giving a thumbs up, so I am pretty sure it means the same to them as it does to us..... either that, or the pope was really pissed at having his picture taken.
Comment: The paragraph you're quoting has disappeared from the Wikipedia article. It appears it wasn't exactly well-sourced...
Comment: I can't imagine Afghanistan or Iran will be getting much tourism.
Comment: Karlson, you seem to be suggesting that Kevin should have "just googled it". But Wikipedia's English-language bias and varying level of authenticity are well-known problems. It's totally reasonable for him to ask the question here, where original answers from experts (eg Sardinians) can be generated. (No original content allowed on Wikipedia, so a Sardinian would need to find a printed source to verify his/her personal experience).
Comment: @NajibIdrissi Updated with the latest version. :)
Comment: In 1982 in Israel I was told it was rather rude, about like the US middle finger, and that when hitchhiking the correct gesture was to point with the first two fingers in the intended direction of travel.
Answer: Not offensive, but in Malaysia you use the thumb to point at things (using the index is rude).
So, you would be pointing at the ceiling/sky.
EDIT: If needed, in Malaysia or Indonesia, use the "ring sign" from divers. I can not guaranty this would be understood in the mountain.
EDIT:
Of course, if you travel back to ancient Rome, this is an imperial prerogative. Don't do that. Unless you really are Cesar, that is.
Comment: I should note that [the "ok" sign can be offensive](http://www.huffingtonpost.com/gayle-cotton/cross-cultural-gestures_b_3437653.html) in other countries...
Comment: The "ring sign" meaning what's in English called "the OK sign"? _(Index finger touches thumb and the three other fingers spread out)_
Comment: I've never had a problem in Malaysia / Indonesia when pointing to things with my index finger.
Comment: @PhilPerry: I would hope most people anywhere in the world would realise that strangers from a foreign country might do strange things.
Comment: It's amazing that there aren't more international incidents caused by the use of a gesture that is perfectly innocuous in your culture, but horrific in another. Thumbs up/down, "OK", pointing at someone or yourself, rubbing fingers together ("money" in the US), even waving with your left hand. Best bet is to carefully read up on the subject before leaving your country. It almost makes one want to stay at home...
Comment: @JoshB Relax. pointing the index at an object in Malaysia is basically as rude as pointing the finger at someone in Europe. Good mannered people don't do it but they won't canne you for that :D

I've seen Indonsians pointing with the thumb, but usually, they use the index.
Comment: FWIW, In northern part of India, middle finger is used to point at things..
Comment: @chue the OK sign has been repurposed by white nationalists in the US and is no longer at all benign.
Answer: Regardless of what cultural norms have been in the past, the meaning of the thumbs-up sign is getting strongly influenced by the Internet. The biggest example is Facebook, which uses the gesture to indicate someone 'likes' a certain post:

With this in mind, I would no longer worry about misusing the sign anywhere except the most distant regions without access to the Internet.


Does creating games for the platform help the platform succeed?

Question: Does creating games for the platform help the platform succeed? Like if I create tons of games for 1 platform does it influence it? If not then what controls a platform's marketshare?
Comment: I think it does. I developed PC Games only for a while and look where the PC is now opposed to 3 years ago.
Answer: It certainly does for your own console once you finally make it. Every time I made a game for my console the sales of it rocketed.
As far as other consoles I wouldn't say so. PC naturally dips and then starts to get better, it could have been coincidental timing. The way the game is designed is such that you're supposed to take note of the market share of each console and work around it, rather than control it.
Comment: +1 I've noticed the same trend. There's no saving the G64.


memory allocation issues on ARM boards

Question: Does using memory allocation API such calloc / malloc cause issues on ARM based boards ? I recently faced a issue wherein I used calloc (1024 Bytes) and this buffer was used across many functions in a single source file. I observed the output of a particular function varied randomly when calloc was used, but when I switched over to a fixed array, the issue never showed up. Hence I am wondering if calloc has got any limitations on a small memory footprint board.
Answer: Assuming you get no error return from the calloc/malloc, the odds are about 9999 to one on that you have a bug, either due to misuse of malloc, misuse of the space so allocated, incorrect memory sections/placement or just because the fixed and malloced buffers will have different addresses.
Answer: This depends on your C library, which in turn depends on your compiler and chosen ARM device.
If you are using embedded Linux on ARM with glibc/uclibc then you should have no problems with malloc.
If you're programming "on the metal" with a limited libc, you should check the documentation to see how well supported malloc is. You may need to configure the heap in your C startup code.

memory allocation issues on ARM boards


Components which are not available for changeset

Question: Which components are not available in changeset for Migration?
Answer: The components available for a change set vary by edition. Click here!
Answer: See Unsupported Metadata Types:

Unsupported Metadata Types
Some things you can customize in a Salesforce organization aren't available in Metadata API.
The following components can't be retrieved or deployed with Metadata API, and changes to them must be made manually in each of your organizations:

Account Teams
Activity Button Overrides
Analytic Settings
Automated Case User Settings
Auto-number on Customizable Standard Fields
Campaign Influences
Case Contact Roles
Case Feed Layouts
Case Team Roles
Console Layouts
Currency Exchange Rates
Data Category Visibility Settings
Delegated Administration
Divisions
Email Services
Fiscal Year
HTML Document and Attachment Settings
Lead Settings
Mail Merge Templates
Mobile Administration
Mobile Users and Devices
Multiline layout fields for opportunity teams
Offline Briefcase Configurations
Opportunity Big Deal Alerts
Opportunity Update Reminders
Organization Wide Email Addresses
Partner Management
The following standard picklists: IdeaTheme.Categories, Order.Status,  >-  Question.Origin. (All other standard picklists are supported.)
Predefined Case Teams
Product Schedule Setup
Public and Resource Calendars
Quote Templates
Salesforce to Salesforce
Standard fields that aren't customizable, such as autonumber fields or system fields
Self-Service Portal Font and Colors
Self-Service Portal Settings
Self-Service Portal Users
Self-Service Public Solutions
Self-Service Web-to-Case
Site.com
Social Account/Contact Settings
SoftPhone Layout
Solution Categories
Solution Settings
Tag Settings
Territory Assignment Rules
User Interface Settings (except calendar features, which are supported in ActivitiesSettings)
Web Links on Person Account Page Layouts
Web-to-Lead
Comment: Welcome to SFSE! Can you edit this and add the relevant parts from the link?


Implementation Of Resolution Refutation In SML

Question: I need to implement resolution refutation for predicate logic to verify if a set of clauses form a logical consequence of a given set of antecedent clauses. I need to code this in SML. Can someone help me to get started ?? Thanks and Regards.
Answer: Larry Paulson is best known as pioneer and grand master of theorem prover implementation in SML in the 1980-ies and 1990-ies.  His classic text book "ML for the Working Programmer" has a tactical prover in chapter 10 as full worked example.  You can get the ML sources from ML book without buying the book.
This assumes an educational background for this question.  If you want a real system you should take Isabelle from today (2013).


Can MLP model sequential data?

Question: When modeling sequential data, RNNs are introduced as an improvement of MLP as they can model the time dependency between the inputs. It is said that feeding the last N data points in the sequence to a MLP does not work because it does not understand that the points come after each other in time. But is this not something that can be learned? Is it not possible the backprop can set the weights of the first layer such that the time dependency is modeled?
Answer: Yes, it can be learned.
In fact many time series problems are solved with non-RNN/LSTM/1D-CNN architectures due to their simplicity.
The reason the more exotic architectures are used are to increase performance. Instead of getting the classic DNN to learn the time relationship implicitly, we can inject our domain knowledge into the problem by choosing a more performant architecture.
It is similar to using classic vs Convolutional NNs, both work, one more directly solves the problem.
The way the increase in performance works, is that you need many less parameters. Look at how RNN cells are structured, and it will make sense that you only need the input, and hidden state from previous RNN cell.
The next reason pointed out by https://stats.stackexchange.com/a/409941/257148 is RNNs can take sequences of arbitrary length.
You can build performant models with most architectures, I've found the difference is the level of feature engineering required. With non-exotic architectures, you need to feed in a lot of differenceing and lag features into your model. This can get expensive, but gives you a lot of control. This is good on small problems, or if you have a lot of compute - as the hyper-parameter search and training times take a long time. I've personally won time-series hackathons using both feature-engineering + classic architecture, and RNN/1-D CNN/LSTMs.
Comment: Would adding a layer of the same breadth as the input to the MLP and enforcing the weights of this layer to be an upper triangular matrix be similar to a RNN?
Comment: I'm not sure sorry, I'd ask - why not just use a RNN instead of trying to replicate it
Comment: Just to make sure I have understood.

Can MLP model sequential data?


5V 1A vs 5V 5A power supply for 6 LED + Arduino

Question: If I want to power up 6 normal 3mm LED with the appropriate series limiting resistor, do I need the 5V with 1A or 5A power supply? Same goes to the Arduino, if I want to power it externally, do I go for the 1A or 5A?
Comment: Both will work, but using a 5A one is quite a bit of overkill.
Comment: If I'm using 5A, will be voltage drop of the resistor be more or less? Should it be more since it needs to resist more current, hence more voltage drop
Comment: @Jason "series limiting resistor" will limit the current.
Comment: The 5A refers to the maximum current it can supply. If you draw less, it will supply less. As long as the voltage is the same, there will be the same amount of current flowing through the led.
Answer: Depending on your led, it will draw 10 to 20mA for a standard led. Thats 0.010 to 0.020A. Multiply this by 6 and you see that a 1A power supply will be enough.
Your arduino, when driving those leds, will also use a few mA. So you can power everything with a 1A power supply.
Answer: Both will work, but go with 1A!!!
It is more forgiving if a short happens.
A 5A short circuit will make sparks that might be dangerous.


Moving two pieces together

Question: Can one open by moving two pawns at a time, one square forward for each? (I hope you don't think I'm being funny-I was taught this when playing at school and have always played with this option).
Comment: I see no reason to downvote this question: The possibility to move two different pawns one step each from their base position is part of many orally transmitted rulesets. Of course, the answer is no for standard chess (and has been so for at least one and a half century).
Answer: Not in a regular chess.
There are some "homemade" rules at least in some parts of the world that allow you to open with two moves (so only at the start of the game), but those are not used on any serious level.
So no, you can't move two pawns in the same move.
Answer: No. You can either:

Move one pawn forwards 2 squares, provided it is the pawn's first move, or
Move one pawn forward one square, unless it is blocked by another piece
Make a capture, either normally or en passant

If you want to learn more, there is a great wikipedia article on the rules.

Moving two pieces together


Are 'treasures' all Earthly goods or wealth?

Question: When it is often repeated in the Bible that we must cast aside our treasures to gain an everlasting treasure in Heaven, does this mean ALL worldly possessions or just money? Do modern desirables (ipods, Playstations, cars, gadgets, incredibly detailed statues, watches etc.etc.etc.) count? I assume they do, just checking...
Comment: To which passage(s) are you referring? (e.g. "cast aside ... treasures")
Answer: If I read these Scriptures correctly What Jesus considers treasure to be is the things you value the most.
Matthew 12:35  KJV

A good man out of the good treasure of the heart bringeth forth good things: and an evil man out of the evil treasure bringeth forth evil things.

Matthew 6:21  KJV

For where your treasure is, there will your heart be also.

For Satan as for many people today their treasure is power and or authority:
Luke 4:6  KJV

And the devil said unto him, All this power will I give thee, and the glory of them: for that is delivered unto me; and to whomsoever I will I give it.

How Man treasures power is portrayed in the exchange between Pilate and Jesus:
John 19:10 and 11  KJV

10 Then saith Pilate unto him, Speakest thou not unto me? knowest thou not that I have power to crucify thee, and have power to release thee?
11  Jesus answered, Thou couldest have no power at all against me, except it were given thee from above: therefore he that delivered me unto thee hath the greater sin.
Even today look at politics and how so many are willing to risk their monetary fortunes to gain a position in Government, and the amount of money some contributors are willing to donate in hopes of gaining political influence.

In answer to your question in my feeble mind as far as the Kingdom goes it probably  has to do with whatever it is that you desire more than obedience to God.


Calculating area under each polygon in QGIS

Question: I would like to know how to calculate the area of the vector layer (red in the photo) under each polygon (white square in the photo). The red layer has the area (km2) in its attributes. But what I want to know is how much (area) of the pink layer is within the square grid. Both my layers are in meters already.
Comment: Welcome to GIS SE, next time, instead of creating a new question, you could simply edit the original one so it is more succint and reflects newly found information.
Comment: Im Sorry @Gabriel C. I will take note of that. I already messed up the 1st one so I thought of creating another question.
Answer: The easiest may be to calculate each area in the red vector, then and join data to your polygon layer.
Fist use "Clip" tool to clip your red vector layer with your polygon layer. Then compute areas in a new field with "Field Calculator" and $area expression. Finally use "Join attributes by location" to join your clipped layer data to polygons.
About "Join by location" settings, be careful with spatial criteria choice, within should be ok. And if some of you polygons contains more than one feature you may have to use sum value in Statistical summary parameter.
Comment: thanks @MaxPlank. What do you mean by "some of the polygons contains more than one feature"? I encountered last time that I tried Intersect before and I got many areas under one id #. meaning the same ID, different rows and different areas calculated.
Comment: If you use intersect, a polygon in your red layer that will have a common boundary with your square grid polygons will get included. If using Within, those will get ignored. You might still get more than one polygon inside the grid cell so you need to sum their areas to get the total area within the cell.


Outlets are hot but nothing turns on

Question: Last night power in living room went out. Flipped all breakers and bought a gk7 voltage detector. Outlets and breakers show hot but nothing plugged up comes on...?
Comment: Gk7 is a non-contact voltage detector.  Voltage may be present, but that detector won't tell you if neutral is good.  Could be an open neutral cause by a bad backstab connector on an outlet.  Gets tricky to find on open neutral, trial and error is usually most efficient, especially if you can guess how the circuit is running.
Comment: It sounds like a neutral has opened I agree with Tyson, I would be going to the last working outlet of first non working outlet and opening those up looking for a bad connection. If backstabs were used this is a common failure.
Comment: were breakers tripped? do you have GFI outlets in living room?  If so, the individual outlet may need to be reset.
Comment: Is all of the power in the living room off or is there something like a light fixture still burning? What happened just before the lights went off? Are there any other outlets not working in other areas like a bedroom? Have you checked each outlet with a device like a lamp or a hair dryer or some such to make sure they are all not working? We are just trying to help you narrow down the possibilities before we can answer your question. Also how old is your house?
Comment: Hello, and welcome to Home Improvement. We'll need more info before we can help you. And, you should probably [take our tour](//diy.stackexchange.com/tour) so you'll know how best to participate here.
Comment: In addition to non-working outlets or switched fixtures that are NOT working as pointed out by @EdBeal the problem could be inside the last working outlet too.  Do you know which breaker it's supposed to be?  If so, turn it off and check to see if any additional items stopped working.  If so, the bad connection could be in one of those as well.
Answer: The non-contact tester isn't telling you the whole story
A circuit requires 2 functioning wires. One of them is "hot" which you are familiar with. However power has to return to complete the loop.  This is very often done with "neutral", and neutral is so near ground that it won't register with a non-contact tester.  Normally.
However, if hot is working and the socket is not, there's a good chance neutral is broken.  You can use the non-contact tester to find it.
You need a load you can plug in that is definitely turned on.  Something very simple like a heater or an incandescent light.  You plug that into the problem socket.  Now, anywhere past the neutral break, the neutral will test out as "hot".  When you find the first outlet where this is true, check it.  Also check the last "good" outlet before this point.

Outlets are hot but nothing turns on


Perpetual motion?

Question: while i was studying my Alevel physics course, i came around the term " perpetual machines " just at the end of the conservation of energy concept, anyway, as a curious person i googled " perpetual machines" and i saw lots of concepts but the one that really confused me is  the " john wilkins perpetual machine " i want to ask how does it work? will it keep on forever? does it even work?
link : https://www.youtube.com/watch?v=V70w3cxDJIM
Comment: Whenever you ask "Does this perpetual motion machine really work?" you can be sure the answer is a resounding "NO".
Comment: Possible duplicate of [Why doesn't this magnetic perpetual motion machine work?](https://physics.stackexchange.com/q/188208/)
Answer: The video you see is a hoax. The principle (as explained in the video) is that the ball is attracted by the magnet ("lodestone") to go up the ramp, then drops down and slides along the bottom ramp.
There are two problems with the implementation: first, the force of a magnet on an object is a function of the gradient - and the gradient of the magnet shown drops VERY quickly with distance. The apparent "keeps rolling up the slide" you see is NOT what you expect from a ball in the field of a magnet.
Second, when you get near the top, the magnet should hold the ball firmly - there is no mechanism for making it drop down the hole (again, the force of the magnet on the ball should be MUCH stronger when it's very close)
Third - if the magnetic field is on all the time, the force is conservative: that is, after a complete loop by the ball, no net work is done by the magnet (or gravity).
The only way to explain the video is to realize there is probably a bit of electronics in the framework, and the magnetic force is modulated (turned on and off) to keep the ball rolling. Which makes for great "kinetic art", but not a perpetual motion machine.
Conservation of energy tells us that such machines cannot exist. And that is a law that has been proven right, over and over again.
Comment: Your second point is incorrect. It is absolutely possible to arrange the setup such that the weight of the ball exceeds the force of the magnet at the top of the ramp. If it doesn't, just move the hole farther away - simple. The machine as a whole still doesn't work, though.
Comment: @NuclearWang - I am not saying it is not possible - just that _in the video_ such a mechanism was not provided.

Perpetual motion?


the best choice to reduce a features vector

Question: i have 1200 features highly correlated , and i want to reduce those number of features
so the best choice is use feature selection or dimensionality reduction? and which method is the best in this case.
feature selection can work with features highly correlated ??
Comment: Isn't dimensionality reduction a form of feature selection? What do you mean by "feature selection" more specifically? Please, edit your post to provide more details.
Answer:
Feature selection -- the case in which the features are highly correlated is the prototypical case in which you want to select a subset of independent features that allows for an equal performance.  However keep in mind that, exactly because they are correlated, there are in general multiple subsets of features that can achieve the same goal (i.e., if x_1 is highly correlated with x_2, you can drop either of them).

Dimensionality reduction -- if your features are only linearly correlated, then a linear dimensionality reduction technique (e.g., PCA) will tackle your problem.  If however the dependence is more than linear (and unknown), dimensionality reduction will construct new features that are a complex combination of the original ones, hence you will get to the same problem, just in a reduced-dimensional space.

TLDR; As usual in ML, it depends on what you need to do.  If it is merely a matter of reducing dimensions in order to speed up calculations, either method is valid.  If you need instead to select features for further [causal?] analysis, you need to lean for the first approach.  But, again, be aware of multiple equivalent sets (e.g., see this paper: https://arxiv.org/abs/1611.03227)
Comment: thank you for your answer , my goal is at the end i will choose a classifier and do the binary classification . this features will be the input of this classifier


Managed database won't validate in ArcGIS Server Manager

Question: I am running ArcGIS Server Manager and Portal for ArcGIS.  Unfortunately, some of my map services aren't working correctly, and I think it has to do with the Managed Database called ArcGIS_Data_Store.  It was just working fine the other day.  What should I do to fix this?
Answer: Portal for ArcGIS services sometimes will fail to work or publish correctly if there are issues with the main ArcGIS Server "Managed Database" data store called ArcGIS_Data_Store.  Navigate to the ArcGIS Server Manager data store page at http://..com/server/manager/site.html as the admin user and click the checkbox next to ArcGIS_Data_Store, then click Validate.  If you have a red exclamation point pop-up, like the one shown in the question, you might need to restart the Data Store Machine.
To attempt to restart the Data Store Machine, go to the Server Admin Data Store Machine Properties page (URL looks something like this:
https://gisserver.domain.com/server/admin/data/items/enterpriseDatabases/AGSDataStore_ds_wztxj7um/machines/GISSERVER.DOMAIN.COM)

Click start, change the format to JSON, and click Start.

It may take a few minutes for the Data Store Machine to start up.  When it is done you should see a message that says {"status": "success"}.  When you do, return to the ArcGIS Server Manager data store page and validate the data store again.  It should now have a green check mark next to it.  If not, you may need to reach out to Esri Technical Support for further troubleshooting.
Comment: So ... do you know the source of the problem ? We restart the service as well but the problem reappears after a few days.
Comment: It's possible there may be issues with the index.  Unfortunately there is not much in the way of good documentation on this front, and you may need to follow up with ESRI Tech Support to troubleshoot the recurring issue.
Answer: I am having a similar issue with my Data Store validating within AGS and Portal. We are running Enterprise 10.7.1 in a four server federated environment.
The first error below has an error message that reads in part: "Error: failed to validate the server managed database '/enterpriseDatabases/AGSDataStore_ds_xxxxx". The server admin server is accessible and functioning as intended.
What I have tried thus far to get things working (without success):
1. Restart the AGS Data Store on its server (test validation)
2. Within AGS admin changed the Data Store machine format from HTML to JSON (tested for validation)
3. Changed the format from JSON to HTML (tested for validation)
4. Ran the 'update license' tool on the DS machine (tested for validation)
5. Restarted the whole Data Store server (tested for validation)
Also, I can remote into all of my servers and they are working as intended.
So I would appreciate hearing ideas on how to resolve this Data Store issue.
Comment: I do not believe changing the output format between HTML and JSON will have any effect.  I believe it is simply how the response is formatted after it completes the action.  Have you tried reaching out to ESRI support?  If so, and they were able to get you back up and running properly, it may be a good idea to create a new question and answer your own question with the steps you took to fix the issue.  Back-end issues like these are not documented very well anywhere so it would be good for us all to try to document solutions for Server when we come across them.
Answer: I had a similar issue with my instance on 10.7 using Windows.  The week prior to noticing this issue I changed the service account password for my entire stack.  I went in and manually changed the password in services, but that's it.  I ultimately went into the C:\Program Files\ArcGIS\DataStore\tools on both my primary and secondary nodes and ran the configureserviceaccount.bat and that resolved my issue. This fixed the error message I was getting for both my relational and tile cache data stores.


How to make an outbound request to users to update their passwords?

Question: Clearly it works best if the request to update a password happens as a response to an inbound request to access a known system, but how do you make an outbound request to users to update their passwords?
Comment: You mean like Sony, LinkedIn, Yahoo, et. al. have done in the past year?
Comment: @Iszi: Correct; their consultants must have had practices for making outbound requests.
Answer: Technical half: changing the password
The simple and secure way is a round-about, "You don't."
When a user logs in with their old password, display a notice saying they must reset their password. Generate an email with a reset token and send it to their email address. The email address token must be used because we no longer trust the password (and we hope that the email address is still under a users' control).
Human half: discussing a breach
If you're requesting users update their passwords, it may be because you're changing hashing algorithms. That really should happen behind the scenes, or involve reclaiming old accounts rather than leaving them dormant. It probably is because you've encountered a breach, though.
Breaches affect customers even if you don't hold any sensitive information because online presences are often linked (same username, email address, etc.) and because passwords are often re-used. If you've lost control of your password database, users may be at risk of having those passwords brute-forced and then used against accounts from other sites.
Regardless of your motivation, the technical method of changing passwords remains the same. If you've had a breach, though, disclosing that is important for your ethical duty to your users and sometimes for legal requirements depending on your jurisdiction. How the letter is written is a combination entirely of legal and subjective matters, but it should explain why users may need to be concerned about other accounts and why they need to reset their password on their next login.
Comment: -1 Oddly, you're the user that lead to me posting this; randomly clicked your profile before the post, and saw your most recent post on [Linkedin](http://storyinmemo.com/?p=98) thought I'd ask a question about it. Given how many users reuse passwords, find it hard to believe the best practice is to wait for the user to login, or organically hear they need to reset their passwords; use passwords in the plural, since I assume the average user uses their password on more than one account. Gave the -1 since you said the best answer is not to do anything until the user uses the password.
Comment: @blunders too much time in the terminal today... :(
Comment: Me, or you... :-)
Comment: @blunders Well, are you asking about the technical part of how to deal with requiring a password change, or with the human part of disclosing a breach? It seems like you already know **why** a breach needs a notification.
Comment: Really don't have an answer in mind; guessing that answer would likely be based on practices in jurisdictions that require by law that users be notified. And yes, believe everyone that knows about password resuse would understand why a breach needs a notification.
Comment: @blunders - You could generate a new password in a new field and use both fields up until the next time the password is used.  Once that happens have them choose a new password and chang the new password field, and delete the old password field, this forces the user's hand.  Outside of doing this I am not sure what else you CAN do, changing it for them and sending them the password, is worst then having passwords stored in plaintext.
Comment: @Ramhound: Thanks for the feedback. Have you read the answers currently posted? Also, don't understand what the function of the "new password" would be, please explain more if possible. Again, thanks!
Answer: Obviously, if you want to send a request to users (without waiting for them to come back), then you have to contact them in some way, which, most of the time, means sending emails. This works only if you know of a valid email address for each user (which is a good reason for verifying the email address when the user first registers).
Thanks to spammers and other villains with fraudulent intentions, typical users are trained to disregard emails which talk about passwords. This is your biggest problem. Similarly, you do not really want to reverse that training. So it would be bad practice to send an email with a clickable link to a password reset page: the security-aware users will not follow the link, and the others just so demonstrate how vulnerable they are.

Let's try another way. Usually, when you need users to do a mass-reset of the passwords, it is because it is suspected, for some contextual reason, that a substantial number of user passwords may be compromised. For instance, someone broke into your server and grabbed a copy of the database of hashed passwords.
Compromised passwords are an issue because they allow unauthorized reentry. Conversely, compromised passwords are not an issue (at least, not for your server) until the attacker tries to come back. This means that you can, somehow, wait. Technically, this involves the following:

You configure your server so that every successful login is redirected to a password reset page (I assume a Web server here). The user is not permitted to access any other service before the password is reset.
The "password reset page" is actually a pre-reset page: the user can click on a button, which makes the server send him (by mail) a transient, user-specific link to the true password reset page.
The true password reset page, as its name says, allows the user the reset his password.
Optionally, you proactively send an email to every user to warn them about the issue, and to courteously (but firmly) suggest that they should reset their password in the near future. No clickable link, please !

This setup is "secure" as long as we assume that the attacker did not guess a user's password and compromised the user's email at the same time.
The relevance of sending a mass email depends on the situation: it may be good for public relations ("see, we are taking security seriously, and we do not want to hide the issues") and it can be bad for public relations ("we got hacked, it is embarrassing"). The current zeitgeist is that, on a general basis, the email should be sent; denying issues has a high probability of making them only worse. Admit your misfortune, eat your hat, and beg for forgiveness -- users will forgive you if they feel that you treat them "fairly" (i.e. you use a lot of flattery). Also, as you indicate, users tend to reuse passwords, so while this is not technically your problem, a proactive warning will be felt as a positive gesture.
If your server is big enough, hire a public relations specialist right away, to handle the crisis.
Answer: About your only option, if you don't want to wait for your users' next login, is to send your users an email and ask them to log in.  That's a bit dubious: your users may delete the email as spam/phishing.
Alternatively, you can disable every user account on your site, and the next time they log in, require them to go through some special extra process to authenticate themselves.  In addition to requiring them to provide their password, you might also require them to solve a CAPTCHA or ask them some questions about their account activity (e.g., for an email provider, ask them to provide the email addresses of a few correspondents that the user regularly contacts).  Or, you might perform some other checks.  None of this is ideal, but hey, you asked.


How are Monero transactions verified if they are encrypted?

Question: If the sender, recipient, and amount is all obfuscated, how can people on the network trust that people are not trading coins they don't have.
Comment: RingCT: https://monero.stackexchange.com/questions/7716/how-does-ring-confidential-transactions-work/8370
Answer: All tokens are accounted for at all times. The protocol keeps track of the tokens (this is how we can verify the total supply). The system just scrambles the outputs so that there is not external way of determining which tokens are spendable from the same wallet.
All that happens is that the password-to-spend for a given token set (called a TXO, for transaction output) changes. Due to the maths of one-way algorithms, you can't tell who holds the underlying key that unifies the spend authority for two separate TXOs on the ledger.
Imagine that each wallet comes with a huge set of physical keys attached to a big key ring. Now imagine each TXO has a physical lock on it. Just by looking at two TXO locks, you can't tell whether the can be unlocked (spent) by keys that belong to the same key chain. When you give someone a subaddress, you provide them with a lock mold, which they can use to relock their TXO with a lock that can be opened with one of your keys. The analogy is not perfect, but I hope it helps make sense of what the core of the obfuscation is. TXOs just get assigned new locks, but the total is always accounted for.


How to name a post apocalyptic town?

Question: I cannot think of good names for towns in my country in the post apocalypse. Most of the time I just call the towns "New Houston" or "New Seattle", but I need more creative names.
What are methods to come up with unique city names?
Comment: Be sure to include [Megaton](http://fallout.wikia.com/wiki/Megaton) on your short list.
Comment: I'm not sure why having this post-apocalypse matters. If people are living in the area that they know was once Chicago, why wouldn't they just call it Chicago? If they don't know what city was previously there, then you name it like you would any other town - Foundersville,  Springfield, Rock Harbor, Oldtown
Comment: Does the name has to reflect its post-apocalyptic status, or you need just a cool city name?
Comment: You may want to trim this down to an answerable question. As it stands now I could write a book on this topic (I would probably enjoy that). What kind of apocalypse is it? When is this? How far after the apocalypse is this? And do people have access to historical records or do survivors still have attachments to their pre-apocalypse lives? Answers to all of these questions would give us a better way to answer. Or are you just asking for factors to consider when naming a post apocalyptic town?
Comment: @Alexander:Just a cool city name
Answer: It's hard to imagine a post-apocalyptic town that's not on the site of a pre-apocalyptic town -- good town sites tend to be good town sites, after all.  Let the post- names be cut down versions of the pre- name.
We see this throughout Europe, for instance, where modern towns have cut down por mangled version of the Roman town that once stood there.  Chester comes from "castra" meaning "camp", Istanbul comes from Greek which was pronounced something like "is tim bolin" -- meaning "The City" -- which is what the inhabitants of Constantinople actually called their town. Modern Cologne in Roman times was "Colonia Claudia Ara Agrippinensium" -- only the "Colonia" (meaning "colony" or "settlement" survived.  This happened a lot.
Answer: You can think of city names as having three parts: an optional prefix, the name, and an optional suffix.  For example:
West Darlington GroveGarden CityMechanicsville
Prefixes

None
Cardinal direction (e.g., "west")
Adjective (e.g., "new," "red")
Meteorological (e.g., "windy," "sun," "clear")

Primary Names

Founder's Name (e.g., "smith," "David," "Kellogg")
Vocation (e.g., "mechanic," "fisher," "brewer")
Animal (e.g., "beaver," "deer," "elk")

Suffixes

Natural (e.g., "grove," "field," "dale")
Community (e.g., "lodge," "city," "-ville")

Frankly, the real problem is the primary.  And my favorite method is to choose one word that reflects the purpose for the city in my story.  For example, if it's the place my protagonist is going to hide...

Hide or hidden

Next, grab some synonyms from Thesaurus.com:

smuggle, cache, harbor, shadow, squirrel

Pick a couple with a few prefixes or suffixes...
Cache valleyLost harborHarborton
and choose or start over from there.  You can work with either synonyms or antonyms, and the construction actually helps as a form of foreshadowing for your story.
Answer: I would say take in the demographics of your town and use that to name your town. For example, if your town is predominantly populated by say people with Mexican or Spanish descent (I assume your setting takes place in USA) then it could have a name like Los Vidas or say predominantly Scandinavian then it could have a name like Overleaf (from the word overleve which means survive in Danish - according to Google translate).
Basically have fun with it. Put in the root word you want to use for the town (survive in this case), figure out the predominant language used, say Danish in this case and try to figure out a homonym for the word like what I did for overleve.
Of course this is just one way. Its your world so you can name it whatever you wish. You can even invent a new language and put in prefix and postfix to identify a town, like PelBrooks where 'pel' comes from the word peligro or danger in Spanish.
Answer: I think Fallout New Vegas did a pretty good job at creating and explanation of names.
New Vegas is New because they knew what was previously in this spot and they recreated "the spirit".
Novac was set in previously unnamed motel (for us) but the "No Vacany" sign had "any" letters lost hence naming place by visible name.
Goodsprings - which is named because the SPRINGS are GOOD sources of fresh water.
So - let's assume that You have Los Angeles. In the first way you would just call it New Angeles.
In the second it could be called "Holwod" from destroyed "Hollywood" sing.
In the third option, I dunno, BurningHills?
Now, mentioned places had very distinguish thing. People (or lack of them). People are like cockroaches. You could nuke them and they crawl out of the hole in the ground and will tell you "this was New York" and everyone still call it that. But you may have place without people when the apocalypse hit and no signs of names. So settler comes and call thaw "flat planes". because it's flat and there are planes.
Answer: It depends on the "nationality" of the area. Southern US would be more Spanish and Mexican styled names, as others have mentioned. If you wanted far north US, you could use some traditional Inuit/Eskimo names, or if you don't care for true accuracy, steal some Welsh town names which tend to sound mystic (Llandaff, Harlech, Tyla Garw, Clydach Vale).
You could also look to existing towns in the US and combine parts of their names, z.B. Asherville + Sweetwater = Asherwater, Sweetville
Comment: "Ashwater" immediately gives an idea of the local potability...  Still, better than "Glowater" or "Poisonville" xD

How to name a post apocalyptic town?


How can you find the maximum aggregate I/O current supply for a Lattice FPGA?

Question: I want to find the maximum aggregate I/O current supply for the MachXO3D (9400HC) breakout board to ensure that I do not damage it. All pins will be using the LVCMOS33 I/O standard. I have been up and down the datasheet for hours to no avail and I suspect that this may be something that has to be inferred using some sort of calculation, but I am currently at a total loss.
Answer: Looking in the MachXO3D Family Data Sheet (linked from the MachXO3D Enhance Secure Control Applications with Hardware Root-of-Trust and Dual Boot Capabilities documentation) there is the following note in the 3.12. sysI/O Single-Ended DC Electrical Characteristics section:

For electromigration, the average DC current sourced or sinked by I/O pads between two consecutive VCCIO or GND pad connections,
or between the last VCCIO or GND in an I/O bank and the end of an I/O bank, as shown in the Logic Signal Connections table (also
shown as I/O grouping) shall not exceed a maximum of n * 8 mA. "n" is the number of I/O pads between the two consecutive bank
VCCIO or GND connections or between the last VCCIO and GND in a bank and the end of a bank. I/O Grouping can be found in the Data
Sheet Pin Tables, which can also be generated from the Lattice Diamond software.

I can't find anything else in the datasheet about the maximum aggregate I/O current supply.