Can electrons be non-fundamental in higher dimensions?

Question: I was wondering, is it necessary that all elementary particles remain elementary in higher dimensions too, or can there be a higher curled dimension (like those in string theory) where an electron, for example, is made up of more elementary entities?
Comment: Related: http://physics.stackexchange.com/q/39590/2451 and links therein.
Answer: When I started in particle physics back in 1962 or so, neutrons and protons had not lost their elementary particle status. Quarks were just being dreamed about. At the time we were very happy with the isotopic spin symmetry between neutron and proton and used the concept to organize the emerging hadronic resonances from our experiments. I am presenting this history in order to show that the concept of elementary particle and composite particle has evolved , is not immutable.

is it necessary that all elementary particles remain elementary in higher dimensions too,

It is not necessary, what is necessary is that any new theory assimilates/embeds the existing standard model which is based on the SU(3)xSU(2)xU(1) symmetry of the interactions of the elementary particles. The standard model does have the isospin symmetry and the proton and neutron as composite particles.

can't there be a higher curled dimension (like those in string theory)

String theory does have curled higher dimensions, but the elementary particles are vibrational states on a string. It can embed the standard model but it is hard to see how the electron can be more composite  as it is just a specific vibration on the essentially only elementary particle, a string.

where an electron, for example, is made up of more elementary entities?

This would mean a different, out of the box, mathematical model. It might be possible to imagine one, but as I said , it would have to accommodate the standard model symmetries.
Answer: Particles are not the fundamental objects that many think. Our best current description of particles is quantum field theory, and this describes particles as excitations in the modes described by the (asymptotically free) quantum field. We regard the quantum field as fundamental, and the existence of particles is a consequence of the behaviour of the quantum field.
We currently believe electrons are fundamental because they are described by a single quantum field - the electron field. By comparison a proton is not fundamental because it is the result of the quark fields. While it would be possible to describe protons by a proton field this would be an effective field theory that was useful only at low enough energies that the internal structure of the proton was invisible. The fundamental fields are the quark fields.
With this context I think your question breaks down into two parts:

is the electron field really a fundamental field or is also just an effective field like the proton field?
how does string theory and the compactification of the extra dimensions bear on this?

The answer to the first question is that we have no experimental evidence that the electron field isn't fundamental i.e. there is no experimental evidence that the electron is composite. But, if you'll pardon the cliché, absence of evidence is not evidence of absence. The electron could be composite and we just haven't (yet) reached the energies where the internal structure would become visible. At the moment we simply don't know.
Re the second question: the quantum fields arise (in a complicated way) from the compactification of the strings, and we still don't have a definitive description of how this happens. However there is no reason to doubt that the electron field can arise as a fundamental field, so there is no reason from string theory to suppose the electron is composite.
There could be particles that arise from the ways the extra dimensions curl, and these are called moduli fields. However we have never observed such particles and if they exist we should have been able to observe them by now. There are various theoretical suggestions for why the particles don't exist but this area is far from fully understood.
Comment: Whether QFT has as its "fundamental" objects fields or particles is somewhat debatable, see e.g. http://physics.stackexchange.com/q/122570/50583. Famously, Weinberg's QFT constructs the (free) fields from the assumption of particles, instead of treating the fields as givens. Similarity, while a modulus field is indeed related to the shape of the compactification, it's debatable whether it's the shape that controls the field, or the field that determines the shape.
Answer:
Can electrons be non-fundamental

Yes, definitely. We can make electrons along with positrons in pair production. We can also destroy electrons and positrons in annihilation. So they aren't really fundamental. However the sort of people who can't tell you why the electron has a magnetic dipole moment and a spin ½ tend to say "the electron is a fundamental particle", and tend not to concede that these measurable properties are hard scientific evidence of the electron's structure.

in higher dimensions?

We have no evidence of any higher dimensions. And if the electron isn't fundamental in our 3+1 dimensional world, I can see no logic in suggesting it's fundamental in some hypothetical 4+1 or 5+1 dimensional world etc.

I was wondering, is it necessary that all elementary particles remain elementary in higher dimensions too

I imagine the answer would be yes, but I will reiterate that higher dimensions remain hypothetical. People have been speculating about them for a long time now. The book Flatland: A Romance of Many Dimensions was written in 1884. That's 132 years ago and counting. We have no evidence of any higher dimensions.

or can there be a higher curled dimension (like those in string theory) where an electron, for example, is made up of more elementary entities?

String theory features open strings and closed strings. There is a sense in that the electron can be said to be made up of a 511keV photon in a closed path. See the toroidal ring model on Wikipedia: "The toroidal ring model, known originally as the Parson magneton or magnetic electron, is also known as the plasmoid ring, vortex ring, or helicon ring. This physical model treated electrons and protons as elementary particles, and was first proposed by Alfred Lauck Parson in 1915". That was before pair production and annihilation. More contemporary papers include https://arxiv.org/abs/physics/0512265 by Qiu-Hong Hu and Is the electron a photon with toroidal topology by Williamson an van der Mark. I think the answer is yes, but that this "curled" photon doesn't involve any higher dimensions:


Publication shows up in secondary server

Question: I have created  log shipping and the primary server is also used for transactional replication. Now after creating log shipping I have noticed the publisher shows up on the secondary and it wont let me delete the database on the secondary as it is being used for replication. How do I delete the database from the secondary?
Comment: Do you need replication ?
Comment: Replication is being used for reporting....Log SHipping used for DR...The primary is  2 Node Cluster...
Answer: When you've restored the database on the secondary you actually moved all its properties, including the fact it's a publisher. In this case you don't have a working replication, just the attributes for replication enabled. So this won't let you drop the db as you want.
The simplest way to remove replication metadata for this db is by using the system stored procs:
<code>-- ON THE PUBLISHER
use YourDb
Go

exec sp_cleanupdbreplication
exec sp_removedbreplication
GO
</code>
Just make sure you're running this script on the secondary, the one you want to drop, not on the production db.


Access a list within a dataframe pandas

Question: I'm working on dataframes with PANDAS in Python. I read a csv file with pandas.read_csv(...). In this csv file the column 'possible_stops' contains lists (each cells in this column looks like : [ ] or [str0,str1]).
I want to iterate over the rows with itertuples() and for each row i want to access the list inside 'possible_stops' column.
However, the dtype of this column is object and when i look for the type of a specific cell (type(row.possible_stops)) it returns str. I think there is something to do with dtype = .. inside the read_csv method but i don't exactly know what to do.
How can i convert cells inside this column into lists ?
Thanks very much!
EDIT :
the resulting df looks like :
latitude longitude gps_speed possible_stops
1.05869 1574942547  0.0 [['Bapeaume', 2]]
1.05862 1573910439  0.0 [['Bapeaume', 2]]
1.05862 1573910441  0.0 [['Bapeaume', 2]]
1.05862 1573910443  0.0 [['Bapeaume', 2]]
1.05862 1573910445  0.0 [['Bapeaume', 2]]
1.05862 1573910447  0.0 [['Bapeaume', 2]]

