In Final Fantasy XIII, why are some fal'Cie's mobile such as Barthandelus, while fal'Cie like Orphan remains in his chamber in the Cocoon?

Question: fal'Cie are godlike beings possess the power to curse humans, transforming them into 'l'Cie.
Answer: Each Fal'cie was created for a purpose (by one of the Fabula Nova Crysalis mythos's gods - usually either Pulse (Gran Pulse Fal'Cie) or Lindzei (Cocoon Fal'Cie), but note that Lindzei, Pulse, and Etro are themselves referred to as Fal'Cie created by Bhunivelze), and beyond the capacity to transform humans into l'Cie they each have precisely and only the capabilities they need to fulfil that purpose.
In this respect, Fal'Cie are the ultimate expression of "form follows function".
One of Orphan's lines suggests that the function in question is the Fal'Cie version of a Focus - but unlike a human-made-l'Cie, they do not have consequences for defying or failing their Focus, but rather are literally incapable of doing so. A Fal'Cie simply cannot take any action that doesn't at least indirectly further its Focus, but its power to act towards that Focus is vast almost beyond comprehension. The problem comes when, like Orphan, "two irreconcilable Focuses [it bears]".
That, despite all the Fal'Cie's manipulation and coercion, humans and l'Cie are far freer than Fal'Cie are is a major underlying theme of the story.
Barthandelus's Focus was to rule Cocoon and orchestrate the attempt to open Etro's Gate - and to do that, he needed  to be able to move around and appear human, so he was able to do those things, but he wasn't able to act directly to achieve the second, because it conflicted with the first - hence his need for Anima. Atomos's Focus was excavation as part of terraforming, with a suspected additional agenda of seeking the Gate beneath the earth, both of which again required mobility. Carbuncle's was food production, which doesn't need the ability to move, so all Carbuncle could do was float where it was and manage the hydroponic gardens. Likewise Kujata, with a Focus of generating power for use by Cocoon's populace, was immobile.
Orphan, by the nature of its mode of  existence before the end of FFXIII, is a slightly special case, but the same principles apply.
Comment: 1) yes, but I'd be inclined to argue that for them, function *is* focus. 2) the preservation of Cocoon and its destruction are irreconcilable Focuses, as both Barthandelus and Orphan itself note. As to why the Focus couldn't be the self-consistent "build up a large human population then use it to throw Etro's Gate wide", we aren't told - but we can speculate that the nature of Fal'Cie means that they decompose such an instruction into simpler terms (in this case, "keep the people of Cocoon safe and numerous" and "make sure that Cocoon can be destroyed, killing all the humans therein")
Comment: Quite an informative answer, but it dragged me to more further questions like:  (1) If Fal'cie are "form follows function", can they also be treated as "function follows focus?  and (2) How and why Orphan has to have  2 irreconcilable focus?  Can't it just be one or many but unified focus?
Comment: And those then conflict.
Comment: I quote Orphan: "Two irreconcilable Focuses we bore. Too frail a shell, and humans would not thrive. Too stout a shell, and they would not die".
Comment: OK. I'll give your answer the upvote for the effort to make things clear, but I still have unconvinced items in mind.
Comment: If you have further questions, I'd say go ahead and post them. That's what the Stack family is *for*, after all.


Why do some people say the universe is hyperbolic?

Question: I thought that it was generally agreed that the universe seems to be flat, according to the Planck data, but every once in a while I'll hear someone say that the universe is hyperbolic. I know this isn't a very formal question, but I'm wondering where this idea comes from? Is it just a common misinterpretation of something, or are they right?
Comment: I suspect the reference to a *hyperbolic* universe refers to the de Sitter geometry. If we are right about dark energy the universe is already approximately de Sitter and will become increasingly close to de Sitter as the expansion continues. Remember that while the universe is spatially flat in comoving coordinates it is certainly not flat in the sense of zero curvature. But unless you can cite specific examples of this terminology any answer is going to be a matter of opinion.
Comment: Is it possible you mean that the metric in GR should be *globally hyberbolic*? If so, this is not a statement about spatial or space-time curvature, but rather a statement about causality; loosely speaking there should not be closed timelike curves. For example this is described on the wikipedia page: https://en.wikipedia.org/wiki/Globally_hyperbolic_manifold
Comment: Thanks guys, John's answer sounds right to me.
Answer: Generally the characterization of the geometry of cosmological space (not space-time) is determined by the values of the four parameters in the Friedmann Equation presented in the section:
https://en.wikipedia.org/wiki/Friedmann_equations#Detailed_derivation . These are the $\Omega$ density parameters which in a cosmological model have values for the density of radiation, matter, curvature, and dark energy (also known as the cosmological constant density). The corresponding subscripts are: R, M, k, and $\Lambda$. The sum of these four parameters equals 1. (I will use here just the subscripts to represent the $\Omega$ variables.) If R+M+$\Lambda$ > 0, then k < 0 corresponding to what is called a 3D hyper-spherical space. R+M+$\Lambda$ < 0, then k > 0 corresponding to what is called a 3D hyperbolic space. If  k = 0 then the universe shape is called flat or Euclidean.


"It" "this" difference

Question: Is there any difference between "this" and "it" in this context when pointing at something? For example, I am pointing at something near me,  or I am holding it in my hand and say "How much is this?" or "How much is it?" I often see "it" instead of "this" in children's books and videos. Do they mean the same thing in such context only?
https://m.youtube.com/watch?feature=youtu.be&v=tNK0ToOgntw#
Answer: "This" is a demonstrative pronoun and "it" is a personal pronoun.
When pointing at something you would use a demonstrative pronount. E.g. This is my car.
A personal pronoun replaces either a subject or an object. Before you can replace something you would need to mention it first. E.g. I want to buy this shirt. How much is it?
Also have a look at this post: it VS. this Vs. that
Answer: If you're talking specifically about the context of pointing to something, it's more natural to use a demonstrative pronoun (this, that) when you first refer to it.

Excuse me, how much is this?  (pointing to something close)
What is that over there?  (pointing)

You can follow up by using 'it' to refer to the thing, having established it as the topic.

How much is this? Is it a genuine leather wallet? Or is it plastic?
How much is that? The necklace over there. Could you show it to me? It's very unusual!

"It" "this" difference


Am unable to sort Configurable products

