What does "alto" mean on a stop sign?

Question: In my Spanish class, we learned that the verb for "to stop" is "parar", but many stop signs have the word "alto" on them instead of "pare" as the command form of "parar". I asked why, but no one was sure. Why is "alto" on a stop sign? What does it mean?
Answer: Alto as a noun is the name of the stop sign in some parts of America; as an exclamation ("¡Alto!") it means "stop!" in all the Spanish speaking countries.
See Alto in the Diccionario de la Lengua Española (it comes from the German "Halt", from the German verb "halten").
Comment: @Mike se lo considera como una interjección con valor imperativo. Si tuviese flexiones que se pareciesen más a los del imperativo, quizás sería posible considerarlo como un verbo muy defectivo, como lo es *abarse* que tiene apenas formas **en total**: *abarse, ábate, abate, abaos, ábese*, y *ábense*
Comment: @guifa - También hay un truco para componer un comentario: copiar el texto, borrar el comentario original, meter el texto en un nuevo comentario, editar, publicar.  (Sólo funciona si no hay respuestas.)
Comment: Interesante, como Alto en la lengua es un sustantivo, cuando se trata de un verbo, sin embargo no tiene conjugaciones.

entonces, es un verbo usado como sustantivo, o un sustantivo usado como verbo ?
Comment: que tiene SEIS formas en total — tengo que dejar de comentar por el móvil
Comment: @guifa si quieres lanza un flag para que te editemos un comentario :)
Answer: The word "alto" as an exclamation has nothing to do with "alto" as an adjective. In the XVI century, king Charles I of Spain also became emperor Charles V of the Holy Roman Empire, Lord of the Netherlands and Archduke of Austria. So in terms of Linguistics it is interesting to note how some words passed from a language in the Holy Roman Empire, such as German, to Spanish. One of them was the German word "halt", which became "alto", as noted by the first Spanish dictionaries from the RAE. The following is from 1770:

ALTO. (Milic.) La voz de que se usa para mandar parar la tropa ó suspender la accion en que está.
[Word used to command the troops to stop moving or to stop doing the current action.]

And before that, in 1726 it was:

ALTO. Voz que se usa para imponer siléncio, y que no se prosiga una conversación, discurso, riña, etc. aludiendo à la voz Alto en el uso militar.
[Word used to make someone shut up and not continue a conversation or speech, dispute, etc., alluding to the same word in its military usage.]

