Is Round decision affected by KO or TKO?

Question: If a boxer wins by KO or TKO, then the rounds won by the boxer and the opponent still count? If I bet on who wins the rounds and one of them wins by KO or TKO, then if my round prediction is right will I win that bet?
Answer: The normal way that round betting works is that it allows you to bet on what round will end the fight.  So third round Tyson would be a bet that the boxer named Tyson would win in the third round.  They normally allow for either picking a specific round or a group of rounds (e.g. first four rounds).  Another source saying the same thing.  A third.  A fourth.  Found by searching for "boxing bet on who wins a specific round".
With round betting, you are mostly betting on a knockout (possibly technical), although you'd also win on a submission.  Because a judge's decision wouldn't occur before the completion of the fight.  It is also possible to bet on the method of victory as well as the round.
If you make a standard round bet on a particular fighter in a round and that fighter wins in that round, you will win.  If the fighter wins in a different round or loses but wins that round on points, you will lose.
While it is possible that some bookmaker is accepting bets on the points winner of the round, there would be no standard way to handle such a bet.  Because that's not a standard bet.  So you would in fact have to ask the bookmaker for the specifics in that case.  They might do anything from paying off on the bet (if they feel a knockout wins the round in which it occurs) through refunding your money (because no decision on points) to keeping it (after all if the fighter won by knockout, they didn't win the round on points).  You should establish that before placing the bet, preferably in writing.


Ruby on Rails: Why do I get timezones munged when I write a time to the DB, then read it back?

Question: I have config.time_zone in environment.rb set to "UTC", and my mySQL server returns the current time in my local time zone when I issue "select now();" and in utc when I ask for "select utc_timestamp;"
I'm running rails 2.1.2, the mysql gem 2.7.3, activerecord gem 2.1.2, and mysql --version returns "Ver 14.12 Distrib 5.0.27 for Win32 (ia32)".
EDIT: My environment.rb is set to UTC and had been since I started the project.  A server restart would have picked up no changes.
<code>record = Record.find(:first)
puts Time.now
# Tue Nov 25 17:40:48 -0800 2008
record.time_column = Time.now
record.save

mysql> select * from records;
---------------------
 2008-11-26 01:40:48

#note that this is the same time, in UTC.

record = Record.find(:first)
puts record.time_column
Wed Nov 26 01:40:48 -0800 2008

#NOTE that this is eight hours in advance!
#All I've done is store a date in the database and retrieve it again!
</code>
Any ideas what  causes this?
Answer: We had the same issue regarding dates, time zones and MySQL. The latter assumes you provide it with date/time values in the timezone it's configured with.
But, since you configured Rails to handle time in UTC, ActiveRecord converts any date/time values in UTC (thus Tue Nov 25 17:40:48 -0800 2008 becomes Wed Nov 26 01:40:48 0000 2008) before using the value in the SQL update/create query it generates and sends to MySQL.
In pseudo-code
<code>("time = %t", Tue Nov 25 17:40:48 -0800 2008) => "time = '2008-11-26 01:40:48'
</code>
which is considered as 2008-11-26 01:40:48 -0800 by MySQL.
Look at your debug log file and you'll see what I mean. The only way it can properly work (meaning w/o bad surprises) is by setting the same timezone in Rails AND MySQL, this timezone being UTC. This is the configuration we use.
Answer: Not an answer you probably want, but I found the key to getting congruent times was to handle all timezone based logic in Rails land and keep the database stupid.
This was going back to rails 2.0 where the timezones/utc implementation was incredibly buggy/broken though, so it might be better now.
Answer: After editing the environment.rb file, did you restart your server before making a new record to your database?


Pattern Name Identification

Question: After quite a lot of search attempts I failed to find a pattern which we can fill in background so as to generate the background as shown in the graphic below.
I'm not sure if its a pattern or a wallpaper created from scratch. If its a pattern, where can I find one and what keyword shall I google.
Comment: it's just an abstract bunch of triangles.
Comment: do you mean the grey folded / creased / scrunched-up paper effect? or the pattern on the photo?
Comment: "Polygon background pattern"
Answer: I would search for anything relating to crystals or crystalized patterns.  Try mixing terms, maybe add "abstract, background, wallpaper, patter, etc."
This one is very close, maybe search for related ones and hopefully find a free one.
I found the above pattern by searching "diamond abstract pattern"
Answer: Delaunay Triangulation is a great search term. We had a discussion about it awhile back.
I created a script in Processing that would fill a rectangle with dots, make Delaunay triangles out of the dots, and then fill the color by putting an image behind the dots, getting the center of each triangle, sampling the pixel behind that center dot, and then filling in the triangle with that color.
You can draw that stuff manually, but Delaunay is a great way to encourage randomness but have rules at the same time so you get predictable results.
Answer: White Geometric Background
Google Image Link
Image from freepik.com

Image from freedesignfile.com

Image from freedesignfile.com

Pattern Name Identification


Some weights in CNN remain constant

Question: When training my CNN, I notice that after several SGD updates, some weights of the layers do not change any more. Is this a normal situation? Will all the weights of the network layers change during each training iteration?
Comment: How did you find out that they are not changing? Could it simply be that the changes are very small? Is it always the same weights not updating, or a different set of weights at each step?
Comment: @JanKukacka: I saved the network weights every 20000 iterations. By looking back the saved weights, I found that some of the weights stopped changing after several iterations. I am trying different network structures and for different structures, the stop-changing weights are not always the same.
Answer: This can happen with ReLU activation functions, when a conv filter before the activation gets to a state when it always outputs a negative number and the following ReLU truncates the output, thus preventing any gradient propagation. Generally, CNNs are less prone to this problem (as the weights are shared between multiple locations), but it can still happen. A large network can usually deal with the fact that some of the units are "dead", however, you might try some other activation function such as Leaky ReLU or PReLU to avoid this problem.
Comment: Do these "dead" units affect the model's performance? I found [this paper](http://web.stanford.edu/~awni/papers/relu_hybrid_icml2013_final.pdf) saying that Leaky ReLU  performs almost identical to ReLU.
Comment: Dead neurons shouldn't be a concern if you've already reached your target performance. If you're interested in weight reduction, you can prune these dead weights to save memory space. As Jan suggested, you can use Leaky ReLU (or) PReLU to address this issue. While doing so, you can observe that the number of dead neurons will be less compared to using ReLU.

Some weights in CNN remain constant


Overwriting save method to create entry in related table automatically django

Question: After registration email with email confirmation is sent to a new user. I created model
UserWithConfirmation with new field is_email_confirmed. I was following this https://docs.djangoproject.com/en/4.1/topics/auth/customizing/#extending-the-existing-user-model.
I want to have UserWithConfirmation created for each new user when user is saved. For now I have sth like this.
from django.db import models
from django.contrib.auth.models import User

class UserWithConfirmation(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE, related_name="user_with_confirmation")
    is_email_confirmed = models.BooleanField(default=False)

    def __str__(self):
        return self.user.username

class User:
    def save(self, *args, **kwargs):

        super().save(*args, **kwargs)
        create_user_with_confirmation(User)

def create_user_with_confirmation(user):
    UserWithConfirmation(user=user)
    UserWithConfirmation.save()

How to make it works?
Answer: Just have UserWithConfirmation extend User
class UserWithConfirmation(User):
    is_email_confirmed = models.BooleanField(default=False)

and change the entry when the email is confirmed
Answer: I solved my problem using signals
I changed UserWithConfirmation to Profile
class Profile(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE, related_name="profile")
    is_email_confirmed = models.BooleanField(default=False)

@receiver(post_save, sender=User)
def create_user_profile(sender, instance, created, **kwargs):
    if created:
        Profile.objects.create(user=instance)

@receiver(post_save, sender=User)
def save_user_profile(sender, instance, **kwargs):
    instance.profile.save()


Expanding iSCSI LUNs (NTFS)

Question: I have a 4TB iSCSI LUN that formated as NTFS in Windows 2008. I've shared this formated volume as a folder over SMB. When the capacity of this volume is not enough, I have to add more iSCSI LUNs, but the end-users must see only the folder that I've shared before. So, when I expand the NTFS volume that is currently 4TB, with more iSCSI LUNS(for example 2 more 4TB LUN), if one of the luns is failed, or missing, will all of my data in the folder be lost? I imagine that the expanding ntfs volume is like RAID 0(striped). if it is like RAID 0, then all my data will be lost when one of the luns is failed, or missing. In brief, there are two questions in here: 1- What will be happened, if one of the luns is missing in an expanded ntfs volume? 2- Is there another way to merge all of iscsi luns as only a folder, in that way the users don't see any extra folder even if I add extra iscsi luns to the file server.(I don't mention about DFS)
Regards.
Answer: You are correct, spanning one volume over multiple LUNs increases its vulnerability to outages. This isn't strictly Raid0, as that implies a striping regime. This is merely one volume on multiple storage entities. If any one LUN goes missing the chances of dataloss are certain. The scale of the loss varies, as files can exist on one, two, or all LUNs in the spanned volume. NTFS doesn't provide a way to isolate directories onto physical device members of a spanned volume.
Comment: Sysadmin is right, rather than raid 0 it is more akin to JBOD. You could, in theory, allocate 3 4TB luns and use windows' software raid 5 to provide some level of parity and recoverability, but this isn't an ideal solution either.
Answer: A simple solution would be to move some of the directories to another disk and link to them using hardlinks (or junctions). Its transparent to the user. Thus you could put 100Gb of files on 10 luns and make 10 links, one to each of these directories from the main shared directory (assuming a simple world and they were equal sizes). Each of these 100Gb luns could be on a separate Nas, each with its own Raid setup. You can use this technique to move stuff off the c: disk on systems which have temp space problems.
I've done something similar where data was organised by year. Years 2014, 2013, 2012 were on the local disk of the server. Previous years were just junctions pointing to directories on an iSCSI volume used for archiving. The users could not tell the difference.
Comment: This would work too, although there are storage provisioning considerations in this scenario, i.e. you wouldn't be expanding the whole drive, rather you would be splitting storage allocations between different folders.
Comment: Its a compromise solution, but its simple and it works with a minimum of effort. Its easy to manage as well so long as you make a decision early on as to how the structure is going to be divided. In the end this is exactly how the unix file systems work, so its hardly something new.

Expanding iSCSI LUNs (NTFS)


Resolution problem