Comment: `object` is not strictly a dtype (see [this answer](https://stackoverflow.com/a/21020411/7685544)). Can you supply an example of your data? I think it should be possible to access the lists inside the column
Answer: It is not possible for an item in a column in a Pandas dataframe to have the data type 'list'. See a list of possible datatypes for a dataframe column here: https://pbpython.com/pandas_dtypes.html.
So instead of it having the type 'list' when stored in a dataframe a list is inserted as a string object.
However, it is still possible to enter the items in the lists in the dataframe with a double for-loop. For example to print each item:
import pandas as pd

data = {'possible_stops':[['str0', 'str1'], ['str2', 'str3']], 'Age':[[20, 21], [19, 18]]}
df = pd.DataFrame(data)
for row in df.itertuples():
    for item in row.possible_stops:
        print(item)

This will print the names in the created dataset one by one.
Answer: I found a way to convert the cells into lists with ast.literal_eval()
for row in selection_traces.itertuples():
l=ast.literal_eval(row.possible_stops)

The problem has been already solved on this forum... Sorry and thanks you !

Access a list within a dataframe pandas


Is there a 'birthday' evaluation on the table?

Question: Congratulations to the site on one full year in beta!  I've only been using the site for about two months now, but I've been encouraged by its progress. I know from looking through Meta that there were "Site Self-Evaluations" in January and April. Given the recent milestone, I was wondering if there is any chance of a 1-year evaluation coming soon. I for one would be very interested in seeing it; the site stats on Area 51 (http://area51.stackexchange.com/proposals/40709/astronomy) clearly don't give a full picture.
Answer: Self evaluations come every 6 months now and the most recent was in early April. So there should be another starting real soon now.
Comment: Taking a look at the queue right now. . . Should be interesting.


Manga where the Mc kills the demon lord but finds the demon lord's daughter in the next room and raises her

Question: The Mc/hero kills the demon lord but hears a noise from the other room and turns out to be the demon lord's daughter so he puts on armor and pretends to be a demon general or something like that and decides to raise the demon lord's daughter
Comment: If anyone correctly identifies the manga you're looking for, please mark that answer as [accepted](https://scifi.stackexchange.com/help/accepted-answer) by clicking on the check mark beneath the voting buttons. Thanks.
Answer: I believe its "Uchi no Maou ga Tenshi de tsurai" where the story roughly is: the MC/Hero slained the Demon Lord (before the Demon Lord died, she asked the hero to take care of her daughter, which the MC later willing to do it just to fulfill a mother's death wish), in which he wears the dark knight armor to conceal his identity and take care of the Demon Lord daughter
Comment: Welcome to SFF! Could you [edit] this to explain how it matches the description given in the question? I.e. why do you think this is the correct manga?
Comment: Am I allowed to put a brief summary where it might contain mild spoilers? Also i know pirated sites are illegal but what abt screenshots from there?
Comment: @Andrew Loh Yes, spoilers are fine when it pertains to something in the original question, since presumably the OP has already read it. In many cases it's enough to grab a synopsis from a database-type site (e.g. mangaupdates.com), but for this title some plot details are needed. Screenshots should be fine as long as they're not overused, as that should fall under fair-use.
Comment: Sorry for the confusion, but we're asking for actual details like "In chapter 2, Bob shows up alongside Miu, and he explains that she's the daughter of the Demon Lord he defeated in chapter 1", or a quoted description of the series with a link to the place where you got the description (note, please don't link to any pirate sites). Screenshots from the manga can be even better because the querent can see the art style, which is hard to describe in words.
Answer: Maybe your talking about Aesthetica of a Rogue Hero
"The story follows a world where several young men and women regularly find themselves spirited away to a world of sword and magic called Alayzard (アレイザード, Areizādo). Those who survive and return are typically gifted with magic abilities. An international training organization named Babel protects these young returnees and trains them in the use of their power. A wayward hero named Akatsuki has come back to his world, along with a beautiful girl called Miu who is the daughter of the Last Dark Lord, whom he defeated in battle."
Also i thought about Kuro no Shoukanshi or "Black Summoner" :
The main character doesn't kill the demon lord but his vassal who was protecting the demon lord's daughter and then takes care of her.


How do you make the resolution bigger on a Canon Rebel T5i?

Question: All of my pictures come out super blurry if they are anything bigger that 5x7 and I want to fix it. So how do I change the resolution? Is it something I have to do BEFORE I take the pictures or am I able to do it after? I need help! Thank you!
Comment: Can you perhaps post (a link to a) a sample picture that you tried printing at 5x7? That would be helpful in determining the cause of the blurriness.
Comment: What resolution are the photos you are currently printing? Lack of resolution is only one among many things that can cause a larger print to be blurry.
Comment: Posting an example image would be a good idea.
Answer: Several possibilities :

back/front focus, easy to check : the sharp zone exists but isn't where you want
low end lenses can make blur pictures. I mean even with good focus the pictures aren't really sharp, because of the quality of the lens.

In the first case, try to manually focus. And there are possibilities to tune it in the body.
In the second case, try to shoot at low aperture. The best picture sharpness is at f/9 for most lenses.
Answer: Are you talking about prints?
Basically you can't enlarge the image dimensions afterwards without experiencing significant loss of quality. Consult your camera manual to locate the settings in the camera itself that allow you to define the size and format of images to take. Also, the amount of megapixels in your camera is directly related to the maximum dimensions of prints that can be made from its photos without losing crispness.


Using a/an/the before "current"

Question: In the following sentence
... , where `id` is supposed to contain current vendor id
should I use one of the a/an/the before current or it's just fine without it?
Comment: _"...or is it just fine without it?"_ I would use _the_, as it is referring to a specific thing.
Comment: Does [this](https://ell.stackexchange.com/questions/178601/should-we-use-the-before-current?rq=1) answer your question?
Answer: In this case, it appears that you're describing an ID which has previously been mentioned (which I'm inferring from the use of 'current').
Therefore, I would suggest using 'the', to make the sentence:

..., where id is supposed to contain the current vendor ID.

(also note the capitalisation of 'ID', as an abbreviated form of 'identification' or 'identifier)
No article would be incorrect here, as articles are generally always needed unless talking about indefinite plurals. However, no article would also be appropriate when using short form, which may be a possibility if you adjust your style slightly:

..., where id is supposed to contain current vendor ID. (lack of article feels out of place, as the rest of the sentence is written verbosely)

... -- id is current vendor ID (rest of phrase also written in abbreviated form, therefore lack of article makes sense in context)

'An current' is also incorrect since 'current' begins with a consonant sound, so 'a' should be used instead. However, 'a current' is generally rarely used and unidiomatic in many cases; the only possible use I can think of for it is when describing one of a plurality of options, i.e. in place of 'one of the' + plural - e.g. 'A current affair commonly being discussed is ...'. However, in all of the following cases 'a current' is unidiomatic:

I would like to meet a current lawyer (consider 'contemporary' instead, or, if you already have a lawyer, use 'the')

Place a current item onto the conveyor (consider 'the' instead, presuming there is only one item being placed at a time)

Take a current medication (consider 'the' instead)

Using a/an/the before "current"


32 gigabytes memory card to 8 megabytes

Question: while formatting my memory card it has decreased to 8 megabytes.
Originally it is 32 Gigabytes memory card.
any idea on it, how to reformat as 32 gigabytes
Comment: It could be hardware problem and the card has crashed either form some electrical damage or because it is fake. You can test if your card with [H2Test](http://mympx.org/Downloads/p13_sectionid/2/p13_fileid/13)
Answer: Have you tried this? https://www.sdcard.org/downloads/formatter_4/
From http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=13138
by aztecoso08

"I had the same problem, only 56MB would show. I used the program from
  this link. I formatted with the "FULL (overwrite)" option, which took
  a while, then the full SD card was available to me again. Thanks
  bredman"
Answer: I am going to assume that you are running on the Windows OS.
The raspbian operating system is a port of Debian Wheezy ( a Linux distro) , Linux uses the ext based file systems, which is not read windows as a result you will only see partitions that are either fat or NTFS based.
If you have Linux you can use gparted to detect and format the SD card to a file format of your choice or you can use the link ( https://www.sdcard.org/downloads/formatter_4/ )provided by Arita to format the SD card from windows.
Also you can verify the actual size of the SD card by right clicking my computer -> manage -> disk management. Here you will see your SD card with the actual size and the amount of free space etc.

32 gigabytes memory card to 8 megabytes


Luggage Transfer for International Transfer

Question: Purchased tickets thru Cheapflights on the Internet. When traveling to Thailand from Canada there are 2 stops. One in USA and Amsterdam. Will our luggage transfer thru or do we need to pick it up? Not sure where we go thru customs.
Answer: They will let you know upon check-in. You can ask if the luggage will be checked through to be sure. Since all your segments are international, this is usually the case, although it sometimes depends on the particular airport.
The bags will be tagged I2I which stands for International-2-International. You would only need to pass through customs in Canada unless you have to change airports or terminals at one of your stops.
Answer: It depends on your ticket and the airlines involved.  Best bet is to call the originating carrier (your first flight out of Canada) and ask if they can check bags through to Bangkok.
Based on your connections I would guess Delta/KLM which will allow you to tag your baggage all the way to Bangkok.  If you are flying on a cobbled together ticket (multiple unrelated airlines), then checking through becomes more problematic.


IP address- is it dangerous for someone to know?

Question: The last couple days I was talking to someone online, and this person said that my IP address was this and that, out of nowhere... Which was wrong, probably because I was connected to a VPN (not the point) but still, I'm worried now, how can you even check someone's IP address? Is it dangerous? Why would someone do it? To get my location or any other reason?
Comment: Is it dangerous for someone to know your home address?
Answer: Actually it is not dangerous on some aspects, your IP address is your basic identity  to your system when connected to internet and if someone knows it then you can be exploited on some basis for some instant of time.
But it is difficult to establish a persistant connection because every time your pc restarts, it gets its new ip address.
So no need to be afraid.
Comment: The line about getting a new IP address every time your PC restarts is overly confident. For a lot of modern internet connections, the IP address for a given connection will remain stable as long as the router is connected, or be entirely static. You certainly can't count on rebooting changing your IP address.
Comment: "if someone knows it then you can be exploited on some basis for some instant of time" is not necessarily true. Whether you can be exploited really depends on whether your internet firewall exposes any ports for inbound  and if the services running on those ports have vulnerabilities to be exploited. And yes, the assumption that your external IP changes frequently is not valid.


Is it possible to access a FileVault 2 encrypted volume from Boot Camp?

Question: If I switch on FileVault 2 in Lion, can I still access my OS X volume from Boot Camp (Windows 7)? Are both volumes encrypted and decrypted together, or does it only affect the OS X volume?
Answer: And the correct answer is: No.
Encryption only affects the OS X volume. Booting into Boot Camp, the necessary password prompt to allow decryption is bypassed entirely. The volume becomes an opaque blob to anything but a running OS X system.
Answer: In short, yes. John Siracusa from Ars Technica has a very long review of Lion with much more detail. Also, on a recent podcast he said to think of File Vault 2 this way - once you turn on your computer and enter the password (before anything boots) the disk is essentially unencrypted. Time Machine backups, Boot Camp, network access, etc all happens (essentially) unencrypted.
While I haven't tried your particular method myself I have FileVault running and I can access my system just fine in other ways. I hope this helps!
Comment: It does. I read John's review, but I was unclear on this particular point. "Whole disk encryption" really means "whole disk" then, not "whole volume"?
Comment: And the real answer is: No. See my answer, I tested it.
Comment: Nice fact to know. I guess the boot loader comes before the encryption password. That is not what I got out of John's article. Thanks for clearing it up!


Adobe Audition - auto adjust amplitude

Question: I have many audio files, that need to adjust amplitude. Please see before image. I need to decrease some parts are over than -6 db to -6 db. But some parts aren't over -6 db, don't need to change.
Is there a way to do this fast?
Answer: The best way to approach this is to use a 'dynamics' processor, such as a 'compressor'. This can be configured to take sounds that exhibit energy over a certain threshold and reduce the overall level by a set 'compression ratio'.

Adobe Audition - auto adjust amplitude


interaction of "Foreclosure" and "Crop Insurance" cards

Question: In the game Farmageddon, if the Foreclosure card is used to "buy" a crop from another player with a Crop Insurance card on it, is the crop acquired complete with the Crop Insurance, or does the Crop Insurance get kept buy the original owner? The Crop Insurance card mentions that it is added to the harvest pile when the crop is "lost"-- and thereby there seems to be an ambiguity: it is "lost" from the point of view of the original player, but otherwise the crop is not "lost" per se.
Answer: The way I played was to leave the Crop Insurance card to the player to who had played it while the crop ownership was transferred to the other player. Then we played the same rules otherwise where if the crop is destroyed in some fashion then the player who put down the Crop Insurance card received the insurance. This would further what I believe was the intention of the card, which is to deter other players from acting on the crop. If they took the crop, the owner of the insurance would have more reason to try to destroy that crop since they would receive their insurance back.
When we played this way, we would have the card facing the owner of the card, so the Crop Insurance moves with the crop, but is rotated to face the correct owning player.
I'm unsure if this ruling was read somewhere or if we just locally decided to play it that way.


Unity3D Pathfinder with Crossings

Question: I'm trying to bring traffic on my street system. The main problem for me are the different lanes and crossings and to make it complete the different types of paths.
I've tried a bit with the NavMeshes, the different types I've solved with costs, so cars prefer greater streets and ignore pavements. But there is the problem how to tell pedestrians to prefer pavements and ignore streets?
And the main problem for me are crossings cause they start to switch the lanes and drive in the wrong side, turn around and so on.
I'm thinking about that NavMeshes aren't the right thing but doesn't get any better idea!?
My usecase is that I want to tell the police Car to drive from the police Station to a bank robbery (fixed coordinates) or the Bus to drive on a fixed route. So I want to have the Option to define multiple points and let them drive/walk to this (or the nearest) point - respecting the lanes and not do a U-Turn (not prefer this).
I don't want ready to use code, just an explained idea how to go.
Answer: Without knowing how your structure is setup, I'll pose to you some general considerations with regards to setting up your pathing.
Solving The Carmageddon Issue (people in the streets!).
Your sidewalk nodes and edges should be given a discount cost when a pedestrian AI does it's pathing calculation. This would make sidewalks inherently 'cheaper' to use than streets naturally.
This Isn't London, Mr. American. (or solving the lane issue)
To discourage U-Turns you'll want to do the same thing as the above issue. Add an extra cost to calculating a U-Turn. If the edge/node it's calculating will be considered a 'U-Turn' double it's cost (or whatever value you deem fit). This again naturally helps to determine the best path given the current conditions.
When spearheading these types of path solving issues. Think about it from the perspective of the object in question. Your lane switching, crosswalks, etc, can all be solved using some type of variant of the solutions above. Of course this all varies depending on the amount of data you have to use to calculate the paths.

Number of people on a sidewalk.
Number of cars on a street.
The speed of traffic on the current edge.
The weighting of a particular crosswalk due to red/green light situations.

Hopefully some of these suggestions help you!
Comment: _"This Isn't London, Mr. American."_ Lol.

Unity3D Pathfinder with Crossings


Jquery Validation WITHOUT Data Annotation in MVC

Question: I want to create a page, in MVC, where there is a label, a textbox and a save link. Textbox will be initially in read mode and on double click of the textbox it is gonna come in edit mode. And when we fill textbox and click save link it gets saved in db. And for the text box, it should have various validations.
For these validations, I am planning not to use data annotations and work all with jquery or ajax. Also, I dont want to post the entire form, just the part where there is an edit.
Is this possible? If possible, then Please, can someone provide me some links or some help regarding this.
Thanks in advance.
Comment: without server side validation you are just asking for a trouble.
Answer: You may use JQuery Validation plug in..


Is it possible to have permissions by term

Question: What I want to achieve is to set a term that makes an item appear in a SharePoint list. Now I want only certain users to be able to use this term. All the other terms in the term set should be still available for other users.
Answer: No, this is not possible out of the box in SharePoint. If your users can see the term set, they can see all of the terms.
--edit --
You can create term sets scoped to a site collection and put your secured terms in there.  It's best to respect the security boundaries put in place by the platform rather than trying to "roll your own".  If you want unsecured terms and secured terms mingled together in the same term set, no, you cannot do that.
For documents tagged with a term you could technically implement custom security via remote event receivers.  But that is messy and I'd stay away from that. Like I said, respect the natural security boundaries.
Comment: So there is no possibility to leverage permission by term to control access to certain documents when they are tagged with a certain term? Something like this: https://www.drupal.org/project/permissions_by_term
Comment: edited to address comment.
Comment: Thanks for the additions. My intention are not really to change critical permissions but give certain people the possibility to make news or documents appear in a certain list. The content can be seen by anyone.


Is there a bukkit plugin to run small scripts when players (re)spawn?

Question: I'd like to setup my bukkit server to run a small script (like, giving players basic items) when players respawn or enter a world for the first time (or cause every 10th respawn to be in another place). Is there a plugin to do this with bukkit?
Comment: I don't believe there is, but perhaps with some more specifics, I could make it for you? What should the scripts be able to do?
Comment: @JakeKing giving the players a CommandBook `kit` for an easy example, and maybe a different one every 10th respawn. Or making them invulnerable for the first minute unless they leave the spawning region earlier, if you prefer a challenge ;-)
Answer: Yes, it is possible to run a script on certain events like respawning or first join.
You will need two plugins to do be able to do this: Autorun and CommandHelper. This will assume you have both fully installed.
For this example, I want two commands to run when a player logs on.

Decide what commands you want to use
Create a new alias/macro in Commandhelpers config.txt with the following syntax:
/macro_name = /command_1 \/command_2

Do a server reload
In game, create a Autorun identifier for your macro:
/addacommand identifier_name macro_name

Now bind the identifier to run when a player joins:
/setjoincommand identifier_name

Done.

This is a very simplified way of doing something like this, and both plugins are capable of much more. For instance Autorun can run commands when a player walks over a defined block; and Command helper can be used as an advanced scripting plugin.
Always make sure to read the instructions for both plugins before you start. However, you probably only need to read the beginners section of Commandhelper, as the rest covers very advanced scripting information.
Hope this answers your question.
Comment: Since this answer was written back in 2012, CommandHelper now has the ability to bind to events, so Autorun is no longer required. I'll submit a separate answer with details :)
Comment: Also, the `config.txt` no longer exists and is replaced by `aliases.msa` instead - with the same functionality.
Answer: Since the other (marked correct) answer was written in 2012, CommandHelper now supports binding to events and therefore this is possible with only CommandHelper installed as a plugin.

Install plugin CommandHelper. Download it here: https://builds.enginehub.org/job/commandhelper

Restart your server to generate configuration

Add the following to plugins/CommandHelper/main.ms

bind('player_spawn', null, null, @event) {
  // Do something here, like sending them a message.
  msg('Oops, that was silly of you!');
}

Run /reloadaliases from the server console to activate it (or restart server)

CommandHelper uses a language called MethodScript, and the API documentation with a list of functions and how to use them can be found here: https://methodscript.com/docs/3.3.4/API.html
If you want to hook into different events (e.g. player_join as well), you may be interested in the Event API documentation: https://methodscript.com/docs/3.3.4/Event_API.html

Specific functions you may be interested in:

Giving players basic items (see pgive_item)
Change respawn location (intercept player_spawn event as in the example above, but change the spawn location with modify_event('x', 123) and similar for y/z)
Tracking if they are up to their 10th respawn (take a look at store_value / get_value, as you can use them to store a counter value like 'player.respawnCount')
Comment: Great to know, thanks! Unfortunately I haven't used bukkit for years and can't test this... Maybe nowadays a simple command block can also achieve this
Comment: I stand corrected! It looks like command blocks can detect a respawn - https://gaming.stackexchange.com/questions/336529/detect-when-a-player-respawns-possible - but CH would be more flexible. Depending on the use case, it's entirely possible command blocks could be enough though.
Comment: @Zommuter - Yeah, I noticed it was an old question :) Thought I'd answer for the benefit of others that come across it. Command blocks are powerful, but I don't think they can hook into e.g. the player respawn event.


Where can I find and submit bug reports on Google's Chrome browser?

Question: It will be important for developers wanting to develop for the chrome browser to be able to review existing bugs (to avoid too much pulling-out of hair), and to add new ones (to improve the thing).  Yet I can't seem to find the bug tracking for this project.  It is open source, right?
Comment: ... or you can just open about:linux-splash page and get detailed instructions
Answer: Google is calling it Chromium on Google Code
The Chromium Bug Reporting Page is there and has the link to submit bugs listed. (Google Account Required)
Here's a direct link to the bug report form.
Comment: Does this also apply to the official build of Chrome? Or just it's open source version? I ask because, I'm having visual artifacts every so often and I'd like to submit a screen shot (to illustrate my point, in the post literal manner) with a bug report. It seems to have something to do with Adobe Flash and it's roll over content being perfected, but corrupting the area that it WOULD take up if I had scrolled over it.
Comment: If your problem is specific to the Google build of Chrome, you could use the built-in reporting at http://www.google.com/support/forum/p/Chrome/thread?tid=2a2135b6f50fd524&hl=en . The issue you've described, sounds like its not specific to the official build, but to the actual chrome project, so it might benefit to have that reported in Chromium itself.
Comment: @MarkTomlin Report it to the Chromium bug tracker. The official build of Chrome is directly based on Chromium.
Comment: @JamesWilkins - Whoops, looks like the direct link had my (now expired) token. It should work correctly now.
Comment: Does this also apply to Chrome on mobile?
Answer: Go to the wrench -> About Google Chrome -> report an issue. (accurate as of v19.0.1084.46)
Comment: I see this option using the Beta Channel of Chrome (v13), very easy.
Comment: Mostly end-users file bugs through there. If you have technical details and a reproduction of the bug, file it through crbug.com/new (which is equivalent to the accepted answer).
Comment: ...no such option. (8.0.552.237 (Official Build 70801))
Comment: This option is available at Tools -> Report an issue.
Answer: This is the home page for the Code: http://code.google.com/chromium/
And here's more info: http://dev.chromium.org/getting-involved including the bug list
Answer: Click the Chrome menu (), then Help > Report an issue....
Since Google Code has been deprecated, you can also go to bugs.chromium.org in order to report new bugs and features or search for the existing one. The Chrome browser is under chromium category, so after logging-in, you can submit a new bug report by clicking New issue on the top-left corner and follow the wizard steps.
See: Report a problem or send feedback on Chrome at Chrome Help
Answer: From the Google Site

Click the Page menu page menu.
Select Report a bug or broken website.
Choose an issue type from the drop-down menu. The web address of the webpage you're on is recorded automatically.
If possible, add key details in the 'Description' field, including steps to reproduce the issue you're experiencing.
Keep 'Send source of current page' and 'Send screenshot of current page' checkboxes selected.
Click the Send report button to report a Google Chrome bug.

I don't see any reference to public bug tracking...
Comment: This is no longer available in the newest version of Chrome, as the page menu has been removed.
Comment: It is, under Tools -> Report an issue
Comment: @Pioul  it's not under Help > report an issue
Answer: The Google Code site for the Chrome project is available at:
http://code.google.com/chromium/
Facilities available allow you to:
File bug reports;
Join the Google group discussions;
Submit a patch;
Plus there are links to the development blog and a whole bunch of other useful stuff.
Answer: See the Issues tab on Chrome's Google Code page.
Answer: The bug tracker is here:

https://bugs.chromium.org/p/chromium/

Some shortcuts:

crbug.com
crbug.com/new (file a new bug)
crbug.com/150835 (go to a bug by number)


Can my SONY ICD-UX533 be used as an external microphone to improve my GoPro sound quality?

Question: I'm trying to devise a solution for recording better audio for my GoPro Hero4 Silver, using an external mic. Before going out and blowing my money on new hardware that I might not need, I am hoping to find a solution using a voice recorder that I already own. Specifically, I own a SONY ICD-UX533, which has been great for the purposes I bought it for (recording lectures and interviews). However, I am unsure if there is a way to use it as an external microphone relative to another device such as my GoPro. It has both mic in and audio out jacks, but not mic out jack. I tried plugging both ports into my MacBook Pro and no external mic was detected. The mic has 4GB of internal storage, but I've put in a 32GB SD card as well. I guess I want to record audio directly to the GoPro SD card, or better yet split the audio and video among the two cards (to save space for video on the GoPro card) in a way that maintains their synchronicity. Might there be a way to hack this thing so that it can be used as an external mic? Or would I be better off doing all this in post-production? If the latter is the case, can someone please suggest a general workflow or series of best-practices that would help me do this effectively?
Answer: If you want to record on the GoPro using an external mic you need a mic adapter for the GoPro. This will let you use the audio out from your mic to plug in to the USB on your GoPro.
The alternative is to import video and audio separately into your video editor. This is a very common workflow pattern, and all you really require is a clapperboard or similar to sync up at the start.
Answer: Have you tried running a cable from the phones out jack on the ICD recorder to the mic input on the GoPro? It might work, since you can monitor the recorded sound thru the headphone jack.


VisualSVN is annoying me by asking me to enter my login & password many times

Question: My VisualVSN is hooked up to Active Directory. I'm using Tortoise as the client. When I was using SVNSERVE and the text files for authentication, it only asks me for the login/password once. Now it's asking me it many times when I connect. To get around that, I would have to check the "save authentication" information checkbox. I could do that but I don't want my password stored in plaintext somewhere on my computer. Isn't there a way for me to get it to recognize the fact that I'm already logged in to my PC as a valid domain user and use my session information to authenticate me?
Answer: If you use the "save authentication" feature, your password is not saved in plaintext but encrypted with your logon credentials. You can check it yourself: the auth data is saved under %APPDATA%\Subversion\auth - you won't find plaintext in there (unless you're using Win9x).
Answer: Are you aksing about VisualVSN Server or the Visual Studio plugin or both?
What protocol are you using? Try to connect to svn with https - that way it can use SSPI for authentication and you don't have to enter the password at all.


Is it possible to have stereo sound from an external mic on a Canon Vixia HF G20

Question: I have a Canon Vixia HF G20 and I cannot find anywhere in the manual about an external mic in stereo mode. The "advanced hot shoe" does support stereo and surround sound but through the Line In/Mic port on the camera I can't seem to produce stereo sound. My source is definitely stereo. Any suggestions?
Comment: Can you provide more details about the source and how you have hooked it up.  That may allow me to clarify my answer further as it appears the camera should support it.
Comment: I seem to be having the same problem, I'm using a Uni-Directional Electret Condenser Microphone, with the cable it came with, and an adapter to fit the microphone port. On the camera I have the MIC terminal input set to MIC.
Answer: According to the Using Commercially Available Microphones section on page 76 of the manual for the HF G20, it should be possible to connect a stereo microphone to the external mic connection.  There may be some problem with the kind of a source you are using or the way you are connecting it.
Answer: Verify again that your source is indeed a stereo source and that your cabling is TRS cabling. I own this same camera and have been able to record audio in full stereo and also on only one side of the stereo spectrum.
Answer: I have the G20 and VidPro Xm-55... u r going to go into custom audio settings and then go to audio mix and just mix about two clicks up on internal microphone and let the external to the rest- that way you get clean sound with stereo separation.
We do live music studio recording and when my overall level is set around 67/70 it seems to be perfect.


Commutative Noetherian Domains of Krull Dimension One

Question: k is an alegraically closed field and A is a commutative k-algebra. We also know that A is a Noetherian domain and its Krull dimension is one. Are there any necessary and sufficient conditions on A under which A becomes finitely generated module over a polynomial algebra k[c] for some c in A? Does anybody know any papers or books that discuss this?
Thanks guys.
Comment: The answer seems to be that it is necessary and sufficient for $A$ to be finitely generated as a $k$-algebra.  Necessity: finitely generated as a module implies finitely generated as an algebra, and finitely generated over finitely generated is finitely generated.  Sufficiency: apply Noether normalization as suggested in the responses below (e.g. Eisenbud, Thm. 13.3).  This has an evident generalization to any finite Krull dimension.
Comment: +1 for catching my error, Prof. Clark.
Answer: Dear Amitsur,
It might help you to think geometrically.  For example, $k[x,x^{-1}]$ is the ring of functions
on a hyperbola $xy = 1$, and the projection from this hyperbola to the line $x = y$ is a finite projection.  This corresponds to the fact that $k[x,x^{-1}]$ is finitely generated as a module over $k[x  + x^{-1}].$ (If we write $f = x + x^{-1}$, then $x^2 - f x +1 = 0$
and $x^{-2} - f x^{-1} + 1 = 0$.)
Answer: This is always the case, by Noether normalization. For a proof, see for examlple, Eisenbud - "Commutative algebra with a view towards algebraic geometry" - Theorem 13.3.
Edit: this is false, one need a finiteness assumption. See comments below.
Comment: It's clearly not always the case, because A could be L[T], a polynomial ring in one variable over a field L which is a huge algebraically closed field and a transcendental extension of k
Comment: you are right off course. My mistake, I misread the question.
Comment: This is incorrect.  If $A$ is a finitely generated module over $k[t]$, then in particular $A$ is a finitely generated $k$-algebra, hence a Hilbert-Jacobson ring.  The Laurent series ring $k[[t]]$ is a PID (and not a field) with only finitely many prime ideals, hence not Hilbert-Jacobson: see e.g. Section 8 of http://math.uga.edu/~pete/integral.pdf.
Answer: This follows from a direct generalization of the Noether normalization lemma.  It is covered in these notes from Mel Hochster.  These notes prove it in a pretty general form (when the base ring is only an integral domain rather than a field).
Edit: A sufficient condition is that the algebra is finitely generated, but it is clearly not necessary.
Edit 2: I misread the question.  I thought he was asking if A is finitely generated over some polynomial algebra (including infinitely generated polynomial algebras).
Comment: Dear Amitsur, perhaps it seems less strange if you realize that you can take f=x+x^{-1} and that x then satisfies the equation x^2-fx+1=o, so that 1 and x generate A as a k[f]-module .
Comment: Thank you guys. I'll check the sources you gave me. So, the Laurent polynomial ring A=k[x,x^{-1}] must be finitely generated k[f]-module for some f in A then. This is kind of strange, isn't it?
Comment: See the comments above.  This is incorrect (note: being finitely generated over k is clearly necessary.)
Comment: lol, of course! Thanks Georges Elencwajg. I guess I need to get some rest. Thank you all for your useful comments.


How is pressure affected by horizontal force in fluid?

Question:
In the situation shown above, Point A is just near the wall at negligible distance. But how is pressure at A is due to weight of water and atmospheric pressure only,why does it not have any pressure due to horizontal net force (point would be accelerating with container horizontally therefore it would have some net force horizontally) even though. If it is due to it being point mass then how does pressure at B have additional pressure due to horizontal net force even though it is also a point mass
Answer: Let us start with a little cube-shaped drop of water floating in space. Squeeze it on two sides. It squishes into a flatter shape. To prevent this, you would have to squeeze with equal force on left/right, front/back, and top/bottom. The forces on all sides have to be equal.
Consider a similar drop of water sitting quietly in a container of water. Forces are acting on the drop. First, there is the weight of all the water above it plus the weight of all the air above that. Because the drop is sitting quietly, not being accelerated, we know the total force is $0$. The force on the front equals the force on the back. Likewise left and right.
The drop has a little weight, so top and bottom are slightly different. The force on the top is the weight of the water above. The force on the bottom is that weight plus the weight of the drop. The drop below our drop pushes back just as hard as our drop pushes on it. So the total vertical force is also $0$. The downward forces are the weight of the water above plus the weight of the drop. And that is the same as the upward force from below.
So the horizontal forces do matter. Without the walls, there would be no horizontal forces, and the water would flow all over the floor. Again, to keep the drop from squishing out of shape, the sideways forces must be equal to the vertical forces. The sideways forces must be a little bigger at the bottom of the drop.
Your question is probably in response to only needing atmospheric pressure and depth to calculate the pressure at A. This is the nature of reaction forces.
If you push on an object, it accelerates. If the object is against a wall, it doesn't accelerate because the wall pushes back just a hard. The force from the wall adjusts to be just as hard as you push on it.
So if you calculate the vertical forces, you know the horizontal forces are just as big. You don't need a separate calculation for them.
Comment: So sir do you mean to say that if a drop is against a wall then it won't accelerate even though the wall is accelerating because the wall will apply equal force? So the drop will remain in its position and when after some instance the drop is no longer against the wall and there is some fluid between our drop and wall then the drop will start accelerating because the fluid(between drop and wall) won't balance out forces on both sides?
Comment: I was assuming the container was not accelerating. In general, the wall pushes back just hard enough to prevent an object from penetrating the wall. This will happen if the object has the same acceleration as the wall. In your drawing, if you push the object against the wall, the wall will push back less hard so the object has the same acceleration as the wall. In this case, pressure changes horizontally, like weight makes pressure change vertically.
Comment: So then, if drop at A is accelerating along with wall then it means that there is some net force along horizontal, then shouldn't that net force also contribute to pressure at A and therefore pressure at A should be more than Patm+dHg(d=density)?
Answer: If the container is accelerating to the right , there is a force in the opposite direction due to inertia. So the pressure at point B would in fact be greater than at point A. The acceleration has the same effect in a horizontal direction as earth's gravity has in the vertical direction. Pressure $p = p_{atm} + \rho \times (a \times x + g \times y)$, where $p_{atm}$ is atmospheric pressure, $\rho$ is the density of water, a is the acceleration of the container, x is the distance of the point from the right wall, g is the local g factor, and y is the distance from the surface
Comment: But why would pressure at A would only be due to weight of fluid above it and Atmospheric pressure? If the point A is accelerating right along with container then there should be some net force along horizontal to provide it and that net force should also provide additional pressure at A right?
Comment: The additional pressure at point B in the horizontal direction results from the sum of the forces acting along the distance AB. Since there are no forces acting on the fluid at point A from the right side, there is no additional pressure here. It may be helpful to consider that acceleration and gravitational attraction have an equivalent effect: You are not surprised that the pressure is only the atmospheric pressure at the surface of a stationary container in gravity, but that container is in the same situation as a container being accelerated upwards.


Working with Canvas and AngularJS

Question: I am taking up a task to re-write the following flash app in HTML5:
http://www.docircuits.com/circuit-editor
Given the complexity of the app and my R&D so far, I have identified AngularJS as the preferred MVC framework for the implementation. The app has various parts such as panels, menus, properties, charts, etc., all of which I believe can be easily implemented in AngularJS.
The key problem, however, is that the component design and interaction (things like, drag/drop, move, wire handling, etc.) need to be Canvas-based, as I have been able to export all the vector graphics from Flash using the CreateJS toolkit (http://www.adobe.com/in/products/flash/flash-to-html5.html) into a Canvas library and not to an SVG.
The problem is that there is no clear way to communicate between the "individual objects inside a canvas" and AngularJS. I have looked at the following examples, but almost all of them work on the canvas object, and not about handling individual components inside Canvas:
AngularJS Binding to WebGL / Canvas
Is there already a canvas drawing directive for AngularJS out there?
I am kind of stuck here, and not sure what to do. Would really appreciate a some comments on:

Whether AngularJS is the right choice?
Should I try implementing the Canvas part in another library (such as Fabric.js, kinect.js, Easel.js) and integrate it with Angular (which again seems too big a task for now)?
If none of the above, what other framework should I switch to that can easily handle canvas as well as other functionality like panels, menus, charts etc. with ease?
Comment: My 2-cents: I use/like both AngularJS+MVC and Html-Canvas separately.  IMHO, trying to use Angular to drive canvas drawing is a bad fit.
Comment: Hi MarkE....thanks for your comments....yups...that's what I have read up so far...do you have any other MVC framework which can do all that I want to do?
Answer: We finally managed to work with AngularJS and HTML5 Canvas together. Here below, I will share, briefly, our requirements and the approach we followed to achieve it.
The requirement was a bit tricky as we wanted to:

Handle event handles on individual elements inside the canvas, and be able to add these elements dynamically based on the data in AngularJS
Keep data for each individual element in AngularJS while using Canvas for only display of the data.
Use controller inheritance for special handling of data in certain cases (for e.g. all the instances should be movable and draggable, but some instance may need to blink or show some color bands etc.)

To handle the operations on Canvas, we divided it into two parts:

Canvas service
It does the job of

initializing the canvas
adding or removing any element from the canvas
refreshing the canvas

Instance directive and controller

the angular controller keeps the handle for the corresponding "canvas element", and also all the data that is associated with it.
the event listeners on each element trigger specific functions in the angular controller which manipulate the instance data
the directive watches the instance data in controller, and correspondingly updates the canvas with the help of the canvas service

For controller inheritance, we found the following approach quite useful:
https://github.com/exratione/angularjs-controller-inheritance
This helped us create controllers dynamically, and with the help of instance directive, we could also handle individual updates on the canvas along with the generic event handling.
I understand that this approach may not be completely AngularJS-oriented, but it worked well for us, and we were able to handle a reasonable amount of interaction between AngularJS and HTML5 Canvas.
Comment: Would love to see a demo and code of this posted somewhere.
Comment: @MadDogMcFie: I understand that code helps much better than the the verbatim. But at this point I can't share the entire code, and it would take me some effort to separate only specific code and post it somewhere, but I can surely help with any questions that you may have.
Comment: Excellent, I am in a situation very similar to the one you described in your question (rewriting a similar application with dynamic UI elements, drag-drop etc). Your guidelines here were really helpful.
Answer: Sure you could do that with Angular just fine. However, depending on the complexity of your app and the type of data synchronization you need I would recommend using JS prototypes to handle that. The "angular way" would be to use directives instead.
Create a global drawing context and then split up the various components into JS objects. Handle the setup, logic, update, etc within each object (sort of like a class) and then draw to the global context. You should have a main draw loop which is essentially a setTimeOut function that updates the game object states and redraws everything.
An alternative approach is to combine Angular and JS prototypes. This is a great example: https://github.com/IgorMinar/Memory-Game
EDIT: another example of building games with angular http://alicialiu.net/leveling-up-angular-talk/examples/directive.html

Working with Canvas and AngularJS


Good way to illustrate project / make a template of my small wood phone dock project? (CAD)?

Question: I have not done woodworking much before and a friend invited me to build something...  I have it all planned out in my head but I don't know what software is available etc for making a good template that my friend can follow...
Comment: Any answer would be slightly biased towards one program or another. I had asked a meta question in preperation for this event: http://meta.woodworking.stackexchange.com/questions/72/cad-tools-utilities-we-could-recommend-to-new-users
Comment: Well that was just mspaint. Sketchup is worth learning. Lots of tutorial videos out there. A little effort makes all the difference.
Comment: thank you for the reply,  I need to clarify that I don't really mean the "best" (which would produce biased answers) so much as something that is "good" or at least common...  A standard, something that lots of people use...
Comment: We also have a [meta about the use of the word best](http://meta.woodworking.stackexchange.com/questions/248/is-best-a-naughty-word-in-questions/249#249) so I understand. That is not the focus of my comment. There are plenty of CAD programs available. Depends on your budget, needs, capabilty, computing power etc.
Comment: Thanks, I will keep that in mind when I use SE in the future...  (I am new to  these sites).  As to the woodworking my budget is $0 needs fairly basic and capability with computing and computing power is high...  I have sketch up but was reluctant to use it this time...  I was more interested in the paint drawing idea in your meta....  simple diagram with dimensions...
Comment: +1 for sketchup. Easy, free, and powerful. You can use it for simple dimensional diagrams too, just make your shape 2D; you can use a ruler to mark dimensions.
Answer: Most woodworkers who do CAD-like renderings these days are using SketchUp; the free version is pretty decent and lots of online tutorials exist. This is an observation, not a recommendation.
Comment: And there are Sketchup tutorials by and for woodworkers on Youtube.
Answer: I'd say that CAD is not necessarily your best option. Don't get me wrong. CAD is a great thing and learning any CAD software will be a very handy thing to have up your sleeve. I highly recommend learning any CAD software (no matter how limited or advanced)
However, there are a few problems:

I have not done woodworking much before

Think of CAD software as a helper to create (mostly) any 3D geometry. Unless you have some very advanced CAD software, it will not tell you if that geometry makes any sense.
You can spend hours creating something, which might be hard or impossible to manufacture.

making a good template that my friend can follow...

What's possible and what not can be hard to tell. It depends on what material (wood) is available and what tools are available to shape or modify it. Maybe your design is valid, but your friend lacks the right router bit to do it. Chances are that he cannot follow it.

my small wood phone dock project

Starting with a small project is a great idea! It can be easy to bite off more than one can chew, but with a small project it's easy to finish it.
And for a small project, you have to ask yourself if CAD isn't overkill.
Here are my suggestions:

Design the project with your friend together. Don't sit alone in the basement for 3 months designing something in some CAD program that cannot be manufactured. The important thing is to understand what's possible with wood and what isn't. This way you can understand the important details of your design that make it either hard or easy to make. This depends on what tools and wood are available to your friend, which is why I recommend doing it together with him.
Doing the design with your friend allows him to understand you. An ongoing communication is a lot easier to understand than just throwing a technical drawing at somebody "I want this done Tuesday!". Make simple sketches (on paper or any drawing program) to document what you both agree on.
(optional) if you want to get into CAD, create a 3D part from the sketches. This is easier for you now, because you know the end result. You are not learning the CAD program and figuring out the design at the same time.
Answer: Although this approach does not necessarily involve software, it can be helpful: prototype your designs by making full-size or scale models using cardboard or XPS foam (the pink or blue 4'x8' sheets of insulation foam sold at home improvement centers). Foam is easy to work with, cheaper than lumber, and you can even prototype complex joinery.
Answer: I'm going to go with Sketch up. One it's free and two if you use it a lot and need more options there is an awesome paid version for anything you would need to do. Also there is a site  woodgrears from a guy  Mathias  Wendel who designed something called Big Print program which is just what your looking for. Able to print stuff to scale them glue it to your piece and cut and drill. Check it out he is an awesome woodworker and had a You Tube channel.


14 Ga stranded wire bathroom fan/light on 20 Amp circuit?

Question: I'm know this topic has been covered thousands of times but I can't find a good explanation to what I'm looking at.
I am putting in a basement bathroom, I'm wiring it now on a 20 Amp circuit per code, and today my bathroom fan and vanity lights came. They have #14 stranded wire in them. I have #12 wire from the breaker. Can I wire these lights into my circuit? I guess what has me stumped is why they would build these units with smaller wire when a bathroom is required to be protected by a 20 amp circuit.
Any help would be appreciated. Thank you
Comment: The #14 wire is built into the bathroom fan and vanity lights. As in the wire I would have to tie my #12 wire into to complete the circuit.
Comment: what do you mean by "in them"?
Answer: That's perfectly fine. The device wiring is based on the device requirements and 14 (sometimes smaller!) is fine if designed tested and certified (UL) appropriately.
Code requirements are based on the total circuit load which may vary as attached devices change and therefore must be the right match of wire and breaker.
Answer: The Code doesn't deal with wiring that's an integral part of equipment
The NEC ampacity rules do not apply to wiring that is an integral part of equipment, as stated in 310.1:

310.1 Scope. This article covers general requirements for
  conductors and their type designations, insulations, markings, mechanical strengths, ampacity ratings, and uses. These
  requirements do not apply to conductors that form an integral
  part of equipment, such as motors, motor controllers, and similar equipment, or to conductors specifically provided for elsewhere in this Code.

Instead, the UL standards for various pieces of equipment govern wire sizing within that equipment, either based on engineering calculations, standard rules, or actual temperature rise tests.
Comment: Awesome. You guys rock thank you for the help.
Answer: You can install a 15 amp device, on a 20 amp circuit, it's permitted, I strongly recommend pig-tailing the connections so that you could still install a 20 Amp device downstream.    You just can't install something that is exceeds the max amperage of the circuit breaker or wiring.
As for the gauge of wiring, if an end device doesn't draw much amperage, it can use smaller gauge wiring because devices downstream won't be sending current down it's smaller wires.   Notice unlike a receptacle device, you won't see line and load on that small gauge example, thus forcing you to pigtail any downstream connections. I've installed led lights that had 18 gauge wiring, at least if I remember correctly.


Handling missing value in column having textual data

Question: I have been working on a supervised ML use case where dataset has Numerical (Price), Categorical(Category) and Textual data(Description) as features. Description feature has about 30% missing values. I don't want to drop them as data set is small and it would cause information loss. Looking for any suggestion on how to handle missing value ?
Answer: A "missing text" can be considered simply an empty text, and an empty text is still a valid text: as long as the design of the code doesn't assume non-empty text, it should not cause any issue. In particular it can be consistently encoded with bag of words representations.


Physical screen size 'detection' based off user agent in PHP/javascript

Question: So, there are ways to detect 'mobile' browsers and screen sizes using javascript and php.. however, the screen size is always returned in pixels and mobile can mean anything these days.
I want to be able to know how big a device display is when it's mobile, what with tablets popping up everywhere. The reason for this is because I want to select a stylesheet for devices with small screens and default to the normal stylesheet for everything else. For example, I want an iPad, kindle fire, hp touchpad etc. to display the normal stylesheet but I want a different stylesheet for cellphones or any device that has a display about the size of a human hand.
Now, I'm guessing something to do this doesn't exist but perhaps someone's thought of a better way or knows of a database somewhere that has dimensions for screen sizes somewhere..hmm
..maybe there's a way of finding pixel density and then applying the screen width/height in pixels to this..
Comment: No, imagine you have a really tiny 8000x20000px (theoretical example) screen which is about 4cm x 8cm or whatever.. you don't want your really cluttered page on that tiny thing regardless of whether the resolution will be able to resolve it nicely.
Comment: Browser sniffing is a flawed strategy. You can't reliably get screen size from the user agent string. And even if you can, it means you are going to have to deal with each different size for each diffrent device (and possibly user agent as well). Explain your issue and you might get help on how to deal with it.
Comment: _"however, the screen size is always returned in pixels"_ - why is that a problem? Isn't the number of pixels much more important than actual screen size?
Answer: I actually think this is a very good question.  The unsatisfactory situation right now is that on 10" tablets you get served a giant, space-wasting single-column "mobile" site by default when the desktop version would have been just fine.
Unfortunately, as John Hunt has discovered, even WURFL does not give accurate physical screen size.
One semi-workaround is a heuristic assuming that if either the x or y dimension is less than 768 pixels then you are on a phone(*) and thus serve the single-column "mobile" version of your site by default.
You should still always allow the visitor to choose between mobile or desktop. Better still, just call it the "single-column" or "slim-width" version of your site to avoid misnomers.
(*) Why 768 pixels?  Because all 10" tablets of any importance are at least 1024x768 or 1280x800, whereas even phones with big screens such as the iPhone 5 or HTC HD5 have widths less than 768 pixels  (iPhone 5 - 640x1136, HTC HD5 1280x720).  This will probably not work on the giant samsung screens, but on those devices, having the desktop version served by default is not as annoying.
Comment: your 768-heuristic argument makes sense ... but I wonder when that basis will go up? 1 year, 3 years? ... ... but still I like it.
Answer: When using wordpress, the wp_is_mobile function has the same problem as it will set the "mobile" flag for tablets and phones.  My problem is I want phones to get a limited page without my top of page image slider to speed up the site download/draw.  Tablets usually have faster wifi access rather than 3G or effectively slower than wifi 4g.
The responsive wordpress theme, Customizr, I'm using uses the auto adapting twitter bootstrap, but still runs too slowly on phones with big image pages.  So the question for my site is not just screen size or resolution, but data and screen draw speed.
Rocco Aliberti in this forum on themesandco's website made a useful suggestion combining a browser detection plugin that sets up an is_tablet function then combining it with the built in wordpress wp_is_mobile function to get "wp_is_mobile() && !is_tablet()" -e.g. the device is mobile and is not a tablet.
http://www.themesandco.com/support-forums/topic/jetpack-mobile-issue/#post-23308
Answer: http://wurfl.sourceforge.net/nphp/
Looks like you can get this infomation from the WURFL API..cool!
Comment: Note: It turns out the database isn't very accurate, it reports a totally incorrect screen size for my Samsung Galaxy S.
Comment: I mean the collective 'you' in English. It's probably bad English, sorry.
Answer: The right answer I think it's to use a responsive layout approach as you'll never get it right for all the various devices (there are 100s of new ones every day..)
Comment: the problem is that responsive is based upon pixels ... and now manufacturers are getting 1000 pixels across, even though the phone is only 5 inches across ... on such a small screen a responsive site would mistakenly push out the proverbial '2-column' version,.
Comment: @dsdsdsdsd Actually, responsive design is usually based on *CSS pixels* which are not the same as device pixels. The vendor basically already did the math for you and gives you 'pixel' that takes the physical device size into account. For example, iPhone 4's screen is reported as being 320x480 *CSS pixels*. Read [Quirksmode: A pixel is not a pixel is not a pixel](http://www.quirksmode.org/blog/archives/2010/04/a_pixel_is_not.html)
Answer: You can use frameworks like Bootstrap that show/hide columns or data based on screen resolution. This works nice as far as just displaying is concerned.
But ideally you would also want your scripting language to know this so that it would not process/execute certain data which is not going to get displayed by bootstrap.
At this moment browser agent does not provide screen resolution. Which should be enabled as modern websites have to be responsive to at least popular mobile, tablet and computer.
This is my wishlist for future versions of HTTP/W3c/Browser implementation.
Answer: you can check the screen size through javascript innerWidth gives/return the width of the device whether you are in the desktop or mobile phones, more filter you can you an user agent with this javascript innerWidth code.
then after that you can apply the css on the basis of screen sized.


Electronic device that introduces harmonic overtones

Question: I play electric guitar but love the sound of violin. I have read articles where violins have been placed under spectral analysis and show rich overtones of harmonics. Is there any device I can use to duplicate this?
I have tried adding octavers and harmonizers but the sound they generate is not akin to a harmonic overtone.
I prefer not to go midi or synth, but any suggestions will be appreciated.
Answer: Guitars are already rich in overtones and harmonics. Experiment with the position of your right hand. Picking near the neck emphasises the fundamental frequency. Picking nearer the bridge brings out more overtones.
The biggest differences between a guitar and a violin are the size of the instrument, and the fact that a violin is bowed.
You could try smaller guitar-like instruments, such as mandolins or ukuleles -- or you could shorten the scale of your guitar with a capo.
Another important difference between a guitar and a violin is that the violin is fretless. That means a soft finger at the neck-end of a fingered note, rather than a hard fret -- for less sustain and fewer high frequencies. It also means more opportunity for sliding. You could try obtaining a fretless guitar, or just try playing with a slide.
You could try bowing your guitar -- you wouldn't be the first. Because the guitar bridge and nut are not curved, bowing a single string is pretty much impossible. You could try an Ebow, which vibrates electric guitar strings using an electromagnet.
Alternatively, why not learn to play the violin?
Comment: If you don't have an eBow, you can do amazing things with the volume control, or an external volume pedal.
Comment: Excellent point @DrMayhem, and come to think of it, adding in a chorus pedal could then be used to make something more akin to a string section instead of a single instrument.
Comment: Thanks. I've done the bow thing. Didn't work:) Tried learning violin too but this is more of a tonal change, mood thing that I'm trying to accomplish. Is the bow so integral to 'that' sound we all hear comming from a violin? Does an Ebow mimic that?
Comment: Saw this online 'Many of the most useful features of the orchestral string instruments result from their use of bows. Compared with pizzicato (plucking the string), the bow allows the player to continuously input energy and so to maintain a note. This is important to the timbre, too: after a pluck, the high harmonics fade away quickly, leaving only the fundamental and some weak lower harmonics. Bowing maintains the rich harmonic spectrum.' So back to injecting those harmonics into the guitar sound.
Answer: Overdriven, distorted guitar sounds contain loads of harmonics, and tend to emphasise them quite well. By experimenting with these sorts of sounds, along with different pup settings, and plucking in different places on your strings, you may come close.Valve amps do it better, but there are several pedals also.
Comment: True. I've done that. In fact Eric Johnson calls his fuzz face sound his violin tone. I am trying to get the richness of the effect without distortion though.
Comment: It's worth noting that although distortion or overdrive would definitely increase the presence of a number of harmonics, the majority of the overtones added by distortion are inharmonic or aharmonic (not to be confused with enharmonic). Because these added frequencies don't belong to the harmonic sequence, they constitute an addition of noise that would only (mostly) be a part of a violin sound if the player was using extreme bow pressure and/or playing very close to the bridge. Both are *very* cool sounds, but probably not what @smiley is aiming for.
Comment: @PatMuchmore: that's mostly true when you play chords. When you distort a simple, cleanly played single note then the extra frequencies are in fact in the harmonic series, or very close to it (as close as in a violin). Perhaps you mean there are _dissonant_ overtones; that's of course true for a violin as well. — Really the main reason that distorted guitar sounds so different from bowed strings is the attack character: a bow gives a quiet but "fuzzy" friction sound, a pick gives a loud and sharp click. Also, the playing technique, phrasing etc. idioms are of course completely different.
Answer: Slim's answer already covers some of this, but I just want to emphasize how massively rich in overtones any guitar is. Only a pure sine wave doesn't have overtones, any natural instrument is rich in them (in fact each overtone is a sine wave). The only spectral difference between a violin and a guitar lies in which overtones are most present, and what their relative amplitudes are. The primary way to manipulate the relative amplitudes of the overtones in your guitar sound is filters. Even very basic filters like hipass and lopass filters can offer you some cool shaping possibilities. For instance, a wah-wah pedal is actually just a fancy lopass filter—moving the pedal just changes the filter's cut-off frequency and Q settings. It doesn't have to be used to make bom-chicka-chicka-wah-wah effects, interesting sounds can be explored involving leaving the pedal in a single position or moving it very slowly.
For serious control, you would want a fixed bank of bandpass filters, each filter centered on closing off or opening up different overtone frequency ranges (some devices that do this are called formant filters, but those are often very specifically designed to replicate human vocal sounds. As long as there is an option to manipulate each fixed filter individually however, these can be made to work in the way I'm discussing). I believe there might be a Moogerfooger pedal along those lines, but I'm not sure. If you look up a spectral analysis of a typical violin and a typical electric guitar (or do it yourself, the software does exist) you could theoretically try to close off some of the frequency ranges of your guitar's sound that aren't present in the violin while trying to emphasize some of the frequencies that are more present in violin sound. Although, I think this would potentially be very interesting, I very much doubt it would suddenly make your instrument sound like a violin terribly much. Still, with an ebow like slim suggests, you might be able to sculpt something with an interesting sound that is intriguingly reminiscent of the violin, and that might ultimately be more interesting than just turning it into a poor violin clone.
Comment: Very interesting point about the bandpass filters. You got me to find an article on Sound on sound which may be helpfull. I will experiment later.


Can county court judges have separate jobs in private firms as solicitors?

Question: Suppose a solicitor in a private firm is appointed as a judge. Are they allowed to continue working as a solicitor in a parallel private capacity? What provisions exist in the way of mitigations to potential conflicts of interest surrounding such a scenario? Tagged england-and-wales and any-jurisdiction, while the question is framed in England-and-Wales-centric terminology. Feel free to answer any adjusted version of the question as may suit your jurisdiction of speciality.
Answer: Working as a solicitor is incompatible with a judicial appointment
new-south-wales
Judges are not prohibited from having outside employment but they must get permission from the CEO of the Justice Department. However, judges wouldn't ask permission to work as a solicitor and the CEO would wonder why this person was a judge if they did.
Part of being a judge is being judicial - having the appearance of detachment, disinterest, impartiality, and, to some extent, remoteness is all part of this. You can't act for just some people and keep up that appearance.
In fact, most judges find the experience to be socially isolating - they have to build a distance between themselves and their former work colleagues and even build a distance into their friendships. Judges are usually quite successful members of society but they can't be seen socialising with politicians, businesspeople, church leaders, or other lawyers because it risks accusations of partisanship. You can't make comments on social media, you can't answer questions like these, you can't express your political or religious opinions, arguably, you can't even barrack for a football team.
Being a judge is more than a full time job
Judges work 60-90 hours per week - when are they going to work another job?
Comment: "accusations of partisanship" — like it would anyhow affect them. At the very most, just some noise in the media. No direct evidence of being impartial — no consequences.
Answer: In england-and-wales, serving full-time judges cannot do other kinds of legal work at the same time. The Courts and Legal Services Act 1990, s.75, says:

No person holding as a full-time appointment any of the offices listed in Schedule 11 shall—
(a) provide any advocacy or litigation services (in any jurisdiction);
(b) provide any conveyancing or probate services;
(ba) carry on any notarial activities (within the meaning of the Legal Services Act 2007);
(c) practise as a barrister, solicitor, public notary, licensed conveyancer or licensed CLC practitioner, or be indirectly concerned in any such practice;
(d) practise as an advocate or solicitor in Scotland, or be indirectly concerned in any such practice; or
(e) act for any remuneration to himself as an arbitrator or umpire.

The offices listed in Schedule 11 include circuit and district judges, who are those who would sit in a County Court.
This prohibition does not cover retired judges, or part-time ones who receive fees rather than a salary. Fee-paid judges (who hold titles like "deputy district judge" or "recorder") are allowed to continue in private practice, but are subject to conflict-of-interest rules to make sure that they keep those aspects of their lives separate. For example, they are not allowed to promote their private services using their judicial title. These are additional specific safeguards around the general law, where all judges must avoid bias and the appearance of bias. The role also exists in the High Court, and by extension even the Court of Appeal, and can be a stepping-stone to full-time salaried appointment. Such judges only sit for a small number of days each year, and are meant to fill out the full-time bench in order to make specialist expertise available, or just be extra people generally.
While it is commonly understood that salaried judicial office is meant to last until retirement, there is no explicit prohibition on a judge returning to practice, or retiring early in order to do so. It would just be unusual and frowned upon. It is common for retired judges to continue to act in a judicial capacity - as arbitrators, in certain foreign courts, or in their original UK courts if needed - which is different from advocating for or advising a specific client. The terms and conditions of their appointment include the stock language

The Lord Chancellor also regards a judgeship as a lifetime appointment. Any offer of appointment is therefore made on the understanding that appointees will not return to practice.

(quoted in "The shadow of the court: the growing imperative to reform ethical regulation of former judges", Gabrielle Appleby and Alysia Blackham, International & Comparative Law Quarterly 67(3):505-546, July 2018) but this is more in the nature of "we hope you won't" than "we can actually stop you". A former judge who was practicing as a solicitor or barrister would no longer be within the ambit of the judicial misconduct process, but they would be subject to the discipline of the appropriate other regulatory body, so there is still a mechanism in place to govern their professional actions.
Comment: This clears up so much.


Timer-based event triggers

Question: I am currently working on a project with specific requirements.  A brief overview of these are as follows:

Data is retrieved from external webservices
Data is stored in SQL 2005
Data is manipulated via a web GUI
The windows service that communicates with the web services has no coupling with our internal web UI, except via the database.
Communication with the web services needs to be both time-based, and triggered via user intervention on the web UI.

The current (pre-pre-production) model for web service communication triggering is via a database table that stores trigger requests generated from the manual intervention.  I do not really want to have multiple trigger mechanisms, but would like to be able to populate the database table with triggers based upon the time of the call.  As I see it there are two ways to accomplish this.
1) Adapt the trigger table to store two extra parameters.  One being "Is this time-based or manually added?" and a nullable field to store the timing details (exact format to be determined).  If it is a manaully created trigger, mark it as processed when the trigger has been fired, but not if it is a timed trigger.
or
2) Create a second windows service that creates the triggers on-the-fly at timed intervals.
The second option seems like a fudge to me, but the management of option 1 could easily turn into a programming nightmare (how do you know if the last poll of the table returned the event that needs to fire, and how do you then stop it re-triggering on the next poll)
I'd appreciate it if anyone could spare a few minutes to help me decide which route (one of these two, or possibly a third, unlisted one) to take.
Answer: Why not use a SQL Job instead of the Windows Service?  You can encapsulate all of you db "trigger" code in Stored Procedures.  Then your UI and SQL Job can call the same Stored Procedures and create the triggers the same way whether it's manually or at a time interval.
Answer: The way I see it is this.
You have a Windows Service, which is playing the role of a scheduler and in it there are some classes which simply call the webservices and put the data in your databases.
So, you can use these classes directly from the WebUI as well and import the data based on the WebUI trigger.
I don't like the idea of storing a user generated action as a flag (trigger) in the database where some service will poll it (at an interval which is not under the user's control) to execute that action.
You could even convert the whole code into an exe which you can then schedule using the Windows Scheduler. And call the same exe whenever the user triggers the action from the Web UI.
Answer: @Vaibhav
Unfortunately, the physical architecture of the solution will not allow any direct communication between the components, other than Web UI to Database, and database to service (which can then call out to the web services).  I do, however, agree that re-use of the communication classes would be the ideal here - I just can't do it within the confines of our business*
*Isn't it always the way that a technically "better" solution is stymied by external factors?

Timer-based event triggers


Adapter: male pvc pipe to female metal outdoor faucet

Question: I have an outdoor faucet that recently had a metal pipe (age caused it to crack) replaced with a pvc pipe. The faucet that is attached is metal, so it didn't leak before; it leaks now because it is a metal to pvc connection. The pvc pipe has a male threaded end and the faucet is female threaded. I need an adapter that is female on the pvc side and male on the metal side, but I have not been able to find one. All I can find is an adapter that has the pvc side that slides inside. I haven't been able to find it anywhere. Does what I need actually exist? Or do I need to fit two adapters together to get the right connection....
Thanks in advance
Comment: Pictures always help when dealing with adapters.
Comment: It is unclear as to how you think an adapter is the solution to a leak.
Answer: It sounds like you're looking for an extender of sorts. I've used fittings like that which also change pipe size at the same time: for example, an adapter with 1/2" female thread going to 1/4" male thread. These are usually brass. I haven't seen one in which the pipe size does not change. You'd probably have to use a regular threaded coupler followed by a nipple of whatever length suits you.
The real problem, though, is that you have a plastic-to-metal threaded connection that's leaking -- is that right? You don't need extra fittings to fix this. All you need is some pipe joint compound, sometimes called "pipe dope." Choose one that includes PTFE (Teflon). Disassemble the leaking joint, dry the male thread, apply the compound, reassemble. Wipe away the excess compound and test for leaks. Chances are high this is all you'll need.
Comment: Yeah the pipe size doesn't change, it's just the leak that is bothersome. I will definitely try the joint compound first before buying fittings I don't need. I have some on hand. Thank you!
Comment: Teflon tape may also work but I think dope is better when using threaded fittings in plastic, less chance to break the female.
Comment: In my experience dope seals the joint _every_ time and only makes a mess if I applied too much, whereas teflon tape never makes a mess but sometimes doesn't achieve a leak-free seal. I find the chance of small mess to be greatly preferable over the chance of having to re-do an assembly because a joint in the middle leaks! :-)


Can you access AppleScript APIs from shell script on Mac OS X?

Question: I already do a lot with shell scripts on the Mac, but I loathe AppleScript, and I would love to be able to access Mac apps' APIs in some other way. Does anyone know any other way to get the power of AppleScript without the pain of its horrible syntax and meager documentation (and its slowness, if possible)?
Answer: appscript is probably your best bet - there are variants for Python or Ruby which should fit well into shell scripts.
There'll still be some trial and error in dealing with individual applications' vocabularies, which you can't really do much about, but at least you'll have a far more capable language (or two) to wrap around it.
Comment: Thanks, appscript looks like just what I need.
Answer: What about MacRuby? It isn't exactly shell scripting but it's not so far removed (and, arguably, much nicer).
Also not sure about the Applescript APIs specifically (not checked) but with HotCocoa you basically have access to Cocoa.
I've pinched this code snippet from here but as you can see it is very readable (this is code just to display a hello world window, admittedly not a typical scripting operation):
<code>require 'hotcocoa'
include HotCocoa

application do |app|
 win = window :size => [100,50]
 b = button :title => 'Hello'
 b.on_action { puts 'World!' }
 win << b
end
</code>
Caveat - MacRuby is at v0.6 but is generally stable in my limited usage. Not exactly what you asked for but might be worth a look anyway.


What was John's motivation for wanting to stop a man using Jesus' name in Luke 9:49?

Question: Luke 9:49 NLT says John said to Jesus, "Master, we saw someone using your name to cast out demons, but we told him to stop because he isn't in our group."
Answer: The motivation for preventing someone from working in Jesus' name is explicitly stated in the same verse of Luke 9:49, "... because he isn't in our group."
Such an attitude displays a type of elitism - others not part of "our group" are either inferior or incapable to doing our work properly, or are unworthy to do our "exalted" work.  [Little wonder that John was one of the "sons of thunder" Mark 3:17]
The same story is recorded in mark 9 and Matthew Poole comments in Mark 9:38 as follows:
So as John and the rest, forbidding him, seemed to be guilty of two no small errors:

Envying for Christ's sake, as Joshua did for Moses's sake, Numbers 11:28, as John's disciples did for their master's sake, John 3:26,
willing that Christ, and those whom he sent out, should have all the
honour of those miraculous operations.

Limiting the grace of Christ to that congregation which followed Christ, and the twelve; a thing that good men are too prone unto.

How much better was the spirit of Paul, who tells us, Philippians
1:15,18, that although some preached Christ of envy and strife, yet he
rejoiced, and would rejoice, that Christ was preached, whether in
pretence, or in truth. Christ would have all his people of such a
spirit, as not to hinder, but commend, not to envy, but to rejoice in
the doing of good by any, whether they did follow him or did not.
Answer: I prefer a more charitable motivation of John - that he was anxious to keep Jesus' ministry pure and undefiled.
However, Jesus knew the bigger picture. Jesus looked after His own name and potential converts by answering the requests of charlatans/unbelievers who sought good for a person - tho to promote themselves.
Luke 9:49 (KJV) -  And John answered and said, Master, we saw one casting out devils in thy name; and we forbad him, because he followeth not with us. 50 And Jesus said unto him, Forbid him not: for he that is not against us is for us.
For me, the Gnostic "Gospel of Philip" addresses this situation:

If one goes down into the water and comes up without having received anything, and says "I am a Christian," he has borrowed the name at
interest. But if he receives the Holy Spirit, he has the name as a
gift. He who has received a gift does not have to give it back, but of
him who has borrowed it at interest, payment is demanded. This is the
way [it happens to one] when he experiences a mystery.

And the case of one 'borrowing' Jesus'' name at interest is what, to me, explains this passage in Matthew:

Matthew 7:21-23
21 Not every one that saith unto me, Lord, Lord, shall enter into the
kingdom of heaven; but he that doeth the will of my Father which is in
heaven. 22 Many will say to me in that day, Lord, Lord, have we not
prophesied in thy name? and in thy name have cast out devils? and in
thy name done many wonderful works? 23 And then will I profess unto
them, I never knew you: depart from me, ye that work iniquity.

Jesus was well aware of those who were 'borrowing' His name to do good for people (because Jesus was permitting it). Jesus would know the heart of the one seeking healing from a 'preacher' who did not Know Jesus/Holy Spirit, and that the healed person may come to truly believe in Jesus. And the 'false preacher' may actually come to believe also, perhaps.


Cannot find my Pokémon Go account

Question: During today's server mess, I tried to reinstall the app on my iPhone 6s. Then, when rebooting it, it had problems with the Google password and I had to reset it through Google. Now it forced me to start a new Pokémon Go character. How do I find all of my "hard earned" data?
Answer: If you haven't signed in yet then you can sign in with Google again and your "Hard Earned" data should be restored
If you have tried signing in then the short answer is: you don't
All pokemon go game data is stored on a server, if you have logged into your account and your data isn't there, there are two possible problems
1) The servers aren't working properly (You have to wait for it to start working)
2) your data was cleared(most likely as instead of losing data most people just couldn't log in)

Cannot find my Pokémon Go account


Entering passwords at public computers

Question: Sometimes it happens that I have to access my email or some other web service from public machines. Are there any options to make it secure or at least reduce risks to acceptable levels? I am most worried about keyloggers. But even if can copy-paste password from somewhere there are still tools to intercept that. So there is basically no security by definition? One measure I can think about is two factor authentication, but it is not always available (for every service). Other possible measure is to have a server/machine somewhere and access it using some sort of remote access, but this requires considerable resources.
Answer: The usual recommendations about accessing private data from a public computer are:

Don't do it.
Don't do it; instead, use a smartphone or tablet.
If your really must do it, there is no other choice, it would be life-threatening not to read your email, then the following mitigations can be used:

Use two-factor authentication (e.g. with Gmail), the second factor using your phone (presumed safe).
Use One-Time Passwords.
Change your password from a "safe" computer as soon as possible after the access.

The first two mitigations suppose that you can enable these extra authentication methods on your Webmail, and that you have some extra device with you (a phone to send or receive a password by SMS, a generator for one-time passwords, a printed list of your next 20 one-time passwords...). The third mitigation depends on how soon you may access a safe computer, but, of course, if you can use a safe computer within the next five minutes, then why don't read your emails from that safe computer ?

In any case, whatever you do, you are betting that possible attackers won't hijack your connections automatically; instead, that the attackers passively gather passwords and won't do anything else immediately, leaving you with some minutes or hours to "plug holes". There are some attackers who act that way; but there also are other attackers who recognize connections to various Webmail systems and automatically hijack them. So, really, don't do it.
Comment: Yeah, so I finally set up two-factor authentication for GMail, by the way they also have one-time passwords when you can't use the phone. But still I am slightly afraid of loosing phone and passwords and getting cut off from one of my main communication tools.
Comment: @Andrey With Gmail, you can also store a cookie on any considered safe  computer ("Stay signed in"), so that you could recover your account from there, once you lost your phone.
Answer: You could boot the workstation using a live distro or an OS installed on a USB key such as Ubuntu. But be sure there is no hardware keylogger and when you send sensitive information over the network be sure to use encryption using a trusted certificate.
Comment: This is usually not an option for public computers (hotels etc).
Comment: To help provide a little more protection against hardware keyloggers, you could use an on-screen keyboard (although that makes you extremely vulnerable to shoulder surfers).
Comment: @AJMansfield shoulder surfers is manageable threat.
Answer:
Install the PortableApps edition of Firefox to a USB thumb drive. This ensures you are using the latest version of Firefox. I am assuming the public computer you are using is running Windows.
Whichever online email service you are using, e.g. Gmail, turn on two factor authentication. Gmail now lets you use a smartphone app called Google Authenticator to generate a token, in a similar way to an RSA keyfob. This is used whenever accessing your email from a new (previously unseen) computer.
Comment: How is having portable Firefox help me against key loggers?
Comment: @Andrey agreed it is difficult to detect keyloggers without some specialised software (or perhaps use a virtual keyboard?). But at least if you are using the latest version of firefox, this can prevent some other browser vulnerabilities. Many hotels and public computers have out of date browsers running, typically Internet Explorer.
Answer: Use one time passwords.  This requires you to be working on a service that supports one time passwords - I don't know of any, but I don't see any logical reason they could not.
Comment: This is not very helpful recommendation, because as you said, they usually don't have OTPs.

Entering passwords at public computers