In a dictionary from 1607 it is registered the expression "alto hazer" as originated from the German word "Halten". You can still say "hacer un alto en el camino" as "to make a stop in your journey". And in 1591 the expression "alto hazer" was registered in a Spanish-English dictionary as "to keepe aloose".
So its use is indeed registered in the military context. Nowadays it still carries the same sense of obligation to stop, extended to non-military contexts.
Comment: Please feel free to roll back any of my edits that don't feel right to you.
Comment: @aparente001 no need to roll back, I know my English is far from perfection so I accept every improvement you made.
Comment: Basically I thought you might want to know that *voz* appears to be a false cognate (although the sophisticates at ELU might know some other definition from linguistics that I'm not aware of). // (I put a helpful dictionary link in the edit documentation -- maybe it was a bit buried.)

What does "alto" mean on a stop sign?


Facet pretty path providing no result

Question: I have used commerce kickstart and created product display page with facet filter.I have used Facet API Pretty Paths module to use simple URL.But it makes no result behaviour.Without facet pretty path, facet filter working good, but URL makes quite complex.
Comment: Can you give the version of facet api pretty path you're using?
Answer: Unfortunately this is a bug in Facet API Pretty Paths module.
take a look at https://www.drupal.org/node/2423029 and ask maintainer to solve or suggest a solution for it.

Facet pretty path providing no result


Not sure how to vent our bathroom - trying to avoid the attic

Question: We started a remodel of our bathroom.  It is a 1949 built house, one level with partially finished basement.  After we did the demo, we got concerned about entering the attic to do any venting.  It is an older home with vermiculite insulation. It is a small bathroom with one outside wall where the shower/bathtub combo covers that entire wall.  Is there a way to vent out the wall or down through the basement and out that wall so we can avoid the attic?  The basement directly below is unfinished.
Comment: There's no reason you can't vent through the wall other than the hassle of warm, moist air and odor at a lower exhaust location. If that's acceptable, you're golden. I wouldn't shy away from working in your attic, though. I owned a 1950s home for many years and did a number of projects up there. Protect your lungs with a simple dust mask and it's not an issue.
Comment: isherwood is right -- a properly fitting dust mask (especially in the diy context, where you're not exposed on a regular basis) is perfectly adequate. If you want to overdo it, get a tyvek suit and shower after you've been up in the attic.
Answer: There are wall mounted bathroom vent fans like this. I don't think going down through the basement would work as well as the wall unit.
Answer: No matter what you end up doing install a push-button timer to control the fan rather than a switch. You can reduce almost all mildew / mold concerns if you leave a fan running for 30 minutes after a shower.


Why are IOC containers unnecessary with dynamic languages

Question: Someone on the Herding Code podcast No. 68, http://herdingcode.com/herding-code-68-new-year-shenanigans/, stated that IOC containers had no place with Python or Javascript, or words to that effect.  I'm assuming this is conventional wisdom and that it applies to all dynamic languages.  Why?  What is it about dynamic languages that makes IOC containers unnecessary?
Comment: Watch this video - http://www.bestechvideos.com/2008/12/08/rubyconf-2008-recovering-from-enterprise-how-to-embrace-ruby-s-idioms-and-say-goodbye-to-bad-habits - it's a presentation by the developer of 2 (failed) Ruby IOC projects.  TLDR version - "Java is Legos, Ruby is Play-Doh"
Comment: @Nate link is dead. Got another link?
Comment: @Trevoke - New link to video is http://confreaks.tv/videos/rubyconf2008-recovering-from-enterprise
Answer: IoC provides a mechanism to break the coupling you get when an object calls 'new' on another class. This coupling ties the calling object with the instantiated implementation of whatever interface it implements.
In static languages when you reference a class by name (to call new on it), there is no ambiguity. This is a tight coupling to a specific class.
In dynamic languages calling new X is a placeholder for "instantiate whatever class is defined as X at the point of execution". This is a looser coupling, as it's only coupled to the name X.
This subtle difference means that in a dynamic language you can usually change what X is, so the decision as to which class is instantiated is still modifiable outside of the calling class.
However, personally I find there are two advantages to IoC that I don't get by relying on the dynamic language to allow injection.
One of the side effects of passing dependencies in through constructors is that you end up with "building block" classes that are very decoupled, reusable and easy to test. They have no idea what context they are intended to be used in, so you can reuse them all over the place.
The other result is having explicit code to do the wiring. Done correctly this cleanly represents the structure of your application and it's decomposition into subsystems and life-cycles. This makes people explicitly decide which life-cycle or subsystem they want to associate their class with (when writing the wiring code), and concentrate on the behavior of the object when writing the class.
Like Jörg W Mittag said.. "Those tools are unnecessary, the design principles aren't." I believe they are unnecessary, but done right, still valuable.
Comment: Isn't the question specifically about IoC **containers** and not the concept of IoC?
Comment: Brilliant answer. . Regarding tools: The same goes for test frameworks, mocking libraries and so forth. You can get the job done without them, but good tools are invaluable.
Answer: I have a different opinion. I think IOC containers certainly have a role in dynamic languages.
I do not share the opinion that a language being dynamic removes the need for a clearly structured composition of objects. Or that a dynamic language 'provides' the same functionality.
An IOC container is simply a tool to manage this organization.
Even in a dynamic language I want to 'wire' together components. Without making hard dependencies between those components. Or maybe even without specifying the actual implementation class for those components.
Comment: IoC containers facilitate certain functionality by providing patterns for accomplishing tasks. Although dynamic languages may contain capabilities that make certain tasks usually accomplished with IoC containers in statically typed languages unnecessary, many of the tasks and patterns are still useful in dynamic languages. See  [this question](http://stackoverflow.com/questions/25576975/) for concrete examples.
Comment: I agree to a point. I believe that even in Dynamic Languages we need to separate wiring from components. I don't believe that IoC Containers are the best way to do this. All you really need is an internal DSL for software wiring. IoC containers as they stand don't exactly fit that description.
Answer: I agree with the answers above, but I thought I'd chip in a little bit here too regarding testing:
In complex systems where there are interactions between sub-systems dependency injection is the best way that I'm aware of to do unit testing.
If you have a logic unit X, that has known interactions with logic unit Y, you can create a MockY that has a predefined behaviour and explicitly test the logic of X.
Without dependency injection, writing tests is a nightmare. You cannot get good code coverage. Some frameworks (eg. django) work around this problem by spinning up mock database instances to talk to for tests, etc. but it's basically a poor solution to the problem.
There should be two sorts of tests:

Unit tests that run in ANY environment and test the logic of individual code units.
Integration / functional tests that test the combined application logic.

Now to the question: IoC. What is IoC good for? It's handy for a few things, but its really really good for making it easier to use dependency injection:
// Do this every time you want an instance of myServiceType
var SystemA = new SystemA()
var SystemB = new SystemB()
var SystemC = new SystemC(SystemA, "OtherThing")
var SystemD = new SystemD(SystemB, SystemC)
var IRepo = new MySqlRepo()
var myService = new myServiceType(SystemD, IRepo)

Into this logic:
// Do this at application start
Container.Register(ISystemA, SystemA)
Container.Register(ISystemB, SystemB)
Container.Register(ISystemC, SystemC)
Container.Register(ISystemD, SystemD)
Container.Register(IRepo, MySqlRepo)
Container.Register(myServiceType)

// Do this any time you like
var myService = Container.resolve(myServiceType)

Now, why don't we see IOC in many dynamic languages?
I'd say the reason is that we don't see much dependency injection in those languages.
...and that would be because typically the testing done in them is non-existent.
I've heard all kinds of excuses for this; interacting with the DOM makes tests hard, my code is simple enough it doesn't require tests, dynamic languages don't need unit tests because they're awesome and expressive.
It's all nonsense.
There is no excuse for a project without unit tests or unit tests with poor code coverage.
...but it's amazing the number of javascript and python projects I've seen (picking on these two specifically only because they're an area of interest and I've seen more projects of this type than others) with no IoC, no DI, and unsurprisingly, no tests.
There is an excellent article on DI on the guice website here:
http://code.google.com/p/google-guice/wiki/Motivation
There is nothing about dynamic languages that solves any of these problems.
Summary:

IoC is useful for things, but primarily for implementing DI
IoC is NOT xml config files. >_<
DI is useful for tests
Absence of IOC is indicative of the absence of DI, which is indicative of the absence of good testing.
Use IoC.
Comment: Yes!! At least someone gets it. Dynamic Typing does not change the fact that you are hard coding dependencies between objects. The whole idea behind DI is to have your application as a combination of small parts that all get assembled at one point in your code. That way, it's easy to add,  remove or swap functionality. IOC containers just make said place look neat or even non existent.  Period. Unit Testing quickly points this out. That's why most people don't write tests. This would be obvious to anyone who takes testing  seriously. Static or Dynamic.. See Angular
Answer: Because they are already built into the language.
An IoC container provides two things:

dynamic binding
a dynamic language (usually an incredibly crappy one, built on top of XML or in newer versions on top of Java annotations/.NET attributes)

Dynamic binding is already part of the dynamic language and the dynamic language is already a dynamic language. Therefore, an IoC container simply doesn't make sense: the language is already an IoC container.
Another way to look at it: what is it that an IoC container allows you to do? It allows you to take independent components and wire them up together into an application, without any of the components knowing anything about each other. There is a name for wiring independent pieces together into an application: scripting! (That's pretty much the definition of scripting.) Many dynamic languages happen to also be pretty good at scripting, therefore they are perfect as IoC containers.
Please note that I am not talking about Dependency Injection or Inversion of Control. DI and IoC are just as important in dynamic languages as they are in static languages, for exactly the same reasons. What I am talking about are IoC containers and DI frameworks. Those tools are unnecessary, the design principles aren't.
Comment: Aren't your points equally valid for a language like Java? You can wire up Java objects in Java just as easy as with any other language.
Comment: I would really like to see an example of this.
Answer:
IoC provides a mechanism to break the coupling you get when an object calls 'new' on another class.

It's naive view on IoC. Usually IoC also solves:

dependency resolving
automatic component lookup and initialization (if you use 'require' with IoC, there's something wrong)
works not only with singletons but also with dynamic scope
99.9% of time it's invisible for developer
eliminates need of app.config

full article You underestimate the power of IoC
Answer: I believe that IoC containers are necessary in large JavaScript applications. You can see that some popular JavaScript frameworks include an IoC container (e.g. the Angular $injector).
I have develop an IoC container called InversifyJS you can learn more about it at http://inversify.io/.
Some JavaScript IoC containers out there declare the dependencies to be injected as the following:
import Katana from "./entitites/katana";
import Shuriken from "./entitites/shuriken";

@inject(Katana, Shuriken) // Wrong as Ninja is aware of Katana and Shuriken!
class Ninja {
  constructor(katana: IKatana, shuriken: IShuriken) {
    // ...

The nice thing about this approach is that there are no string literals. The bad thing about it is that our goal was to achieve decoupling and we just added a hard coded a reference to Katana and Shuriken to the file in which Ninja is declared and this is not real decoupling.
InversifyJS offers you real decoupling. The ninja.js file will never point to the katana or shuriken files. However, it will point to the interfaces (at design-time) or string literals (at run-time) which is admissible because these are abstractions and depending upon abstractions is what DI is all about.
import * as TYPES from "./constants/types";

@inject(TYPES.IKATANA, TYPES.ISHURIKEN) // Right as Ninja is aware of abstractions of Katana and Shuriken!
class Ninja {
  constructor(katana: IKatana, shuriken: IShuriken) {
    // ...

The InversifyJS kernel is the only element in the application aware of the life-cycle and dependencies. We recommend to do this in a file named inversify.config.ts and store the file in the root folder that contains the application source code:
import * as TYPES from "./constants/types";
import Katana from "./entitites/katana";
import Shuriken from "./entitites/shuriken";
import Ninja from "./entitites/ninja";

kernel.bind<IKatana>(TYPES.IKATANA).to(Katana);
kernel.bind<IShuriken>(TYPES.ISHURIKEN).to(Shuriken);
kernel.bind<INinja>(TYPES.ININJA).to(Ninja);

This means that all the coupling in your application takes place in one unique place: the inversify.config.ts file. This is really important and we are going to prove it with an example. Let's imagine that we are changing the difficulty in a game.We just need to go to the inversify.config.ts and change the Katana binding:
import Katana from "./entitites/SharpKatana";

if(difficulty === "hard") {
    kernel.bind<IKatana>(TYPES.IKATANA).to(SharpKatana);
} else {
    kernel.bind<IKatana>(TYPES.IKATANA).to(Katana);
}

You don't need to change the Ninja file!
The price to pay is the string literals but this price can be mitigated if you declare all your string literals in a file which contains constants (like actions in Redux). The good news is that in the future the string literals could end up being generated by the TS compiler, but that is in the hands of the TC39 committee for the moment.
You can try it online here.
Answer: One of the main features of IOC containers is that you can automatically "wire" your modules together at runtime.  In dynamic languages you can do this fairly easily without any fancy reflection-based logic.  However, IOC containers are a useful pattern that many people understand and it may sometimes be of some benefit to use the same design style.  See this article for another viewpoint.
Answer: IoC containers really allow for a compositional layer in statically typed, procedural/OO languages.
This compositional layer exists relatively naturally in dynamic languages such as Python or Javascript (consider that Javascript is heavily based on Scheme).
You could probably make a good argument that IoC containers are just a generalization of the Interpreter pattern.
Comment: Why?  This seems more like an assertion of the argument than a reason.  angular has something like an IoC container, doesn't it?
Answer: Herding Code 82 (6/6/10) compares Ruby with .NET and includes some detailed discussion on the extent to which .NET needs more IOC/DI than Ruby.


Cricket, run out without bails

Question: In a local league game because of windy conditions bails weren't used at either ends. The bowler disturbed the wickets with his legs before collecting the ball and running out the non striker when the second run was being taken. No stumps were removed from the ground on both occasions. Was the batsman out? This video here is exactly how it happened except the player involved was the bowler and not the wicketkeeper.
Answer: Yes, this is a valid dismissal once the decision was made to play without bails. Law 29.4 makes this very clear:

After a decision to play without bails, the wicket has been put down if the umpire concerned is satisfied that the wicket has been struck by the ball [...] or by a fielder in the manner described in 22.214.171.124.

(where 184.108.40.206 is "by a hand holding the ball").

Cricket, run out without bails


Question about the graph of the square root function

Question: I know this question may be stupid but I've been studying for my test tomorrow and I'm so frustrated, I can't figure this one out.
if we have a square root function like this: $y = \sqrt{x}$ wouldn't $y$ be both $+2$ and $-2$ for $x = 4$, so shouldn't the graph look like a quadratic graph?
Answer: By convention, $\sqrt x$ doesn't just mean any number whose square is $x$ -- it means the positive (or zero) number whose square is $x$.
In particular $\sqrt 4$ is $2$ and only that. It is true that $(-2)^2$ is also $4$, but because $-2$ is not positive, it doesn't satisfy the condition for being $\sqrt 4$.
Answer: Functions send each $x$ to only one $y$ value. So while it is true that the root of a real number can be positive or negative, in order to graph as a function, the convention is to choose the positive root.
However, you'll notice the inverse of the function $y= {x}^{1/2}$ should also be a parabola, as it is formed by reflecting over the line $y=x,$ but one turned on its side, so your intuition is not far off. Just remember the convention for your exam, and good luck.
Comment: Thanks, I'm wondering why our teacher didn't say anything about this "convention", it's been driving me crazy for the past 2 hours.
Comment: The inverse of $f(x) = \sqrt{x}$ is $f^{-1}(x) = x^2, x \geq 0$.
Answer: In this case it is so called principal square root, i.e. the nonnegative root of equation $x^2=y$.
See also http://en.wikipedia.org/wiki/Square_root.


ElementaryOS and Wireguard

Question: Testing linux and started with Elementary OS.
I am looking to finalize my install with wireguard.
I am lost as far as how to install and the name of the package to install wireguard.
I did run apt-get cache search/list but to no avail.
Any light on this is much appreciated
Answer: Since Elementary uses the same package manager as Ubuntu, usually you can follow instructions written for that distribution.
NOTE: Elementary does not come with software-properties-common installed (which is required for add-apt-repository), so here's the steps I followed to install it.

sudo apt install software-properties-common
sudo add-apt-repository ppa:wireguard/wireguard
sudo apt install wireguard

Source
Updated as per comment.
Answer: If you click on the (Source) it takes you to the page that go though the steps in setting up wireguard.
Answer: Another option would be to install WireGuard via Snaps.
You can use Snaptastic from the AppCenter, or install via the command line like so:
snap install wireguard-ammp

ElementaryOS and Wireguard


Get Remote site url by SOQL APEX in salesforce

Question: I want to get value of remote site url in salesforce
(Ex: I want to get http://abc.com like image below).
How can I use query SOQL in APEX to get it?
Answer: You can use ToolingAPI to access the RemoteSiteSettings. In developer you can try to query like below.
<code>select id, SiteName, EndpointUrl from RemoteProxy
</code>
In the above query EndpointUrl is field which you are looking for.
You need to check the "Use Tooling API" check box to true else you will not get result.


How to scan photos properly?

Question: I am thinking about digitalization of my photos in case something bad happens to them. Photos are 15 cm long and 10 cm wide. I will do it with my HP DeskJet Ink Advantage 4535 scanner. I want to have some tips about: dpi, how to properly put photo on scanner bed (layout), cropping or not cropping photo = meaning leaving photo with blank area around (which is best solution in this case), using different formats, media storage (SSD or HDD, cloud). Thank you for answers.
Comment: Hi, welcome. How many photos? What have you discovered so far? There is plenty of info about this online already (though I understand you might still be confused)
Comment: See this question posted on the site already: [What is an efficient way to digitize a family photo collection?](https://photo.stackexchange.com/q/105302)
Answer: Before you trust your photos to a scanner, maybe you should check it, scanners from all-in-one printer/scanners are mostly designed to scan documents, color fidelity may not be their top characteristic. Some also introduce transversal distortion, are slightly misaligned, or do not scan to the very edge of the scanner bed. All this can be checked by scanning squared paper with a few arrows drawn to the edges, carefully tucking the sheet along the side of the scanner bed. You can then check:

That you see the tips of the arrows
That the vertical lines are indeed vertical in your image editor
That the intervals between the first vertical line and the others follow a linear progression.
No home-grade scanner is perfect, so expect to find slight inaccuracies, that won't really matter. But this can also reveal some more problematic ones.

Then:

Scanning at 600DPI will produce decent 8Mpix images, good for most purposes.
Usually one tucks a size of the photo along a side of the scanner bed. But you can discover that your scanner is slightly misaligned that way (something scanning squared paper will also show).
Cropping is better/cleaner even if the un-cropped bits are likely to be very easily compressed and not add that much to file size. I advocate cropping because it makes you look at the scanner output when you can still fix things (misalignment, etc...)
Image file format:

TIFF is OK, but if you use JPEG compression in the TIFF you have to be able to control the compression/quality level). Using high-bit depth (16-bit or more) is likely overkill given your scanner.
JPEG is adequate at good quality levels (90-95). At 8Mpix your image files should be about 2MB, if they are below this you are possibly compressing too much.
PNG is lossless but the compression algorithm is slow, and won't find much to compress in a photo.
File size shouldn't be a concern given the size of mass storage these days, unless you save to the cloud and you have a slow link.

Storage:

You can use the cloud as a secondary backup, but don't put too much trust in it. Unless you pay a dear price you'll discover that the provider doesn't feel too concerned about the safety of your data. Also, writing is cheap, reading back can be expensive.
Ideally you want at least two media, not kept in the same physical location (leave one with a parent/friend, or in your office)
The most reliable long term storage is the old-fashioned hard-disk.
Answer: Few fast recommendations:

try to align the photos to scanner borders, this will help you to avoid rotation (to strait)
scan at 600 DPI, in specs I see 1200DPI but have my doubts how real is this. Warning, each file will be around 26MB.
scan only the photo, normally you do not need the entire A4 format (297x210 mm) for 150x100mm. If photo have border you can include it in to the scan.
scan on 24 bits
store as PNG or uncompressed TIFF. With TIFF you can add in one file two images - front and back if you have important info on the back you want to keep
store on at least 3 places, disk, removable media and cloud

How to scan photos properly?


"rising sea level" or "rising sea levels"?

Question: I've seen both in newspapers when it comes to the subject of global warming. Confusingly, "rising sea levels" seems to be used more frequently.
For me, it's much easier to understand "rising sea level", an uncountable noun used to describe a concept of the rising sea, than to imagine it as a countable noun, "sea levels." How does "rising sea levels" even mean? Aren't all the seas that would be affected by the melting of the glaciers connected with each other in a way? How can their "levels" be separated from each other when the amount of water in seas on the earth rises?
Comment: Not all seas are at the same level. The Atlantic at one end of the Panama Canal is eight inches higher than the Pacific at the other end. Also there are different levels at different times due to tides, so yes there are multiple levels, but his is a language question right?
Comment: Both are correct. Sea levels differ both geographically as well as with time. Context will determine the noun's number.
Comment: If you think that's confusing, just try discussing how rising sea levels might mean lower seal levels!
Comment: Yes, it's definitely a language question, and just because it's a language question, I have issues every time when I need to express "rising sea level(s)". I'd naturally go for "rising sea level," but at the same, I'd dither a bit because it seems that "rising sea levels" is used more commonly, and I'd be worried that I was grammatically wrong.
Comment: You say  'For me, it's much easier to understand "rising sea level", an uncountable noun used to describe a concept of the rising sea.' However, sea levels are measured at chosen times and places, so the individual measures will be the primary data. Thus 'sea level' will in the first instance be a shortened form of 'measure of the level of the sea'. The non-count version must be a notional averaged phenomenon, which I'd say is **harder** to understand. Perhaps we've seen too many exaggerated computer graphics. Good question, though.
Comment: There's more than one sea in the world, and more than one place in every sea to have a level.
Answer: Rising sea levels is factually correct, even if counter-intuitive.
As long as (the incorrect) "rising sea level" does not have clear and obvious grammatical superiority, the (correct) plural should be used.
See the Wikipedia article, especially the section showing factors which change Sea Level in a locality, for some ways to overcome your intuitive (and incorrect) idea that Sea Level is the same everywhere.


AFCI/GFCI at panel from bathroom that doesn't have a GFCI

Question: Our bathroom outlet is not a GFCI.  There is an AFCI/GFCI at the panel which trips way too much.  I want to replace the regular outlet with a GFCI outlet and put a regular circuit breaker instead of the AFCI at the panel.  Is this a fairly easy task?  I've wired into the panel with regular circuit breakers and installed GFCI 's before without any problems but never replaced an AFCI.  Thanks very much for your help
Comment: Are the **"trips way too much"** GFCI trips, AFCI trips or overcurrent trips? If they are overcurrent, your plan won't help. If they are AFCI, you may have fewer trips and more standing outside in the cold watching the house burn down. If they are GFCI using a local GFCI will make it simpler to reset. Generally **"trips way too much"** indicates a fundamental problem either in wiring or in use.
Answer: Virtually all AFCI/GFCI breakers have some means of communicating why they tripped.
If the trips are from overcurrent, replacing it will not help at all. The breaker will still trip.
If the trips are from an AFCI detection, there's probably an arc fault. That should be fixed. Replacing with a non-AFCI breaker will allow the arc fault to continue until it finally causes an overcurrent trip or a fire. If you are required to have AFCI protection on this circuit and you removed it, that might cause your insurance to not be liable to pay for the burnt house. It's possible that removing it, once you have it, would be enough for their lawyers to make that case even if you are not required to have it, but in most cases people only have it because it's required.
If the trips are from GFCI, either someone drops electrical things in the tub a lot or there's a problem with the circuit wiring or one or more devices, and those problems should be addressed. You could replace the breaker with an AFCI-only breaker, and move the GFCI protection to the bathroom, or both bathrooms if it feeds more than one. You'll have to verify that everything on the circuit now that requires GFCI protection is still GFCI-protected when you are done.
GFCI/AFCI breakers have both the circuit hot and the circuit neutral connected to them, and most AFCI-only breakers are the same. A few AFCI breakers don't use the circuit neutral, so that would move to the neutral bar. I don't advise using a non-AFCI breaker as it's most likely that you are required to have that protection here, or you would not have it now.


How do I rename address alias in Tezos?

Question: I have created an account with ./tezos-client gen keys my-address. Now I want to rename the alias of the address from my-address to address1. How can I do that?
Answer: I do not know if a simple command exists for renaming aliases. What you can do is going to the folder of the client (usually cd ~/.tezos-client) and then rename the respective keys in the following files:

public_key_hashs
public_keys
secret_keys
Comment: that's right. I also did not find any special command for that. Just edit those files and you will be fine. Do not forget to check if json still valid after editing

How do I rename address alias in Tezos?


can we pass dataset to a web service method? If yes , then how?

Question: can we pass dataset to a web service method? If yes , then how?
Answer: IIRC, "yes" (just have a DataSet parameter), but also "you shouldn't";  while .NET may know how to process it, web-services are meant to be interoperable based on xml entities; a DataSet (even when serialized as xml) is about as far away from that as you can get. IMO it would be a better idea to write some basic classes that represent your model, and expose those to the web service, as they can be properly represented in xsd for SOAP purposes.
Comment: @Marc Gravell: how can i pass dataset from android to soap service there are any setps for that?
Comment: @HarshalKalavadiya here's the thing: ***stop using `DataSet`***. It is not the right tool for this, *especially* if you need to pass if over a service boundary. If the android app is native: no, not really. If it is Mono - maybe there's an outside chance.
Comment: +1 even though I posted my answer to use ReadXML and WriteXML methods but I would still go with your answer to use separate classes to pass data.
Comment: @Marc Gravell:Thanks for yor answer .. pls. refer this link [http://stackoverflow.com/questions/19198017/pass-arraylist-data-into-soap-web-service-in-android](http://stackoverflow.com/questions/19198017/pass-arraylist-data-into-soap-web-service-in-android) i have to pass array of data to SOAP service so how can i pass it ?
Answer: Passing a DataSet to a webservice is not a good idea. Instead use DataSet's ReadXML or WriteXML methods to pass data to webservice and read it at webservice end.
Edit: If possible create separate classes as Marc Grawell said, if that's not feasible for you (which is a rare case) then you can use above methods to pass data for better approach than passing DataSet directly.
Answer: Marc is right about the dataset.  It is probably one of the worst design principles you can do.
However you should not construct your datacontracts the way you represent you model.  The SOAP messages you construct should be defined as messages.  You are not sending objects over the wire but SOAP messages.  You can then use one of your object models incapsulated by that message, but do not send it as an object itself.
Working message based allows you more control over things like secuity headers and faulths.
http://msdn.microsoft.com/en-us/library/ms734675.aspx
Comment: A side note: the above mainly relates to WCF; the tooling etc for *vanilla* asp.net web-services is much less powerful
Comment: Yes indeed, this can only be done using a more robust framework like WCF.


Latin abbreviations in the Dorset Protestation Returns of 1641-2

Question: In the Dorset Protestation Returns of 1641-2, there is a block of 3 John SUTERs which have abbreviations after the names - se, jut, iun (obviously related to Latin in some way).  The jut abbreviation is quite common and I translate that to junior - ie the son of another of the same name elsewhere.  However I am unable to find a definitive translation of iun in any textbooks.  Other information suggests that this person is the grandson in the group.  Does anybody know for sure what this means?
Comment: The first two abbreviations are se~ and ju~ and almost certainly stand for "senior" and "junior", as you know.  Without more text to compare with it is impossible to be sure what the third is. But it does not start with any usual form of 'i' or 'j'. My best guess would be Mi~, perhaps meaning "minor" or a related word. Can you show us a larger sample? (There are a couple of "M"s a little further down the page.)
Comment: According to my copy of "Palaeography for Family and Local Historians", there is no distinction between i and j. Iunior (ie jun or iun) then means "younger ". However, I am a long way off getting my eye in on that script to validate your transcripts.
Comment: Thanks - I will try to post the full page.  The writing from the pages from the nearby villages is slightly different in style and not 'pure' Latin.  I think the key to this is the 1st character of the 3rd name - it follows a ':' which has been used to show a word shortening in later years of the parish register.  I have burial dates which support 3 generations but no baptisms (PR didn't start until 1653).
Answer: Now we've got the bigger picture, I'll make my comment into an answer.
The first two abbreviations are se~ and Ju~ and almost certainly stand for "senior" and "junior", as you know.
The third is, I'm fairly sure, "Mi~". The blob at the top of the first letter is part of the "J" above. Removing that, what's left matches closely the "M" in "Mans" on the top line (and the "N" in the following word follows the same pattern.) The "M"s elsewhere - beginning people's names - are more elaborate and don't match but I think it's reasonable that the scribe used his simpler form in an abbreviation like this. I can't see any other letter on the page that fits better.
Looking at the transcription online, in Wimborne Minster there are two John Stronge, sen. and minimus; and three Thomas Budden, sen. Ju. and minor.
https://archive.org/details/dorsetrecords12frye/page/n261/mode/2up and the next page.
So "Mi~" could stand for "Minor" or "Minimus". "Minimus" means "least" and so is the obvious one for the youngest of three, although the Wimborne recorder seems to have "minor" and "minimus" the wrong way around.
Comment: Junior, Senior etc. do not necessarily indicate different generations. They could include cousins. In my own family - a few years earlier and not far away (just into Devon) - there's even a case where John senior and John junior where half-brothers.
Comment: Well I think your logic is sound but looking at the 1st name in the 2nd column - it's Richard Moger - the 'M' there is quite different as you have noted.  Everything points to this being a case of 3 generations but I want to avoid confirmation bias so will do a bit more research and then return here.  Thanks for the link.


Do I have to pay taxes on external savings?

Question: I am thinking on moving to Canada to work, save for retirement, and move back to Portugal due to the lower cost of living to live my retirement. I will contribute to the Canada Pension Plan and also save for my retirement. I have to calculate how much I want to save to get a fixed retirement salary but I don't know if I'll have to pay taxes over the money I saved on a normal Canadian bank account (taxed in Canada) and then withdrawed in Portugal and how many taxes I'll pay over the Canadian Pension Plan. Thank you in advance for your help.
Answer: You should probably check this with a tax accountant,  but I'll give you the basics.
If you live and work in Canada you will pay Canadian tax on all your income. You will not pay tax in Portugal, except maybe for the first and last years when you move between the two. If you put your retirement savings in a regular investment account then when you move back to Portugal you will not pay tax on what you withdraw from that account, either to Canada or Portugal. However you would need to pay Canadian  tax on any interest and capital gains you make on those investments while you are in Canada.
Most Canadians do not do that. They pay retirement savings into a Registered Retirement Savings Plan (RRSP). They claim a tax credit on their contributions, and any interest or capital gains on the RRSP is tax free. However when they withdraw from their RRSP they would pay tax on it as if it was income.(There are limits on how much money you can put in an RRSP).
If you used an RRSP you would have to pay a Witholding Tax on your RRSP withdrawals even after you stopped being a resident in Canada. It is likely that you would not have to also pay Portuguese tax on it because it is already yours and not technically income, but I would check with a tax accountant.
The mathematics of this, and especially deciding which is better, is quite complicated and depends on many things. You should check them with a professional. You should also be aware that tax rules can change over a period of decades.
Comment: Thank you a lot. I intended to say I was thinking on saving to an RRSP due to the tax benefits but I apparently forgot.


What happens if vampires in Anne Rice's books drink the last drop of someone's blood?

Question: During the movie Queen of the Damned, Marius tells Lestat that they cannot consume the last drop of blood of someone, or else they will die too. What exactly happens if a vampire takes the last drop of blood from someone?
Answer: In Queen of the Damned, the lore dictates that if someone drinks "the last drop of blood", they will take death - their victim's death - into themselves...
Interview... states that if you drink the blood of the dead there will be a heavy consequence (although not necessarily death)
The two are not necessarily mutually incompatible: Queen... may just be more elegiac and prosaic in the way it articulates its point.
It's very unlikely the idea of "The last drop of blood" is supposed to be literal, but rather interpreted as some form of accommodated murder. If there were literally no blood left in their victim's body, they would exhibit drastically different signs of decay and de-circulation (particularly in the scene where Marius is explaining feeding to Lestat).
Perhaps the "last drop" is just a more flowery way of saying you will drink the blood of the victim once it has died and become a cadaver, and thus incur what befalls Lestat in Interview....

These two films (if not the books) seem to deploy the same idea in slightly different terminology, but despite the ambiguity it could be inferred to be the same point.
Comment: But this also happens in the books?
Comment: Do you have a quote fromthe passage from the Pandora that directly quotes them as draining the blood until *he is dead*, or until the point of death, in which they stop to allow the body to die from Exsanguination?
Comment: It's been a while since I read the books, but I don't remember this bit about "the last drop of blood" being in there.  I could be mistaken though.  Also, the Queen was a MUCH different creature than most "modern" vampires, and IIRC there were several things that applied to her and not to most others, so maybe this was one of those.
Answer: In The Vampire Lestat, Magnuson tells this to the newly made Lestat who, true to form, does it anyway.  All that happens is that he actually feels the death, and it momentarily stuns him. Not deadly in of itself, but potentially dangerous when feeding in a dark alley or some such place...a bad time to be psychically knocked senseless, so I can see an elder advising a newbie against this.
Comment: I'm on _The Vampire Lestat_ now. Being engrossed by the "vampire lore" of Anne Rice's world from _Interview with the Vampire_, I was made deeply curious by the unspoken and unanswered question "_why_ shouldn't a vampire drink after his victim's heart has stopped beating?" ...only to be bemused by Lestat breaking the rule, and experiencing...basically not much (other than what you described). Given Lestat's experience with it, I wonder why he'd bother repeating the advice to Louis or Claudia. Is this topic ever explored much more later in the book/series?


add to compare doesn't work

Question: When I want to add a product to compare list I get the error "page not found".
The wishlist works fine, if I access the link from "mydomain/catalog/product_compare/add" it is redirected to "mydomain/catalog/product_compare/index" and it says that there are no product to compare. It happen only when I add product to compare list.
Answer: Most likely you use Amasty_ShopbySeo extension and have 'Stores->configuration->Improved Layered Navigation: SEO->SEO URLs->Add Suffix to the Brand Pages and All-products Pages' set to 'Yes'. They don't check routes and add suffix defined in 'Configuration - Catalog - Catalog - Search Engine Optimization - Category URL Suffix' to the end of your request in the seofyUrl() method in vendor/amasty/shopby-seo/Helper/Url.php:
if ($this->hasUrlSuffix || $this->getRequest()->getMetaData(Data::SEO_REDIRECT_MISSED_SUFFIX_FLAG)) {
        $identifier = $this->addCategorySuffix($identifier);
    }

So, finally you get URL like this 'catalog/product_compare/add/.html', where .html is your suffix and get new weird request.

add to compare doesn't work


Mechanism for hydrolysis of cyanohydrin

Question: I know that acetals can be hydrolyzed with H2SO4 but I am not sure how benzaldehyde would be formed following hydrolysis of the cyanohydrin. When I searched online it I found answers suggesting that a carboxylic acid functional group will form rather than benzaldehyde but this question indicated otherwise. Can someone please provide a mechanism as to how benzaldehyde can be reformed after reaction with H2SO4?
Answer: Cyanohydrins are formed under acid conditions in the presence of cyanide - essentially the addition of HCN across the C=O bond. Mechanism from Wikipedia

Cyanohydrins are stable under acidic conditions, but note that the reactions are reversible. Under basic conditions (eg carbonate work up of the hydrolysis reaction) the reaction runs backwards losing cyanide anion and regenerating the carbonyl compound

Mechanism for hydrolysis of cyanohydrin


How to create releases for public or private repository in GitHub?

Question: I have a problem how create releases in our public or private repository in GitHub ? How to do it using windows cmd or linux terminal ? Is there any special commands for that?
Comment: Maybe, this should help you https://help.github.com/articles/creating-releases/.
Comment: @ julian salas Thank you very much . The article you provide is very informative!
Answer: The example below show You how to made a single release cycle, first you should create a central repository, then you create a develop branch.
You create a develop branch
git branch develop
git push -u origin develop
This branch contain the complete history of your project, now whereas your  master contain new version. Your team should now clone the central repository and create a tracking branch for develop.
You create a tracking branch for develop
git clone ssg: //user@/path/
git checkout -b develop origin/develop
Everybody now has a local copy of the historical branches set up. So You decide to make a new feature. For that you create separate branches for your respective features with base as your develop branch.
You begin a new feature
git checkout -b some-feature develop

You can to add commits to the feature branch as You wish, then:
git status
git add <some-file>
git commit

You finish your feature
After adding new features, You decides that your feature are ready, now You can merge it into your local develop and push it to the central repository, like so:
git pull origin develop
git checkout develop
git merge some-feature
git push
git branch -d some-feature

The first command makes sure the develop is up to date before trying to merge in the feature. Note that features should never be merged directly into master.
You begin to prepare a release
While others develop's working on his feature, You can start to prepare the first official release  of project, You can to use a new branch to encapsulate the release preparations. This step is also where the release's version number is established:
git checkout -b release-0.1 develop

This branch is a place to clean up the release, test everything, update the documentation, and do any other kind of preparation for the upcoming release. It's like a feature branch dedicated to polishing the release.
You finish the release
Once the release is ready to ship, You merges it into master and develop, then delete the release branch.It's important to merge back into develop because critical updates may have been added to the release branch and they need to be accessible to new features. Like so:
git checkout master
git merge release-0.1
git push
git checkout develop
git merge release-0.1
git push
git branch -d release-0.1

You should know that release branches act as buffer between feature development and public releases. Is good idea that whenever you merge something into master, you should tag the commit for easy reference:
git tag -a 0.1 -m "Initial public release" master
git push --tags

If you want a better explanation, visit this link: https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow.
Comment: This is great! .I'll be check your solution as soon as possible and thank you again. This is what I want !
Comment: Aha! I've confused about the git checkout command and your answer has great explanation about that!
Answer: Releases are a feature of GitHub, and are not a feature of general git (similar to other Github extra features like Issues and Pull Requests).  However, people have created projects that allow you to create GitHub releases from the command line.  The following are a few that I could find:

Go (golang) Implementation of GitHub releasing: https://github.com/aktau/github-release

JS Implementation of GitHub releasing: https://github.com/ungoldman/gh-release
Comment: Thank you very much for the info . This is interesting and really helpful !
Answer:
How to do it using windows cmd or linux terminal ? Is there any special commands for that?

There is, using the GitHub CLIP gh that you need to install first.
Since gh 2.19.0 (Nov. 2022), you can do, using gh create release:

Support explicitly marking a Release as "Latest" by @mislav in #6538
Example:
cd /path/to/local/repository
gh release create v1.3.0 --latest --target=main --notes ""
gh release create v1.2.1 --latest=false --target=1.2-stable --notes ""

This helps considering since Oct. 2022, you can explicitly set the latest release to any version you want.

Previously, a repository's latest release was the one created on the most recent date. In the event that multiple releases had the same date, the semantic version number broke the tie.
This new feature provides an explicit toggle to mark a release "latest" when you create it.


How to set arithabort on at the instance level for all new dbs?

Question: How do I set Arithabort 'on' for al new databases created in SQL Server? I know how to set it at the db level but how do I set it at the instance level?
Comment: Why do you need to do this? ARITHABORT is effectively on with most clients due to `ANSI_WARNINGS ON` and database compatibility greater than 80 (SQL 2000). The database setting is a no-op.
Comment: Scripts won't run faster with it on. The database setting is almost entirely (if not entirely) ignored as clients will set it explicitly anyway.  Plus for  `ARITHABORT` this is further ignored anyway as Dan explains. If you think scripts run faster because you changed this once and you saw an improvement then this was likely a parameter sniffing issue https://www.sommarskog.se/query-plan-mysteries.html - and to be clear if the problem plan had been cached with `ARITHABORT ON` then you would have seen similar improvements by setting it `OFF`
Comment: Ok, I'll bite... `ARITHABORT` is a session-scoped option, something that's set to `ON` or `OFF` by clients as and when needed - sometimes on a [per-statement basis](https://learn.microsoft.com/en-us/sql/t-sql/statements/set-arithabort-transact-sql#examples). How are you setting it `ON` at the database level?
Comment: @AlwaysLearning - you can do that here [`ALTER DATABASE SET`](https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-set-options?view=sql-server-ver16) - but as most or every client will set it automatically I doubt the value set there is used much/at all in practice.
Comment: Why are you bothering to set it on? What benefit do you thing setting it `ON` gives you?
Comment: I right click on a Database in SSMS, right-click, select properties then options and in the miscellaneous box select arithmetic abort enabled - set to true/false/.
Comment: I support thousands of databases and some times I find it set off. I run sp_msforeachdb to set it on for all dbs but I don't want to keep doing this.
Comment: Scripts run faster with it on and its part of MS recommendations to keep it on.
Answer: Regarding your comment:

I support thousands of databases and some times I find it set off. I
run sp_msforeachdb to set it on for all dbs but I don't want to keep
doing this

TL;DR, it is likely you do not need to change the ARITHABORT database default setting at all.
ARITHABORT ON is implicitly set when clients connect with ANSI_WARNINGS ON (as do modern drivers) and the database compatibility level is 90 (SQL 2005) or higher. The default database ARITHABORT ON setting need only be set if you are using an unsupported SQL Server version (which allows database compatibility level 80 or lower) or use a client driver that doesn't set ANSI_WARNINGS ON when connecting, such as the long obsolete DB-Library driver.
Be aware that an implictly set ARITHABORT ON setting is not exposed by DMVs, the bit 64 @@OPTIONS flag, or DBCC USEROPTIONS. These report ARITHABORT OFF even when implicitly set due to ANSI_WARNINGS ON and database compatibility 90+. ARITHABORT ON will be reported only after a T-SQL SET ARITHABORT ON; is executed by the client.
Also, regarding  your other comment:

Scripts run faster with it on and its part of MS recommendations to keep it on.

The MS documentation states "Setting ARITHABORT to OFF can negatively impact query optimization, leading to performance issues." This is likely why MS went through the effort of turning it on by default as described above. Consider the only way to turn it off (with modern client drivers and 90+ compatibility) is with an explicit SET ARITHABORT OFF; T-SQL statement in app code or non-default ODBC setting. Furthermore, the effect of ARITHABORT on performance is often misconstrued as the answers to this question discuss since the explicit ARITHABORT session setting is part of the query plan cache key.
Answer: Each new database that is created in a SQL Server instance is based on the model database of that instance. The model's database setting for Arithmetic Abort Enabled is set to False. This is why each new database is configured with the setting turned off (False).
Answering Your question

How do I set Arithabort 'on' for al new databases created in SQL Server?

Using SQL Server Management Studio

Right-click the model database
Open Properties
Switch to Options
Scroll down until you find Arithmetic Abort Enabled
Change the value from False to True
Click on OK to close the properties window.
Create a new database....

Using SQL Statement
USE [master]
GO
ALTER DATABASE [model] SET ARITHABORT ON WITH NO_WAIT;
GO

....then create a new database.


Where do I download the manuals for games I buy on Steam?

Question: I recently signed up with Steam and bought a few discounted games, but I can't find any manuals for them. I assumed they'd be installed along with the games, but I can't find any sign of them or of download links for them on Steam. Am I missing something?
(The games are Crysis, Fallout 3, Mirror's Edge and Burnout Paradise.)
Answer: There is a thread on the Steam forums about this: http://forums.steampowered.com/forums/showthread.php?t=1196986

Check the steam store page. You can right-click the game, click "view store page" and then see if there is a "view the manual" link in the lower right.
If there is no manual link there, go to Google and search for the manual there.

Here are a few of the sites that show up prominently in Google:
http://www.replacementdocs.com/download.php
http://www.meekeo.com/
Comment: Thanks. Found manuals for Crysis and Burnout Paradise via right-click > Store page.
Answer: Not a lot of games include manuals with their Steam versions. If they are available, you can open them by right-clicking the game and choosing View Player Manual.
I just checked, Mirror's Edge (the only game I have in your list) doesn't have a manual, only support pages.
Comment: The website for Mirrors Edge tries to flog you a game guide for $25  but no basic user manual :¬(
Comment: Didn't see any 'View player manual' entries in the right-click menus but looking at the forum post mentioned by Adam N it looks like these are optional.
Comment: Exactly, I said `if they are available` which they aren't in Mirror's Edge's case.
Answer: I checked the Steam store page for each of the games you own. As Arda stated, Mirror's Edge does not have a manual. On the Steam store page for each game, when you scroll down, if there is a manual for the game, you will usually find it in the right hand column near the bottom. I believe you can view the manual even if you don't own the game by clicking on that link in the store page. It is worth noting that if you own the Fallout 3: GotY edition, the manual is listed on the store entry for Fallout 3 vanilla edition, but not the GotY version.
Comment: Great, got Fallout 3 manual now too.


How to set up multiple phone numbers under text messages send/receive option

Question: Can I set up multiple phone numbers under text messages send/receive option? I have an iPhone 5c.
Answer: You can only assign 1 single phone number for sending SMS text messages (or iMessages), that of the SIM that is currently inserted.  You can assign any number of email address IDs that can be used for sender or recipient addresses.  You may be able to use an SMS forwarding system to allow receiving of message to multiple numbers, but you will only be able to reply from your own SIM number.
As a tangent, in the yet-to-be-released Yosemite version of OSX, it can pair to a phone and send text messages on behalf of it directly from the desktop.  Potentially it could pair to multiple phones to essentially have multiple sender IDs expressed as phone numbers, but that's not really what you are asking for and I include it only for observations sake.


When do you use 'extend' and 'expand' as synonyms?

Question: There are lots of posts about the difference between extend and expand, but I can hardly find any posts explaining their synonymous usages. When do you use them interchangeably?
Comment: That is because they are not close synonyms, and they are not interchangeable. They both mean "get bigger" in some way, but differently as you have found. One synonymous usage, though, if your house is too small, could be "we extended/expanded the accommodation".
Answer: The word "extend" is used for linear things.
The word "expand" is used for two-dimensional or three-dimensional objects.
Examples of "extend":

We can extend the rope with a carabiner
We can extend the life of your pet dog for at most 6 months (time is modeled as being linear)
We can extend the shelf life of our company's breakfast cereal by adding tri-sodium phosphate to it   (time is modeled as being linear)
John extended his arm to William (human arms are long an skinny, approximately linear)

Examples of "expand":

China expanded into Tibet in the year 1959.  (China looks like a two-dimensional blob on most world maps)
The balloon expanded as the clown used a pump to put more air into it ( a balloon is three-dimensional, and has volume)


Run python script using spark-submit on windows 7

Question: I'm trying to submit a python script using spark-submit on windows 7. I'm using spark 2.3.0 built for hadoop 2.7 . The python script is supposed to read data from a csv file and plot graphs. is it possible to run such a script using spark-submit? In the python script I included this block of code for spark context.
import findspark
findspark.init()
import pyspark
from pyspark import SparkContext
APP_NAME = 'kineticPCA'
conf = SparkConf().setAppName(APP_NAME)
conf = conf.setMaster('spark://192.168.xx.xxx:7077')
sc = SparkContext(conf=conf)

This is the how submit the job on command prompt, on the spark bin directory
spark-submit G:/guru orders/pca kinetics/files/kineticPCA.py

This is the error I get:

Error: Cannot load main class from JAR G:/guru with URI G. Please
  s through --class.
  Run with --help for usage help or --verbose for debug output

What could be the cause of this error?
Answer: use this command
.\bin\spark-submit \guruorders\pcakinetics\files\kineticPCA.py


Are there any Ethereum L2 projects that built based on the Parity Substrate framework?

Question: Substrate is a powerful framework that makes it easy to build a blockchain. I am more familiar with the substrate development than the Layer2. and am curious about why there are no Ethereum Layer2 rollup projects based on it (I did not find any now). Substrate can be EVM compatible by installing the frontier layer. In addtion, as a Substrate-Ethereum Layer2 chain, it can be upgraded to the parachain to share the Polkadot security, sounds like a good idea.
Answer: There is an project called Madara which is a Starknet sequencer, based on substrate.


Have I designed my network correctly? If not, how do I fix it?

Question: I was hoping to get some feedback on a graph neural network I have designed. I've been doing this by myself, so this is a sanity check to make sure I have understood this correctly.
I have a selection of small graphs, each node has 4 features. I want to classify each graph as belonging to category A or B.
My network structure is:
graphConvLayer1() – this takes 4 features as input and returns 3
graphConvLayer2() – this takes 3 features as input and returns 1
These layers should aggregate each nodes features together with their neighbours
This should return an object that is N*1 (where N is the original number of nodes). This can then be fed into a set of linear layers, with dropouts.
This setup gets decent classification ability, but this architecture seems to go against some resources I've found and led me to be kinda unsure what to do (https://medium.com/@sunitachoudhary103/how-to-deal-the-graphs-data-in-deep-learning-with-graph-convolutional-networks-gcn-39f69db072ee). I feel like I have followed tutorials I've seen on the subject, but the previous link implies there should be pooling layers between the graph layers, and that the number of nodes should be changing (which isn't happening for me)
How should I adapt my network?
Answer: If all of your input graphs are the same size, then your approach works fine. Otherwise, the size of the linear layer would need to change based on the size of the input graph. Pooling is one way of getting around this, by transforming the representation of N nodes into a form which doesn't depend on N, and thus can be plugged into a linear layer.


How to increase Pagesize of REST API call response using SSJS in Cloudpage

Question: I am using REST API call to get history data. For this I am writing SSJS in Cloud page and am trying to store the data in a data extension. The result of REST API call is more than 100 records. But by default it is giving me page 1 , page size = 100. How to set page size to maximum? I am using a for loop, if condition in the body to get specific activity details for all Id's
Answer: In general,but not always the case, you can use the $page and $pageSize parameters to control this.
For example:
<code>/fake/myendPoint?$page=1&$pageSize=500</code> would return a payload of the first 500 items in the return.
Do be careful though as not every endpoint will do this. Also, sometimes in order for $pageSize to work, you need to indicate the page first (like my sample) or it will not affect the return.
EDIT: for anything being retrieved in bulk, I would look to either have multiple calls that are looped through and concatenated (will likely be a high resource draw and risk of timeout issues) or I would look to do a data extract of the full load, push this to an FTP and then utilize your service to grab this data and properly ingest it.
Comment: Thanks for the reply. I am able to retrieve the data with increased page size now. But there is a limit for 10000 records only. Is there any other way to get the complete data set at a time ? I have around 800000 records to get updated in a d.e.
Comment: @Harry I can almost 100% guarantee any call trying to pull that many records at once to SFMC will time out, even if you could. Your best bet to get those is to either do a data extract to a CSV and then import that CSV to your other system or to do a for loop around the retrieve calls and concat the results together to form one massive super array of data.


Can you prevent iMessage texts from being deleted?

Question: Is there any way to prevent the deletion of iMessage history? Can a particular iMessage with someone be archived so I don't accidentally delete it?
Comment: Take a ton of screenshots :D
Answer: I'm not sure if it's what you're looking for, but there is a Message History setting that prevents messages from being auto-deleted after a certain amount of time.
You can find it in Settings -> Messages -> Keep Messages. Make sure it's set to Forever instead of 30 Days or 1 Year.
Comment: Thanks, that's a good feature. Unfortunately it won't stop me from accidentally deleting months worth of convo like I was hoping to have (archive or lock).
Answer: No, there's no built-in way to archive iMessage history.
The only way to keep messages is to copy/paste them somewhere and then sync that to all your iCloud devices (or to back them up via your preferred archival method).
Answer: Although not a strict answer to your question, you can archive all messages off-line, including attached images, by using the iExplorer app from Macroplant. It comes in macOS and Windows flavors, too.
Although a bit pricy (US$50) it is an incredible tool for accessing the data on your iOS devices that Apple makes impossible or difficult to do.
[Disclaimer: I'm a happy iExplorer customer. I have no financial stake in the Macroplant.]
Answer: If you have Verizon, you can create a my verizon account online with your child's number. From ther you click on my services, send a message.
It will show you all of their texts from then on and store them for 3 months. Even if they are deleted off of the phone they will be online. It works best if imessage is turned off, if its on the text may show up out of order.
I dont know what cell service you have, if it's not Verizon, call customer service and see if they have anything like this.


Programmatically delete CCK field value

Question: I have content type with Photos ImageField. I need to create some moderation view to show all photos and "delete" link to delete appropriate photo. How can I programmatically delete value from CCK field (in general not only ImageField but any field type)?
Answer: You will need to check the ImageField array to see what needs to be changed but for D6 but it   should be something like the below:
$node = node_load($nid);
$node->field_photo[0]['value'] = NULL;
node_save($node);

Just change the field name to what you are using and change the $nid to the node id #.
Comment: This appears to be the best approach in Drupal 7 too. There are heaps of field functions, but none of them seem able to single out and delete one specific field entry.
Answer: WestieUK has a correct general expression. However, the vague question presents two potential cases for Filefield/Imagefield here:

Delete all references to that file from all nodes -> filefield_file_delete($file);.
Delete only that node's reference to the file -> Use WestieUK's method.

If there never are multiple node associations for the files in your structure (usual behavior in Filefield/Imagefield), method #1 is safe and simple to use for case #2 as well.
If the file is no longer referenced, do not forget to also remove the entry from the file tables and delete the file from disk with file_delete($path);.

Programmatically delete CCK field value


Can't Rename Files In Xcode 4 Anymore?

Question: Seriously, in previous versions of XCode I could right-click a file or group in XCode and I would get the "rename" option. In XCode 4 I can't seem to rename my files in XCode directly anymore. What happened? Why would Apple remove such a feature? How can I rename my nibs, image resources, and others in XCode now?
Answer: Note that if you're renaming a class, the best way I've found to do this is to open the class header, select the name of the class then control-click and choose Refactor / Rename. That way Xcode will rename the .h and .m files and replace instances of your class name (almost) everywhere it appears, including XIB files. Nifty!

Edit: in Xcode 4.2, watch out for this gotcha: "When initiating a refactoring rename operation from the declaration of a property, any Interface Builder files that refer to that property will not be updated correctly. Instead, perform the rename operation on a usage of the property, or an associated @synthesize statement."
Answer: The contextual menu item was removed, but you can still rename from within. Select the file and then click again in the name and you should get the editor field.  Type away to rename.  It can be a little temperamental though.  The biggest problem I usually have is doing the 2nd click too quickly and it being registered as a double click.  So you might need to play around with your timing a little bit to get used to it.
If you want the CM item back, make sure to file a bug report on it.
Comment: That works. I managed to do it quite quickly. Thanks a bunch.
Answer: Select the file in the navigation window and press Enter.
Just the way renaming in Finder.
Answer: In case you want to change the path in case you moved some files...
Step 1: View -> Utilities -> File Inspector to open the file inspector
Step 2: Under Identity -> Path there is a white icon to change the relative path of the file
Furthermore, to rename the file, just refactor as stated above ;)
Answer: another way you can do it, is by using the little rectangle with an arrow in it which is at the bottom of the bar. Click on it, your items will be displayed in a list like view, you can rename it there the way you would rename files or whatever... Hope that helps
Answer: If you want to rename non-class files like png files just select file and choose 'Show File Inspector' from right click, then change file name from 'name' textfield (identify and type label).
I you want change class name, I recommend 'Simon Whitaker' Refactor method (second comment).

Can't Rename Files In Xcode 4 Anymore?


Can Django trans tags include HTML tags?

Question: Can Django trans tags include HTML tags? For example can I do {% trans "Hold Ctrl" %} ? Or would I have to do {% trans "Hold" %} {% trans "Ctrl" %}" instead?
Answer: Can we include HTML tags inside the trans template tags?
No, we should not include HTML tags inside a trans template tag as you are doing in your 1st approach {% trans "Hold Ctrl" %} . This is a wrong approach
From the docs:

The {% trans %} template tag translates either a constant string
  (enclosed in single or double quotes) or variable content.
It's not possible to mix a template variable inside a string within {% trans %}. If your translations require strings with variables
  (placeholders), use {% blocktrans %} instead.

<title>{% trans "This is the title." %}</title> # example 1

<title>{% trans "myvar" noop %}</title>  # example 2

Solution-1: Using trans template tag
Instead of putting HTML code inside the trans tag, you can do something like below to get the desired result(though this is not the recommended approach).
{% trans "Hold" %} {% trans "Ctrl" %} # using trans tag

Solution-2: Using blocktrans tag instead
Better option is to use blocktrans template tag instead of trans tag to include the HTML tags.

the blocktrans tag allows you to mark complex sentences consisting of
  literals and variable content for translation by making use of
  placeholders:

You can then just do:
{% blocktrans %}
Hold Ctrl
{% endblocktrans %}

Comment: @RahulGupta I'm confused by this. What does the ability to mix variables and strings have to with including HTML tags (which are just constant strings)?  Which is to say, you should be able to include them just fine, but you need to make sure they're translated correctly (i.e. not translated in most cases) ;)
Comment: Solution one isn't really correct, it doesn't make sense to translate the words independently if they are part of a sentence. E.g: some languages need them to be the other way around ("Ctrl" and then "Hold").
Comment: This doesn't seem to accord with the DRY principle.
Comment: Quite a bit in my case.
Comment: To some extent you can say.
Answer: As Rahul said in his answer, one should not include HTML tags inside a trans template tag. However, according to Translating text blocks with Django .. what to do with the HTML? (which I just found), one can put HTML tags inside of blocktrans template tags instead. Thus I don't have to do {% trans "Hold" %} {% trans "Ctrl" %}". I was unable to find such instructions in the Django 1.8 docs.
Comment: Yes, we can't use HTML tags inside a `trans` template tag but we can use `blocktrans` tag. The solution using `trans` template is not the best solution. We can use the `blocktrans` template tag instead for our case. I have updated the ans, please check.


At the end of LotR, why does the Eye of Sauron burn so vigorously after the Ring gets destroyed?

Question: In The Return of the King, after the Ring got tossed into the fires of Mount Doom, the Eye of Sauron burst into flames, and the tower of Barad-dûr then collapsed. Then the Eye shrank to a small point and exploded. What was actually happening there?
Comment: I'm tempted to blame Peter Jackson.
Comment: He's still connected to the ring up until they're both destroyed completely. I always thought Sauron was just screaming in agony. He is essentially feeling the burning of over 1,000-degree magma while the ring sinks, after all.
Comment: Related: https://scifi.stackexchange.com/questions/27657/was-the-eye-of-sauron-saurons-actual-physical-form
Answer: I don't know that the specific visual effects in the movie are explainable beyond 'it looked cool', but as for the events - when the Ring was destroyed, the power Sauron put in it was lost, and everything Sauron used the Ring to make was undone.
As Gandalf says in RotK -

If it is destroyed, then he will fall; and his fall will be so low
that none can foresee his arising ever again. For he will lose the
best part of the strength that was native to him in his beginning, and
all that was made or begun with that power will crumble

The foundations of the Barad-dûr (Sauron's Dark Tower) were made with the Ring, so upon its destruction the tower falls as its foundations are destroyed.
Sauron is a Maia - a spirit which can assume a body to act in the physical world, but is inherently incorporeal in its own nature.
He didn't technically "die" with the destruction of the Ring, but he lost so much of his power that he was thereafter unable to do anything meaningful or manifest a new body; Gandalf says

a mere spirit of malice that gnaws itself in the shadows, but cannot again grow or take shape.

("take shape" referring to assuming a physical body, which he was able to reconstruct after previous defeats - in the Downfall of Númenor, and by Gil-galad, Elendil, and Isildur at the Battle of Dagorlad).
Comment: Well, if you mean the burning eye form of Sauron that's present throughout the movies rather than something specific to the "death scene", the movies use that to represent Sauron - presumably because Sauron never actually appears personally in the books, but some kind of visual representation was thought to be necessary for a movie (I'm speculating, don't know for sure). In the books, there are references to Sauron's 'Eye' as his will/focus/attention, and Frodo sees something very similar to the movie depiction (though it's "rimmed with fire" not made of fire) in the Mirror of Galadriel (...)
Comment: (...continued) But the flaming Eye is not treated as Sauron's "body" or actual physical form in the books. But it's hard to show the will/focus/attention aspect in a movie, except with a literal visual representation. In the *books*, Sauron does in fact have a physical form at the time of LOTR. Gollum says "He has only four fingers on the Black Hand, but that is enough" (which seems to refer to when Sauron tortured him), showing he has regained the form he used in the Battle of the Last Alliance (thus his Ring-finger is gone). See http://www.glyphweb.com/arda/faq/sauronshape.html for more.
Comment: But what was that burning eye thing then?
Answer: Your simple answer would be: Peter Jackson's special effects.

It's just to make the Fall of Barad-dûr look much more interesting on film.

For the book The Return of the King, this is roughly what happens to Sauron.

The realm of Sauron is ended!' said Gandalf. 'The Ring-bearer has fulfilled his Quest.' And as the Captains gazed south to the Land of Mordor, it seemed to them that, black against the pall of cloud, there rose a huge shape of shadow, impenetrable, lightning-crowned, filling all the sky. Enormous it reared above the world, and stretched out towards them a vast threatening hand, terrible but impotent: for even as it leaned over them, a great wind took it, and it was all blown away, and passed; and then a hush fell.

The film scene was not written inside the book, and hence a canonical answer for this question cannot be given.


Trouble with macros

Question: Recently, at work, the program that we have used for years has drastically changed and all of our old file types are no longer supported. This has left us completely out in the cold as to how we can access our old files without using the older software. With that being said, here is my problem with macros that I'm in need of help:
I need to be able to open a file in a specific program, copy all the text in the file, paste the text into a new notepad document and then save the notepad file with the file's original name as a simple text document. I need to do this to an entire folder (and eventually folders within a folder but that can wait for now).
If I need to clarify anything let me know. Thanks for any help you can give me.
Answer: Have you tried doing this in powershell?
Using powershell you can loop through every file in a directory and copy/paste all contents to another file named with a _new.txt suffix.
I'll try to find a code for this for you, however I' havnt used powershell in quite a while but its relative simple to learn.
Comment: That'd be great, xeet.
Comment: Sounds more like a job for AutoIt, than for PowerShell, to be honest.

Trouble with macros


web extraction software and spiders with GUI

Question: I'm looking for an email and data extraction programme to build a mailing list for particular industries, I am looking for one with a simple GUI but has extensive capabilities and easy to use on ubuntu.
Answer: You can use something like HTTrack to create a local static mirror of the site first. Then cd into the local mirror and grep for email addresses:
grep -srhwoIiE "[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}" . \
| tr '[:upper:]' '[:lower:]' \
| sort -u

There are probably better regexes for emails (it's notoriously difficult because the email RFC is so loose) but that should get you going.
Comment: That's great oli, is there anyway of getting more fields than just the email addresses? are there any programmes which can do it directly off the sites?


Since it's a "virtual drive" is Parallels Desktop unaffected by system restore on a MacBook (2009)?

Question: I used a free trial of Parallels Desktop 11 on my 2009 MacBook and the trial expired before I deleted my files from Windows. I'm going to restore the computer to factory settings before selling it using "clover leaf + R". But if the buyer installs Parallels Desktop will they get "my" Parallels Desktop (with all my files) because it's a virtual drive unaffected by system restore? If so, how can I erase my files from Parallels Desktop as well?
Answer: A "virtual" drive that Parallels creates when you make a Windows virtual machine is like any other file in your Macbook. Once you restore to factory settings (reformat) your old files (and the Windows virtual drive) are no longer accessible (not easily at least, unless they purposely try to recover your files using special tools). So you don't have to worry too much about your virtual drive unless you have very sensitive information there and you think the buyer will try to recover your files with recovery tools.
If you want to be extra safe, when you restore your computer and it is time to Erase your hard disk, click on Security Options and slide the slider all the way to the right to "Most Secure". This process will take some time depending on how large your hard disk is but it will ensure that the buyer will not be able to recover any files.
For more info, read this article and pay attention to step 4:
https://support.apple.com/kb/PH22241?locale=en_US


Product of Gamma functions II

Question: What is the value of the product of Gamma functions
\begin{align}
\prod_{k=1}^{10} \Gamma\left(\frac{k}{10}\right)
\end{align}
and can it be shown that
\begin{align}
\prod_{k=1}^{20} \Gamma\left(\frac{k}{10}\right) \approx \frac{\pi^{9}}{54}
\end{align}
and
\begin{align}
\prod_{k=1}^{40} \Gamma\left(\frac{k}{10}\right) \approx \left( 6 + \frac{625}{4501}\right) \pi^{18}.
\end{align}
Comment: Check the multiplication formula: http://en.wikipedia.org/wiki/Multiplication_theorem#Gamma_function-Legendre_function
Answer: Original Question
As shown at the end of this answer,
$$
\Gamma(x)\Gamma(1-x)=\pi\csc(\pi x)\tag{1}
$$
As shown at the beginning of this answer,
$$
\prod_{k=1}^{n-1}\sin(k\pi/n)=\frac{n}{2^{n-1}}\tag{2}
$$
Using $(1)$ and $(2)$, we get
$$
\begin{align}
\left[\prod_{k=1}^{10}\Gamma\left(\frac{k}{10}\right)\right]^2
&=\prod_{k=1}^9\Gamma\left(\frac{k}{10}\right)\Gamma\left(1-\frac{k}{10}\right)\\
&=\prod_{k=1}^9\pi\csc(k\pi/10)\\
&=\frac{2^9\pi^9}{10}\tag{3}
\end{align}
$$
Thus,
$$
\prod_{k=1}^{10}\Gamma\left(\frac k{10}\right)=16\pi^4\sqrt{\frac\pi5}\tag{4}
$$

Gauss's Multiplication Formula
Define
$$
f(x)=\prod_{k=0}^{n-1}\Gamma\left(x+\frac kn\right)\tag{5}
$$
then $f$ is log-convex and
$$
\begin{align}
x\,f(x)
&=x\,\prod_{k=0}^{n-1}\Gamma\left(x+\frac kn\right)\\
&=x\,\Gamma(x)\,\prod_{k=1}^{n-1}\Gamma\left(x+\frac kn\right)\\
&=\Gamma(x+1)\,\prod_{k=0}^{n-2}\Gamma\left(x+\frac{k+1}n\right)\\
&=\prod_{k=1}^{n-1}\Gamma\left(x+\frac1n+\frac kn\right)\\[6pt]
&=f\left(x+\frac1n\right)\tag{6}
\end{align}
$$
Plugging $\frac xn$ into $(6)$ gives
$$
\frac xnf\left(\frac xn\right)=f\left(\frac{x+1}n\right)\tag{7}
$$
$(7)$ and log-convexity implies that
$$
f\left(\frac xn\right)=C_n\frac{\Gamma(x)}{n^x}\tag{8}
$$
Using $(1)$ and $(2)$ yield
$$
\begin{align}
f\left(\frac1n\right)^2
&=\prod_{k=1}^{n-1}\Gamma\left(\frac kn\right)\Gamma\left(1-\frac kn\right)\\
&=\prod_{k=1}^{n-1}\pi\csc(k\pi/n)\\
&=\frac1n2^{n-1}\pi^{n-1}\tag{9}
\end{align}
$$
$(8)$ and $(9)$ yield
$$
C_n=\sqrt{n2^{n-1}\pi^{n-1}}\tag{10}
$$
Therefore, $(8)$ and $(10)$ give Gauss's Multiplication Formula
$$
\prod_{k=0}^{n-1}\Gamma\left(x+\frac kn\right)
=\sqrt{n2^{n-1}\pi^{n-1}}\frac{\Gamma(nx)}{n^{nx}}\tag{11}
$$

Second Question
Using $(11)$,
$$
\begin{align}
\prod_{k=1}^{20}\Gamma\left(\frac k{10}\right)
&=\prod_{k=0}^{9}\Gamma\left(\frac1{10}+\frac k{10}\right)\prod_{k=0}^{9}\Gamma\left(\frac{11}{10}+\frac k{10}\right)\\
&=5120\pi^9\frac{\Gamma(1)}{10^1}\frac{\Gamma(11)}{10^{11}}\\
&=\frac{\pi^9\,9!}{10\cdot5^9}\tag{12}
\end{align}
$$

Third Question
Using $(11)$,
$$
\begin{align}
&\prod_{k=1}^{40}\Gamma\left(\frac k{10}\right)\\
&=\small\prod_{k=0}^{9}\Gamma\left(\frac1{10}+\frac k{10}\right)\prod_{k=0}^{9}\Gamma\left(\frac{11}{10}+\frac k{10}\right)\prod_{k=0}^{9}\Gamma\left(\frac{21}{10}+\frac k{10}\right)\prod_{k=0}^{9}\Gamma\left(\frac{31}{10}+\frac k{10}\right)\\
&=\left(5120\pi^9\right)^2\frac{\Gamma(1)}{10^1}\frac{\Gamma(11)}{10^{11}}\frac{\Gamma(21)}{10^{21}}\frac{\Gamma(31)}{10^{31}}\\
&=\frac{2^{18}\pi^{18}}{10^{62}}10!\,20!\,30!\tag{13}
\end{align}
$$
Comment: Nice answers. +1 I knew of 3 proofs of the gamma multiplication formula, but that wasn't one of them.
Comment: Nice solution. I added some notes about the approximations in a follow-up solution.
Answer: Since @robjohn has done an excellent job at providing an answer in detail I will add my comments as an additional solution. The results presented here follow the numbering in robjohn's work.
In robjohn's equation (12) the factor
\begin{align}
\frac{9! \ \pi^{9}}{2 \cdot 5^{10}}
\end{align}
has been provided. Numerically this can be seen as $.018579456\cdots \ \pi^{9}$. By comparing this to that of $1/54 = .0185185\cdots$ one can make a good approximation by
\begin{align}
\prod_{k=1}^{20} \Gamma\left(\frac{k}{10}\right) = \frac{9! \ \pi^{9}}{2 \cdot 5^{10}} \approx \frac{\pi^{9}}{54}. \tag{14}
\end{align}
Another possible value is $20/1077 = .0185701021\cdots$ which leads to the statement
\begin{align}
\prod_{k=1}^{20} \Gamma\left(\frac{k}{10}\right) = \frac{9! \ \pi^{9}}{2 \cdot 5^{10}} \approx \frac{20 \ \pi^{9}}{1077}. \tag{15}
\end{align}
From equation (13) the factor is
\begin{align}
\frac{2^{18} \ (10)!(20)!(30)!}{10^{62}} = 6.138858832\cdots = 6 + .138858832\cdots .
\end{align}
Since $625/4501 = .1388580315\cdots$ then to a fair approximation it can be stated
\begin{align}
\prod_{k=1}^{40} \Gamma\left(\frac{k}{10}\right) \approx \left( 6 + \frac{625}{4501} \right) \pi^{18}. \tag{16}
\end{align}
Comment: What was the reasoning behind the rational factors of $\pi^{9n/20}$? Why did you think that the answer was a rational multiple of $\pi^{9n/20}$?
Comment: @robjohn This problem is similar to problem I, of the same name, where most viewers missed the point. Several factors went into the design of this series of questions. Those being that the sine values be rationals, or have nice products, be "quick" to calculate, if knowing a few ideas, the products not be quickly found on a website, ie wiki or mathworld, and finally the problem, or a related one, be considered for a problem column of a journal, and also be a teaching experience. In aspect to reduction of the large factors to a nice fraction was just a side thought in the design

Product of Gamma functions II


Simulating a transaction's state change without writing to the blockchain

Question: I'm trying to simulate a transaction to observe the state change and events that will be emitted, before sending the transaction to the blockchain. I'm interested in all the internal calls and state changes. I've looked into eth_call but it only returns the contract return value and not events or changed states. What are the ways in which I can achieve this? I understand that there are no straightforward ways so I'm open to any possible implementation ideas.
Comment: **Comments have been [moved to chat](https://chat.stackexchange.com/rooms/148018/discussion-on-question-by-pbsh-simulating-a-transactions-state-change-without-w); please do not continue the discussion here.** Before posting a comment below this one, please review the [purposes of comments](/help/privileges/comment). Comments that do not request clarification or suggest improvements usually belong as an [answer](/help/how-to-answer), on [meta], or in [chat]. Comments continuing discussion may be removed.
Answer: This is what I would do: I would run a local fork of mainnet using hardhat node provider_url and do the transaction there, while capturing the events and reading the state changes that resulted afterwards.
Comment: Thanks for the suggestion Julissa, it worked like a charm! However, I wish to reset the fork and sync with the mainnet periodically. As per [documentation](https://tinyurl.com/2p99xsuf), I created a task -

`task("reset_fork", "Reset", async (taskArgs, hre) => { await hre.network.provider.request({ method: "hardhat_reset", params: [{forking: { jsonRpcUrl: "",},},],})})`

But when I do `npx hardhat reset_fork`, it doesn't seem to reset. Local chain is still in its previous forked state. What am I missing?
Comment: I put together a working prototype, which can simulate transactions and sync with the mainnet periodically. But each transaction simulation takes around 15-30 seconds (eg, token swap on uniswap). Is there any kind of optimisation possible here?
Comment: Happy it worked. As per the second question I think you should create a new question with that, I don't see whats wrong.
Answer: You are wanting the RPC method eth_simulateTransaction[^1]. Tenderly [^2] offers such an RPC method.
Some additional repositories that may help you develop a solution:
https://github.com/manifoldfinance/bundle-simulator/tree/feat-blockreplay
https://github.com/rmeissner/safe-simulator-gh-action
https://github.com/rmeissner/safe-simulator
EVM Performance
As for performance, certain "interpreter abort" conditions within the EVM interpreter are currently checked for on every interpretation step, such as Out-of-Gas, Stack Overflow, etc. When one of these conditions is found to apply, the currently-executing call frame is immediately escaped, with any state modifications made by that call frame and its descendants being reverted, just as if a user-triggered REVERT instruction were executed.[^3]
Now, EVM formal semantics make no requirement to perform these checks for each interpretation step. This implicit pseudo-requirement makes applying runtime optimizations to EVM interpretation, such as Just-In-Time compilation or threaded-code interpretation, mostly pointless, as either every instruction implementation needs to contain/generate redundant copies of these same checks, or trampolines to the interpreter to perform these checks need to be inserted between successive instructions. [^3]
Adapting a new constraint-based approach for speculative execution for the EVM is the only real way to speed up such simulations, as the interpreter check is orthogonal to all EVM throughput issues. In contrast to the traditional approach of predicting a single future and demanding it to be perfectly accurate, a speculative EVM can, on multiple futures, leverage speculative results based on imperfect predictions whenever certain constraints are satisfied.
Under these constraints, transaction execution can be substantially accelerated providing a faster response time.
Additionally, securerpc.com will be introducing an RPC method with such functionality. Note, I am the co-founder of Manifold Finance which operates SecureRpc.
References:
[1]: https://github.com/ethereum/EIPs/pull/2560
[2]: https://tenderly.co/
[3]: https://github.com/tsutsu
quoted from tsutsu, covalent-hq and erigion contributor.


Find list of missing textures / files?

Question: When Blender can't find an image-based texture in a node-based material, it just replaces that image with purple. Sometimes I accidentally move files on my hard drive, and Blender replaces parts of my render (the missing image-based textures) with purple, which I sometimes don't realize until I've finished a 20 hour render... For example, in After Effects, I can just search for "missing" in the search box and all missing files in that project show up. Where in Blender (2.8) can I find a list of missing files, like image-based textures (JPG, PNG etc.)?
Answer: If you make File > External Data > Find Missing Files you'll find your files but I don't know how to easily show their location. You could pack them all with File > External Data > Pack All Into Blend then unpack to another folder if necessary: File > External Data > Unpack All Into Files.
Answer: Unfortunately, you will have to check your nodes and tell Blender the new path, where you moved the file. I don't think Blender has that same option you have in AE.
Answer: File > External Data > Report Missing Files shows all missing files/textures.
Comment: I clicked it but nothing happened. Can you show what the expected behavior of this should look like? Thanks

Find list of missing textures / files?


How do I wait on three child processes?

Question: I'm trying to fork 3 different child processes from a parent (and running this on a UNIX box), and I want to have this requirement :
The parent must wait till all the 3 children processes have finished executing.
I'm using wait for the same .. Here's the code snippet :
#include <unistd.h>
#include <sys/signal.h>
#include <sys/types.h>
#include <sys/wait.h>

int main()
{
    int stat;
    /* ... */

At last, in the parent, I do this :
    wait (&stat);
    /* ... */
    return 0;
}

Question :
Do I need to call wait thrice or does a single call suffice?
I need to know how this works..
Answer: You have to issue three waits.  Each wait blocks until a child exits or doesn't block if a child has already exited.  See wait.
Answer: You have to wait three times.
Answer: Side note: If you don't want to block waiting for each to terminate in turn, you can instead install a signal handler for SIGCHLD and then call wait() to collect the return code once you know it is ready.

How do I wait on three child processes?


How important is it to know the "ideal state" you're designing towards?

Question: How important is it for UX designers to first take a step back to figure out what that "ideal state" is, before carrying out the incremental improvements? The former will exhaust more time & resources before outputs are produced, but the latter runs the risk of "improving a horse when we should be designing a car".
Answer: It is very important that from the start that a UX designer does not think they know the ideal state. To approach a problem thinking one already knows the solution is one of the biggest mistakes designers make. A large part of the reason UX Design exists is to tackle this issue head on.
The point of UX Design is to examine what users actually need via research and analysis. As such, in a way yes, the first thing to be done should be to take a step back and look at the challenge the users are faced with, and figure out what you need to figure out and how to get to there. Basically the primary challenge of UX is to ask the right question. Considering what the answer to this question is, only comes at a much later stage once the research is done.
Even once we get to the development stage its not a particularly good idea for a UX Designer to 'know' the ideal state and then work towards this. If you already think you know what the ideal state is then why not design that right away?
What we should know is what the ideal state will accomplish for the user, however not what it will actually look and feel like. The point of incremental improvements from a UX POV is to discover and alter the vision of what the end product will look like. To experiment with different possibilities to see which would work best for the user. It's quite a different situation to programming or graphic design, where you should have a clear image of your final product before you even start working.
TLDR: UX is about discovery. The hard part is in figuring out what the question is, not providing the answer.
Answer: One of the first things to set out when working on any project is the ultimate goal - in you example this would be the "ideal state". This would form a part of the first discovery/ideate phase of your project.
However, when working incrementally, it's easy to miss the fact that users' goals change with each iteration. If you're working in Agile (I'm assuming you are because you're talking about making incremental changes) each sprint should have it's own mini discovery phase where you look at that long term goal and see if it's still relevant as well as uncovering any issues that might be relevant to the particular increment you are focussing on for that sprint.


Numbers mod 11 Order

Question: Can you show that for all positive integers that are 10 mod 11, none of them have digits that increase at any point? I ran a Python program for numbers up to the millions checking, and I couldn't find any numbers that are 10 mod 11 that also have digits that increase at any point, so I'm inclined to believe it's true.
Comment: @croraf `have non-increasing digits` is not equivalent to (and stronger than) "*do not have non-decreasing digits*" which is what the question asks. Consider for example that $\,9 \cdot 11 + 10 = 109\,$, and $\,109\,$ has neither non-increasing nor non-decreasing digits.
Comment: Less confusing is to say "Can you show that all positive integers that are 10 (mod 11) have non-increasing digits".
Answer: Sorry, why should the 2nd rightmost digit be $0$? Another idea: if $n$ has non-decreasing digits and at least 2 digits, let $d$ be the leftmost digit. Subtract from $n$ the number whose digits are $dd00\ldots$, with enough $0$s to make it the same length as $n$. The result is congruent to $n$ modulo $11$, still has non-decreasing digits, and has fewer digits than $n$. Keep doing this and we get down to a single digit or $0$, which is obviously not congruent to $10$ modulo $11$.
Comment: `why should the 2nd rightmost digit be 0` If that's about my now-deleted answer, then that was wrong and I removed it.

Numbers mod 11 Order