Question: I am new to Linux and Ubuntu. I installed the latest Ubuntu LTS 14.04.3 over Virrtualbox version 5.0.12. The problem is I cannot get proper resolution. It is just 800x600 default and I want to set it to 1920x1024 but am not able to do so. The resolution option in display setting is disabled. It might be some basic setting but since I am new I don't know. Can somebody help me out? I also don't see auto resize Guest Display as active in view settings..
Comment: Have you installed the [VirtualBox extension pack?](https://www.virtualbox.org/manual/ch01.html#intro-installing)
Answer: When running your Ubuntu in VirtualBox, click above on Devices and then click on Insert Guest Additions CD image
Guest Additions improve guest OS stability and performance.
More informations can be found at: https://www.virtualbox.org/manual/ch04.html
I recommend to install VirtualBox Extension Pack (it contains lot of drivers) found at: https://www.virtualbox.org/wiki/Downloads
Extension pack include:

The virtual USB 2.0 (EHCI) device
The virtual USB 3.0 (xHCI) device
VirtualBox Remote Desktop Protocol (VRDP) support
Host webcam passthrough
Intel PXE boot ROM
Experimental support for PCI passthrough on Linux hosts
Disk image encryption with AES algorithm

Resolution problem


Android Multi Language Keyboard Support for an application

Question: Is there any way we can provide multi-language keyboard support for an application. I need to provide support for 8 international languages in an application.
Answer: You can build your own keyboards for different languages, no built in keyboards are provided for this.  You just have to add buttons with respective characters and with it you can easily make your own keyboard.


How do slime supports their weight and reach higher places?

Question: Unlike typical slime that flows and drip from a height, there is a new species of slime that is capable of scaling height in search of food. I am wondering how does a gloopy and slow moving slime without backbone or any kind of cartilage to support its own weight could scale tall places? My slime is biologically immortal but can still die and be digested when eaten by other animals.
Comment: Assuming it can move it's own jelly around the way it wants to, give it a very high surface tension and with a little bit of squeezing some goo into cracks it should grip and be able to climb. The surface tension thing will give you an upper limit on slime size, but it can still be quite large, especially if your slime can have a "crust" or denser exterior layer. They may even be able to drip and reform their crust.
Answer: Cytoskeleton

"... they [cells] are highly structured in much the same way as our
own bodies. They have a network of filaments known as the cytoskeleton
(literally, "cell skeleton"), which not only supports the plasma
membrane and gives the cell an overall shape, but also aids in the
correct positioning of organelles, provides tracks for the transport
of vesicles, and (in many cell types) allows the cell to move.
https://www.khanacademy.org/science/biology/structure-of-a-cell/tour-of-organelles/a/the-cytoskeleton

Slime mould
Here is a time-lapse video showing exactly what you want.
https://youtu.be/VJkJbM3y5R4

...slime molds ... form a structure called a pseudoplasmodium that
moves over logs, bark, and soil at a rate of one inch per day. When
food is particularly abundant, the slime mold changes. Some of the
slugs form a base, while others become spores and stalks.
https://decodedscience.org/the-blob-attacks-gooey-slime-mold-is-an-example-of-leaderless-motion/#:~:text=When%20slime%20molds%20get%20together%2C%20the%20party%20begins.,a%20base%2C%20while%20others%20become%20spores%20and%20stalks.

Here is another video. It shows that slime moulds can creep vertically upwards. https://youtu.be/Nx3Uu1hfl6Q
Answer: Lie down, open your mouth and stick your tongue out. Your tongue does not have bones, so how did you manage that?
You manage because your tongue is a hydrostatic organ, so it behaves just the same as a hydrostatic skeleton:

A hydrostatic skeleton, or hydroskeleton, is a flexible skeleton supported by fluid pressure. Hydrostatic skeletons are common among simple invertebrate organisms. (...) As a skeletal structure, it possesses the ability to affect shape and movement, and involves two mechanical units: the muscle layers and the body wall. The muscular layers are longitudinal and circular, and part of the fluid-filled coelom within. Contractions of the circular muscles lengthen the organism's body, while contractions of the longitudinal muscles shorten the organism's body. Fluid within the organism is evenly concentrated so the forces of the muscle are spread throughout the whole organism and shape changes can persist.

Organisms containing a hydrostatic skeleton have advantages and disadvantages. Their fluid shape allows them to move around easily while swimming and burrowing. They can fit through oddly shaped passages and hide themselves more effectively from predators. They are able to create a force when squeezing through rocks and create a "prying open" gesture. There is a lightweight, flexible component to them that allows this movement with very little muscle mass.
These organisms are also able to heal faster than organisms that contain hard skeletons. Healing in these organisms varies from creature to creature. However, if the cavity needs to be refilled, the "fluid" can easily be refilled if it is water or blood. If the fluid is some other type of liquid, it can take longer, but it is still faster than healing a bone. The common earthworm is also able to regrow damaged parts of its body.
These organisms have some relatively simple pathways for circulation and respiration. Also, these organisms have a cushion to allow protection for internal organs from shock. However, it does not protect internal organs from external damage very effectively.
Because the hydrostatic skeletons have limited ability for attachment of limbs, the organisms are relatively simple and do not have many abilities to grab or latch onto things. Organisms with complete hydrostatic skeletons need to be in an environment that allows them to re-fill themselves with their fluid that is necessary for survival. This is why hydrostatic skeletons are common in marine life. They have a large amount of access to the necessary elements for survival. Terrestrial organisms that have hydrostatic skeletons generally have a lack of strength because they are not in a fluid environment. If one were to expand its body too much, it would collapse under its own weight.

Hydrostatic skeletons are very common in invertebrates. A common example is the earthworm. Also, hydrostatic nature is common in marine life such as jelly fish, starfish, and sea anemones.

This ability to keep a shape may also explain how a relative of the slimes, the gelatinous cube, can keep its shape ;)
Comment: Invertebrates do not fit into the category,  "gloopy and slow moving slime". They have a definite bodily structure.
Comment: @chasly-reinstateMonica wouldn't that imply that the slime is a vertebrate?
Comment: No, the biological definitions of vertebrate and invertebrate apply only to animals. See my answer for a motile organism that is neither.
Comment: @chasly-reinstateMonica we need to check if this slime is eukaryotic, multicellular, heterotrophic,oxygen breathing, develops from a blastula and has collagen before we can decide whether it is an animal or a protist (or a fungus maybe).
Comment: Until it has been definitely classified as an animal, we cannot classify it as invertebrate. This has not been agreed yet.
Comment: @chasly-reinstateMonica last sentence in the question says *"My slime is biologically immortal but can still die and be digested when eaten by **other animals**."* ;)
Answer: Snails do not have backbone or any kind of cartilage to support their own weight, yet they can climb and move and can reach up to 30 cm.
Cephalopods like octopuses and squids can grow even bigger, though they have the support of water.
Your slime can use the same internal mechanism, as they also need to move in some way.
Comment: *"Your slime can use the same internal mechanism"* - Which is?  P.S. Snails produce slime but they are not made of slime.- they have a definite bodily structure.


I don't know agile software development. Where do I ask questions about it?

Question: What's the best Stack Exchange site to ask questions about agile software development on?
Comment: Agile software development? What is it you want to ask?
Comment: As the answer by Martijn suggests, Agile can refer to various things. You might want to clarify what it is you want to ask.
Comment: Maybe, I wasn't aware that agile was only for software developement.
Comment: I'm thinking right now about the following questions : 1/ True or false : Agile means you don't plan. 2/ How can you convince your clients/bosses that you don't know how long the project is gonna take. But on second thought, I beleive both of theese questions don't belong to a Q/A site, because the answers would be speculative instead of factual.
Comment: Get a Scrum certification. I'm just kidding. Do absolutely anything but that. I'm surprised someone said they didn't know it was only for software. The it's in the title of the manifesto and pretty much every single principle. You can try to apply it to other things, but Agile is similar to Lean except adapted specifically to software. So instead of taking the software-specific adaptation and using it for other things, why not step back to something more generalized?
Answer: Programmers.SE is for all things at the whiteboard, including development methodologies.

Programmers — Stack Exchange is a site for professional programmers who are interested in getting expert answers on conceptual questions about software development. If you have a question about...

…
development methodologies
…

As always, do make sure your specific question is on-topic for the site, by looking at their FAQ. There are plenty of questions on the topic of agile already, so be  sure to look for dupes.
If you are coming to Agile as a project manager rather than a developer, your question could also be a fit for Project Management, from their FAQ:

The site is for project management practitioners, academics and amateur theorists. This is a site about the field of project management for people who love the subject. Our site includes the following topics:
This site is about...

…
Agile
…