Question: Am working on a shopping cart site now and am unable to sort the products based on the price.. I have drink size as the configurable product and there are several drink sizes for a single product e.g 100 ml, 250 ml, 500 ml.. The price should be sorted as per the minimum quantity but its not sorting like that..
Answer: When dealing with configurable products (or any time you're dealing with a concept for only one type of product, as configurable attributes are), you'll probably be working with getTypeInstance. See below, I grab the configurable attributes for the product, then find the one for size. You could also just run through every configurable attribute if you wanted. Or if size is the only configurable attribute, just skip that if().
$attrs  = $_product->getTypeInstance(true)->getConfigurableAttributesAsArray($_product);
foreach($attrs as $attr) {
    if(0 == strcmp("size", $attr['attribute_code'])) {
        $options    = $attr['values'];
        foreach($options as $option) {
            print "{$option['store_label']}
";
        }
    }
}

Hope that helps!
Answer: You just need set the sort order for the drink size attribute options under
Catalog > Attributes > Manage Attributes > [Your Attribute] > Manage Label / Options

The sort order of the options listed there will set the sort order for the options list in the configurable options dropdown. POC using sample data:

Here's the effect visible on the site frontend:

Am unable to sort Configurable products


Does aeronautical experience ever expire?

Question: Do the hours of flying with instructor or solo ever expire? I have my 50 (yes, 50) year old pilot's Flight Log with CFI entries for 20 hours dual and 1 solo. Do I have to start over, or would some of them count for PPL license?
Answer: As far as the FAA is concerned, they do not expire.
As far as any (reputable) flight school goes, they will probably require a full, recent minimum 40 hours of training before they sign you off for the practical exam.
The good news is that your old training, no matter how rusty, probably means you'll pick up the basics quite quickly, and probably solo (again) faster than the average, and may very well be ready for your checkride close to 40 hours.  (The national average is a checkride around 50 to 60 hours.)
Comment: My personal requirement is at least 40 recent hours. I was surprised there's no expiration.


Prove that $d(A,B)=d(x_{0},y_{0})$

Question: Let $X$ be a metric space, $A$ a compact subset of $X$ and $B$ a closed subset such that $A\bigcap B=\emptyset$. Prove that $d(A,B)=d(x_{0},y_{0})$ for some $x_{0}\in A$ and $y_{0}\in B$. Please help me
Comment: Stimulus: *What have you tried so far?* Reaction: adds *Please help me* to the question. O well...
Comment: I'm guessing $B \subset X$.  If so, $B$ is also compact as the closed subsets of compact sets are again compact.
Comment: possible duplicate of [real analysis question about compactness](http://math.stackexchange.com/questions/125055/real-analysis-question-about-compactness)
Comment: @Ittay: Very close, but not a duplicate, I think. $A$ and $B$ are assumed to be compact in the other question.
Comment: very true Martin. My apologies.
Answer: First show that if $d(x, B) = inf\{d(x, y) : y \in B\} = s$ then for some $y_0 \in B$, $d(x, y_0) = s$ (This will use the fact that $B$ is complete so you also need to assume that $X$ is complete). Next show that $x \rightarrow d(x, B)$ defines a continuous function on $X$. Finally use the fact continuous real valued functions attain their extrema on compact spaces.
Edit: As Martin points out below, $d(x, B)$ may not be attained in general. So let me just add that the above argument works only when either $B$ is also totally bounded or closed balls in $X$ are compact.
Comment: Completeness of $B$ is not enough. There is no reason for a sequence $(y_n) \subset B$ such that $d(x,y_n) \to d(x,B)$ to be a Cauchy sequence.
Comment: You are absolutely right. I edited my answer accordingly.
Answer: The statement in the question is wrong.
Example 1: Let $X = \{0\} \cup (1,\infty)$ with the metric induced by $\mathbb{R}$. Let $A = \{0\}$ and $B = (1,\infty)$. Note that $A$ is compact and open, and $B$ is closed. Then $d(A,B) = 1$ but there is no $y_0 \in B$ such that $d(0,y_0) = 1$.
Example 2: It was suggested that completeness of $X$ helps. Consider the closed subspace $X = \{0\} \cup \{(1+2^{-n})e_n \mid n \in \mathbb{N}\} $ of $\ell^2(\mathbb{N})$ where $e_n$ is the $n$-th standard basis vector $e_n = (0,\dots,0,1,0,\dots)$. Set $A = \{0\}$ and $B = \{(1+2^{-n})e_n \mid n \in \mathbb{N}\}$. Then $d(A,B) = 1$ and $A$ is compact, but there is no $y_0 \in B$ such that $d(0,y_0) = 1$.
The statement of the question is true if closed balls in $X$ are compact, or if $B$ is assumed to be compact. To see this, take $(a_n) \subset A$ and $(b_n) \subset B$ such that $d(a_n,b_n) \to d(A,B)$. Pass to suitable convergent subsequences of $a_n$ (by compactness of $A$) and $b_n$ (either by compactness of $B$ or by noting that this is a bounded sequence, hence it is contained in some ball). Show that the limit points lie in $A$ and $B$, respectively, and that they have distance $d(A,B)$.

Prove that $d(A,B)=d(x_{0},y_{0})$


What is the best way in SketchUp to align the bottoms of all objects to the x-y origin plane?

Question: A single object slices OK in Slic3r.  However, when I copy the objects and paste onto a guide point on the y axis to put five objects in the drawing, the slicing leaves out parts.  The worst object is below the y-axis by 0.01 mm, but SketchUp is not allowing me to move the object to the y-axis alignment.  I've tried decreasing the snapping length to 0.000001 mm, and even unchecking Enable length snapping. I'm looking for the best way to align the bottoms of all objects to the x-y origin plane.
Answer: I would like a better answer involving automatic alignment, but this was my solution.

Make the object a single component.
Make sure the guide points are accurately located.
Cut and copy the first component to the origin.
Copy the component to the guide points.

What also worked better was to break the grouping of components into building blocks that could be put together to make the whole.  Once the building block sliced correctly, it could be made into a component.
Note: the more complex the first layer, the more this accuracy seems to be an issue.
Comment: Hey Perry, this would be better as part of your question.
Comment: Due to lack of response, I expect this to be the answer, but want it to be open ended.


iPhone: How to restore and update without using iTunes or iCloud

Question: I decided to delete an existing iCloud account on my new iPhone SE which my deceased mom left me. After successful deletion, i changed password and forgot it. Now "iPhone is disabled connect to iTunes" is he only display i see. But whenever I connect to iTunes and software update begins to download, it pauses. And instead of resuming the download, it stops even if it is 99 % done and starts all over again.
I'm unable to pause download on iTunes and this is killing me because the file is too large for me to afford mobile data or Wi-Fi for.
Please help me with any other alternative aside using iTunes or iCloud. i have no iCloud account on my iPhone SE and i deleted the existing one.
How can I restore and update my iPhone SE without using iCloud or iTunes?
Comment: Hate to say this, but I can't think of any way to do a restore/update of an iPhone with either iTunes or iCloud. Have you considered going to an Apple Store to do the restore, since they have free wifi?
Answer: Restore iPhone not available without iTunes.
You can only do Factory Reset without iTunes.


Is it possible to download #of votes and the rate of votes an image has in reddit?

Question: I found an online image scraper that can basically download all the imgur images from a subreddit category, can anyone tell me if the reddit API allows me to also add the number of votes and the rate at which the votes are obtained?
Answer: Yes. I believe the precise method you're looking for is GET_info in the api documentation. Alternatively you can use the json version of a subreddit listing to get the data. You're looking for score and if you want the average score increase per hour, then created_utc (avoid created) as well. There are also wrappers for certain languages of Reddit, that can make this easier.


Whta's the difference between "relation" and "relationship"?

Question: At my English lesson I said "They had good relations" (about two neighbors), but my teacher corrected me "They had good realtionship". Why?
Comment: "They had good relationship." is also not grammatical.
Comment: As one of the answers in the linked question indirectly says, "They had good relations" is quite likely to be understood as "They had good sex", which is quite possibly _not_ what you intended. As an aside, if you are talking about two neighbours, it is often preferable to say instead that they _are on good terms_, rather than mentioning relation(ship)s at all.
Comment: I think the cited duplicate question contains some very good answers to OP's question. Nevertheless, I would also add that _relations_ is used in a much more formal setting, for instance: _diplomatic relations between US and Iraq_. On the other hand, _relationship_ isn't usually employed this specifically and has a broader scope.
Comment: If your teacher thinks that "They had good realtionship" is actual English, let alone correct, you need a new teacher.  It contains at least two errors.
Answer: "Relations" also can refer to people connected to the neighbors by blood...their extended family.  Thus if you are talking about their relations to each other, "They had a good relationship is less confusing.
Answer: If you originally said, "They had good relations" and your teacher changed the wording to "They had a good relationship," I think your teacher either was trying to uphold a rather subtle distinction or was trying to steer you away from unintended implications of your statement. The relevant definitions of the two terms in Merriam-Webster's Eleventh Collegiate Dictionary are as follows:

relation 7 b pl (1) :  DEALINGS, INTERCOURSE {foreign relations} (2) SEXUAL INTERCOURSE
relationship 3 a : a state of affairs existing between those having relations or dealings {had a good relationship with his family} b : a romantic or passionate attachment

One possibility is that your teacher heard the word "relations" and thought "Uh-oh, my student is unwittingly inviting hearers to imagine that she's talking about relation[s] definition 7b(2)." Of course, what's relation[s] definition 7b(2) for the goose is relationship definition 3b for the gander—and your teacher doesn't seem to have harbored any concerns that the corrected sentence might be misread as referring to "a romantic or passionate attachment." So either a high level of selective delicacy was at work, or your teacher was focusing on the difference between relation[s] definition 7b(1) and relationship definition 3a. Let's give the teacher the benefit of the doubt.
The chief difference between "dealings, [nonsexual] intercourse" on the one hand and "a state of affairs existing between those having relations or dealings" on the other is that the former (relations) refers to particular interactions, while the latter (relationship) deals with the overall state of affairs between the interacting parties. As I said, it's a rather subtle distinction—and neither your original wording (which focuses on the discrete instances of interaction) nor your teacher's rewording (which focuses on the larger connection that those discrete events have established) is inherently objectionable. They just emphasize slightly different things.
If you're still curious about why your teacher felt so strongly that relationship definition 3a was preferable to relation[s] definition 7b(1), I recommend asking. If the teacher looks embarrassed, you'll know that those two definitions weren't at the heart of the correction after all.


Install RPM file on Arch Linux?

Question: I want to install sqldeveloper from Oracle on Arch Linux. The only Linux download option is RPM. I am not interested in using arch repositories to install sqldeveloper. I can only use what the vendor provides.
Comment: The package in the AUR **is** "what the vendor" provides: that is how packaging on Arch works. If you are going to use Arch, you should familiarize yourself with how `pacman`, `makepkg` and PKGBUILDs work.
Comment: "The package in the AUR is "what the vendor" provides" Lol... no. People want to use software that isn't in the AUR, believe it or not. I can't install Java 1.6.65, 64bit from Oracle/Sun ...? Right, because Arch is a rolling release, and doesn't keep previous versions for starters.
Comment: An extensive explanation is given at: http://nemrod.se/guides/install-rpm-packages-on-arch-linux/
Answer: Jasonwryan (as per usual) was right on the mark with his initial comment.
Arch's packages are supposed to be as close to "vanilla" as possible. Now, while you could use rpmextract or alien, there isn't really a good reason to do so. What you should do is create a PKGBUILD that uses the RPM as the source file and then installs everything that's needed where it should be in the package() function. If you are unsure of how to do this, take a look at some packages on the ArchLinux User Repository; there are plenty that do similar things.
Now, since bsdtar (the default extractor used on source files by makepkg) supports extracting RPMs without issue, there is no reason to use rpmextract—it adds a makedependency without adding any real functionality.

Some related reading from the wiki:

PKGBUILDs
Basic PKGBUILD templates
Arch packaging standards
Comment: The question title states: install RPM file on Arch linux, and all i've found was just the usual arch elitist answers "check the manual"/"check those resources".
This answer basically tells the user where to search his own answer instead of giving simple easy-to-follow instructions. While this is canon on arch fora, it is against common practice on SO. I guess the user could've asked the question on the arch forum if he wanted this kind of answer.
SO etiquette requires verbatim citing of parts of linked resources that apply to the particular answer.
Comment: This answer needs a link to example PKGBUILDs that take RPMs, extract them and then put the files where they need to go. The link to the AUR is not helpful in this case. It would be helpful if it were more specific.
Comment: Exactly. If you are not willing to provide a detailed answer to the question being asked or at least willing to provide links to *specific* instruction, please refrain from posting an answer.  Links to AUR are useless---anyone using Arch would know what AUR is and where to find it. This answer is actually polluting search results  and wastes  everyone's time ---it shows up as answering the question, while it does not provide any *specific* useful information .
Comment: @brett as a years long arch user, I agree
Comment: It looks like the latest `rpmextract` on Arch Linux is just a wrapper around `bsdtar`.
Answer: I was genuinely surprised at the lack of examples! Arch bundles a few make/configure examples in /usr/share/pacman, but that's it. The templates link in HalosGhost's answer is now a redirect to a page that only covers the variables within a PKGBUILD. So I find myself motivated to help others out here:
PKGBUILD:
# Metadata; be sure to set this to reasonable values to not confuse your
# package manager or cause name conflicts with the repositories.
pkgname="rpm-package-name"
pkgver="0.0.1"
pkgrel="1"
pkgdesc="Short description of rpm package"
arch=("x86_64")

# The RPM file you want to install; place in the same directory as this file.
source=("filename.rpm")

# Assuming you're not going to push this to AUR or whatever, you can just skip
# the integrity check here. Otherwise, replace SKIP with the output of
# "sha -a 256 filename.rpm".
sha256sums=("SKIP")

package() {
  # Copy all directories from $srcdir into $pkgdir. $srcdir will already have
  # been populated with the contents of package.rpm, but it also contains a
  # symlink to it, which we don't want to copy; anything in $pkgdir after this
  # command will be installed to your root directory.
  find $srcdir/ -mindepth 1 -maxdepth 1 -type d | xargs cp -r -t "$pkgdir"
}

Be sure to edit the variables in the template as needed for your package. You will at least need to replace rpm-package-name and filename.rpm for it to work.
After you create this PKGBUILD file with your desired rpm placed beside it, run makepkg from the same directory. If all goes well, you should be able to verify that the generated package file has what you expect in it by inspecting the generated file with tar tf <package_name>.pkg.*. Do a sudo pacman -U <package_name>.pkg.* and voila! Enjoy your rpm software that is now installed.
Of course if you run into any errors, I'm sure folks on the Arch forums would be willing to point you to some manuals to read...
Comment: Doesn't work for me :(
Comment: @DragosRachieru after you run a `makepkg`, does any new directories appear? Does it bail with any error?
Answer: The Arch-specific tool is rpmextract. https://www.archlinux.org/packages/extra/any/rpmextract/
Answer: There's a tool called alien that can (attempt) to build a deb from the rpm.  Sometimes it works; other times it makes a mess... it's an imperfect process at best. alien can be used to simply unpack the rpm into a deb format directory (i.e. do everything but build the deb) where you can manually install (copy) everything.
The other option is to install the rpm tools under arch and force installation of the rpm.  This will get it installed, but not being a native rpm distro, it will have no knowledge of the deb packages on the system. Meeting the dependencies will, thus, be up to you. Also, any rc scripts it installs will have to be converted to systemd.
Comment: Maybe I'm missing something, but creating a `deb` file doesn't seem useful because Arch Linux does not use a deb based package manager.
Comment: I see. I think some RPM files just have packaged binaries. For sqldeveloper, all I had to do was install `rpmextract`. It created a directory structure of `/opt/sqldeveloer/...[prebuilt and ready to run..` ...But you're saying that for rpms which requires building, this is no easy task?
Comment: I'm saying `alien` can convert an rpm to a deb package -- or at least try as rpms can have complex install/remove scripts. `alien` can be told to do everything but build the deb, where you can look at what the rpm tries to do and maybe clean it up before building the deb.  If `rpmextract` did the trick, then don't worry about `alien`.
Comment: `tgz` then (which will be close to what pacman uses, but not the same)  A `deb` can easily be extracted using `cpio`. (and `tgz`, directly with tar.) RPM is a bastardized cpio archive -- it has a bunch of junk before the gzip'd cpio stream.
Answer: I'm not sure if these would work for everyone, but its the fastest way if you don't care what it may or may not do
I did these to get skype working on arch, basically open the .rpm file, then see if you can find a file named "." If you do then copy the files within the "." file to your root directory (AKA "/")
I do not recommend these unless you know exactly what you're doing

Install RPM file on Arch Linux?


Error Logging FoxPro vs .Net

Question: Back in the day -- Fred Flintstone was still in shorts -- in FoxPro, you could STORE everything in memory to a MEMO field in a table with a single command.
I don't know about other practical uses, nor the wisdom of it, but I loved to use it when 'AirdisplacementDevice Implements ManureSpreader' : when an error occurred you'd store the memory in the memo field.
You could then use RESTORE FROM, load the stored memory and re-enact the event in all it's gory detail and start debugging.
I was wondering, is there an 'easy' way to do that in .Net ?
Answer: Net exactly, but you can use reflection to get details about properties and such and you can get access from the stack trace. I'm not aware of any way to stash away current state and then some how load these values when debugging.

Error Logging FoxPro vs .Net


how does nvidia-smi work?

Question: What is the internal operation that allows nvidia-smi fetch the hardware level details? The tool executes even when some process is already running on the GPU device and gets the utilization details, name and id of the process etc. Is it possible to develop such a tool at the user level? How is NVML related?
Answer: Nvidia-smi is a thin wrapper around NVML. You can code with NVML with help of SDK contained in Tesla Deployment Kit.
Everything that can be done with nvidia-smi can be queried straight from the C library NVML. If you need to query this data in an app of some sort, it's better (and probably easier) to write against NVML instead of parse nvidia-smi stdout (which format changed in the past).
There are also python and perl bindings for NVML library. So you can use higher level programming langugage than C.
Comment: So it is not possible to query anything, not provided through NVML using nvidia-smi? NVML doesn't provide any access to SM level detail. So I was thinking of communicating with the driver in alternate ways. Is it possible with nvidia-smi or some other tool?
Comment: There are more libraries provided by NVIDIA. NVML is for managing GPUs on a high level (e.g. Tool for an sys admin). It seems you're interested more in profiling. Take a look at http://docs.nvidia.com/cuda/cupti/index.html than.
Comment: Do commandline profiling, nvprof and visual profiler use the same CUPTI? With those, I can just get the profiling results at the end of execution. And they are specific to applications. The profiling of an application can be done by adding CUPTI APIs in the source code (like in events_sampling example with threads) or during execution, the nvvp or nvprof commands are associated with the executable.
Comment: [continued..]  That means CUPTI is used for application profiling. I want some tool like nvidia-smi, which just gives the status of the device. CUPTI provides APIs for active_cycles, active_warps etc. but can they be used outside the application to just check the instantaneous status of an SM? I am a beginner, sorry if I am wrong somewhere.
Comment: I haven't ever used CUPTI. The easiest way is to try it out. AFAIK nvprof uses CUPTI underneath so the functionality of these utilities is a good representation of what's available in CUPTI API.

how does nvidia-smi work?


removing glue from felt pads on chair legs

Question: I am trying to remove old glue from chair felt pads.  I have tried GooGone, sanding and paint thinner.  Does anyone have a remedy for this problem?
Answer: If the glue is still tacky at all (or ever was), Laquer Thinner or "Goof Off" may be a good solvent.  If the glue is a hard type glue such as Elmer's or a Wood glue, your best bet is to try to chip off as much as possible with a sharp pocket knife. Then a block sander or electric sander may work OK for the rest.  Or if you have access to a flat bastard file ($4.99 or so at Sears Hardware or Home Depot, Lowe's, etc..), then you can really put some muscle into it.
Answer: I had chairs that had the felt pads on top of chair gliders, bought used. Chairs very hard to move on tile, got stuck, left black gunk on floor.  Used hammer and screw driver, chiseled them off. Worked great. Chairs move wonderfully now.
Answer: See if you can get some evo stick adhesive remover...its in a red tin. It really is the best...we use it in the factory so it is industrial strength stuff. If that doesn't get it off I doubt anything will.
Answer: I had to do this recently with some old flimsy chairs.

Secure chair on the side or upside down, if the legs are flimsy maybe secure them as well.
Use a sharp wood chisel to remove the chunks.  Watch your hands, fingers and wear eye protection.
Work chisel between the wood and glue or slice through layers of glue.
Once the majority is gone, use a sanding block or orbital sander to sand down to the wood.  You want the sandpaper backed by a hard surface.

It sounds like you are almost there, the two main ingredients are determination and patience.
Answer: I've always use nail varnish remover and a old rag.


Are my data stationary or non-stationary and why?

Question: I am a little confused about whether this graph shows stationary or non-stationary time series:
Answer: The autocorrelation graphs show nothing about stationarity. In fact, they rely on the assumption that your time series is covariance stationary (otherwise you wouldn't have a single autocorrelation coefficient).
A time series can be non-stationary for two reasons: it follows a deterministic trend (which would make its mean non-constant) or it has a unit root (ie. it follows a random walk).
For the first case looking at a graph is probably the easiest way to tell is probably by plotting or to think of a model which would justify a particular trend. For the second, the Augmented Dickey Fuller test is the easiest way to approach it.
PS:I know this answer comes quite late but I was having similar issues and this might help someone else.
Answer: Impossible to make a determination as there my be level shifts ( causing npn-nob-staionarity ) , time trends (causing non-stationarity ) , chnages in paramters over time ( causing non-stationarity ) , changes in the variance of the errors over time ( causing no,-statioanarity )   etc.... Please post you data as that will disclose whether or not your data is stationary or non-stationary.
Answer: Looking at the pictures it seems to be stationary, nevertheless I suggest you to run Dickey–Fuller or Augmented Dickey–Fuller test in order to have a definitive answer.
Comment: The graph seems to a trend down or possibly the start of a cyclic pattern.   Nothing to indicate stationarity.
Comment: Could you explain what it is about the graphics that suggests stationarity?  It looks like one ought to draw the opposite conclusion, especially from the consistent trend in the acf and the extraordinarily high partial autocorrelation at lag 40.
Comment: Graphs only can give you intuitions or clues, there is no way other than statistical tests to evaluate it.
Answer: The structure of this serie is that of  linear trend and circle. A single straight line can run through the centre of the series to the end. Implying that it has a single mean through the whole length of time and therefore stationary. This circles sorrounding the mean imply that the signal has stationary trend and circles
Comment: This answer seems not to recognize that the plots in the question are an *autocorrelation function* (ACF) and *partial autocorrelation function* (PACF).  In that context this answer makes no sense.
Comment: As it's currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


windows could not start sql server ( error 1067 the process terminated unexpectedly)

Question:
Possible Duplicate:
windows could not start sql server ( error 1067 the process terminated unexpectedly)

When i start sql server 2008 in my computer this error occurs,
Windows could not start sql server (MSSqlServer) service on local computer error 1067 the process terminated unexpectedly.
Comment: Check the eventviewer logs and you will probably find reason there. type `eventvwr.msc` in cmd prompt to get there.
Comment: Could not register Service Control Handler. Operating system error = 1222(failed to retrieve text for this error. Reason: 15100).
Comment: no my disk is empty
Comment: i reading this http://social.msdn.microsoft.com/Forums/en/sqlgetstarted/thread/ef306f44-64b1-44ad-b614-aea0e2ea8175
Comment: Already asked on [ServerFault](http://serverfault.com/questions/232022/windows)...
Comment: i asked in ServerFault but nobody answer
Answer: It is likely something is corrupted.
If this is a production box, talk to your DBA.
You may have to run a SQL Server Repair as per this post.


How to write 4 part chord progressions when the roots are only a step apart

Question:
My textbook instructs me to use contrary motion with the upper parts against the bass when writing chords a step apart. But here in this image you can see I have voiced the chords IV - V so that I can have them rise in parallel without any perfect intervals in parallel motion. Is what I have done acceptable or is it considered to be bad voice leading?
Comment: What does it sound like to you when you play it? A lot of the 'rules' are based on what the end product sounds like, so more than half the battle is won when what gets written sounds good.
Answer: What you've written will sound quite nice.  I like the effect of all voices rising towards a cadence.  Very uplifting.
But it isn't  Bach-style SATB writing, and I wouldn't advise doing it in an elementary theory class!  It breaks too many rules.
You've got parallel 5ths between bass and alto, octaves between bass and soprano.    The 'rule' about preferring contrary motion when roots are a step apart is because otherwise it's hard to avoid such things.


Copy Gnosis-safe on Ethereum to safe on Polygon with same safe address

Question: we followed the instructions here, https://www.loom.com/share/ca34aabcd62747fb9fb89bd463b4c741, to create a safe with the same address as our original safe on Ethereum, on the Polygon network.
Our safe address is 0x7E08C7606aCF5887B7dA9914f7c7cD05c2bec8Ab
The transaction went through and we can see it here: https://polygonscan.com/address/0x7E08C7606aCF5887B7dA9914f7c7cD05c2bec8Ab, but it's not registered as a contract and we can't switch the network in our gnosis safe.
Did we do something wrong ? Or how long will it take before we can access it ?
Answer:
You sent the transaction to the safe address but instead should've sent it to the factory contract, please follow the video carefully.
You will not be able to use the Safe in the interface, please check the video description:

However, existing Safe addresses on Eth mainnet re-created on L2/sidechains (and vice versa) do not load up within our UI. This is because they use different singleton contracts. Therefore, users would need to load these newly created Safes via another UI e.g. through our command line interface: https://github.com/gnosis/safe-cli.

This functionality is only intended for the recovery of funds sent on an incorrect network.
Answer: To load the Safe
pip3 install -U safe-cli
safe-cli <safe_address> <node_url>

To perform actions on that safe:
tx-service balances
send_ether <address> <value-wei>

See safe-cli and my previous answer for more context.


I am Getting Sorry, no posts matched your criteria on form submit only for certain page

Question: I have created my own custom forms plugin in which I have created a form and after submitting I get "Sorry, no posts matched your criteria". The strange thing is when I added form to other 2 pages its working fine.
Comment: This sounds like something you'll have to debug yourself, sorry. How are you submitting the form - where are you submitting it to, a REST API endpoint? What's the difference between the pages where it works and where it doesn't? Can you watch the submission in your browser debug tools to see any difference between the pages that work and the one that doesn't? Can you add code to the code that's handling the form submission in the back end to see what's different?
Answer: I've finally figured out the problem. All the code, in all it's variations was fine and works, except for one tiny thing. The variable '$name' is used by the WordPress system to display the blog name, and as I was using that as my variable for the name field on my form it was causing issues. Who knew.
Anyway, I simply changed it to use '$fullName' and changed the id and name attributes on the form to 'full-name' and everything worked great.


frida-server being targeted by port scan?

Question: Whenever I install and start frida-server, I have a banking app that behaves weirdly. After some research, I discovered some app may be able to do a port scan on the device running frida-server at the NDK level. I tried changing frida-server's default port to something else but I'm still reproducing the app's exact behavior.
According to mullerberndt, I have put together a script that checks for both frida-server's default port and the whole range of ports and send a D-Bus protocol probe
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>

struct sockaddr_in sa;

int detect_frida_server(void);
bool check_protocol(int);
bool check_all_ports(int);

int main() {
    int res = detect_frida_server();
    printf("Detection result return value: %d\n", res);
    return 0;
}

int detect_frida_server() {
    const int fs_port = 27047;
    memset(&sa, 0 , sizeof(sa));
    sa.sin_family = AF_INET;
    sa.sin_port = htons(fs_port);
    inet_aton("127.0.0.1", &(sa.sin_addr));

    int sock = socket(AF_INET, SOCK_STREAM, 0);

    if(connect(sock, (struct sockaddr *) &sa, sizeof sa) != -1) {
        printf("FRIDA DETECTION[1]: Open port: %d\n", fs_port);
        if(check_protocol(sock)) {
            printf("Frida server detected!");
            return 1;
        }
        printf("Suspicious.\n");
        return 2;
    }
    else if(check_all_ports(fs_port)) {
        printf("Frida server detected!");
        return 1;
    }

    if(check_all_ports(fs_port)) {
        printf("Frida server detected!");
        return 1;
    }
    return 0;
}

bool check_all_ports(int port) {
    int i, sock;
    for (i = 0; i <=65535; i++) {
        if(i == port) continue;

        sock = socket(AF_INET, SOCK_STREAM, 0);
        sa.sin_port = htons(i);

        if(connect(sock, (struct sockaddr *) &sa, sizeof sa) != -1)
        {
            printf("FRIDA DETECTION[1]: Open port: %d\n", i);
            if(check_protocol(sock)) return true;
        }
    }

    return false;
}

bool check_protocol(int s) {
    char res[7];
    bool rres = false;

    memset((void*) res, 0, sizeof(res));

    send(s, "\x00", 1, NULL);
    send(s, "AUTH\r\n", 6, NULL);

    usleep(100);

    if(recv(s, res, sizeof(res) - 1, MSG_DONTWAIT) != -1)
        if(strcmp(res, "REJECT") == 0)
            rres = true;

    return rres;
}

Compiled it with
\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android21-clang detect-fs.c -o detect_frida
And push with
adb push detect_frida /data/local/tmp/detect-fs-v2
When running the code, I was able to detect the open port and connect but the D-Bus protocol didn't seem to be working, hence stuck in a loop (if connected it would print Frida detected"):
here
So I trimmed down the code to just connecting to port and returning a true/false value:
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>

int port_scan(void);

int main() {
    int open = port_scan();
    if(open) printf("Port is open at: %d\n", open);
    else printf("No ports were found to be open. System secure.\n");
    return 0;
}

int port_scan() {
    struct sockaddr_in sa;
    memset(&sa, 0 , sizeof(sa));
    sa.sin_family = AF_INET;

    for(int i = 0; i < 65535; i++) {
        int sock = socket(AF_INET, SOCK_STREAM, 0);
        sa.sin_port = htons(i);

        if(connect(sock, (struct sockaddr *) &sa, sizeof sa) != -1) {
            close(sock);
            return i;
        }

    }

    return 0;
}

without the connection protocol. I suspect this is what my app of interest was doing. To be fair, I gave my binary root access and did chmod 775 on the binary. But I do wonder if Play store apps would be able to detect this in a non-rooted environment at the NDK level without going through the hassle of trying to build an apk to test myself.
Is it reasonable to expect that no ports should be allowed to listen on localhost in a non-rooted android environment? (Not even a web server on port 80)? Well, since the app didn't outright complain root i know its capable for the most outright  cases, reasonable to assume  it was giving me a benefit of doubt but hinting my environment isn't secure.
So apart from mullerberndt's method of port scanning for frida-server, the alternative would be checking for frida-gadget, which we aren't using, how could we write a frida script to hook connect method to return false (ie all ports are closed). Keep in mind we have to allow legitimate connect methods as this is the fundamental of app communication methodology with its own backend
Also, how long would scanning all ports take on an android device to be discretely practical as a means of root/tamper checking?
Comment: Have you tried to capture the localhost traffic (not sure if this is possible on Android)? Alternatively you could stop frida and open a different tool on that port that records incoming requests. Th is way you would see if the banking app sends something to frida-server.
Comment: It doesn't  need to, ut just checks if port is open ie. Can connect or not. That's why I'm asking if apps can make that assumption just because a server is running on an android device. But yes I could create a server that runs and register it as a service
Answer: On further research, I was actually found to be running 2 instances of frida-server one on a default port the other on a custom port. I had to run the first port scanner script on my device and wait for it to finish. It took me about 5-10 mins on Termux.
Simply starting the server on a different port and making sure you dont have any other instances of frida running on the original port solves the issue, my app ceases to exhibit the weird behavior. For obvious reasons, I will neither state the bank app in question nor the abnormal behaviour of the app in response. Banks consider running their apps in a rooted environment a very sensitive security issue.
I just conclude my target app was simply actually checking to see if frida was listening on the default port 27047 with this code
 boolean is_frida_server_listening() {
    struct sockaddr_in sa;

    memset(&sa, 0, sizeof(sa));
    sa.sin_family = AF_INET;
    sa.sin_port = htons(27047);
    inet_aton("127.0.0.1", &(sa.sin_addr));

    int sock = socket(AF_INET , SOCK_STREAM , 0);

    if (connect(sock , (struct sockaddr*)&sa , sizeof sa) != -1) {
      /* Frida server detected. Do something… */
    }

}

Source: The Jiu-Jitsu of Detecting Frida (archived)
Which answers my question of how much time it would take to run a full port scan on all the 65535 ports. Basically 5 - 10 mins on an arm-64 Android device. Not a good option for a root detector that simply needs to complete their checks in seconds. When you can simply just change the port. And the creators of frida have changed their hand-shake protocol so that isn't working now.
Hope this helps anyone out there


What activities will require an Excelsior covid pass?

Question: NY's website and re-opening plan is difficult for me to understand, and the website is very opaque.  What sorts of activities will require an Excelsior pass or recent negative covid test, and will these requirements vary by county or municipality?
Comment: @DavidSiegel done.
Comment: can you add a link to the site please?
Answer: It seems to be pretty vague at the moment, and I've copied what I see as relevant to the question.

If you're attending an event or business and you're not sure if you
can use Excelsior Pass—please check with the business or venue in
advance.

There will be many opportunities to use Excelsior Pass, with more
coming soon!
Currently, several industries are currently or expected to require
proof of COVID-19 vaccination or negative test results for entry.
Once you and your party enter an establishment, you will still
be asked to follow other State guidance regarding social distancing or
face coverings.
Weddings and Catered Events:
Weddings and catered events can operate
at 50 percent capacity, with no more than 150 people per event, as
long as all patrons are tested before the event. Specifically, patrons
or guests must have received a negative COVID-19 PCR test that was
taken within 72 hours of the start time of the event or an authorized
antigen test performed within 6 hours of the event start time.
Major Stadiums & Arenas:
At major stadiums and arenas, spectators must
show proof of a negative COVID-19 PCR test taken within 72 hours,
COVID-19 antigen test taken within 6 hours, or proof of full
vaccination (to be fully vaccinated you must have completed your
vaccine series at least 14 days prior). As of April 1, smaller sports
venues can also reopen with spectators under the same guidelines for
proof of a negative test or vaccination. Easily retrieve and save
proof of vaccination or a negative COVID-19 test with Excelsior Pass.
Events, Arts & Entertainment Venues: Starting April 2, venues can
welcome more people with proof of vaccination or a recent negative
COVID test for entry. Easily retrieve and save proof of vaccination or
a negative COVID-19 test with Excelsior Pass.


send a text message via .net

Question: All:  Are there any free solutions out there for sending text messages (SMS) via .net?  (maybe a web service or something?).
EDIT
What I'm really looking for is a reference for a reputable online service that I can use for sending SMS messages.  Has anyone out there used such a service, and if so, can you give me a recommendation/warning?
EDIT

(first the disclaimer:  I'm not in any way associated with this company, I'm just posting back what I found, in case anyone else out there is looking)

An update:  I ended up going with www.clickatel.com  My work was for a technology exploration and demo project,and I could buy credits on that system cheap.  In my case, I started out using their REST API.  I had problems with that api (sometimes the commands would timeout).  So I switched to the web service API (SOAP)  It worked very well for me.
Comment: [http://www.codeproject.com/KB/IP/Sending_SMS_using_Net.aspx](http://www.codeproject.com/KB/IP/Sending_SMS_using_Net.aspx) this is an article that explains how to do it
Answer: Most accept email but it is vendor specific.

send a text message via .net


Performance difference between MOVE and = assignment in ABAP

Question: Is there any kind of performance gain between 'MOVE TO' vs x = y? I have a really old program I am optimizing and would like to know if it's worth it to pull out all the MOVE TO.  Any other general tips on ABAP optimization would be great as well.
Answer: No, that is just the same operation expressed in two different ways. Nothing to gain there. If you're out for generic hints, there's a good book available that I'd recommend studying in detail. If you have to optimize a specific program, use the tracing tools (transaction SAT in sufficiently current releases).
Answer: The two statements are equivalent:
"
To assign the value of a data object source to a variable destination, use the following statement:
MOVE source TO destination.

or the equivalent statement
destination = source.

"
Answer: First of all move does not really affect much performance.
What is affecting quite a lot in the projects I worked for is following:

Nested loops (very evil). For example, loop through all documents, and for each document select single to check it company code is allowed to be displayed.
Instead, make a list of company codes, consult them all once from db and consult this results table instead.
Use hash or sorted tables where possible. Where not possible, use standard table, but sort it by keys and use "binary search".
Select from DB by all key fields. If not possible, consider creating indexes.
For small and simple selects, use joins. For bigger selects  using joins will still work faster, but would be difficult to follow up.
Minor thing - use field symbols to read table line, this makes it much faster.
Answer: No, they're the same.
Here's a couple quick hints from my years of performance enhancement:
1) if you use move-corresponding where possible, your code can be a lot more concise, modular, and extendable (in the distant past this was frowned upon but the technical reasons for this are generally not applicable anymore).
2) Use SAT at every opportunity, and be sure to turn on internal table tracking.  This is like turning on the lights versus stumbling over furniture in the dark.
3) Make the database layer do as much work as possible for you.  Try to combine queries wherever possible, especially when combining result sets.  Two queries linked by a join is usually much better than select > itab > select FOR ALL ENTRIES.
4) This is a bit advanced, but FOR ALL ENTRIES often has much slower performance than the equivalent select-options IN phrase.  This seems to be because the latter is built as one big query to the database layer while the former requires multiple trips to the database layer.  The caveat, of course, is that if you have too many records in your select-options the generated query at the database layer will exceed the allowable size on your system, but large performance gains are possible within that limitation.  In general, SAP just loves select-options.
5) Index, index, index!
Answer: 1) You should be careful while using SELECT statement in ABAP language.
Unnecessary database connections significantly decreases the performance of ABAP program.
2) While using internal table with functions you should call it by reference to reduce memory usage.
Call By Reference:
Passes a pointer to the memory location.Changes made to the
variable within the subroutine affects the variable outside
the subroutine.
3)Should not use internal tables with workarea.
4)While using nested loops, use sorting algorithms.
Answer: They are the same, as is the ADD keyword and + operator.
If you do want to optimize your ABAP, I have found the largest culprits to be:

Not using binary lookups and/or (internal) table keys properly.
The syntax of ABAP is brain-dead when it comes to table use. Know how
to work with tables efficiently. Basically write
better/optimal/elegant high-level code. This is always a winner!
Fewer instructions == less time. The fewer instructions you hit the
faster the program will run. This is important in tight loops... I
know this sounds obvious, but ABAP is so slow, that if you are really
trying to optimize critical programs, this will make a difference.
(We have processes that run days... and shaving off an hour or so
makes a difference!)
Don't mix types. There is a little bit of overhead to some
implicit conversions... for instance if you are initializing a
string data type, then use the correct literal string with
(backtick) quotes: `literal`. This also counts for looking up in
tables using keys... use exact match datatypes.
Function calls... I cannot stress the overhead of function calls
enough... the less you have the better. Goes against anything a real
computer programmer believes, but there you have it... ABAP is a
special case.
Loop using ASSIGNING (or REF TO - slightly slower on certain
types), avoid INTO like a plague.

PS: Also keep in mind that SWITCH statements are just glorified IF conditionals... thus move the most common conditions to the top!
Answer: You can create CDS with ADT Eclipse. Or views(se11) have good performance for selecting.
Answer: "MOVE a TO" b and "a = b" are just same in ABAP. There is no performance difference "MOVE" is just a more visible, noticeable version.
But if you talk about "MOVE-CORRESPONDING", yes, there is a performance difference. It's more practical to code, but actually runs slower then direct movement.