The agile tag there is their most popular to date. Again, stick to the FAQ to remain on-topic.
Comment: Questions on agile methodologies would also be on topic on [Project Management](http://pm.stackexchange.com/).
Comment: @Yannis: Cool, wasn't aware yet of PM.SE. Updated.
Comment: Thx, didn´t know about programmers.SE
Answer: First, you have to prepare a backlog of questions about the Agile/scrum methodology. Be sure that each question has a clear 'definition of done' that will allow you to judge when it is completely answered.
Second, go through the questions and rate each according to its business value, so that you know the relative importance of them. Be sure to consult all your stakeholders to ensure that these values reflect the different needs of the organization.
Third, guess how many questions are likely to be answered in a two-week sprint. Post that many questions to programmers.stackexchange.com.
Fourth, demand that all the participants in programmers.stackexchange.com show up every day for a 15 minute stand-up meeting to report on their progress.
Fifth, at the end of the sprint, evaluate which of the questions has been answered to your satisfaction. Calculate a 'velocity' based on the number of questions answered. Be sure to let the community know their velocity. Exhort them to improve it.
Sixth, lather, rinse, and repeat until...
You get all your questions answered.
Or you get a suspension.
Comment: How to ask questions the agile way ^^
Comment: @Rosinante http://meta.stackexchange.com/questions/156491/doppelganger-answers
Comment: How did this get duplicated?


ListIndex of current value of combobox without selection

Question: In VBA, the ListIndex property of a Combobox shows the index (starting at 0) of the item selected in the overall list (array) of values in the Combobox.  It shows -1 if there is no selection made.
When I bring up a sheet in Excel with a Combobox and the last value in it, it comes up with a ListIndex of -1, instead of the actual ListIndex of the item.
What is the trick in VBA to quickly getting the ListIndex of the current non-selected value?
I know I could manually check the array myself (the .List property), but I'm hoping that VBA has some quicker way to do this.
Comment: Do you fill the `ComboBox` through the `Add` Method on `Workbook_Open`, seting `ListFillRange` or another Method?
Answer: From VBA Help on the ListIndex Property:

The ListIndex property contains an index of the selected row in a
  list. Values of ListIndex range from –1 to one less than the total
  number of rows in a list (that is, ListCount – 1). When no rows are
  selected, ListIndex returns –1. When the user selects a row in a
  ListBox or ComboBox, the system sets the ListIndex value.

So I assume you aren't selecting anything, but trying to read the selected value. That might explain why ListIndex returns -1.
Answer: This works for me to retrieve the index of the displayed item in the combo.
<code>        Dim dst As Worksheet: Set dst = Worksheets("MyData")
        MsgBox (dst.OLEObjects("combobox1").Object.ListIndex)
</code>


Instance Injection Android Unit Test

Question: I am very new in writing the unit test cases. Currently I am writing the unit test cases of a Camera Application using robolectric and roboguish. In code segment I am opening a camera like this
private Camera safeCameraOpen(final int id) {
        boolean qOpened = false;
        try {
            // stopPreviewAndFreeCamera();
            this.mCamera = Camera.open(id);
            qOpened = (this.mCamera != null);
        } catch (Exception e) {
            logErrorMessage("Error in open camera > Log captured", "Fail to open camera >> camera Id " + id
                    + ">> Message" + e.getMessage());
        }
        return this.mCamera;
    }

In writing the unit test case, I want to use this opened instance like the following way
this.mShadowCamera = Robolectric.shadowOf(mCamera);

here mCamera instance should be same which i have opened in code.
The problem is I dont know how can i use the same instance to write the code.
I am trying to read roboguish but not able to understand it properly. Please help me in this.
Answer: You can use ShadowCamera's getLastOpenedCameraId() to assert that it is equal to the id you are passing in

Instance Injection Android Unit Test


Maximum weight matching on bipartite graph with unequal set cardinalities

Question: Consider a maximum weight matching problem on a bipartite graph $G = (E,V)$ with $V = U \cup W$ such that the sets of vertices $U$ and $W$ have different cardinalities, i.e., $|U| \neq |W|$. Given this discrepancy in the number of vertices in $U$ and $W$, will the LP relaxation of this problem still have integral solutions?
Answer: Yes! The result is due to the vertex-edge incidence matrix of any bipartite graph being totally unimodular. The proof of that result doesn't depend on the sizes of $U,W$ (as long as none are nonempty, then the graph is not bipartite at all).


Municipal coats of arms -- on-topic?

Question: Is Any restrictions on the use of municipal coats-of-arms? on-topic for this site? We've handled questions about personal coats-of-arms before, but is this a stretch too far? (My view is that it is off-topic, but I'm just one voice).
Answer: I would tend to agree that it is going off topic, if not already there.
My reasons for this are:

As @ColeValleyGirl illustrated in her comment on the question - any image associated with family history is not in and of itself the subject of research, but rather a nice piece of narrative for our stories.
Any 'municipal' imagery by its definition, cannot relate to an individual, only represent the area - either geographical or institutional - and therefore cannot reasonably be used as evidence in genealogical research.
Although we have dealt with individual heraldry before, it is generally out of the scope of our general discussions.

Willing to be taught otherwise, but I would agree that after reading the FAQs again that this question is off topic for now, unless it can be re-written to demonstrate exactly why it is relevant to the research of @bgwiehle
Comment: I don't think the gist of the question is necessarily off-topic (am I contradicting myself when looking again at my own answer?) - rather, what is lacking is the demonstration of any linkage to a family member. The topic I raised about contracts and prices for tramp-sailings btw USA and Australia concentrated (in its answers) on transport not family history. However, it was, I believe, very relevant to my GG uncle as he was working on the ship in question. This question demonstrated no link to an individual. The Q could be improved by adding such a link - not something *we* can do.
Comment: "and therefore cannot reasonably be used as evidence in genealogical research" raises very pointedly the long-ignored question of the role of FH as opposed to G in this site. Closing this as off-topic rather than trying to improve a (not very good) first question would send a message about a very narrow interpretation of scope -- which may be what "the community" wants.
Comment: @Fortiter, I'd much prefer to see it improved rather than closed, but I can't immediately see how to do it.
Comment: @Fortiter - I tend to read "genealogy" as synonymous with "family history" so didn't have any problems with AvieRose's reply. Personally I think Americans use both terms in different ways so have given up trying to distinguish!
Comment: @Fortiter, I've suggested an improvement at http://genealogy.stackexchange.com/questions/3251/any-restrictions-on-the-use-of-municipal-coats-of-arms#comment4328_3251
Comment: @AdrianB38, see http://genealogy.stackexchange.com/questions/3251/any-restrictions-on-the-use-of-municipal-coats-of-arms#comment4328_3251
Answer: Heraldry is a different discipline from family history. Transmission of arms drove the creation of genealogy as a discipline but the questions involved in that topic had nothing to do with genealogy. If we were the Institute of Heraldry & Genealogical Studies, it would be on topic but...
As it is, we can make intelligent guesses but it's my use of logic (and Google) not my knowledge of heraldry that drove my answer. Not a good place to be.
I was going to ignore it but someone seems to think it's a good question...

Municipal coats of arms -- on-topic?


Is it legal to work in UK for a Canadian company and pay Canadian tax only, not UK tax?

Question: I am a citizen of both UK and Canada, can I work in the UK for a Canadian company and pay Canadian taxes only?
Comment: Your citizenship almost never matters in any meaningful way for taxes (except U.S.), or it is the last thing that matters. It depends on your residence situation, your ties to either country, the treaties between the countries. But it rarely results in you paying less tax in total.
Answer: For a very short time, yes. If your Canadian company sends you from Canada to the UK to do a job for them for 14 days, that's fine. At some you will need to pay taxes in the UK. I assume that tax will be subtracted from your Canadian taxes because there is likely some treaty to avoid double taxation.
If you have always been living in the UK, then you pay UK taxes only, no matter where the company is from. You should describe your circumstances a bit more. Remember that we can't read your mind over the internet.
Check this website: https://www.litrg.org.uk/tax-guides/migrants/residence-and-domicile/when-someone-resident-uk
Basically three cases depending on your circumstances: 1. You are clearly not a UK resident. 2. You are clearly a UK resident. 3. You are somewhere in between and it gets complicated.
Your nationality doesn't matter much, except UK nationality allows you to enter the UK and work there without a work visa for example that other Canadians would need.


How fast can you run, drive, and swim in Battlefield 4?

Question: In meters per second (the game measures distance in meters right), how fast can you run, drive, and swim? Obviously there are different kinds of vehicles that can go at different max speeds, so just name the ones that you know the speed of.
Comment: Best way to get to a location? Spawn there! Or use a jet, it travels at 400+ kmh :)
Comment: Is that the Battlefield Triathalon?
Comment: LOL, no. :P I was going to use the info to figure out the best way to get to a location under certain circumstances i.e. you have to swim at some point but there is some ground that you can run faster on, but it is a longer path.
Comment: @Novarg no pls do not be that kind of person who grabs one jet and then jump when he arrives the location, making the team lose the jet.
Answer: Here you can check the speed for every vehicle in the game. They write it's "outdated" but surely they'll update it and even if not, it's a good clue to compare vehiclespeed.
Units unknown, kmh or mph I guess.
<code>MBT -> 56
IFV -> 65
MAA -> 56
ART -> unknown (slow)
</code>
I did not find a source, but with 3000 IFV kills I got a little experience and I'm pretty sure they differe. LAV is accelating faster than BMP, if the topspeed differs is unsure.
Check walking speed here (in progress).
Running is (any weapon) 6.66 m/s
Walking (pistol) 3.33 m/s
This post is older than fall-update which brought the BF3 movement in BF4. So the stats might be outdated but still give a clue.


Why did Morla's eyes have a paralyzing effect on Atreyu?

Question: The Swamp of Sadness apparently had no effect on Atreyu, which Artax thought was likely due to him wearing the Amulet. That being the case, he's later obliged to consciously resist the paralyzing effect of Morla's eyes. Why did Morla's eyes have an effect when the Swamp didn't?
Answer: The amulet offered resistance against the ambient, passive sadness of the swamp, but Morla's paralyzing gaze was an additional effect directly focused on Atreyu. Like yeah, your umbrella can protect you from the rain and wind — but not a firehose.
Comment: Welcome to Literature! Can you expand your answer to explain your reasoning? Which passages from *The Neverending Story* led you to your conclusion?
Comment: That's a good point - that makes sense to me.


Retain chilli powder taste till end of cooking

Question: When I add chilli powder to an Indian curry, and let it lid-closed for next 5-7 minutes, by the time it's cooked, it loses it's taste and the curry becomes bland. What should I do to retain the spice and colour (as even a pinch of Turmeric and 2 spoonful red chilli powder makes the curry yellowish? Why does it become bland??
Comment: What do you mean loses its taste? Are you saying you taste it right after you add it, and then a few minutes later and there's a difference between the two strengths of flavor? Or are you saying you don't taste it straight after but you think it should be spicier?
Answer: 2 probable causes

you did not put enough chili powder.
the chili powder is stale.

Some chili powder are not "spicy hot", taste some before adding it to your curry.


The problem of 'Common DH Primes'

Question: NSA crack multiple encrypted channel by some tricks on 'Common DH Primes', which is a old news, but how actually they crack it? I still can't get the concept why using a 'Common DH Primes' will comprise a system. Can someone explain the process to crack a encrypted channel by using 'Common DH Primes'?
Comment: See this question: http://crypto.stackexchange.com/questions/12184/how-well-does-breaking-multiple-dh-key-exchanges-over-the-same-group-scale
Answer: I'm assuming you're referring to logjam.
Using a common DH prime doesn't by itself compromise a system. But using a DH prime that is potentially within computational reach of an organization, especially one that is widely used, is. The authors estimated that cracking a 1024 bit prime might be possible for an organization such as the NSA, given a huge amount of resources (several hundred million dollars) and time (1 year).
Attacking DH is done by computing the discrete log, using an algorithm called NFS. It turns out that for the classical DH (using the multiplicative group of integers, modulo a prime $p$), the attack can be amortized over all discrete logs in a group. In other words, most of the work needed to solve the discrete log using NFS only requires knowledge of the group (defined by the prime $p$), and not the computed value $g^a$ (different for every connection). This means that the attacker can do a huge amount of precomputation and then attack individual connections very quickly.
So the authors suggest that since most of the internet uses only 1 or 2 specific 1024 bit primes, an organization could invest heavily to do the necessary precomputation. Then individual connections can be broken quickly, by computing the last step in NFS. If you want to know how that works, read the link K.G. gave, or learn how NFS (Number Field Sieve) for the discrete log works.
All this can be prevented in a couple of ways. One, simply use larger primes. Even if the entire world used one specific 2048 bit prime, it would (probably) be impossible for an organization to crack encryption in this manner, amortization or not. Better yet, switch to elliptic curve DH. Elliptic curves don't suffer from the same precomputation woes, meaning attacks on parameters that are barely within computational reach only compromise one connection, rather than all those using that group.
Comment: Is it mean the attack very similar to rainbow table or time-memory tradeoff attack? Large organization pre-compiled all possible secret so they can decrypt the message quickly. Am I right?
Comment: In an abstract kind of way, yes it's similar.
Answer: bkjvbx has explained this in detail. I'm going to summarize the specific point that you asked about.
Using the same DH group ("same primes") for many communications is not in itself a problem. There is no weakness in reusing the same group, even a very large number of times: it doesn't make attacks easier.
However, using the same group a lot makes it a more attractive target. Most of the work in doing the attack is independent of the specific secrets that are exchanged: it can be done for the group as a whole. So if everybody uses the same group, an adversary with a lot of computing power can perform the (extremely expensive) computations for that particular group, and once this is done they can break all communications that use this group. If everybody used different groups, the adversary would have to perform those expensive computations many times instead of once and for all, and the attack would switch from being just barely feasible to infeasible.

The problem of 'Common DH Primes'


Do ATMs at banks in Mexico generally require cards with chips?

Question: Do ATMs at banks in Mexico generally require cards with chips to withdraw cash?
Comment: Do any cash machines anywhere require chips? Part of the reason your chip-and-pin card still has a mag-stripe is so you can still use the card if the chip fails.
Comment: @DavidRicherby I'm pretty sure most Korean ATMs only process chip-based transactions and the magstripe fallback has been switched off. I don't know of another place but other countries will probably follow at some point.
Answer: You need to ask your bank if they allow non-EMV transactions, as it is the bank that will refuse the transaction and not the ATM.
All ATMs since the 70s/80s are equipped with the mag stripe readers, and most ATMs have been upgraded to accept mag stripe and EMV cards. So its not the ATM that will reject your card, it is your bank.
You run the risk of automatic rejection if you have a non-EMV card and are using it at a kiosk or vending machine, as these are high risk devices and thus have more stringent controls.
Comment: If the bank has issued a card that's mag-stripe only, I seriously doubt they will refuse to honor it at an ATM, if the ATM accepts it.
Comment: If the ATM ha no cash, or no connection to contact the bank, or the card is canceled, then it isn't the bank rejecting the card, it's the ATM.
Answer: I have used both my mag-stripe only card and my chip card this year in Peru, Mexico, Spain, England, Wales, Ireland, and USA.  Last year in Canada, Mexico, and Iceland.  2014 in Netherlands and Turkey.  Someday, they'll stop accepting mag-stripe, but not yet.  You might ask your bank why they are taking so long to make the switch.


How does build-order naming work for Zerg?

Question: For example, does "13-pool" mean "spawn 13 drones, and turn the 13th into a pool" (so that now you are at 12 supply)? Or does it mean "spawn 13 drones, then turn the 14th into a pool" (so that now you are at 13 supply)?
Answer: It means the former.  You build the spawning pool while you're at 13 supply.  Going down to 12 supply is a side-effect but replacing the drone as soon as possible is important to any build.
Answer: A 13 pool build means you build the pool at exactly 13 supply.  A 13 pool starts at 6 supply, so you should build 4 drones, an overlord and then 3 more drones before you drop your pool.
Comment: Just being pedantic here, but many players prefer to spawn the overlord at 9 supply, rather than 10. There's some math that goes into it, but the difference is slight, so it shouldn't matter too much.


What's the best way in Windows to manage multiple ssh sessions (via putty?) to look at clustered servers?

Question: There's a tool called cssh for linux that has simular use to what I'd like to have on Windows. Basically I'm logging into servers that are identical to each other and I'd like to be able to type the same thing in both windows at the same time to look at logs, do various greps, etc.
Answer: PuTTY Command Sender is what you're looking for.
Comment: I've used this, but it seems like one window has a definite lag... it's more noticeable when autocomplete is turned on. On one window, I get the autocompleted commands I expect, on the other I get just the letters I typed during autocomplete unless I go extremely slowly. Is this just me?
Comment: The commands are sent in serial, not parallel I believe. It is working great for me to send the same commands to many boxes, but each happens one after the next.
Answer: You could always install clusterssh via CygWin (a UNIX compatible shell for Windows)...  (you can google for more information about the two)...
Comment: http://jon.limedaley.com/plog/post/installing-clusterssh-on-cygwin
Answer: I know this is an old question, but I found it because I've been using Putty Command Sender for about five years and always thought it was pretty terrible. I didn't use it enough to go looking for alternatives until now. Just came across puttyCluster -- https://github.com/mingbowan/puttyCluster -- and holy sht, it's unreal I've been wasting time with stupid Putty CS and it's inability to use maximized+"docked" windows.
Also found these alternatives, but haven't tried them:
cputty
clustershish
(I don't have the rep to post more links, but just google them).
Answer: I have recently figure out a way to do this easily. I used an excel sheet to build cmd commands including putty ssh log-in then copy past the columns in a cmd window. it works like magic even if you have to customize the command for each server.
cmd Command         ip          user name           password            Command template

echo  /snmp set enabled=yes >temp\10.10.0.9.txt| putty -ssh email@example.com -pw passwd -m temp\10.10.0.9.txt        10.10.0.9           user_name           passwd      /snmp set enabled=yes

echo  /snmp set enabled=yes >temp\10.10.0.31.txt| putty -ssh email@example.com -pw passwd2 -m temp\10.10.0.31.txt   10.10.0.31          user_name2                  passwd2     /snmp set enabled=yes

if you want to run the exact command list on every machine then you save it to a file  and use another sheet to generate the command-line batch.
cmd Command         ip          user name           password
putty -ssh firstname.lastname@example.com -pw paaswd -m commands.txt          192.168.0.21          user_name           paaswd
putty -ssh firstname.lastname@example.com -pw paaswd -m commands.txt                192.168.0.22        user_name           paaswd

you will need to create a folder named temp inside putty main folder and you might need to customize putty logging to save a file per ip or pear session.  this is my first post here so I cant upload images.
Answer: In addition to using clusterssh or mtputty, a simpile bash script can login to a list of remote servers using ssh, copy a file to each using scp and execute a script on each of the servers.  I'm a bash scripting novice so likely not the most efficient or best option but seems to be pretty easy to manage.  I've found it easier than both clusterssh and mtputty.
Save this code into a file named copyFileToServers.sh, create a serverlist file that has a list of ips or server names and execute by typeing ./copyFileToServers.sh.
You'll need cygwin on windows (which is the only place i've tested this).  You will have to install sshpass (i know people really hate this package but i was too lazy to get ssh keys going on all the servers) separately which can be downloaded from sourceforge.
One thing to note, you'll have to login using ssh user@remomte_server from the command line of your admin machine for each server you want to manage.  sshpass doesnt work until you have manually acknowledged adding the ssh key for the remote servers.  You only need to do this once.
(note: I wasn't able to get clusterssh running on windows cygwin as of july 2014 so i couldn't really speak to how good/bad the program is at accomplishing what OP asked for.)
HOSTS=./serverlist
echo "what file should be copied to the remote servers?"
read file
echo "where should the file be placed on each remote server?"
read dest
echo "what script should be run on all remote nodes?"
read remoteScript
while read line

do
        if [ "${#file}" -gt 0 ]
    then
        sshpass -p 'password' scp $file root@$line:$dest
    else
        echo "skipping file copy"
    fi
    if [ "${#remoteScript}" -gt 0 ]
    then
        sshpass -p 'password' ssh root@$line 'bash -s' < $remoteScript
    else
        echo "skipping remoteScript execution"
    fi
    echo $line
done < $HOSTS

Answer: If you are using Windows the easiest solution is MobaXterm multi-execution mode (aka MultiExec mode):
MobaXterm brings another really useful mode called "Multi-execution" mode.
This mode allows you to display all your terminals at the same time and to
write your commands to all of them at once: when you press a keyboard key,
it will write the same letters on all your terminals at once. This mode can
be activated by pressing the "MultiExec" button.

Via: https://mobaxterm.mobatek.net/documentation.html
Answer: An open source tool inspired by csshX but for windows has recently been launched: csshW1.
It's main purpose is exactly the use case you describe:

type the same thing in [multiple] windows at the same time

1 Disclaimer: I am the main developer of the application


Movie with line "Remember the word Yahoo"

Question: Does anyone remember the name of a movie where there are two guys that are friends in the present and one had a family and was struggling financially. The friend goes back into the past (don't remember how or why) and while he is there meets his other friend as a young boy and tells him to "remember the word Yahoo".  When he gets back to the present his friend has invested in Yahoo stocks and done well.  It was only a side story of the real story but all I can remember about the movie.
Comment: The "Frequency" answer is correct, but the main character does not go back into the past - he can communicate with his family in the past via their ham radio.
Answer: Frequency released in 2000 has this as a quote, and it's given to a friend so that he can invest.

"I want you to remember this word, okay? It's kind of like a code word: Yahoo. Can you remember that?"

IMDB link

 It revolves around a radio that reaches 30 years into the past to talk to his dad, and is used to help solve a serial murder.
Comment: "I also want you to remember to sell before 2001. And back up any data you add to Upcoming.org once they buy it."


Transactional File Access and Caching in JBoss AS 5

Question: We need to locally store a cache on a File System through JBoss 5. The files we need to store are big (~50 Mbyte) and there are many consumer (through WS on JBoss) that read these files and one producer (JBoss Biz Logic) that creates the last one.
Because there are concurrent read and write problems, I would like to know if there is a solution to manage the transactions on File in a FileSystem (that could be NAS or CIFS or other thing).
I looked at "JBossCache" but in the documentation they say that File System access is only for test purpose. I looked at JBoss "Transactional File I/O" too but I don't know if it works.
Probably we need a framework to manage the caching layer and another framework to store this data with transaction on FS. A solution could be to store data in a DBMS but I don't like very much this solution.
I do not want to reinvent the wheel, so please give me some help :-)
Answer: See if XADisk can help.


Does $O(4,\mathbb{Q})$ have an exceptional outer automorphism?

Question: Does the orthogonal group $O(4,\mathbb{Q})$ have an exceptional outer automorphism analogous to that of its subgroup, the Coxeter/Weyl group $W(F_4)$?
Answer: $\def\QQ{\mathbb{Q}}\def\Out{\mathrm{Out}}\def\HH{\mathbb{H}}$I think tim penttila's answer may be misleading: $\Out(O(4, \QQ))$ is nontrivial and quite large, and the exceptional automorphism of $W(F_4)$ is induced by a non-inner automorphism of $O(4, \QQ)$. What Connors - The automorphisms of $O^+_4(V)$ in the anisotropic case (the paper tim pentilla cites) shows is that $\Out(O(4, \QQ))$ is generated by the "obvious" automorphisms, but not that $\Out(O(4, \QQ))$ is trivial.
So the answer to your question depends on whether you consider an "obvious", but not inner, automorphism of $O(4, \QQ)$ to be exceptional.
Many thanks to tim pentilla for finding this paper!
Connors considers a four dimensional vector space $V$ over a field $k$ (not of characteristic $2$) with an anisotropic quadratic form $q$, and shows that $\Out(O(V,q))$ is generated by two sorts of automorphisms.
(The type that won't interest us) Let $Z$ be the center of $O(V,q)$ and let $\chi : O(V,q) \to Z$ be a character. Then $g \mapsto \chi(g) g$ is an automorphism of $O(V,q)$. In our case, $Z = \pm \mathrm{Id}$ and I think (not sure) that the commutator subgroup of $O(4, \QQ)$ is $SO(4,\QQ)$, so this just gives the automorphism $g \mapsto (\det g) g$.
(The type that will interest us) In the generality which Connors considers, let $g : V \to V$ be a semilinear map which preserves orthogonality. In our case, we can simplify: The automorphism group of the field $\QQ$ is trivial, so semilinear maps are linear; a linear map which preserves orthogonality is one such that there is a scalar $c$ with $q(g(v)) = c q(v)$. Conjugation by $g$ is an automorphism of $O(V,q)$, which Connors calls $\phi_g$.
If $c$ is square in $k$, then conjugation by $g$ is the same as conjugation by $\tfrac{1}{\sqrt{c}} g$, so $\phi_g$ is inner. However, if $c$ is not square, then $\phi_g$ is not inner. Proof: Suppose, to the contrary, that there is some $g'$ in $O(V,q)$ with $ghg^{-1} = g' h (g')^{-1}$ for all $h \in O(V,q)$. Then $g^{-1} g'$ commutes with every $h \in O(V,q)$, so $g^{-1} g'$ is a scalar, say $g=ag'$. Then $c = a^2$.
Now, in the particular case of $\QQ^4$ with the standard quadratic form, there are many automorphisms of this second type. Namely, any positive rational number is of the form $w^2+x^2+y^2+z^2$ for rational $(w,x,y,z)$. Identiying $\QQ^4$ with the quaternions, left-multiplication by $w+xi+yj+zk$ will achieve $c=w^2+x^2+y^2+z^2$. So $\Out(O(4, \QQ))$ contains a copy of $\QQ^+/(\QQ^{\times})^2$.
(The $F_4$-Coxeter group) Let $\HH$ denote the Hurwitz quaternions: Quaternions of the form $w+xi+yj+zk$ with $w$, $x$, $y$, $z$ either all in $\mathbb{Z}$ or all in $\tfrac{1}{2}+\mathbb{Z}$. Let $\HH_k$ be the set of Hurwitz quaternions of norm $k$.
The $F_4$ root system can be represented as $\HH_1 \cup \HH_2$; here $\HH_1$ is the $24$ short roots and $\HH_2$ is the $24$ long roots. Let $g$ be left multiplication by $1+i$. Then $g(\HH_1) = \HH_2$ and $g(\HH_2) = \HH_4 = 2 \HH_1$. So conjugation by $g$ turns reflections over the short roots into reflections over the long roots and vice versa.
The Coxeter group $W(F_4)$ is generated by reflections in the $F_4$-roots. Conjugation by $g$ is its exceptional automorphism.
Answer: No. See
[Edward A. Connors, The Automorphisms of $O^+_4(V)$ in the Anisotropic Case
Proceedings of the American Mathematical Society, Vol. 54, No. 1 (Jan., 1976), pp. 16-18].
Comment: Thanks for the helpful answer! I've left another answer adding some more context and possibly disagreeing, but this is definitely helpful; welcome to MO!
Comment: @DavidESpeyer's [answer](https://mathoverflow.net/a/403854) referenced [above](https://mathoverflow.net/questions/401599/does-o4-mathbbq-have-an-exceptional-outer-automorphism#comment1034420_403824).
Answer: @DavidESpeyer
We don't disagree. As you suspected, I don't consider an automorphism
of O(4,q) induced by an element of GO(4,Q) exceptional, even if it induces
an exceptional automorphism of the Weyl group. Why would I?
And you're welcome for me finding the paper. Dieudonné's On the automorphisms of the classical groups doesn't cover the anisotropic case.
(This was the first place I looked.) It had to be known, and probably some time in the period 1951-1980 (Dieudonné in his 1951 paper Sur les groupes orthogonaux rationnels à trois et quatre variables doesn't know it yet.)
He still doesn't seem to know it by 1963 and La géométrie des groupes classiques, 2ieme ed.
Wonenburger, María J. ,The automorphisms of the group of rotations and its projective group corresponding to quadratic forms of any index. Canadian J. Math. 15 (1963), 302–303, did dimension at least 5 for characteristic not 2.  It's still not known by Robert Steinberg in his
Yale Lectures on Chevalley groups 1967-8, nor by Humphreys in On the automorphisms of infinite Chevalley groups, Canadian J. Math. 21 (1969), 908–911, nor by Borel and Tits, Homomorphismes "abstraits'' de groupes algébriques simples.   Ann. of Math. (2) 97 (1973), 499–571. It seemed to me to be known by the time of the work of Zun Xian Li in 1987 [Sci. Sinica Ser. A 30, 1121–1132] and even by Hefendehl in 1980 [ Geom. Dedicata 9, 129–152.]
Having narrowed the time range to 1973-1980, a little more searching found
Connors' paper.
Comment: You can edit your answer if you want to expand on it. You can also comment directly under David's answer if you want to. Note that answers on MO are not necessarily sorted by age, so that many people will not read them in the order they were created. By default, the number of votes an answer gets is the sorting criterion.
Comment: Not if you don't have enough reputation you can't- and new users don't have any reputation...
Comment: Well you do now.


workflow debugging prerequisites failed to complete - Visual Studio SharePoint hosted Apps

Question: When trying to debug a workflow created in SharePoint 2013 App using Visual Studio 2012 version, i am getting the error "workflow debugging prerequisites failed to complete". I tried to publish the app first and then debug, but still got the same error.
Comment: Having same issue but could not resolved... Environment : Server 1
SP 2013, SQL Server 2012 SP1
Visual Studio 2012
Workflow Client, Workflow Management Tools CU2 Server 2
Workflow Manager updated with CU2 Any help on this would be highly appreciated. thanks
Answer: Is your Visual Studio fully updated?
The following link is for 2013 version but it seems to have encountered exactly the same error:
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/733af28d-7a01-487b-822b-36bfc095fac9/workflow-debugging-prerequisites-failed-to-complete-vs2013-autohosted-app?forum=sharepointdevelopment
Have a look at the following link as well:
http://blogs.msdn.com/b/officeapps/archive/2013/10/30/debugging-sharepoint-2013-workflows-using-visual-studio-2013.aspx

You must enable Service Bus debugging if you want to debug workflows on Office 365. If your project targets SharePoint installed on your local network, you do not need to enable Service Bus debugging. Instead, you need to open incoming connections to TCP port 12292. If you use Windows Firewall with Advanced Security, you can simply enable the rule "Workflow Manager Tools 1.0 for Visual Studio 2012 - Test Service Host". If you try to debug against a SharePoint host on the local network without opening the port, Visual Studio will prompt you to enable the rule.
Answer: The problem was with workflow manager configuration. Reconfiguring it again resolved the issue. Also, since the SharePoint version was updated from RTM to March 2013 Public Update, i had to register the workflow service again.
Reference http://www.andrewconnell.com/blog/Updates-For-SP2013-Workflow


Can two GFCI outlet loads be powered by two separate circuits?

Question: My garage outlets and my outdoor outlets are all on the same GFCI circuit.  If outdoor circuit gets wet my garage outlets lose power.
Comment: Is the circuit protected by a GFCI breaker or outlet?  If an outlet, you could get another GFCI outlet and re-wire the feed in the upstream outlet and feed the next outlet on the line side, rather than the load side, then install the new GFCI outlet in the first "downstream" location.
Comment: Sure, they can be split, but not from the same outlet. Did you have a more specific question? If so, please provide more specific information about your circuits.
Comment: Thanks George.  Circuit is protected with GFCI outlet.  That helps!
Answer: It may be possible to add a circuit and split where things are fed from. The best option would be to add heavy duty covers or in use covers with proper seals as code requires on outside receptacles in wet locations this keeps the receptacles dry so they won't be the cause of the trip.
If the garage is attached to the home adding circuits is much easy and less restrictive rules apply than for a detached structure.


Do we need to file Form 8958 when we do Federal return, even though all our income are only from employment and interest?

Question: We moved to Washington State last year which is Community Property State. We (myself and spouse) don't have any community income (income generated by shared assets) ; We both have income reported in W2 forms and interest income(1009-INT). We are planning to use 'Married Filing Separately' status this time because of the tax situation. Do we (myself and spouse) still need to file Form 8958 when we do Federal return, even though all our income are only from employment (w2) and interest(1099-INT) ?
Answer: These two claims: We ... don't have any community income and We both have income reported in W2 - they're contradicting each other. Earned income is generally community property (See the statute).
As to interest income - it may or may not be community, depending on what the interest was for and on what account.
Comment: So, Earned Income (even though we both work for different employers) is considered as community property income in Washington State and we both required to file form 8958 with our federal return. Is that correct?
Comment: @SurEsh yes, and if you're commingling your earned income with your separate properties you may have tainted what you thought was separate.


Can your Metamask get hacked by signing a message, no gas?

Question:
If I log into a new project with Metamask, and the operation costs no gas, can I get hacked?

Does no gas mean you are safe when signing with Metamask?
Answer: Kind of, you can sign a message off-chain for zero gas that could be used maliciously.
One of the oldest, and most dangerous ways to sign data, is eth_sign. See this quote from Metamask:

it allows the website you're on to request that you sign an arbitrary hash. In this mathematical context, 'arbitrary' means unspecified; your signature could be applied by the requesting dapp to pretty much anything. eth_sign is therefore unsuitable to use with sources that you don't trust.

However, in 2016, EIP 191 standardized "\x19Ethereum Signed Message:\n" being prepended before any signed data. This essentially solves the issue listed above, see this quote from Ethereum.org:

By adding a prefix to the message makes the calculated signature recognizable as an Ethereum specific signature. This prevents misuse where a malicious dapp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim.

Ok so now that transactions can't be sent directly from a malicious JSON RPC eth_sign, this doesn't mean you are entirely safe. Also please note that as of October 3rd, 2023, Metamask still contains the original eth_sign method, however, it is disabled by default and must be enabled in the settings.
Using Metamask's personal_sign will implement the prefix specifying that it is a signed message.
The new updated JSON-RPC eth_sign can still be used in unwanted ways, such as bypassing a function that uses ecrecover to prove ownership.
EIP 712 introduced eth_signTypedData which defines a standard for how data will be structured and signed, thus allowing the data to be more human-readable and easily verifiable. If the DeFi protocol you are using has implemented this standard, or any of its upgraded versions such as eth_signTypedData_v4, you should be able to see exactly what you are signing.
Regardless, unless you fully understand what you are doing, it's probably best to only sign transactions from trusted parties to prevent your signature from being used maliciously.
Answer:
yes
no

Some contracts support the use of signatures to authorize third parties to perform operations, so you may suffer losses due to signing without knowing the content.
For example, some tokens, e.g. DAI and USDC, implement EIP-2612 that allow users approve by signature.


How much overclocking is "okay"?

Question: So I'm using a PIC32, it's rated for 80 MHz operation. But my crystal might be inaccurate, so it could oscillate at 80.01 MHz. I can presume this is okay, but what if I were to use a 7.3728 MHz crystal and an 11x PLL, would running it at ~81 MHz be okay? I suppose what I'm asking is how far is too far? And why do manufacturers not include a bit of overun (for example rating it at 81 MHz?)
Comment: You can take a closer look at those conditions specified on the data sheet and still be operating the part safely for your application.  For instance, if the part is spec'd run at 80 MHz up to 125°C and you plan on running inside where the temperature may never exceed 30°C you'll be fine running at 81 MHz.  There is an [interesting article](http://www.eetimes.com/design/signal-processing-dsp/4209479/Go-beyond-the-datasheet--Part-2--Understand-the-considerations) on this subject.
Comment: Also note that you cannot generalize. If that particular chip works at 81 MHz, there's no guarantee the next one will too.
Answer: Manufacturers specify a maximum clock speed for a reason, as it guarantees correct operation under all conditions specified in the data sheet. Operating a device outside its specification might be OK in a hobbyist application, where an occasional failure can be tolerated, but isn't a good idea if reliability is important. You will have to test the system and see if it is sufficiently reliable for your requirements, under all circumstances.
I can't see 81 MHz causing a problem, but it can't be guaranteed.
Answer: Well the right answer is "you can overclock until it stops working" .... more seriously something like bumping an 80MHz clock to 81MHz is not a big deal
(puts on chip designer hat) when we tape out a chip we don't have complete control over what happens at the fab - they might put a little too much dopant (or to little) in one step, or under etch a step so that wires are slightly wider (with higher capacitance) - instead we design for the 'worst case corners of the process' and try and make internal timing there - that way any functional chip coming out the other end should work and meet the spec - from you point of view it means that most of what you get from us is somewhere in the middle of the yield curve and happy to run over spec .... but some percentage will be just at spec and will fail if you overclock (and some percentage will go much faster still).
We don't normally test chips for speed (maybe sometimes a test patch on a dies to test the process) - it's way too expensive - we plan on them all working. Some expensive chips (high end processors for example) will get tested and binned because it makes sense for both practical (yield) and marketing reasons to do so
Comment: Indeed. Some batches of chips may even overclock better than other. Me and my brother have bought a PC a couple of years back with both a Intel Q6600 CPU. We bought from different shops, and we got different batches (shown on the box).
My batch overclocks to 3.2GHz (from 2.4GHz) on a boxed cooler, without adjusting any voltages. My brothers version has to increase voltage above 3GHz.
It heavily depends on the batch, fabrication plant, etc. There is no fixed point to hold on to if you're designing with overclocked parts.
Answer: In fact, most of these low-speed chips can work on 1.5x frequency in normal conditions, the only problems are at extreme temperatures (like -55 or 125) + flash/EEPROM writing.
So if you you are building device which will be operated at 15-40C range, you may test that it works at 120Mhz and leave at 100 permanently.
:-)
Manufacturers underspec devices to increase yeld rates & reduce reclaims.
Comment: when I used their dsPIC a while back it said its maximum was an absolute maximum, and when trying to go higher my actual clock frequency(effective to the chip) decreased.
Comment: Well, you should have tried feeding raw clock into it without any PLLs and stuff, it would have no chance to avoid overclocking :-D
Comment: it had built in PLL on the extern clock lines. There was no way around that.
Comment: Ok, then we have artificial obstacle here :-)
Answer: If you're working with a single device you can just try and see what frequency still works. 81 MHz will still work, no doubt about it.
It's a bit different if you're working with production quantities. You can't make a production run and hope everything will be all right.

In the early 90's I worked for Philips Audio and we had a design which used a Motorola 56002 DSP running at 27 MHz. This was an audio application, and the 4th harmonic of 27 MHz is 108 MHz, just at the edge of the FM band. Because we feared interference we wanted to run the DSP at 27.1 MHz. Would this work? Yes. For sure? No. Motorola guaranteed it for 27 MHz, no more. We requested and got a custom version of the specification which stated 27.1 MHz as the maximum frequency.

Did we get different, selected devices, or was there a die redesign? Of course not, but in unlikely the event that a DSP would not work Motorola would be liable.
Answer: Back in the 1970's, it was pretty common to run 6502 microprocessors at above the rated speed, even though the data sheet gave a minimum cycle time of 1000ns for the 1MHz part.  The popular Atari 2600 Video Computer System ran its processor at 1.1932MHz; the Apple II, Commodore VIC-20, and Commodore 64, all ran at 1.0227MHz.  Since there were no speed grades between 1MHz and 2MHz, I would expect all of those machines were overclocked (by almost 20% in the case of the Atari 2600 Video Computer System).

How much overclocking is "okay"?


Which Jewish Groups Don't Believe in Resurrection of the Dead?

Question: The Sadducees denied a coming resurrection of the dead, since they accepted only the written Torah as scripture. However, their movement went extinct in the early first millenium. After them, who was the first known Jew to deny that a literal resurrection of the dead would occur in the future?
Answer: You could say it was the Rambam.  Yes, his 13th principle of faith is "The dead will be resurrected."  But he made it clear he believed in a spiritual, not a bodily, resurrection, saying:

All men must die equally, their bodies becoming dissolved into their constituent matter. [Rambam, Introduction to Sanhedrin 10]

There are no bodies and no bodily forms in the World to Come… There is no eating or drinking there, nor is there anything which the human body needs in this world. Nor does there occur there any of the events which occur to the human body in this world, such as sitting, standing, sleep, death, distress, laughter, and so forth. The ancient sages say: "In the World to Come, there is no eating or drinking or procreation, but the righteous sit with their crowns on their heads and bask in the radiance of the Divine Presence... There is no way for us in this world to know or comprehend the great goodness which the soul experiences in the world to come, for in this world we know only of material pleasures, and it is these we desire. [Rambam, Yad, Teshuvah 8]

The Ravad countered:

The words of this man seem to me to be very near to those who say there is no resurrection of the body, but only of the soul. By my life, this is not the view of the Sages. [Rabbi Avraham ben David of Posquières on Yad, Teshuvah 8:2]
Comment: No. You can't. [איגרת תחיית המתים](https://he.wikisource.org/wiki/%D7%90%D7%99%D7%92%D7%A8%D7%AA_%D7%AA%D7%97%D7%99%D7%99%D7%AA_%D7%94%D7%9E%D7%AA%D7%99%D7%9D)
Comment: @MauriceMizrahi you claim "he made it clear he believed in a spiritual, not a bodily, resurrection" yet your citations do not make this clear at all. You have not laid out your argument, you simply state your naked conclusion as fact. The Rabad (an anti-Maimonidean) saying that in his eyes the Rambam's articulation here sounds similar to him (בעיני קרובים) to those who deny non-corporeal resurrection does not prove that in fact any such denial existed. It does not show what you claim it does. In fact it shows that he thought the Rambam's wording came close but didn't actually affirm any denial
Comment: The Rambam clearly affirmed it (see his letter above). In his eschatology, the messianic era and the later resurrection of the dead are not referred to as events that occur in 'Olam ha-Ba. This term is reserved in the Rambam's mesorah for the non-corporeal postmortem life of the soul.  There are all kinds of interesting questions we can ask such as what the purpose of resurrection would be in the Rambam's system - but that is an entirely separate matter than whether he affirmed it or not.
Comment: @Deuteronomy -- That is what the Rambam said.  My additional quote makes his position crystal-clear.


I want to develop a framework in Python for desktop based applications. How should I go about it?

Question: I want to develop a desktop application framework in Python, much like QT, but how to go about it? Any tutorials or links related to it would be helpful!
Comment: I don't get the question.  Do you want to write an application or a framework?  The title says "develop a framework" but the question says "develop ... application".  Which is it?
Comment: a framework , which helps in developing applications . hope you get it now ?
Answer: There is so many great freameworks like wxPython (Tutorial), PyQt (Tutorial), PyGtk (Tutorial) already.
You just need to try your favorite one.
Answer: You can get a pretty comprehensive list of Gui programming frameworks for Python here, http://wiki.python.org/moin/GuiProgramming
Answer: theres WxPython tutorial http://www.wxpython.org/tutorial.php
or PyQt http://zetcode.com/tutorials/pyqt4/
or the ever stylish Tk http://www.pythonware.com/library/tkinter/introduction/
Answer: Well the best way to start is to look at the source code of the framework the other answers are talking about.
First, try to use them all to build the same application with the functionalities you expect from a framework. Them, look at how it works under the hood.
Secondly, build your framework, starting by writing your first widgets, then notice the problems with your current architecture, and re factor. Start again, until you have something stable and usable.
Eventually, find out this was nice as training experience, but useless as a contribution to the software communities since you will never reach out the qualities of existing tools.
Then give up and try to code your own MMORPG.


Do I need to run new wire

Question: I'm trying to install a new outdoor with a outlet on the post...but the electrical coming from the house that powers it does not h ave ground...is the lamp post grounded enough just being in the ground? Or do I need to pull new wire?
Comment: Can you post a photo of the cable end?
Answer: Option 1, add GFCI protection
Follow this cable back to the house to the service panel.   You want the circuit to start at the service panel, stop at a receptacle inside the house, then go outside.  If it's not like that already, rewire it so it is.   Now install a GFCI receptacle in the indoor location, and feed the outdoor line off the LOAD terminals.
Now install a 3-prong receptacle on the pole, and label it

GFCI Protected
No Equipment Ground

Option 2, retrofit ground
Don't run a whole new 3-wire cable, just run a ground wire.  It does not need to follow the same route.  It does not need to go all the way to the panel, only to any grounded circuit that is also served out of the same panel.  That circuit's ground wire must be at least as large as your ground wire is required to be.
Using the pole won't work.  Ground has two purposes (to wildly oversimplify).  The post would arrest lightning just fine.   However it would fail dismally at returning fault current to the service panel.   Dirt is a poor conductor (that's why they use copper instead).   It wouldn't flow enough current to trip the breaker, and it would just sit there shocking you and anyone between you and the house.  Of course in the latter case, a GFCI will provide that protection.

Do I need to run new wire


Frame size, propagation delay and bandwidth relationship

Question: I found in some forum this formula for calculating the frame size in function of the propagation delay and the bandwidth : frame size >= 2*(propagation delay)*bandwidth, I could not however find any reliable reference either to a book or a paper that mention such a formula. Is this formula correct ? If yes could anyone please explain the logic behind? In fact, before that I always thought frame size = propagation delay*bandwidth.
Comment: Without context, nobody will be able to answer this question.
Answer: It seems to me that it is based on the conservation of packet principle (in quality of service - congestion avoidance) that states that:

no packet is inserted into the nework before one is pulled/removed

(sorry I did not found the original reference, but a look a google leads to several references).
As commented by @Zac67, it depends on the context.
Your assumption frame size = propagation delay*bandwidth is right if you consider only sending data "blindly". I mean if you keep sending frames at the same rate without looking at loss/congestions (eg. with UDP).
The following is only the results of some thoughts. This is not intended to be the absolute truth.
However when dealing with congestion, some mechanisms make use of congestion notification. The basis are: when you send a packet from A to B, B send a message to A (ie. the notification). The source do whatever he wants (adapt throughput, other parameters, ...). This was the case for TCP, when the destination acknowledges a packet at a time.
In that case, and in order to follow the packet conservation principle, the source send a new packet when he receives the notification, that is after the sum of the propagation delays of A->B and B->A.
Considering that both A->B and B->A delays are equals, a new packet enter the pipe after 2*propagation delay.
In that case, no to waste bandwidth, the frame size can be doubled.
Comment: Thank you for your reply. I am wondering why the frame size should be greater or equal to RTT*bandwidth? Why not straight equal ?
Comment: It seems that this is to allow collision detection on NIC (http://penchaljammula.blogspot.fr/2011/02/minimum-ethernet-frame-or-packet-size.html)


Endpoint of a Line segment

Question: If I have one endpoint $(x_1,y_1)$ and the distance of the line segment, how do I calculate $(x_2,y_2)$? I also know the angle the line makes with the $x$ axis if that helps.
Comment: What do you mean by (x2, y2)? Do you mean the other endpoint of the line segment?
Answer: Draw a line perpendicular to the x-axis and that passes through $(x_1,y_1)$. Construct a perpendicular line to the y-axis that passes through $(x_2,y_2)$. You'll get a right triangle. Now I guess you can use the sine and the cosine of the angle to find the length of the sides of the triangle. What are the lengths of the sides of the triangle?
Answer: This question is tagged with Linear Algebra, so I'll give an answer in terms of vector operations.
Let's call the endpoints $\vec u$ and $\vec v$, the distance $d$, and the angle $\theta$.
If $\vec u$ and $\vec v$ are $d$-distance apart, so are $\vec 0$ and $(\vec v - \vec u)$.
If $\vec u$ and $\vec v$ form a $\theta$-angle with the $x$-axis, so do $\vec 0$ and $(\vec v - \vec u)$.
If we rotate $(\vec v - \vec u)$ clockwise by $\theta$, we get a vector $(d, 0)$. Likewise, if we rotate $(d, 0)$ counterclockwise by $\theta$, we get $(\vec v - \vec u)$.
$$
\left[\begin{array} \\
\cos(\theta) & -\sin(\theta) \\
\sin(\theta) & \cos(\theta) \\
\end{array}\right] \left[\begin{array} \\ d \\ 0 \end{array}\right] = \vec v - \vec u
$$
$$
\left[\begin{array} \\
\cos(\theta) & -\sin(\theta) \\
\sin(\theta) & \cos(\theta) \\
\end{array}\right] \left[\begin{array} \\ d \\ 0 \end{array}\right] + \vec u= \vec v
$$
There you have it.
Answer: There are two possible answers if the length (what I think you mean by "distance of the line segment") is positive. Let the (non-obtuse) angle between the line determined by the segment and the $x$-axis be $\theta$ and let the length of the segment be $d$.
The direction from $(x_1,y_1)$ to $(x_2,y_2)$ is either the direction from the origin to the point $(\cos\theta,\sin\theta)$, which is a distance of $1$ unit from the origin, or else it's the opposite direction (the direction from the origin to the point $(-\cos\theta,-\sin\theta)$).
So from $(x_1,y_1)$, go $d$ units in one of those directions, which is the same as adding either $(d\cos\theta,d\sin\theta)$ or $(-d\cos\theta,-d\sin\theta)$ to $(x_1,y_1)$ to get to $(x_2,y_2)$.
The two solutions are $(x_1+d\cos\theta,y_1+d\sin\theta)$ and $(x_1-d\cos\theta,y_1-d\sin\theta)$.

Endpoint of a Line segment


web2py application level variables

Question: I'm new to web2py and web application development in general and I have a certain use case in mind that I'm not sure how to solve given the tools and knowledge that I currently have.
What I want to do is load a pickled class instance once and then keep reusing it for every request that comes into my web2py application. Is there a way to do that in a way that doesn't impact per request performance? In other words is there a way to unpickle the data once and only once and keep reusing it for every request?
Unpickling the data in the model is not the right way to do it because the model is executed on every request and so this will reload the file every time. Similarly doing it in a module is also not the right thing because importing the module will execute the code in the module on every request. The only other thing I can think of is caching the data in ram but I would like to know if there is another way to do it.
Answer: Maybe do it in a module and import the object from the module.

web2py application level variables


Sizing cables in pulsed power applications

Question: I am looking for rules for sizing cables for short pulses.  For example, if I were to run 2000A DC current for 0.5 seconds in a cable, what size would I need? Sizing as if it were continuous current seems like overkill.  I could calculate the temperature rise for each wire size and then pick one, but how do I determine an acceptable change in temperature?
Comment: What's the duty cycle?  And it might be helpful to think in terms of watts, rather than current.
Comment: What is your expected average transmission loss? [W/meter'  x thermal resistance ['C/W] * thermal time constant [seconds] It takes seconds to heat up and a long time to cool down.
Answer: You know the temperature rise just like every other wire...Max Insulation Temp - Maximum Ambient Temp.
Calculating temperature rise due to pulses would require things like thermal impedance if you go with the physical models and those are basically simulations. 2000A is a lot of current so will produce a lot of resistive voltage drop in your wire so try this first instead...it's much easier:

Determine your allowable voltage drop.
Determine the resistance required to achieve this.
Find an AWG with this resistance.
Check a standard table to see if that AWG can't already support 2000A continuously. If it can, you're done (although it still might be tough to find a table with AWGs that can go up to 2000A).
Answer: If you plan on 2kA for 0.5 s, you may want to limit the temp rise to the temperature rise of 80'C
Consider:
4/0 copper cable D = 11.7 mm Area = 107 mm²    0.1608 mΩ/m

Fusing current in 10 seconds = 3200 A

But if were computing the short circuit capacity of wire rated before fusing open, this was done by the Southern California Edison Company published in June 1928 .
Comment: Good graph, but the numbers are unreadable.
Comment: I can see if you click on image to zoom 2kA @ 0.5s = 100kcir-mils ( on AWG table it shows 100kcmil = (1/0)cable = 8.25mmD. ) meaning it should not melt (but might smoke) so 4/0 cable might be best for repeat pulses.
Comment: Zoom didn't work for me, but I only have a phone connection. Merely curious.


wire limits when attached to high voltage 220v

Question: I have my home electricity wires,
and I want to attach directly a set of wires that will be plugged into a controller box with power supply.
that power supply was a phone charger that i adapted into my controller, and i took only its circuit board.
I soldered screw terminals to the charger's board in order to have easy plug for the home electricity.
The only question I have is if I need to take into consideration the wire's width.
the screw terminals holes arent the largest, and i wish to know if I can use a smaller diameter wires with it.
The home electricity I already added terminals to split it, both to its regular destination and to my project power supply.
So from that "junction", can I use a smaller set of wires? How can I know how small?
Its just a phone charger, its not taking alot of current, so I think its possible.
I just dont know what the limits are.
Comment: Hope that you know what you are doing. Projects involving 220VAC mains current, should be undertaken knowing the significant risks of electrocution / fire-hazards, thorough understanding of how to avoid those and with the right tools.

In any case, your question isn't clear. What do you mean by "controller box" ? What is it controlling ? Why do you want to wire it directly to mains ? Why is using standard electrical plugs, not an option ? And what is the relation to phone-charger ?
Comment: If you aren't familiar with wire gauge, current, and power, don't start with mains voltages. Start small and work your way up. What you are doing is *dangerous*.
Comment: 'but what difference does it make if it uses the 220vac this way or the other..its the same "risk"' Check that with your insurance company. If they don't cancel your insurance, it is OK. This is highly depending on the country you live and local laws.
Comment: Why not install a wall outlet socket and do it the safe way instead of jeopardizing your home/fire insurance coverage?
Comment: Its an arduino and a relay to control 220vac.everything is working OK. in order to finish it, i need to use a power supply. this entire "box" will be located far from a plug, so I took a phone charger that i can (and its working for me great) power-up my "box", and took its board. that board now (after some work) contains screw terminal. I want to wire it to the 220vac wires. but those regular "high diam." wires are very hard so I wanted to know if i can use some smaller diameter wires.
Comment: There's no room for wall socket there. but what difference does it make if it uses the 220vac this way or the other..its the same "risk", just the plug is different. Instead of using the regular 2 pins socket, wire it directly.
Answer: What you are doing is dangerous, and it doesn't sound like you understand that. If your house is supplied with 220V, and it has a 15A circuit breaker, it can supply as much as 3.3kW, or 3.3 thousand joules of energy per second. A bullet fired from a rifle has about 2 thousand joules of kinetic energy. So, roughly speaking, the mains voltage in your house has the potential to shoot you with a rifle once per second.
This is why we have so many safety codes. Through about 150 years of people being killed by modern electrical distribution, some people have engineered very good ways to minimize the hazard presented to ordinary people while still reaping the benefits of this very convenient, very concentrated energy source. You don't sound like one of those people, and I'd advise you to give them due deference. The codes don't exist to annoy you. They exist to protect your life.
Here's just one way what you are doing might kill you: you say you have soldered screw terminals to your device. Most electrical codes forbid solder on unfused mains connections. This is because when something goes wrong with your device, a large current may flow. This large current makes a lot of heat, and solder melts at a relatively low temperature. The screw terminals may fall out, and if the neutral line falls out but the live line doesn't, there's no reason the electricity won't use your body as a path instead of the neutral line. This isn't a hypothetical failure mode. People have been killed this way, and that's why all the wiring in the electrical boxes are done with wire nuts which are rated to withstand the temperatures that can exist in a short circuit condition.
This is just one of thousands of hazards you must keep in mind. I've been working with electronics for a long time, and even I avoid building projects that connect directly to mains. Power supplies are cheap enough, and I value my life.
Since you are just going to ask your question elsewhere if we don't answer it here, I might as well. There are two obvious ways a wire can fail through too much voltage or too much current.
If there is too much voltage, the insulation on the wire isn't sufficient to withstand that voltage, and it breaks down. You should use wire rated for at least 220V AC to avoid this.
If there is too much current, the wire overheats, melts, melts its insulation, starts a fire, or otherwise does bad things. The degree of heating per unit of current is a function of the diameter of the wire. There are many tables on the internet which can help you calculate this. So in theory, you could use a small wire for 220V supply to a device that requires little current.
In practice, people don't use small wires for this, because they break easily and kill people. I'm sure there's something in your local electrical code about this. Again, what you are doing is a bad idea. If you absolutely feel compelled to continue down this path, don't blame me when you burn down your house, kill your pets, or kill yourself.
Answer: What you are looking for is the current rating of the wire. There are places to get easy access to a wire gauge chart. You just need to ensure the wire you are using is rated to a higher current. AWG is designed to be logarithmic, that means you can double your current every time you subtract 3 from the gauge.
You can use a smaller wire if your current requirement is lower then that required by the rest of your house, if it is a manufactured product the fact it does not fit a larger wire gauge is probably a sign it does not pull that much current. However you do have to ensure you are not violating building codes, if you have your project go awry you might be very liable.


How do you create 2D skeletal animations without extra software?

Question: I'm working on a Cocos2d-x game and I'm developing on Windows. What I want is to make some skeletal animations, without using a tool or extra software to do so?
Comment: Since questions asking for tool or technology recommendations are off-topic here, I've removed that part of your query.
Comment: If you want to not use tools or software, then you have to make and animate them using a custom system you write.  Good luck.
Answer: Well, the way to go about that is to take a hard look at your linear algebra and go to work.  A bone in skeletal animation is just a vector that has another vector as origin and is dependent on its parents scale and rotation. Example skeletal structure:

If you think of all these bones as a relative vector, you can arrange them in a hierarchy, one being dependent on its parent bone.
At the point of every vector, you add an image that is relative to it's position, rotation and scales with the scale of each bone.
Once you've gone through the grueling process of making your hierarchy work correctly with scaling, rotation, etc., you can just keep adding nodes and move them / rotate them over time as you please.
The part of merely rotating, moving and scaling them as you please of course is much harder to get looking good then doing in-editor but hey, here we are. It's a lot harder than doing it with additional software however and I highly recommend an application like Spriter or the like for any skeletal animation.


What's the problem with Black Hole evaporation?

Question: Black hole evaporation is not unitary because it takes a pure state to a mixed state. On the other hand, ordinary decay processes in Quantum Mechanics do not seem very unitary either. (For example, if I know my final state is a Breit-Wigner distribution, I don't think it's possible in general to reconstruct the initial state.) In what way are decays any more unitary than BH evaporation?
Comment: "Black hole evaporation is not unitary because it takes a pure state to a mixed state" - this statement is almost definitely false. The truth will become clearer as we gain better understanding of quantum gravity, but I think we can already be pretty confident it's false. For example, Hawking conceded https://en.wikipedia.org/wiki/Thorne%E2%80%93Hawking%E2%80%93Preskill_bet because he decided "black holes eventually transmit, in a garbled form, information about all matter they swallow"
Comment: That's a good point. I mean in classical gravity.
Answer:
On the other hand, ordinary decay processes in Quantum Mechanics do not seem very unitary either.

No, decay processes are perfectly unitary. However, they entangle the decaying object and the environment, so you can't recover the state by measuring the object or environment alone.
As a simple example, consider an atom with ground and excited states $|g\rangle$ and $|e \rangle$, inside a cavity which can have $|0 \rangle$ or $|1 \rangle$ photons in it, at frequency $\omega = (E_e - E_g)/\hbar$. The part of the Hamiltonian responsible for decay is
$$H_{\text{int}} = \alpha |1g \rangle \langle 0e | + \text{h.c.}$$
and the evolution is perfectly unitary. For example, starting from the state $|e0 \rangle$ one smoothly evolves into a superposition of $|e0 \rangle$ and $|g1 \rangle$. The description of other quantum decay processes is similar, except that the environment will have more degrees of freedom. The state is pure at all times.

In what way are decays any more unitary than BH evaporation?

In the standard semiclassical derivation of Hawking radiation (which does not look at all like finding $H_{\text{int}}$ above) one finds that the emission spectrum is exactly thermal. So when the black hole completely evaporates, you're left with only thermal degrees of freedom, which correspond to a mixed state. That's the puzzle.
Comment: I agree that the atom decaying in the cavity is a unitary process and is even reversible (https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.58.353). However, if you take the cavity to have infinite volume, the decay will be irreversible even in the absence of decoherence. Moreover, if you wait an infinite amount of time, it will not be possible to recover the initial state (I think).
Comment: @EricDavidKramer Adding infinite volume and infinite space seems to me to simply muddy the issue. The black hole information paradox still exists even if the black hole is in a finite box.
Comment: @EricDavidKramer Furthermore even in infinite volume, the time evolution is still unitary. It may be hard in _practice_ to recover the original state if the environment is big, but that's not the same as being impossible, and it's not the issue here.
Comment: I'm worried that the thermal spectrum of radiation might be correct only if you wait an infinite amount of time for the black hole to actually collapse. In that case, this would be similar to the limit of infinite volume and decay after an infinite time. Your point about the black hole in a finite box is a good one, and I'm unsure how to think about that.
Comment: @EricDavidKramer Perhaps, but now this is getting into a full discussion of the black hole information paradox. It goes without saying that I don't know the answer! Nor can I really say anything more for sure.
Comment: Most impressive. Obiwan has trained you well ;-)
Answer: In QFT with classical gravity, the problem with Black Hole evaporation is that the asymptotic spectrum is that of a thermal density matrix with respect to the free theory of an asymptotic observer. The asymptotic density matrix does not merely have Planck-spectrum expectation values - it is also completely diagonal, meaning that the coherence between the off-diagonal matrix elements vanishes.
This is because the particles escaping to infinity are entangled with the particles falling in to the black hole, and since there is no way to measure what fell in to the black hole, the reduced density matrix on the Hilbert space of particles escaping to infinity is that of a mixed state.
On the other hand, in a decay, the evolution is unitary for any finite time. The state will be the Breit-Wigner, plus some exponentially decaying transients. At any finite time, the exponentially decaying deviation from Breit-Wigner can (in principal) be measured exactly to reconstruct the original state.


How to find the vector of length $5$?

Question: Given vector $\mathbf a = -2\hat i + \hat j + \hat k$ and $\mathbf b = \hat i - 3\hat j + \hat k.$
Find the vector of length $5$ perpendicular to the plane containing vector $\mathbf a$ and $\mathbf b$.
I have worked out the perpendicular of $\mathbf a$ and $\mathbf b$, the vector is
$4\hat i + 3\hat j + 5\hat k$. But I do not know how to find the vector with length $5$.
Comment: Hint: Do you know how to calculate the length of the vector you have identified ?
Comment: multiply your vector by some unknown constant $a$. Calculate the norm of this vector: $\sqrt{av\cdot av}$ and set it equal to 5 and find the constant $a$.
Answer: If you have a vector $v$, you can find a vector $w$ of length $\ell$ in the same direction as $v$ by writing $w=\ell v/\|v\|$. The quantity $\|v\|$ is the length of $v$ (in Euclidean space you can compute this using the Pythagorean Theorem), so $v/\|v\|$ has length $1$, so $\ell v/\|v\|$ has length $\ell$.

How to find the vector of length $5$?