How to best keep a bunch of coriander fresh?

Question: I bought this bunch of coriander at my local fruit shop. What is the best way to keep it fresh as long as possible? I usually cut off about 1 cm of the stems and then put them into a glass of water, at room temperature. I wonder if I would be better off putting them into the fridge, with or without the water. Or if there is another option I'm unaware of.
Comment: @Erica : with the exception being that this is cilantro ... so the best way to store it is in a plastic bag, then place in the trash can.
Comment: As far as I know many (most?) asian grocery stores in Germany have the coriander (with roots!) in plastic bags (without water). The coriander is stored in the fridge.
Comment: Coriander (cilantro) is similar to parsley... I wonder if one can keep it in water like a flower... that's how my dad stores parsley.
Comment: I keep them in a glass of water as well, but also in a fridge. Sounds like it would a useful experiment to see whether one method is more effective than another :)
Comment: @Joe I think you must have the "cilantro gene"... http://www.npr.org/blogs/thesalt/2012/09/14/161057954/love-to-hate-cilantro-its-in-your-genes-and-maybe-in-your-head
Answer: For almost all delicate green herbs, the best thing to do is

Hold them by the bottom of the bunch and gently swirl in plenty of
cool water to remove all the dirt
Gently shake to remove excess water
Wrap loosely in a damp paper towel
Place in a plastic bag and store in the crisper drawer of your refrigerator

This will keep most herbs fresh for many days.
Comment: I'd actually argue against washing them and/or using a damp towel.  I can store most herbs (not basil) for 2+ weeks by [wrapping them in a dry paper towel, plastic bag, and into the crisper](http://cooking.stackexchange.com/a/473/67).  In my experience, moisture leads to rotting.
Answer: Taking off the twist tie (or whatever is holding the bunch together) is the first step--cilantro always seems to rot most when tightly packed.  After that, I've had good luck with an occasional trip in the salad spinner.  It can be used to help separate out (remove) any cilantro already completely turned to mush (which seems to happen to me even when most of the cilantro is completely fine) and should leave the remaining cilantro mostly dry.  Then I wrap what remains in a dry paper towel (which usually gets a little damp as it wicks moisture from the cilantro) and put in a plastic bag in the crisper drawer.


Is there a way to find out if a given app supports GCM (like APNS)?

Question: Is there a way to find out if a given app supports GCM (Google Cloud Messaging)?
(GCM is Google's version of APNS.)
Comment: I could imagine that requires some permission (like `RECEIVE_WAP_PUSH`), or at least has to declare an corresponding intent/broadcast-receiver in its `Manifest`. But as I'm not sure, I only leave these pointers in a comment until someone can approve the one or other :)
Comment: @Izzy, why would it have `WAP` in its name?
Comment: It would probably not. I just gave an example of one permission I know of, which is also related to push. I rather think it's a broadcast receiver. But I'm not a dev, so I'm not sure how exactly it works.
Comment: I think Acrobits Groundwire is supposed to have GCM, maybe someone can find out...
Answer: As the developer documentation describes, an app needs the permission com.google.android.c2dm.permission.RECEIVE to receive GCM messages. This shows up in the permissions list as "Receive data from Internet" (which is a little vague, I know).
Of course, the presence of the permission doesn't necessarily mean the app actually will use GCM. Even if it does use GCM, it might not use it for all the uses you think it might use it for: maybe only some kinds of 'refresh' or polling operations can be replaced by GCM uses. And even if it uses GCM fully, in all the ways you'd expect, it's still possible for the app to use more power than it needs to. Using GCM is no guarantee that the app is well-written or efficient.
Comment: @cnst Nonsense. Not using GCM doesn't mean the app is running all the time, and in some uses cases, might be more efficient. For example, if you get several emails per hour, an email client that runs every hour to check mail will use less power than one that receives a GCM push every time mail arrives at the server.
Comment: Anyway, it misses my original point, which is that even if GCM is the right answer for a particular app, the app might still end up being a battery or bandwidth hog for other reasons.
Comment: *"Using GCM is no guarantee that the app is well-written or efficient."*  Whilst what you say above it true, I still reserve my opinion that *not* using GCM *does* guarantee that the app is not efficient.
Comment: I guess I just have IM and VoIP/SIP in mind, for which I still believe that my assertion stands.
Comment: @cnst That's a very narrow set of uses. I wouldn't want other visitors to think that what's true for an IM client is true for every kind of application that might use GCM.


LTE-HAT GPIO SIM7600

Question: I´m able to connect to the internet via the SIM7600 4G HAT modem when it´s connected to USB. Now I´d like to achieve the same without USB but only with the GPIO connection. Somehow the manual (https://www.waveshare.com/w/upload/6/6d/SIM7600E-H-4G-HAT-Manual-EN.pdf) is´nt quite explicit on how to achieve this or I´m overlooking something or it´s just not possible.
Some help would be very welcome. Many thanks in advance.
Answer: I have been testing it and I think this needs a certain type of driver or adapter software for the connection to run only by GPIO pins on the Raspberry Pi. I only have been successful connecting this SIM7600E-H with the help of Modem Manager, since I cannot establish the IP without it, but been able to register into the NAT by only AT command. Then, with another USB cable connected to the USB entry (not the USB-TO-UART one), Modem Manager can recognize the device by cdc-wdm0 and stablish the connection, being necessary with this setup to registered by AT commands first, then connecting by Modem Manager. The commands I sent to /dev/serial0, in my case by minicom, are the next:
AT+CENABLELAN=1

AT+CFUN=1,1

Then, sometimes the NET led keeps being red, and other times it starts blinking quickly, so the network is registered. Then, with the one USB cable attached (without Modem Manager cannot detect the modem), the modem can be connected by:
mmcli -m 0 -e
mmcli -m 0 --simple-connect='apn=,ip-type='

sudo udhcpc -i wwan0

LTE-HAT GPIO SIM7600


Moving a black hole

Question: What (if any) would be a viable option for moving a black hole with a similar mass to our moon? The black hole is not very far away (i.e disregard difficulties in reaching it). Ideally, there should be a deployable option for both short and long distances (at least 0.5 light years)(short and long distances can have separate methods). Obviously, mounting physical thrusters is impossible, so is there a different way of "pushing" one?
Comment: Throw in some electric charge. Then use the usual means to move electric charge. Pretty sure this is a "trope" in science fiction. You need to have "honking" big stuff to move a mass that size, but it's scale not a new idea.
Comment: Use a gravity tractor. Gravity still works with black holes.
Comment: *Technically* this is a duplicate of [this question](https://worldbuilding.stackexchange.com/q/132252/40609) But that question was so badly asked that I'm not going to VTC as a duplicate. [This other question](https://worldbuilding.stackexchange.com/q/181222/40609) is almost a duplicate. It's worth looking at their answers if only to get a more broad view of the idea.
Comment: @JBH I Didn't notice those before. They don't seem to be exactly what I'm looking for though.
Comment: @zevythegreat Yeah, that's why I didn't VTC as a duplicate. We have really good questions about moving planets, though, that might also be worth looking at just to get more ideas (search for "is:q moving planet").
Answer: Black holes are not particularly special when considered far from the event horizon. They behave like any object with mass, charge, angular momentum, they follow geodesics, and so on. When fields are weak and speeds are low, GR behaves like Newtonian mechanics.
Momentum transfer
So, right off the bat, one way you can move a black hole is to crash a projectile into it, something with a lot of momentum to donate.
$$p=m_{p}v$$
As mass of the projectile, $m_p$, decreases, its velocity must increase to maintain the same momentum. If the black hole fully absorbs the projectile and nothing is scattered, then it gains all of the projectile's momentum. You can calculate the delta-v inflicted on the black hole by rearranging the momentum equation:
$$Δv=\frac{p}{M}$$
Where $M$ is the mass of the black hole, $7.35\cdot10^{22}$ kg. First, let's find the size of the black hole to figure the size of the projectiles, in order to fully intersect with the black hole's cross-sectional area. The radius of a Schwarzschild black hole is given by:
$$r=\frac{2GM}{c^{2}}$$
This comes out to 0.2 mm in diameter. Let's make the projectiles 0.1 mm across, just to be safe, and assume they're made of iron with density 7,900 kg/m^3. Projectile mass comes out to $3.3\cdot10^{-8}$ kg. Vanishingly small. Maybe ultra-high speeds will make up for the lack of mass?
If the iron spheres move at fully half-lightspeed, they each impart $6.8\cdot10^{-23}$ m/s delta-v. Yikes.
Presumably you've got a linear accelerator shooting these things like mad, and macron accelerators can be quite efficient at translating electrical energy to kinetic energy, but even after a combined one billion projectiles the total delta-v inflicted on the black hole is $6.8\cdot10^{-14}$ m/s.
Maybe you've got one long'n accelerator, so let's look at higher speeds. To do that we'll need to use the formula for relativistic momentum instead:
$$p_{R}=\frac{m_{p}v}{\sqrt{1-\frac{v^{2}}{c^{2}}}}$$
One of these projectiles moving at $0.999999997$ c imparts a delta-v of $1.65\cdot10^{-18}$ m/s, and one billion yields a combined $1.65\cdot10^{-9}$ m/s. Yikes, still.
Now, a macron accelerator scaled for the job at hand could probably churn out millions of these particles, and over time it would have an effect. An accelerator shooting one million every second for a year will have imparted 0.00005 m/s delta-v, displaced the black hole by 0.0008 m, and raised the black hole mass by 1,000,000 kg. It would take 35 years and 36,000 metric tonnes of iron macrons to move the black hole 1 meter.

Electrostatic accelerator
A better option might be to give the black hole an incredible charge and stick it in an electrostatic accelerator.
Charged objects feel a force when placed between electrodes, proportional to the accelerator voltage gradient and the object's charge. The exit velocity of a particle through a linear electrostatic accelerator is given by:
$$v_{exit}=\sqrt{2V\frac{C}{M}}$$
$V$ is the difference in voltage, $C$ is the surface charge on the object, and $M$ is the mass of the object. The surface charge can be found by:
$$C=4\pi ε_{0}V_{g}r^{2}$$
$V_g$ is the voltage gradient across the object and $r$ is the object's radius. With a voltage gradient of 100M V/m and black hole radius of 0.0001 m I get a surface charge of $1.11\cdot10^{-10}$ Coulombs. Going back to the first equation, if the voltage gradient across the accelerator is 100M volts, I get an exit velocity of $5.5\cdot10^{-13}$ m/s.
(Disclaimer, I'm not sure whether some of these voltage figures are "reasonable", even for extrapolated super sci-fi tech.)

Black hole rocket
Linear accelerator is out, and it seems there's no easy way to do this.
Here's my suggestion: you've got a black hole that's just the right size for power generation via matter accretion (you could get away with smaller, but a tenth of a millimeter is probably okay). If memory serves, micro black holes have the potential for 40% mass-energy conversion, which is on par, if not better, than matter-antimatter efficiencies. If you dump a lot of charged matter into the black hole, you can pin it in a powerful magnetic field and draw power from the emitted radiation of accretion, and probably the magnetic pressure of containment as well. You're probably looking at petawatts of power, minimum, which could be used to power an efficient electric thruster.
Alternatively, you might use the accretion energy to heat reaction mass like hydrogen to extreme temperatures and thrust off of it with a magnetic nozzle, creating a very efficient thermal rocket; or, you might redirect some of the super-hot accretion matter itself as exhaust.
Ballparking some figures, if your black hole rocket has 1 Lunar mass of hydrogen fuel (mass ratio of 2) and can expel the hydrogen at an exhaust velocity of 30% c, then delta-v comes out to ~7% c, enough for a boost up to 3.5% c and back down again. With a mass flow of (ballparking here) 10,000,000 kg/s (VERY high), we get a thrust of $3\cdot10^{14}$ N, an acceleration of $4.1\cdot10^{-9}$ m/s^2, and a burn time (the time it takes to burn all reaction mass) of 230 million years. To get burn time into timescales measured in centuries, mass flow needs to increase to 10 trillion kg/s, which is just downright unrealistic (that's like 1 Mount Everest every second).
Clearly, the black hole doing all its own pushing isn't going to cut it. (There probably exists an equilibrium though where a small enough black hole (that's not too small for accretion) can manage mass flows that equate to burn times on human timescales.) Clearly, the black hole needs outside help. I would suggest using some of the black hole's accretion energy for thrust, diverting the rest to magnetic confinement, and using external propulsion such as beamed power from a large solar array. A large laser sail, or magnetic sail, tethered to the black hole containment machinery, receiving exawatts of equivalent thrust power to seriously boost it up to speed. The sails would have to be quite large, probably thousands of kilometers across, to achieve enough collection area for beam power.
Once you've got it up to speed, you'd definitely make use of gravitational assists and slingshot maneuvers where and when you can.

At the end of the day, you're trying to move something as heavy as the Moon, and that's going to be costly no matter which way you look at it.
Comment: I wish I could upvote this twice -- first for the pitiful amount of acceleration and motion you could impart by dropping in momentum or with the classic (going back to early Niven, at least) electrostatic traction method, and secondly for the super-civilization-viable self-thrusting method (burn time of 230 million years at half a nano-G doesn't seem terrible if you think on a universe-lifetime scale).  BTW, slingshotting mass around just outside the ergosphere would double the effect for a give amount of momentum input, but that's still nothing, near enough.
Answer: TL;DR: the energy requirements for moving a black hole over even slightly interstellar distances (eg. your 0.5ly journey) are so unreasonable as to be out of the reach of anything but a Kardashev level 2 civilization, and therefore practically godlike by our standards. No merely human-level things are plausibly going to be able to do what you ask.

The Dying Of The Light mentioned gravity tractors, and that's one way in which you might move a massive object without physically attaching rockets to it or waving your hands and invoking sufficiently advanced technology. This basically involves another massive object "hovering" near the thing you're trying to move, using its own reaction motors to stop it falling into the payload, and relying on the mutual gravitational attraction of the payload and tug to drag the payload.
The mass of the tug is given by $$m_2 = \frac{Fr^2}{Gm_1}$$ where $F$ is the desired force to impart to the payload, $r$ is the separation of the tug and the payload, $m_2$ is the mass of the payload (eg. the mass of the moon in this case) and $G$ is the gravitational constant. In the simplest-to-calculate case, lets do a continuous thrust uniform acceleration brachistochrone transit to move the black hole 0.5ly in 1000 years. This requires an acceleration of approximately 2 microgees, giving a thrust of about 1.4 exanewtons (1.4x1018N). If you positioned your tug a mere 100km away from the black hole (black hole gravitational field strength of 50 gees) then its mass could be as low as 2.8x1015kg. If it were 1000km away, the mass requirement increases to 2.8x1017kg, but that's still 5 orders of magnitude smaller than the moon. For comparison, Saturn's moon Calypso has appoximately the mass of the former, andhas a mean radius of ~10km. Elara, a moon of Jupiter, has the mass of the larger tug and has a mean radius of ~80km.
The transit has a total delta-V of ~600km/s. A beam-core rocket with an exhaust velocity of 0.3c would necessitate a mass ratio of only 1.007, which is pretty reasonable giving a ballpark antimatter requirement of about 2.5x1020kg (plus the same amount againt of the regular stuff)... for reference, Enceladus is about 1020kg, so your total propellant supply is equivalent to about five enceladuses. You'd probably park them in higher orbits around the black hole such that they wouldn't ever block the thrust plume of the big rocket.
(side-note: you can't easily use the black hole itself for power generation here, because its Bekenstein-Hawking luminosity is a fraction of a watt... you might be able to build an accretion disk and use that as a power source, but that adds a non-trivial amount of mass and has its own problems which are too complex for me to examine here, mostly around how big the hot region of an accretion disk around a lunar-mass black hole could actually be)
Producing that much antimatter, and transporting half a lightyear, and then maintaining it for a millenium and tapping it safely and burning it efficiently throughout that time is left as an exercise to the reader, who probably needs to be about level 2 on the Kardashev scale... if you had a Dyson sphere that could perfectly capture the output of the Sun, it'd take you its full output for a few thousand years to synthesize enough antimatter ex nihilo, and at that point you gotta wonder if it would be easier to just build a Kugelblitz generator instead.

So much for rockets. Now we've established you need the capability to be building and using (possibly partial) Dyson swarms, why not avoid all that tedious and ganderous mucking about with moon-sized chunks of antimatter and instead use a light sail as your gravity tug and point a Nicoll-Dyson beam at it. If you're not pushing the black hole directly away from your source emitter, and directly towards a braking emitter of similar power this becomes harder, but I'll handwave those difficulties away because you're basically dealing with ancient and strongly superhuman star-gods at this point.
Lightsails accelerate because photons have momentum. From The Starflight Handbook, if a beam of light with power $E_b$ is perfectly reflected by a sail of mass $M_s$, then that sail will experience a change in velocity $\dot{V_s} = {2E_b \over M_s c}$.
To achieve your microgee-level acceleration with a moon-like mass pulled by a solar sail (on the assumption that the sail mass is much less than the total mass of sail-plus-moon system) you need about 2x1026 W... that's about 1.8 times the luminosity of the Sun, so you need either multiple small beam sources or a brighter star (of at least F8V type). And remember, you need a similar star at the other end to brake the 'hole into place at its destination!
If the sail was irradiated with 1MW/m2 of laser energy, it would need to be a disc some 8 million kilometres in radius (about 0.05AU), and if it was made of something that weighed 1g per m2, it'd mass about 2.1x1017kg. Keeping it attached and in shape is left as an exercise to the reader, but as the users would be K2-level civilisations, they shouldn't find this to be particularly challenging.
Flight time would be 1000 years, as with the antimatter rocket above. There'd be no fuel synthesis time, though that's offset by the need to build multiple ND-beams. Again, it isn't clear how useful a little black hole would be if you could wield this sort of power, but that's a plot-level discussion out of scope of this answer.
Answer: Alright, lets see.
A Black Hole with the mass of the Moon, assuming it doesn't rotate, has a Event Horizon 0.2mm across. So 0.10644mm in Radius. This would make it exceptionally dangerous and hard to spot.
This small size rules out basically everything the two others have said because of two facts of life.

Such a small Black Hole has an insane gravitational acceleration on its Surface (The Event Horizon) so putting ANYTHING even remotely close to it won't fly as the Tidal forces will shred anything into a string of atoms. To be exact, the Acceleration due to gravity at the Horizon is 422197661110932750455m/s². At a distance of 1000km the acceleration due to gravity would be about 4.22m/s². Give or take. 100km out, the acceleration is 422m/s² and so on. So dropping anything in is not a good idea. The main reason is that everything will get shredded. So your debris wont enter all on the same side. Quiet the opposite. Due to the strong acceleration the debris will kinda fall in from all sides. If they don't get yeeted into interstellar space.
The black hole is so small that whatever you throw towards it is more likely to just get shredded into a billion pieces and be thrown away instead of falling in. It is actually rather hard to let something fall into a black hole this small.
The Black Hole has way too much inertia anyways. Shooting at it is the equivalent of firing a 9mm at the moon and expecting it to move.

These reasons also apply to very large Black holes. The Gravitational field and Inertia make it basically impossible to move them.
There is one way to do it though. With Lasers. If you fire a Laser with a wavelength at least half as big as the Radius of the Black Hole, you can transfer the Momentum of the Photons to it with basically 100% efficiency. The higher wavelength the laser is, the more Energy and hence momentum you transfer.
Yet still, here is where it all kind of falls apart. A Black Hole the size of the Moon is just a mass the size of the Moon trying to be moved with a laser pointer. We can do the math here but the verdict is that if you don't have the power of a Star focused into a beam 0.005mm in radius you ain't gonna move it.
Comment: I upvote your answer for its blunt frame challenge quality, however.. don't worry. It can be done, there is no science tag to this question. You don't need to touch it. To move a black hole, you could pull it away putting some other large mass in its vicinity, or using a tractor beam to tug it, or other applications of thinkable artificial gravity.
Answer: Feed it with a moving mass
Everything Glorfindel said holds. You won't be able to approach this object.
Its size is only 2mm or moon weight, it could be 2 moon weights, still no immediate danger to the planet. Now consider feeding it a moon, or  a large asteroid, in order to move it.
All you have to do is disturb e.g. Phobos orbit around Mars in such a way, that it will collide the tiny black hole at some velocity. After the collision, Phobos will be eaten by the black hole, or it flies through, but some of the momentum Phobos had will be added to the momentum of the black hole, pushing it out of orbit. Note: calculation is required, there should be relevant friction !
Comment: See my answer where I calculate momentum transfer by feeding it appropriately sized pellets ("macrons") moving at high fractions of lightspeed. Not very reasonable levels of acceleration. Throwing an asteroid at it, most of the material will scatter and only a small portion will transfer momentum. Less efficient. (Also, if you *could* feed it "2 moon masses", that implies you can bring the two together and you might've just moved the 1 moon mass BH instead...)
Comment: @BMF you modeled the projectile as a tiny iron cylinder 0.1 mm in diameter. You'll need a lot of these. My proposal is to (literally) throw a moon or large asteroid at this thing. Let it collide. The mini black hole will penetrate the moon and leave it on the other side. Underway, it will absorb part of it and cause a lot of turmoil. The friction determines the momentum transfer.. I'm just guessing, I'm not a physicist.

Moving a black hole


Notifications on both screens in Ubuntu 18.04

Question: Notifications are useless if I don't always see them. I can't know which screen I'm going to be looking at, so they should appear on both screens. Is there any way to get this to happen in Ubuntu 18.04?
Comment: I think 16.04 works the same way.
Comment: I'm on 18.04. Older answers say to edit a key under `apps/notify-osd`, which no longer appears in `dconf-editor`.
Answer: In lieu of being able to find a better solution after dealing with this problem myself, I've made a workaround, though it's not precisely what OP asked for (it only shows a notification on the screen your cursor is on). It shouldn't be too difficult to hack other functionality into this, and it's short enough that everything it does can be quickly perused to verify it doesn't have any malicious code [one python file, and a one-line bash script], in contrast to the forks of notify-send that other people have made).
https://github.com/hillcjames/NotificationAmplifier

It listens for calls to notify-send (without intercepting them), and prints out the call's message on an image. The image will (should) popup on whatever screen is active, and close itself after 5 seconds.
This also keeps a log of notification messages, in a text file in the folder from which the command is run.
git clone firstname.lastname@example.com:hillcjames/NotificationAmplifier.git
cd ./NotificationAmplifier

sudo apt-get install python-pip

pip install opencv-python
pip install Pillow
sudo apt-get install wmctrl
sudo apt-get install xdotool

Start it python ./amplifyNotifications.py, and just let it run.


Simple C# Evernote API OAuth example or guide?

Question: Anybody know where I can find a simple example C# code example? Apparently really tough to find.
I'm just starting out, got my Developer key.
Initial (really noob question/presumption) - -Can (should/must) my solution be a web service client? No new libraries I need to install in .Net right?
Basically, as a test, I want to be able to securely present a single note from a private notebook in html similar to what the Everfort export in html looks like on a outside WebSite.
Many Thanks in Advance!
Answer: You should start by downloading our API ZIP from http://www.evernote.com/about/developer/api/. You'll find C# client sample code in /sample/csharp. This sample code demonstrates using the Evernote API from a desktop application that authenticates using username and password.
Answer: I am not sure if you ever got this working, but I was playing around with Evernote, OpenAuth and C# this morning and managed to get it all working. I have put together a blog post / library explaining the experience and outlining how to do it with MVC here - http://www.shaunmccarthy.com/evernote-oauth-csharp/ - it uses the AsyncOAuth library: https://github.com/neuecc/AsyncOAuth
I wrote a wrapper around AsyncOAuth that you might find useful here: https://github.com/shaunmccarthy/AsyncOAuth.Evernote.Simple
One prickly thing to be aware of - the Evernote Endpoints (/oauth and /OAuth.action) are case sensitive
<code>// Download the library from https://github.com/shaunmccarthy/AsyncOAuth.Evernote.Simple

// Configure the Authorizer with the URL of the Evernote service,
// your key, and your secret.
var EvernoteAuthorizer = new EvernoteAuthorizer(
    "https://sandbox.evernote.com",
    "slyrp-1234", // Not my real id / secret :)
    "7acafe123456badb123");

// First of all, get a request token from Evernote - this causes a
// webrequest from your server to Evernote.
// The callBackUrl is the URL you want the user to return to once
// they validate the app
var requestToken = EvernoteAuthorizer.GetRequestToken(callBackUrl);

// Persist this token, as we are going to redirect the user to
// Evernote to Authorize this app
Session["RequestToken"] = requestToken;

// Generate the Evernote URL that we will redirect the user to in
// order to
var callForwardUrl = EvernoteAuthorizer.BuildAuthorizeUrl(requestToken);

// Redirect the user (e.g. MVC)
return Redirect(callForwardUrl);

// ... Once the user authroizes the app, they get redirected to callBackUrl

// where we parse the request parameter oauth_validator and finally get
// our credentials
// null = they didn't authorize us
var credentials = EvernoteAuthorizer.ParseAccessToken(
    Request.QueryString["oauth_verifier"],
    Session["RequestToken"] as RequestToken);

// Example of how to use the credential with Evernote SDK
var noteStoreUrl = EvernoteCredentials.NotebookUrl;
var noteStoreTransport = new THttpClient(new Uri(noteStoreUrl));
var noteStoreProtocol = new TBinaryProtocol(noteStoreTransport);
var noteStore = new NoteStore.Client(noteStoreProtocol);
List<Notebook> notebooks = client.listNotebooks(EvernoteCredentials.AuthToken);
</code>
Answer: http://weblogs.asp.net/psteele/archive/2010/08/06/edamlibrary-evernote-library-for-c.aspx might help.  As the author states it just bundles some and fixes some.  Haven't tried it myself but thought I'd mention for a possibly easier way to get started.  Possibly.
Answer: This might help too...found it using the Way Back Machine since the original blog site was offline.
https://www.evernote.com/pub/bluecockatoo/Evernote_API#b=bb2451c9-b5ff-49bb-9686-2144d984c6ba&n=c30bc4eb-cca4-4a36-ad44-1e255eeb26dd
The original blog post: http://web.archive.org/web/20090203134615/http://macrolinz.com/macrolinz/index.php/2008/12/
Scroll down and find the post from December 26 - "Get it while it's hot..."


Can I use a single wire and run two jumpers to two gcfi outlets and on the other side run two wires off the single wire to two gcfi circuit breakers?

Question: Situation: Have a jetted bathtub that requires 2 15A gfci outlets each to its own breaker. Problem only have one wire running into tub area (would have to tear up.newly installed floor to run another. Is it possible to use that single wire and connect two wires and run to the outlets and connect two wires to the other end of the wire (wire is approx 8 ft) and run those to the breaker box and attach to two gcfi breakers
Comment: Can you mount a subpanel somewhere near, but not inside, the bathroom?
Comment: With the layout it's not really a feasible option.
Answer: NO WAY!!!!
If I understand you correctly, you want to run 2 15A circuits over one cable. You can't do that. (There are certain exceptions involving a 3-wire cable, but I assume you are describing an ordinary 2-wire (plus ground) cable.) Depending on how you wire up those two circuits, you would either end up overloading the wires (30A on wires designed for 15A) or just outright zapping everything by ending up with 240V when you want 120V.
Following up a bit more based on comments:
Assuming that each device specified by the manufacturer only actually uses 7.5A, that would be too much for a single 15A circuit (therefore requiring two separate circuits) but small enough (15A is less than the 16A continuous limit for a 20A circuit) to fit on a 20A circuit, and therefore on 12 AWG wire.
However, aside from being a violation of the manufacturer's instructions, which is a big no-no on permanently wired devices, there is a potentially fatal flaw:
If you slam two circuits into one, you have no way to control which circuit actually carries the load! It might go 50/50 (as planned) but it might not. In addition, if one of those wires comes out, you now have all 15A of load going over a single circuit. While technically OK in the short-term, that is exactly what the manufacturer is trying to avoid by having you use two circuits in the first place. In addition, if there are any startup loads then there could be real honest-to-goodness overloads involved as well.
But wait, there's more! This will probably not actually work anyway because not only do you want to nominally split the circuits 50/50 for load purposes, you must split the loads consistently on hot and neutral. That just ain't gonna happen. Which means you may end up with frequent GFCI trips. Which inevitably leads to "who needs this GFCI stuff anyway". Which leads to taking out the GFCI and replacing with regular breakers "just for a little while to test things". Which of course becomes permanent. Which results in serious (possibly fatal) problems when there actually is a ground fault in a bathtub.
NO @#()$@&#$)!@@# WAY!
Comment: Thanks for the response. Basically it would look like a straight line (8ft 12-2 wire) with two Ya on each end. So something like this >-<. 2 gcfi outlets - wire- 2 gcfi breakers. The motor for the jets and the air pump both pull 7.5 amps. I'm using 12-2 wire and I have a 20 amp gcfi breaker and 15 amp gcfi outlet
Comment: I don't know if it will jump the breaker if I only use one wire one outer and one breaker
Comment: No, just no. You are violating the manufacturer's instructions. If that results in a fire, your insurance will not pay.
Comment: Well #$@*. Thanks for the info though. Guess I'll just have to drill a hole in the floor and seal it really well to run a new wire. Crappy instructions with the tub. One set says runs on a 15A circuit but when you get into the manufacturer specs on the website it says use two 15A circuits.
Comment: Based on what you have described, this **could** have been designed to run on a single 20A circuit. My guess is that they have multiple models and some would not work on a single 20A, so they just say to run any/all on 2 separate 15A circuits. But that is just a guess, and there may be other factors going into the "2 circuits" rule.
Comment: Wouldn't be that big of a deal if it wasn't a freestanding tub...that and we've been waiting 6 months for the tile guys to finish in there and we've had the tub for a year...so wife is not a happy camper.


How to create dynamic buttons to call a function with different arguments

Question: I'm trying to build up a jscript interface on a WSH component for foobar2000 music player.
At some point, i need to create a variable number of buttons that will each call the same function, but using a different argument. I can create the buttons, using a for loop and an array. However, all buttons will pass the argument of the last button only.
Here is the code i use to add buttons :
for (var i=0; i<_groupsArray.length; i++) {
    _btn = _groupsArray[i];
    ƒview.addButton(_btn, _img, function () {setView(_btn)}, function () {doPlay(_btn)});
}

In this case, _btn is used both as the button label and the argument i want to pass to the function when i click on the button (it will be an artist name, or album title or something similar). ƒview is a custom object that holds the buttons. I created it so i don't have to specify position of buttons, ƒview will calculate them whenever needed.
This is the part of the addButton method that will actually create the buttons (the rest does calculate the layout). Each action argument is passed as a parameter to the button being created, without any processing by the addButton method.
this.addButton = function(label, img, action1, action2, action3, action4, action5) {
    ...
    new ButtonObject(label, __x, __y, __w, __h, action1, action2, action3, action4, action5);

Finally, i have this in my buttonObject constructor :
function ButtonObject(label, x, y, w, h, action1, action2, action3, action4, action5) {
    ...
    this.action1 = action1;
    this.action2 = action2;
    this.action3 = action3;
    this.action4 = action4;
    this.action5 = action5;
    ...
    this.act1 = function () {
        var __doIt = function () {this.action1();};
        return __doIt;
    }

The function passed during the for loop will finally be stored in the object as action1, action2 ... property.
I tried many different ways of calling action1 with act1 method, including directly calling this.action1(); using this.action1.apply(); trying to form a clausure as you see above. Either it will call the correct action but using the argument of the last button created, or it will crash or have no effect.
I'm now out of ideas to try. I had some partial success passing the function and the argument separately but that's an ugly trick. I've read a number of tutorials on clausures and how they can keep the local variables alive, but i still didn't managed to make them work for me in this case. My last attempt (as you can see it in the code) will crash when i click the button with a "this object does not handle this property or method" pointing to the line
var __doIt = function () {this.action1();};

So how do i keep the arguments "alive" within each button?
Comment: This sounds like the [Javascript closure inside loops](http://stackoverflow.com/questions/750486/javascript-closure-inside-loops-simple-practical-example) problem.
Answer: Try something like:
for (var i=0; i<_groupsArray.length; i++) {
    _btn = _groupsArray[i];
    ƒview.addButton(_btn, _img,
        function(b) {return function () {setView(b)};}(_btn),
        function(b) {return function () {doPlay(b)};}(_btn)
    );
}

You need to create a closure to hold the value of _btn, not just a binding to it. The extra wrapper function does precisely that.


Do we really need "online" in tags on a web applications site?

Question: There are lots of tags like "online-security" and "online-storage" showing up. Do we really need "online" - isn't that implied?
Comment: No, no you don't need that. I'd just retag them.
Comment: @Kinopiko: I did. :)
Answer: I agree we don't need the tag [online] -- it seems redundant to me, too.
Answer: I'm not sure. I just saw this question after I posted a question which I tagged [online-shop].
I think just [shop] or [shopping] don't really cut it.
[shopping-cart] maybe? But that only covers part of what I want.
Any other suggestions?
Comment: Why not? What kind of shop will it be on a "web apps" Q&A site? Using "online" to shop on WebApps feels like adding "programming" to the C# tag on StackOverflow - completely redundant.


Wine colored leaf border on a French Marigold, what's wrong?

Question:
All the leaves are turning wine from the edge inwards. Not sure what is causing this, and after a long search I found nothing similar. Anybody?
Comment: What part of the world are you in and how long have you had the marigolds?
Comment: Good question Bamboo.  What part of the world are you?   My guess is either early in the planting season (Spring) or end of the growing season (Fall).
Comment: I'm from Uruguay, so spring started less than 2 month ago.
It's been a month since I bought them.
Answer: One cause of purple leaf discoloration is phosphorous deficiency. This can be aggravated by low temperatures, which might explain why it has started recently (depending where in the world you are gardening, of course).
The purple colour is the result of the plant being unable to producing enough green chlorophyll. Without chlorophyll, many plants would be red or brown, not green.
Try a high-phosphorous fertilizer. There are various commercial brands sold as specifically for flowering plants, or plants like tomatoes which have high nutrient requirements.
Soil acidity can also inhibit phosphorous take-up by plants, but unless you want to do a soil test, just try an appropriate brand of fertilizer first.
Answer: The only time I've seen this coloration on the edge of the leaves of Tagetes has been when its either too cold (esepcially at night) or the plant is suffering, or has suffered, some drought. You don't say if your plants have been in or outdoors, but overnight temperatures might be a factor, as it was early spring when you bought them, otherwise, possibly insufficient water. That can be caused because they've run out of root room when in small pots, or simply because they're either not watered often enough or with enough water when they are given some.


How to use MS office 2007 and MS Office 2010 simultaneously on a single Vista?

Question: Recently I installed MS Office 2010 as a separate installation(not upgrade) on my Windows Vista. I want to use both MS office 2007 and MS Office 2010.
But whenever I switch to Word 2007 from Word 2010 or vice-versa, a Configuration process starts which is like a setup of Word and it take lot of time.
Is there any way of using both Offices simultaneously?
Comment: Out of curiosity, why do you want to do this?
Comment: The main reason I want this is that my family members are obsessed with Office 2007 and I am really comfortable with Office 2010.
Comment: Try installing it to your respective Application Data (C:\Users\USERNAME\Application Data\) folders (assuming that you have different accounts).
Comment: No. Only one user account!
Comment: I have 2003, 2007, and 2010 on a machine.  I gotta make sure new programs play nice since some users still refuse to move out of the stone age. . .
Answer: Here is a page that microsoft has on the topic. It seems that so long as you are using the 32 bit version of office 2010, and installed the versions in the correct order (earliest to latest), everything will work out.
Perhaps the most important thing to note is that Outlook 2010 cannot co-exist with the previous version of office.
Here are the steps to prevent the auto-reregistration of word 2010:

Exit Word 2010.
  Start Registry Editor.
In Windows 7 or Windows Vista, click Start, type regedit in the Start Search box, and then press ENTER.

If you are prompted for an administrator password or for a confirmation, type the password, or click Continue.
In Windows XP, click Start , click Run , type regedit in the Open box, and then click OK .

Locate and then click to select the following registry subkey:
  HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Options
After you select the subkey that is specified in step 3, point to New on the Edit menu, and then click DWORD Value.
Type NoReReg , and then press ENTER.
Right-click NoReReg , and then click Modify.
In the Valuedata box, type 1, and then click OK.
On the File menu, click Exit to close Registry Editor.
Comment: yes, Outlook cannot co-exist! and yes..it works!! thanx a lot @soandos!!
Comment: hey @soandos what is the step 3 in step 7?
Comment: Sorry, bad numbering. I am fixing now. @AshutoshDave, done.
Comment: Always happy to help :)
Answer: If other less resource-intensive methods fail, and you have a valid Windows licence, you can use some virtual machine software (like VirtualBox) to run another Windows installation with totally separate settings and programs from inside a window on you main Windows Vista, as if it was just another program. If you go for Virtualbox, check its seamless mode for a better experience.