Scoreboard for who flips a lever

Question: I have a system where flipping a lever in a room will teleport the player, but I need a scoreboard to test who's actually flipped a lever to run the commands on. If the triggered commands after it only affected '@p' then the person standing closest to the lever would be affected even if they weren't the one who activated it. I tried to use a scoreboard for minecraft.use:minecraft.lever, but that's only for placing levers, not actually activating them. I need some other way to detect which player actually activated the lever.
Comment: There is no scoreboard type for this. I'm not sure if you can completely reliably track it.
Comment: I guess you could use click detection and then raytracing to determine if there is a lever in the direction the player looked, but that's overkill, you would basically have to reprogram the entire "flick lever" mechanic with command blocks. Are there other ways that you could make the player do something, instead of a lever? Could you make them stand on a pressure plate, drop an item, throw a snowball, equip a helmet, etc.? Those are all much easier to track.
Comment: I guess I could use armor stands holding items to form a switch-like figure and then have a detector stand that's punched as an activation, but it seems like a 'using levers' criteria would be a basic criteria...
Comment: I agree, that would be a good feature and you can suggest it by pressing the "leave feedback" button in the game's menu. But for now you probably want to find a different solution, right?
Answer: You don't need a scoreboard in order to actually do it.
1. Place the lever on a block.
2. Place a command block under or behind that block.
3. Set the command to  /tp @p <destination>
Personally, I'd use a button, so that you can just press the button and not have to worry about the next person who comes into the room, but it's up to you. Of course, there is the off-chance that someone will be in front of you when you press the lever or button, but if that ever happens, you can just press the button again.
Unfortunately, /tp @a[scores={lever=1..}] <destination> will not work because there are no criteria for flipping a lever or pushing a button, which means that in order to make it work you'd have to do /scoreboard players add @p lever 1 and /tp @a[scores={lever=1..}] <destination>, but then it's the exact same as the /tp @p command and is ultimately just more complex and is not needed.
Edit: The only problem is that the closest person will be teleported even if they didn't flip the lever, however, there is no workaround for that. You'll just have to make sure that the second room is at least 4 blocks away, and hope that no one is standing closer to the lever than the person who flips it.

Scoreboard for who flips a lever


Emulating a processor's (limited) resources, including clock speed

Question: I would like a software environment in which I can test the speed of my software on hardware with specific resources.  For example, how fast does this program run on an 800MHz x86 with 24 Mb of RAM, when my host hardware is a 3GHz quad core amd64 with 12GB of RAM?  Emulators such as qemu make a great point of running "almost as fast" as the underlying hardware; I would like to make it run slower.  Is there a way to do that?
Comment: I'm not sure about processor speed, but you can definitely control RAM using a VM like VirtualBox, Parallels Desktop, etc.
Comment: Yes, I think memory is not the problem; the problem is speed and other resources.  I'm being inclusive in the phrasing because I want it to be just like the actual hardware, in every respect.  I was sort of hoping there was a ready-to-go solution, but evidently there isn't, so I'll take it piece by piece.
Answer: I have never tried it, but perhaps you could achieve what you want to some extent by combining an emulator like QEMU or VirtualBox on Linux with something like this:
http://cpulimit.sourceforge.net/
If you can limit the CPU time available to the emulator you might be able to simulate the results of execution on a slower computer. Keep in mind, though, that this would only affect the execution speed (or so I hope, anyway).
The CPU instruction set and other system features would remain unchanged. This means that emulating a specific processor accurately would be difficult if not impossible.
In addition, using something like cpulimit, which works using SIGSTOP and SIGCONT to repeatedly stop/restart the emulator process might cause side-effects, such as timing inconsistencies, video display artifacts etc.
Comment: This is interesting; I did not know about cpulimit.  While it isn't a complete solution, it is the most important "missing piece" of what I'm looking for, because I think that memory limits can already be set in most emulators.  I do realize that I wouldn't actually be emulating the other processor (unless qemu specifically emulates, say, a specific member of the x86 family), but this is probably close enough for my purposes.
Comment: *cpulimit* works quite well. OK the guest OS still print the physical cpu speed, but the available speed is set by cpulimit. e.g. `cpulimit -l 5 -s qemu-system-i386 -cpu pentium -m 32 ` does emulate a Pentium 166MHz quite realistically. Thanks @thkala.
Answer: In your emulator, keep a virtual "clock" and increment it appropriately as you execute each instruction. From there you can simply report how long it took in virtual time to execute, or you can have your emulator sleep now and again to keep execution speed roughly where it would be in the target.
Comment: This sounds hard.  I'm not sure whether this would be implemented in the host or guest OS, but I don't think I have the skills to do that either way.
Comment: @Liam: Also, you would not get a "feel" of how slow or fast it is, which would be important if you are evaluating e.g. a desktop application or other interactive software. Multimedia applications would be difficult to test, as well.


Memory Consumption of Process

Question: How can we know which process is using how much memory individually?
Answer: 1 - Using 'ps'
This will show you top 10 process that using the most memory:
ps aux --sort=-%mem | awk 'NR<=10{print $0}'

You can manipulate the 10 if you like.
2 - Using 'top'
when you opened top press m will short process based on memory usage.
Answer: I prefer running  htop  so I can watch as things change over time.
It uses a terminal window to show all the top processes, and automatically updates continually.
You can set it to sort based on CPU (default) or memory.
If it is not on your system it can be easily installed.
Answer: The problem of determining how much memory an individual process consumes is an open one, and mainly based on definition.
The issue in large part arises from shared libraries - how would you calculate the memory usage of a process which uses the same .so as 3 other processes ? would you say it consumes the entire memory the lib is allocated, as it couldn't function without it? would you say it consumes the proportional part (1/4, as there are 3 other procs which use it concurrently - pss)? would you say the process is independent of any libraries it loads in order to run?
Would you include swapped out memory, or only physical ram resident pages? What about multiple threads, or child processes? Forks use the same memory as their parent as long as no change is made - would you count that memory allocation for each process or only for the parent?
This question has been asked and answered here and in other sites many times, so I'll just give a few links and a general conclusion.
First the most quoted article on the subject - https://emilics.com/notebook/enblog/p871.html
A few SO and U&L questions on the same subject:
https://stackoverflow.com/questions/7880784/what-is-rss-and-vsz-in-linux-memory-management
https://stackoverflow.com/questions/118307/a-way-to-determine-a-processs-real-memory-usage-i-e-private-dirty-rss
Correctly determining memory usage in Linux
In conclusion - /prc/[pid]/smap as per the doc

The /proc/PID/smaps is an extension based on maps, showing the memory
  consumption for each of the process's mappings.

Or use the pmap command.

Memory Consumption of Process


Internal energy and $E=mc^2$

Question: If you have an object at rest, and you measure its mass to a really high accuracy.
Does the energy in $E= mc^2$ equal the internal energy in thermodynamics? Does it measure all the kinetic and potential energy contributions inside the body?
Answer: Energy is the zeroth component of the 4-momentum. The 4-momentum is defined as:
$$\tag{1}p_{\mu}=\left(\frac{E}{c},\vec{p}\right)\label{1}$$
The dot product of 4-momentum with itself is:
$$\tag{2}p_{\mu}\cdot p^{\mu}=m^2c^2\Rightarrow \frac{E^2}{c^2}-p^2=m^2c^2\label{2}$$
In particular, if the object is at rest, the spatial component of the 4-momentum is zero and in this case, the mass is given by:
$$\tag{3}m=\frac{E}{c^2}\label{3}$$
In thermodynamics, the internal energy is given by the sum of all kinetic and potential energies of the particles that form the thermodynamic system. If the gas is ideal, the individual gas molecules do not interact, so there is no potential energy to consider in the system. The internal energy of an ideal gas is given only by the kinetic energy of the molecules.
The mass of an elementary particle is a manifestation of potential energy transferred to the particle when it interacts with the Higgs field. For a composite particle, the mass in the equation (\ref{3}) takes into account all of the kinetic and potential energy of the internal components of the particle. For example, the proton is a hadron, which means that it is a composite particle made of quarks and gluons. The protons are made of two up quarks and a down quark. Quarks are elementary particles. The mass of the proton is given by the mass of the quarks and by the QCD binding energy. In fact, most of the mass of the protons comes from the binding energy between the quarks.
Answer: The thermodynamic notion of "internal energy" was developed long before special relativity, so there is no way the historical definition could include the mass energy. Rather the historical definition includes molecular kinetic energy, intermolecular potential energies, and chemical energies.1
And of course that means that for most problems ignoring the mass energy in your definition of the internal energy is just fine.
That said, mass energy is "an energy present in the system in modes that are not apparent at the macroscopic scale" (one possible way of defining the internal energy), so there is no reason you can't count it in there. It just won't be a very interesting term in most cases because it won't change appreciably between the initial and final states (and you have to watch out for double counting). You could ask if it make sense to consider in in the case of, say the URCA process in neutron star cooling, but even there the matter is usually modeled in terms of chemical potentials.2

1 One could argue that chemical energies manifest as changes in mass, and it wouldn't be wrong but it also wouldn't be very useful.
2 This is basically the same game as saying that chemical energy is distinct from mass energy, but here it is less obvious that thinking in terms of chemical potential is a better than thinking in terms of mass energy.

Internal energy and $E=mc^2$


Looking for a customized filter webpart for sharepoint online

Question: the filter webpart is too weak in sharepoint online.  I am looking for a customized filter webpart for sharepoint online.  I tried to find the vendors but they all can only run on server, not sharepoint online.  Do you know any vendors can provide advanced filter webpart for sharepoint online?
Comment: Can you explain what you want to accomplish?
Answer: thanks Benny,
http://www.sharepoint-webparts.net/ListFilterWebpart.aspx
something like this.  it has demo on it. you can try it out.  I am looking for company that can help me to create such webpart on sharepoint online.
Gary


If particles get mass from the Higgs field, why do we not see Brownian motion?

Question: If an electron would otherwise be moving at the speed of light if it weren't constantly interacting with the Higgs Field, how is conservation of momentum preserved if it's constantly bouncing off of virtual Higgs Bosons? Why does this not lead to particles like electrons experiencing Brownian motion from all the random collisions?
Answer: The cartoon of particles getting their mass by repeatedly bumping into Higgs field is truly misleading--to the extent that it has led the OP to ask this question (which to most high energy physicists sounds "silly").
Here, I can offer another slightly better cartoon that addresses the conceptual issue:
Imagine the Higgs field as a large collection of closely-spaced stumps jutting out of the surface of a vast body of water. Water waves (representing the quantum massless particles in this analogy) attempting to traverse the area with stumps will be multiply scattered, causing them to be "slowed down" which looks like these waves corresponding to particles have acquired a mass.  Since we have have replaced the massless particles with waves, this cartoon offers a "smoother" picture which makes it easier to discard the notion that any Brownian motion would occur.
Please keep in mind that this is just another cartoon: every analogy that highlights a particular feature (in this case, the lack of any Brownian motion in the Higgs mechanism) always falls short in something else (the loss of wave packet localization due to the numerous haphazard scatterings, and the apparent loss of momentum conservation as the waves are scattered).
In reality, the waves undergo only forward-coherent scattering with the Higgs field.  The "coherent" aspect of scattering holds the wave packet together.  The "forward" scattering aspect means that the wave number (i.e. the momentum) remains unchanged.  It works just like how glass changes the dispersion relation of light waves due to forward coherent scattering with the glass molecules.
None of this is particularly tied to the fact that it's a left/right chirality flipping interaction.
Comment: I honestly don't think it's a silly question,  that's quite unfair to the OP
Comment: no, unfair to the OP
Comment: I like your analogy with the forward scattering, it is actually a very good one, especially the comment on the forward scattering are nice (with a bit of stretch one could think of the 1->1 scattering amplitude as the corrections to the propagator and m). But I just slightly disagree with the very last comment: it seems  precisely because it is a left-right chiral flipping interaction that the dispersion relation for the wave is changed more dramatically than, to follow your analogy,  just changing the refraction index. To go from $\omega=k$ to $\omega=\sqrt{k^2+m^2}$ one really needs those.
Comment: @innisfree did you mean unfair to the *cartoon*?
Comment: @innisfree I don't know how calling the question silly is unfair to the OP.  The problem lies with the cartoon.  Not with the OP.
Comment: I also honestly don't think that it's a silly question. By the way, stumps in a water do experience Brownian motion.
Answer: That's an interesting question. As @JgL says, particles  that interact with the Higgs field (e.g. electrons) experience a drag, which makes them massive. You wonder whether these interactions could impart momentum to the electron.
Let's extend the analogy to a ball being thrown through water. If the water is sloshing about, as well as providing drag, the waves could impart net momenta on the ball, making it deviate from a straight line. This is only an analogy; there are aspects of drag (e.g. energy loss as ball slows down) that is quite unlike the Higgs field.
However, the part of the Higgs field that provides drag, denoted by $v$, resulting in masses, is homogeneous (i.e. unchanging) in space and time:
$$
\text{Higgs field}(x) = h(x) + v
$$
That means there is no sloshing or waves that impart momentum on the electron. The homogeneous part of the Higgs field is like perfectly still water that provides drag and nothing else. The other part of the Higgs field, $h(x$), results in physical Higgs bosons.
The physical Higgs bosons, $h(x)$, could indeed impart momenta; however, this would be nothing but collisions (elastic scattering) between Higgs bosons and electrons. As there is no big source of background Higgs bosons, the probability of any interactions is negligible, and it doesn't cause the electron to deviate from a straight line.
Finally, concerning the effects virtual Higgs bosons (as opposed to physical Higgs bosons considered above) on the motion of an electron. Virtual Higgs bosons cannot be present in the initial or final states. We begin with an electron and end with a electron. By conservation of momentum, it cannot have changed momentum, i.e. it does not deviate from a straight line due to virtual Higgs bosons.
Comment: All I can get are people trying give poor analogies and that the real interaction is waves in fields. Can no one give me a good picture of what the interaction between an electron and the Higgs field is? We have such good representations for double slit interference http://images.slideplayer.com/13/3866150/slides/slide_2.jpg or for refraction http://file2.answcdn.com/answ-cld/image/upload/w_760,c_fill,g_faces:center,fl_lossy,q_60/v1401366713/jc4cflstuchmhsyqh42e.gif What's conceptually going on with electron-higgs field scattering?
Comment: The drag analogy makes no sense to me. To me drag is friction which would stall an electron to a stop. I'd tend to think it'd be more like a photon in glass, except that, as I understand it, the reason the photon is slower is because it spends a fractions of a second absorbed by an electron before it is reemitted. But in the case of the Higgs field, an electron is clearly not absorbed, only interacting with the field. What I need is a better conceptual description of the interaction with the field.
Comment: @Shufflepants : a photon in glass has a slight [effective mass](https://www.google.co.uk/#q=photon+effective+mass) because it's moving at less than c. Because it's interacting with the glass. When you catch a photon in a mirror-box, then whilst it's going round and round inside the box, it's effectively at rest in aggregate with respect to you. Then all of its energy-momentum is effective as mass. The mass of the system is increased. When you open the box it's a radiating body that loses mass.
Answer: The Higgs field is a field that permeates all of space (very much like the electromagnetic field), Higgs bosons are 'excitations' of this field. In some contexts, you can roughly think of these excitations as ripples or waves in the field, though this is a bit of a sloppy analogy. I would say these 'excitations' have a much richer structure than just being simple waves, which allows them to also behave as what we normally think of as particles.
When the Higgs field interacts with other elementary fields, the excitations of these other elementary fields (which you can think of as other elementary particles) experience what you can think of as 'drag', because due to their interaction with the Higgs field they have to 'plow through' this Higgs field while they are moving through space. This is the typical way the Higgs field gives what we normally think of as 'mass' to e.g. electrons (the excitations fo the electron field). If this interaction would not be there, the excitations of the electron field would be free to move through space at the speed of light.
(Sometimes people prefer to explain Quantum Field Theory in terms of particles to avoid having to mention 'excitations' or 'fields'. When they do this they often talk about 'virtual particles' where they are actually talking about interactions between fields. This, unfortunately is a problem that arises often when you try to explain things by analogy. Your explanation will only seem to make sense as far as your analogy holds. )
Edit: If you know some electromagnetism you can maybe try to play around with two classical fields $\phi$ and $\chi$ who's interaction is described by the Lagrangian
$$
\mathcal{L} = \partial_\mu \phi \partial^\mu \phi + \partial_\mu \chi \partial^\mu \chi + \phi^2 \chi^2
$$
If the coupling term $\phi^2 \chi^2$ wasn't there, waves in the two fields could freely propagate at the speed of light. The behaviour of both fields would be described by a differential equation of the form
$$
\frac{1}{c^2}\frac{\partial^2 \phi}{\partial t^2} = \nabla^2 \phi
$$
The coupling $\phi^2 \chi^2$ causes waves in the $\phi$ field to interact with the $\chi$ field. Waves in the $\phi$ field will as a result experience some form of 'drag' (not in terms of friction, but as a consequence of the way the fields interact with each other). When we turn this coupling on, the above differential equation that describes the behaviour of the $\phi$ field will be changed, an be of the form
$$
\frac{1}{c^2}\frac{\partial^2 \phi}{\partial t^2} = \nabla^2 \phi - \chi^2 \phi
$$
The amplitude of the $\chi$ field at a point $x_i$ now behaves as an effective mass that is experienced by the waves in the $\phi$ field at that point. This is analogous to the way the Yukawa coupling of the Higgs field gives an effective mass to many other fundamental fields.
Comment: "Your explanation will only seem to make sense as far as your analogy holds."
And I'm looking for more detailed answer than the "drag" analogy provides. My physics intuition reads "drag" as friction that would slow a massive particle to a stop. See the comments on the main post by @QuantumDot for something closer to what I'm looking for. I'd compile it into an answer myself, but I've only barely got a conceptual grasp on it, and I'm sure I'd butcher it. And it probably needs some details filled in.
Comment: I've read a ton of the super layman's descriptions and have tried to read some that go into some of the math, and that's what's lead to my confusion. I've read a lot of physics, but my math background for quantum mechanics is lacking. Looking for something in between that explains the concepts accurately without needing to fully understand all the math involved.
Comment: The 'drag' is a fundamental interaction between the Higgs field and the other fields involved. You can compare it in that sense with electric charge.
     Why are some particles electrically charged? Because they interact with the electromagnetic field. It is one of the basic assumptions of the theory in order to fit our observations. The different fields and their interactions are the assumptions - carefully chosen to fit our observations - on which the theory is based. Particles are less fundamental within the framework of the Standard Model, they are excitations of these fields.
Comment: @Shufflepants - ' Looking for something in between that explains the concepts accurately without needing to fully understand all the math involved.' - This may be a problem. One theme in the answers is that analogies don't really give an accurate picture. There is no royal road to physics.
Answer:
If an electron would otherwise be moving at the speed of light if it weren't constantly interacting with the Higgs Field,

Here is the first misunderstanding , the electron is not "interacting" with the Higgs field  in terms of exchanging energy or at least momentum, which is what "interaction" means classically and quantum mechanically.
Quantum mechanical interactions are represented by interaction vertices in Feynman diagrams which have a definite coupling constant of interaction and describe the integral that has to be evaluated to get crossections and lifetimes. The acquisition of mass happens at the wave function level, before probabilities for interactions are calculable.
The acquisition of mass for the massless particles happens below  a specific  energy when the electroweak symmetry breaks and from then on all electrons acquire a fixed mass. In the present standard model of the universe that happened at 10^-10 seconds after the Big Bang., and the average particle energy was of the order of 100GeV.

how is conservation of momentum preserved if it's constantly bouncing off of virtual Higgs Bosons?

It is not bouncing off Higgs bosons, it is just the the units of reference of the vacuum have changed, there is a non zero vacuum expectation value for the Higgs field, whereas the electron field and all the other particle fields have zero expectation value if no particle is there, the Higgs field has a value and that imposes constraints on all the other fields, not interactions.

Why does this not lead to particles like electrons experiencing Brownian motion from all the random collisions?

There are no collisions, no interactions of the classical type. In terms of wavefunctions, the wavefunction of the electron is superposed on the Higgs field. An electron path generated with creation and annihilation operators on the electron field gets a fixed non zero  mass when the Higgs field has the vacuum expectation value it has after symmetry breaking (246GeV), than before symmetry breaking when the electron mass was zero and the Higgs vev was zero.
Answer:
If particles get mass from the Higgs field, why do we not see Brownian motion?

Because they don't.

If an electron would otherwise be moving at the speed of light if it weren't constantly interacting with the Higgs Field

It isn't. We make electrons and positrons in gamma-gamma pair production. We start with photons moving at the speed of light. These photons interact with each other, such that each changes direction and starts interacting with itself. Then it continually changes direction, in a chiral spin ½ fashion. Only then we don't call it a photon any more. We call it an electron. Or a positron if it has the opposite chirality. And as Einstein said, the mass of a body is a measure of its energy-content. Not the measure of its interaction with some field. See https://arxiv.org/abs/1508.06478 by van der Mark and (not the Nobel) 't Hooft. If you catch a massless photon in a mirror-box, you increase the mass of that system. When you open the box it's a radiating body that loses mass.

how is conservation of momentum preserved if it's constantly bouncing off of virtual Higgs Bosons?

Momentum is preserved because it isn't bouncing off virtual Higgs bosons. See this answer. Virtual particles only exist in the mathematics of the model.

Why does this not lead to particles like electrons experiencing Brownian motion from all the random collisions?

Because it's a fairy tale. See page 174 of A Zeptospace Odyssey where CERN physicist Gian Guidice says 98% of proton mass results from E=mc², whilst electromagnetic effects and the Higgs mechanism account for 1% each.

As for whether that 1% is correct, well. Don't forget that we've never ever seen a free quark. However we have seen low-energy proton-antiproton annihilation to gamma photons.

Image credit CSIRO, see The Big Bang & the Standard Model of the Universe
I think the best way to think of this is that it's like opening one box with another. Then each is a radiating body losing mass. All of it. And then that box isn't there any more.


Relationships between tables

Question:
I have 2 birds per pair IE "Maleringnumber"and "FenaleRingNumber" in tblPair
If I open a Form for tblBird I want to see all fields in the table AS WELL as "PairedStatus" of the male and the female. The tables in the pic are in a query. How do I link the tblBird and the tblPair
Answer: Your tblPair (Please tell me this is a classroom assignment. I would shutter to think business operational databases had tables names prepended with "tbl"!) is almost a good intersection table which is what is normally used to connect two entities in a relationship like the one you describe.
A "pair" is made up of two Birds, one male and one female. The dates when the pairing was made and ended and the cage the pair are located are tracked.
Here are some of my impressions of your schema. Some are outside the scope of your question, but may affect the ultimate resolution of that question.
You seem to have simplified the schema to include just data that may illustrate the relationship you are asking about. That is good, but there doesn't seem to be any purpose for RingNumber. And RingNumber would appear to be unique so why is there a RingNumberID? Did you simplify away their purpose? So let's just use BirdID for the duration and stipulate that it is an integer.
Let's also simplify the SexID as a simple char(1) field containing either 'M' or 'F'. Here is the new Birds table:
create table Birds(
  ID         int       auto_generate primary key,
  SexID      char( 1 ) check( SexID in( 'F', 'M' )),
  SpecieID   int       not null references Species( ID ),
  AddDate    date      not null, -- Date bird was added to database
  constraint UQ_Birds_FKAnchor unique( ID, SexID, SpecieID )
);

The CageNumber, RemovalDate and RemovalReason are not necessary for this discussion and probably shouldn't be in this table anyway.
What you want is a way to relate a male bird with a female bird of, I assume, the same species. This should be done in such a way to make it impossible to pair two male or two female birds or to include a bird in a new pairing if already in an existing pairing.
This could be done with an intersection table.
create table Pairs(
    MaleID     int  not null
    MaleSex    char( 1 ) check( MaleSex = 'M' ),
    FemaleID   int  not null,
    FemaleSex  char( 1 ) check( FemaleSex = 'F' ),
    SpecieID   int not null,
    Status     char( 1 ),
    PairedDate date default( NOW ),
    CageNumber int  not null,
    constraint UQ_Pairs_Male unique( MaleID ),
    constraint UQ_Pairs_Female unique( FemaleID ),
    constraint FK_Pairs_MaleBird foreign key( MaleID, MaleSex, SpecieID )
      references Birds( ID, SexID, SpecieID ),
    constraint FK_Pairs_FemaleBird foreign key( FemaleID, FemaleSex, SpecieID )
      references Birds( ID, SexID, SpecieID )
);

As you can see, very close to your existing table. You don't show the constraints of your table, and those are critical.
The first field must contain the ID of a bird defined as male ('M') in the Birds table because the second field may only contain an 'M' value. (This is also why there is a unique constraint which includes the ID field even though ID is unique all by itself.) So also with the third and fourth fields defining a female bird. The unique constraints guarantee no bird may be in more than one pairing and each pairing must be with the same species.
It looks like you want to be able to end the pairing, thus making the birds available for other pairing. In that case, add the Status field to the unique constraints. This will make it possible to have the same bird in different relationships but only once for each value of Status. I assume Status is something like "Ongoing" and "SoOverEachOther". But there could be more, like "GettingToKnow", "JustFriends", "HeadOverHeels" and so forth. This works either way.
This table defines a relationship between a male and a female bird of the same species. Each attribute in this table must define the relationship itself. Thus the single species identifier which applies to each bird, the date the pairing took place and the CageNumber identifying the honeymoon suite.
To display each pair, join the Pairs table twice with the Birds table to get the details of each bird. Rather simple really.

Relationships between tables


ArcGIS Pro: Definition Query > Create new definition query in SQL

Question: I have one point type feature class and another feature class with a polygon.
Using ArcGIS Pro, in the feature class type point > Definition Query > create new definition query in SQL.
I want as a result the points that are inside that polygon.
Only SQL code will be used.
Comment: Welcome to GIS SE. As a new user, please tale the [Tour]. Your Question is not particularly clear. You can only have a spatial constraint in an RDBMS which supports spatial operators (not shapefile or file geodatabase), but if the geographic boundary is encoded in a attribute, the SQL would be very basic.
Comment: What kind of geodatabase? Oracle 18c? File geodatabase?
Answer: Definition queries work with attributes so your points need to be attributed with the polygon ID. You achieve that by using the Spatial Join tool then you can apply the definition query.
But if what you want is a "quick a dirt technique" for hiding all points outside your polygon then visually you can use the clipping properties of the Map.
Before:

Setting up visual clipping:

Results:

Be aware such data is just being visually clipped so if you do any geoprocessing then all points would be included.
Answer: With Field Calculator you can set a specific attribute using Select by Location between the polygon and the point.
Then set your DQuery using this new attribute.
If you don't want to make set a new attribute, you can right click on the layer with the selected points > selection > create new layer w/ selected features.
Visual Clipping is also a good option.


How do I create a smooth slope to join 2 planes of different elevation?

Question: I'm trying to model a slope to connect 2 different planes together as shown here, but I'm not sure how to do it. I've tried using the sculpt tool but it did not give me the desired effect. This is what I want the slope to look like. How should I go about modelling this?
Answer: To create such a slope is fairly simple.
Create a row of verities at the top and bottom of the slope. Make sure that the rows have the same amount of verities. Then you can bridge the gap.
If you want to create a bulge/indent, add a few edge loops running down the slope. next using proportional editing o, drag the center edge loop up or down. Using these techniques you can mold you slope. I would recommend sculpting for fine tuning.
Answer: I would use the Bsurfaces Add Surface feature.
The process is as follows.

Add any object, enter edit mode and delete all the vertices.
Place the 3D Cursor where you want the surface to start. Place the 3D cursor in a view that is 90° from the view you will be drawing the strokes in. (all following steps will be with the cursor placed from the top view and drawing a surface along the Y axis)
Go to the front view NumPad 1 hold D and draw a grease pencil stroke at the height you want the surface to start at.
Go back to the top view NumPad 7 and move the 3D Cursor down along the Y axis.
Back in the front view draw a grease pencil stroke lower then the first stroke. (important draw all the strokes in the same direction.)
Repeat steps 4 and 5, far as many steps you need for your surface. (at this point you could rotate the view to get an idea of what the surface will look like.)
in the tools panel (T) Tools > Bsurfaces > Add Surface. That is about it, you can adjust the options to fine tune how many loops will be created.

Note if you have a set vertex count you want to start from (bridge to and from) you can start by selecting the vertices, and then drawing the strokes. The selected row of vertices will be the starting point of the surface.
Some great videos from the author of the addon on using Bsurfaces on vimeo.
Also the Bsurfaces quick guide a pdf.


How to catch an error that isn't even caught by the OnException override?

Question: So we have a base controller we are using and it contains an override for OnException that logs the error to our bug tracking tool. However I noticed that some errors never make it, and I'm wondering if it is somehow silly to expect an application to log all it's own errors when itself is the thing that is having an error, which could cause some errors never to be caught.. ? Either way what is the best solution, or should OnException always be expected to happen? Should I be putting some tool on Windows Server to log the errors instead of within the app itself?
Answer: I don't think I've ever seen an error that wasn't trappable at some point.  I have application level logging also and like you i've implemented a base controller.
my base controller doesn't do any logging.  instead i created a custom action filter with which i decorate my controllers and actions with and it does all the logging.
i also, in the global.asax, added code to the Application_Error event that does a bit of logging and also calls an error controller to handle the actual error.
I hope this in some way helps you.  If you want any of the code i've mentioned then add a comment to this answer and i shall provide.  it's not a lot of code either.
Answer: The Controller.OnException event can only catch events that are thrown in the scope of an executing Controller.  There are events that happen before an http request is mapped to a controller and the OnException event will not capture these events.  For example, if you have a controller factory that maps the RequestContext to a particular controller, than an exception thrown here is not in the scope of a Controller.
You should implement a "fail safe" exception handler in the global.asax.Application_Error event.


Single exit of function uses goto

Question: Apropos of What kind of bugs do "goto" statements lead to? Are there any historically significant examples?
I am not that learned in C, and to me the puzzle is that a single exit of a function is mandatory, but a goto is considered bad. Often one has to exit a function on a error condition, and then use a goto to the exit point.
Also, I am fond of using protothreads. Is that not a form of goto?
Comment: Doesn't the [highest voted answer](http://softwareengineering.stackexchange.com/a/334419/)'s approaches answer your question? Also remember that it is legitimate to extract chunks of code into functions, even if those functions would have only one caller, because making the control flow more obvious and verifiable is a legitimate concern on its own.
Comment: Possible duplicate of [Where did the notion of "one return only" come from?](http://softwareengineering.stackexchange.com/questions/118703/where-did-the-notion-of-one-return-only-come-from)
Comment: Yes,rwong, it does answer most of the questions, and I am happy to use a goto the return statement to exit early.
Then the question of entering a function at different points comes up, and protothreads does serve a very useful purpose, entering a function at different points, and exiting at different points.
I don't see anybody arguing against it, so I accept that that is also not wrong.
Thank you
Comment: `goto cleanup` is fine in C because it lacks other cleanup mechanisms (`try`...`finally`, RAII, etc.).
Answer: Languages are full of gotos. Only thing is, they've been abstracted away to make the use of them safer. A function with a return value is an abstracted goto, a while loop is an abstracted goto, every conditional statement is an abstracted goto.
Just take a look at the CPU stack and you will see lots of jmp instructions, which actually are gotos.
So in short: they're still there but abstracted to make them safer to use.
Comment: Dankie Pieter
And nobody comments on the use of protothreads that goto different entry points?
Answer: If we take a look at the protothread we see that the macro is not creating a goto but using a switch-case statement. So protothreads are not goto.
The protothread does create multiple exit points. A single exit point of a function is not mandatory but it's a good rule of thumb that when the function requires multiple exit points or many indentations you can assume that the function you've written is too large. You have to consider both because you can avoid indentation by using many exit points or you can have one exit points by writing complex if-statements, loops and using gotos. Neither of those are good.
The reason why goto is bad is not because of exit points. If we take a look at the while or for loop we see that all the jumpers we're talking about is taking out of the programmer's hands. If wanted or not the programmer has no control over these hidden jumpers, it is placed and dynamically indexed for the programmer during compilation. If we take a look at an if-statement, which is a jump ahead instruction, we'll see the same thing. Nowhere in the code is any goto defined by the programmer but created by the language. This is the biggest reason why goto are considered harmful. Gotos are breaking the design of the programming language with the possibility breaking the program while knowing that the programming language is designed to take care of it flawlessly.

Single exit of function uses goto


Text Editor with FTP

Question: I'm new to Ubuntu. Is there a text editor with built in FTP out there that anyone can recommend to me? I am trying to use Bluefish right now.
Comment: You can use an FTP client like FileZilla that has the support of editing/viewing remote files with you local editor. Saved modification will then be uploaded to the server through FTP of course.
Comment: Is there anything that is like PSPad on Windows where it is already integrated into the Text Editor?
Answer: Gedit will see any saved bookmarks you make in Nautilus. So in Nautilus you can File>Connect to Server   and then Bookmark that location once it opens.
Gedit will see those bookmarks and can open right to your files. You can also install some additional plugins and options for Gedit to show line numbers, snippets and find/replace.
Works great.

Text Editor with FTP


How to determine whether logo design will require illustrative skills

Question: A new potential client has reached out to me to design a logo that features a mascot. This mascot would need to poised in different positions and needs to be animated. Does this sound more like a job for an illustrator?
Comment: Sounds like they need an animator. Going rate for character animation is a bit different than graphic design, just saying.
Comment: Based *purely* on your 2 sentences here.. yes it'll require some form of illustrative skill.
Comment: even based on the first sentence alone: you need to _draw_ a mascot...
Comment: "logo" "be animated". I think this should be a pass as clent might not be fully aware of what they're asking for,
Comment: Based on this information alone it's impossible to say what skill sets are required. What does the mascot look like? What mediums will this need to be created in? What art style is it created in?
Comment: I'd more clarification. Does their mascot already exist or does it need to be designed along with the logo? 2D or 3D?

Potentially Adobe Illustrator + Adobe Character Animator could fulfill this need based on how comfortable you are designing a 2D character.
Answer: When in doubt, ask for references or provide references (actual photos of existing 'mascot' logos, think Michelin, Jaguar, WWF, etc), to help yourself and the client identify the type of work needed, then figure out if that's something you can actually do.
This is the typical case of a vague briefing that only reveals itself in full after the terms (timeline, payment) have been already established.
Do not take the job until you completely understand what the job is about.
Comment: This is good sound advice, thanks Lucian.
Answer: The answer is that it will either require an illustrator (capable of performing a limited number of poses and familiar with how 2d animations are executed) or a 3d artist that can create a model (also familiar with how 3d animations are executed.
For character animations, I would first inquire with the client to determine just what sort of form these animations will take.  If there's numerous rotations involved and it's not just flat directional stuff -- Then definitely get the mascot created in 3d.
If the artist is unfamiliar with how to execute animations -- Then you will need an animator as well.  For myself, when I'm working on games and need to execute character animations, I've turned to Spline from Esoteric Software.  It's a very popular package used outside of Unity -- Largely for how simple it is to use and create animation data that can be brought into Unity.
Here's a link to their site: https://esotericsoftware.com/spine-purchase
If you're up to the challenge and have a good sense of motion, you could have the character developed and tackle the animations yourself through Spline or a similar product (there's also Adobe Animate).  For me, I really got into spline in no time flat -- but I also have a long history with Flash.
Comment: @ZachSaucier animation is tedious no matter what. Many people equate tedoiusness as hard but its not. Just a lot of work. Since all animation is tedious all animation software including 3D have a focus that is alien to people who are not a history of making tools to make their life easier.
Comment: "If there's numerous rotations involved and it's not just flat directional stuff -- Then definitely get the mascot created in 3d." - Depending on the art style and skill set of the creator, doing multiple 2d versions may very well be easier. A lot of 3D animation isn't that easy :)
Comment: @ZachSaucier -- I completely agree with joojaa.  2D animation is actually a lot harder to pull off these days, because you have very defined limits to what you can do -- And it is really easy to come off as cheese.  With a 3D Model in hand, there's really no limit to what can be accomplished.

With the right software, however, it is really easy to get to the end game in short order.  The stuff I'm seeing today on the market is really quite amazing and has a short learning curve.  Back in the day, it started with Poser and everything in that app was just plain cheesy. :(
Comment: 2Advanced, thanks for your detailed reply, much appreciated!


how to install windows service (Kerio vpn client service) correctly?

Question: I'm try to install service from C# and using ServiceTools.dll (Source - Dll - Refer) and also using from InstallUtil.exe but service is not installed or don't start after install !

when i use from InstallUtil.exe : (32bit and 64bit / with .net 1-...-4)
use from this commend :

InstallUtil "Service File Path"
"C:\Windows\Microsoft.NET\Framework64\v4.0.303\InstallUtil.exe"
  "C:\Program Files (x86)\Kerio\VPN Client\kvpncsvc.exe"

But i get following  error :

Exception occurred while initializing the installation:
  System.BadImageFormatException: Could not load file or assembly
  'file:///C:\Prog ram Files (x86)\Kerio\VPN Client\kvpncsvc.exe' or one
  of its dependencies. The m odule was expected to contain an assembly
  manifest..

and also if install service with ServiceTools.dll
use from this commend :
ServiceInstaller.InstallAndStart("Service Name", "Service Display Name", "Service File Path");
ServiceInstaller.InstallAndStart("KrSVC", "Krio service", "C:\Program Files (x86)\Kerio\VPN Client\kvpncsvc.exe");

It's work and service installed but Service don't start and  i get following  error :
Windows could not start the KrSVC service on a local computer
Error 1053: The service did not respond to the start or control request in a timely fashion

Note :

when i install kerio vpn client sevice correctly installed and
worked and also can start /stop/etc...
For install service first of all i remove kerio vpn client or unistall kvpncsvc service
kvpncsvc have a service however can start with user interface
and if double click on it it's open like desktop app.
and also i was checked InstallUtil 32 bit and 64 bit from .net 2 or etc..
kerio vpn client is her : 32bit - 64bit - site

Now i want to know how can i install or start this service ?
Answer: I had the same problem.
Resolution:
1. Enable Keiro Virtual  Network Adapter (Control Panel\Network and Internet\Network Connections)
2. Start Keiro VPN CLient Service
3. Run Keiro VPN Client
Answer: Make sure you have admin rights on the system. Start Command window as administrator.
Make sure all the dependencies are in same folder.


What is the inverse $z$-transform of $\frac{z}{z+1}$?

Question: When it's $\frac z{z-1}$ the answer in the discrete domain can be found in the general tables = $u[n]$, but for $\frac z{z+1}$ I can't find the rule. Some examples say it's $(−1)^nu[n] $ or $a^k\cos(k\pi)$, which one is it and why?
Answer: To be well defined, the $z$ transform must include the ROC (radius of convergence). You can see that in this example.
You can write:
$$\frac{z}{z+1}=\frac{1}{1+z^{-1}}=\sum_{n=0}^{\infty}(-z^{-1})^n  \tag{1}$$
which is the $Z$ transform of $(−1)^nu[n]$
but also you can write
$$\frac{z}{z+1}=z \frac{1}{1+z}=z \sum_{m=0}^{\infty}(-z)^m = \sum_{m=0}^{\infty} (-1)^m z^{m+1} \tag{2}$$
which, setting $n=-(m+1)$ gives
$$\sum_{n=-\infty}^{-1} (-1)^{n+1} z^{-n}$$
which is is $Z$ transform of $(-1)^{n+1}u(-n+1)$
So which one is the correct inverse transform? It depends on the ROC. Eq $(1)$ only converges when $|z^{-1}|<1$ or $|z|>1$ (outside the unit circle), while eq $(2)$ only converges for $|z|<1$
Hence, to do the anti-transform it's not enough to have the $Z$ transform as a mere formula, you need to have also the ROC. Or at least the data of the original sequence being causal or anticausal.
Answer: $$\frac{z}{z+1}=\frac{1}{1-(-z^{-1})}=\sum_{n=0}^{\infty}(-z^{-1})^n=\sum_{n=0}^{\infty}(-1)^nz^{-n}=\mathcal{Z}\{(-1)^nu[n]\},\quad |z|>1$$


How can I test that I am correctly setting a new ntp server?

Question: I have a config script that is configuring the ntp server of a machine (which is running Ubuntu 14.04) by stripping lines matching ^server .* from /etc/ntp.conf and adding a new line server new.ntp.address. Now I want to test that this change is valid and working.
My initial thought was to have new.ntp.address be my desktop (which is running ntp) and set my desktop's time to something new, but after some reading I noticed that ntp will reject all but slight changes to the current time. How can I verify that my change to the ntp server config is correct and working?
Per this question, I ran sudo ntpdate -dv <my ip address> from the client machine I was configuring. The output showed it did not find an npt server because the strata was too high:
$ sudo ntpdate -dv 192.168.12.125
23 Sep 16:30:37 ntpdate[26673]: ntpdate firstname.lastname@example.com Wed Oct  9 19:08:07 UTC 2013 (1)
Looking for host 192.168.12.125 and service ntp
host found : 192.168.12.125
transmit(192.168.12.125)
receive(192.168.12.125)
transmit(192.168.12.125)
receive(192.168.12.125)
transmit(192.168.12.125)
receive(192.168.12.125)
transmit(192.168.12.125)
receive(192.168.12.125)
192.168.12.125: Server dropped: strata too high
server 192.168.12.125, port 123
stratum 16, precision -23, leap 11, trust 000
refid [192.168.12.125], delay 0.02586, dispersion 0.00011
transmitted 4, in filter 4
reference time:    00000000.00000000  Sun, Dec 31 1899 16:00:00.000
originate timestamp: d7cc8124.166c9d3f  Tue, Sep 23 2014 16:30:44.087
transmit timestamp:  d7cc8124.16e4ba7a  Tue, Sep 23 2014 16:30:44.089
filter delay:  0.02586  0.02736  0.02599  0.02586
         0.00000  0.00000  0.00000  0.00000
filter offset: -0.00204 -0.00129 -0.00211 -0.00204
         0.000000 0.000000 0.000000 0.000000
delay 0.02586, dispersion 0.00011
offset -0.002042

23 Sep 16:30:44 ntpdate[26673]: no server suitable for synchronization found

EDIT1: I used these instructions to fudge the strata on my desktop, which is acting as the ntp server. Now, when I run sudo ntpdate <my ntp server address> from the client machine it updates its time (in my case I had to set a fairly small but noticeable change to the server time to witness this working, about 55 seconds skew is what I introduced on my desktop). However, when I start ntp on the client again and try to see it automatically pick up the changes, I'm unable to see it adjust the clock time even though I waited several minutes after starting ntp (it seemed from googling that the standard polling frequency is 60 seconds). How can I troubleshoot this?
EDIT2: Eventually the clocks did synchronize, but it took significantly longer than a minute. I think this suffices to verify my experiment, but I'm still interested in if there is a better way.
Answer: The commands ntpstat and ntpq -p off-hand
(from mobile so without sample output for now)


Issue sending workflow email, to an email enabled AD security group

Question: I have an issue sending workflow email, to an email enabled AD security group. I sandwiched the AD group inside a SharePoint group and give permission in the site(this is the usual way to send email to individuals within the AD group). Why the people in the AD couldn't receive the email( I also added my self as individual and able to gate the email)
Answer: It could be a restrictions in exchange server which prevents SharePoint to send an  email to this AD Security group, need to check the Delivery management for this group and allow SharePoint to send messages to it.
Answer: I can reproduce your issue in SharePoint Online.
It's by default that the members of security group cannot receive the email.
We need to create the Mail-enabled security group and add the users to it.


How to get out of browser to work on a silverlight application?

Question: I have a silverlight application and i have already checked the box that enables OOB. When i run the program from the IDE and i right click on the browser, i do not get an option to install the application. Instead i have an option to remove the application.
I would like to get an icon that other users can just click on in order to run the application. Is there a reason why i do not have the option to install the application when i run my program?
If it matters i am using silverlight 5.
thanks!
Answer: You have the option to remove the application means you have installed out of browser in the past, after clicking "remove the application" you will have the option to install the application locally.
Comment: beneath the "enable OOB" checkbox there is out-of-broswer settings button, click it to bring the settings window, make sure you have "show install menu" checked
Comment: I tried this, but when i click "remove the application" and i run the program again i - once again - do not have the option to install the application locally


Attainable bounds for correlations for Gamma random variables?

Question: I'd need to know if it's possible to reach [-1,1] bounds with Pearson's correlation with a generic pair of Gamma random variables. The problem as you may imagine is there's no known closed form for the quantile function (at least to my knowledge).
Is there a solution? Even a research paper could be enough, actually I haven't been finding anything.
Comment: Are both variables drawn from the same Gamma distributions, or are you asking about (say) a Gamma and a Gaussian?
Comment: I was trying to replicate this reasoning...
http://stats.stackexchange.com/questions/66775/attainable-correlations-for-exponential-random-variables/66776#66776

ps a generic pair of Gamma variables
Comment: How would the quantile function be related to bounds on correlation coefficients?
Comment: An exponential variate is a $\Gamma(1)$ variable, so the answer you reference applies to any two Gamma variables with the *same* shape parameters both equal to $1$. It generalizes easily to other common shape parameter values. Although formulae may be difficult to obtain, two things can immediately be deduced from basic properties of Gamma variables (there is a one-to-one relationship between shape and skewness) and of correlation: the lower bound of $-1$ cannot be attained for different variables and the upper bound can be attained only when they have the same shape parameter.
Answer: If $X$ and $Y$ are perfectly correlated random variables (the Pearson
correlation coefficient $\rho$ has value $+1$ or $-1$), then it must be that $Y = \rho aX + b = \pm aX+b$ where $a >0$.
A Gamma random variable $X$ with shape parameter $t>0$ and scale parameter $\theta>0$ has density function
$$f_X(x) = \frac{1}{\theta \cdot \Gamma(t)}\left(\frac{x}{\theta}\right)^{t-1}\exp\left(-\frac{x}{\theta}\right)\mathbf 1_{\{x\colon x>0\}}, ~~t > 0, ~~\theta > 0. \tag{1}$$
We write $X \sim \Gamma(t,\theta)$.
With this characterization, if $X$ and $Y$ are perfectly positively
correlated random variables and $X \sim \Gamma(t,\theta)$, then
$Y = aX+b \sim \Gamma(t, a\theta)$ provided that $b = 0$.
If $b \neq 0$, then $Y$ is a displaced Gamma random variable whose
density function is moved rightwards by $b$ units. Note that $X$ and $Y$
have the same shape parameter. It is not possible
for two Gamma random variables with different shape parameters to be
perfectly positively correlated.
On the other hand, no two Gamma random variables can have Pearson correlation coefficient $-1$. If $X \sim \Gamma(t,\theta)$, then $Y = -aX+b$  takes on negative values with positive probability, and thus cannot have a Gamma distribution.
A somewhat more general definition of Gamma random variables allows
$\theta$ to take on negative values, and the random variable takes
on positive values only or negative values only according as
$\theta > 0$ or $\theta < 0$. Thus, for $t > 0$ and
$\theta \neq 0$, we have that
$X \sim \Gamma(t,\theta)$ has density function
$$f_X(x) = \frac{1}{|\theta| \cdot \Gamma(t)}\left(\frac{x}{\theta}\right)^{t-1}\exp\left(-\frac{x}{\theta}\right)\mathbf 1_{\{x\colon
\operatorname{sgn}(x) = \operatorname{sgn}(\theta)\}}\tag{2}$$
so that $-X \sim \Gamma(t,-\theta)$. With this characterization,
two perfectly correlated Gamma random variables $X$ and $Y$
necessarily have the same shape parameter while their scale
parameters must have the same sign or opposite sign according
as $\rho = +1$ or $\rho = -1$, and it must be that $Y = \rho a X$
where $a > 0$.

A different generalization of Gamma random variables
is not considered here.
Comment: @whuber Could you provide a reference for the slightly more general notion of Gamma random variables? [Wikipedia's version](http://en.wikipedia.org/wiki/Generalized_gamma_distribution) has positive-valued random variables. If negative scale parameters mean a reflected Gamma distribution (RV takes on negative values only), then $X \sim \Gamma(t,\lambda)$ makes $-aX$ a $\Gamma(t, -\lambda/a)$ random variable perfectly negatively correlated with $X$.
Comment: The problem becomes subtler and more interesting when you use a slightly more general notion of Gamma variable that includes negative scale parameters. That would rule out your argument, requiring a (slightly) more penetrating analysis of the situation. A more challenging way to understand the question would be to obtain upper and lower bounds for the correlations as a function of the two shape and two scale parameters.
Comment: To understand this generalization, which you have done correctly, requires no reference, so references are of interest only insofar as they indicate that the generalization has potential use. To that end, *inter alia*, Bieniek and Szynal, *Limit Distribution of Differences and Quotients of Non-adjacent kth Record Values* (Probability and Mathematical Statistics, vol. 23, Fasc. 1, 2003) employ this generalization.  (They use a different terminology, though: to make all scale parameters positive they consider Gammas with negative scales to be "Negative Gamma" distributions.)
Comment: just what I was asking for! thanks (also for the intuition behind the result!)


Batch set entries as draft?

Question: I have 900 entries that I have imported via the excellent import plugin. I need these to be set as draft (or 'disabled' status). Is there any way I can do this programatically? I don't fancy doing it manually.
Answer: I asked this in the issues for the plugin and got a very prompt reply, the solution offered works perfectly:
https://github.com/boboldehampsink/import/issues/15

Batch set entries as draft?


What is the best short message to get away from virtual meeting for short time?

Question: Due to the pandemic, many daily standup meetings were converted into video calls but it is not always possible to be available on the call all the time, sometimes we have to get away from the call for a short period of time without leaving a call and it is always hard to explain
this each and every time. Is there anything standard sentence/acronym for that?
Comment: What would you do in your language?
Comment: *"I'm just going for a pee break"* might be a bit too much information for many online business meeting contexts. So I suggest you just say *"Would you excuse me for a moment?"*
Comment: Will you be able to understand hindi?
Comment: Try Hindi, if you can also provide a rough translation that would be great.
Comment: 'Abhi atta hun' rough translation 'I'll be back in no time'.
Comment: I think "I'll be back in no time" looks fine. You could include an "excuse me" or something else. Feel free to include a "self-answer".  I would upvote.
Answer: A common way in more informal contexts to signify you'll return shortly is to use the acronym BRB: Be Right Back.
Another one is AFK: Away From Keyboard. This is often used when input is required or desired.
The first acronym emphasizes the shortness of the time of the user's absence, whereas the second lets others know the user cannot interact with the digital/virtual environment.
Comment: I see **AFK** as a status at work very regularly.
Comment: These could work in a gamer chat.  May not be appropriate in a business meeting.
Comment: @JamesK Fair point. I think these have already spread sufficiently outside of gaming context, but they might indeed not be suitable for (most) business meetings.


Getting error while adding a trusted site

Question: I am adding some markup in "Head Markup" section of Community Builder(Settings --> Advanced) that references resources from 3rd party websites. Thus, SFDC gives me CSP violation warning in the markup. To resolve this I went to Settings --> Security --> Content Security Policy (CSP) and changed policy to:
Allow Inline Scripts and Script Access to White listed Third-party Hosts
And went on to add these sites in trusted sites. Then I whitelisted them inCSP Errors section.
However, there is  this one site that is giving me error as shown below:

This site is coming in "CSP Error" section:

But when I click on whitelist button, nothing happens, the page refreshes and I get errors as:

I have also added these sites in Trusted sites in Salesforce org --> Settings -->  Security Controls --> CSP Trusted Sites. But it is not working.
Any help appreciated.
Answer: at the moment there isn't any fix. You can find updates here: https://success.salesforce.com/issues_view?id=a1p3A000001FSlqQAG
BR,
Simone.
Comment: This article talks about error that comes when we are using a lightning:map. Here I am not using one.
Comment: Hi @Sarang try to add only domain instead of whole url (as follow without spaces) -->

https:// www. googletagmanager. com
Comment: I did that but to no avail.


Empirical Data on Refactoring?

Question: Are there any empirical studies that show the impact of refactoring (or lack of refactoring) on a development team's productivity?
(NOTE: I'm only looking for empirical data--From my own experience, I personally know that refactoring works, but I was wondering if there was some hard data to back that claim).
Answer: This article looks to have the info you seek.
Answer: Trends in Java code changes: the key to identification of
refactorings?
A Case Study on the Impact of Refactoring on Quality and Productivity in an Agile Team
Extracting refactoring trends from open-source software and a possible solution to the 'related refactoring' conundrum
The Effectiveness of Refactoring, Based on a Compatibility Testing Taxonomy and a Dependency Graph
And lastly

Empirical Data on Refactoring?


Spectral clustering in finance

Question: What are some examples of applying spectral clustering to financial times series data or other areas of finance? Why spectral clustering was used for each application rather than other types of clustering would help too.
Answer: One spectral analysis technique involves decomposing a univariate time series using SVD, assigning eigenvectors to two or more groups with k-means or another clustering algorithm, with the least significant group discarded as noise and the remaining groups used for reconstruction.
Answer: You are kindly advised to take a look at Chapter 9 of "Big Data Science in Finance" by Aldridge and Avellaneda

Spectral clustering in finance


Physical Review Letters Style

Question: Does anyone have latex template like the one they use in Physical Review letters (i.e. two columns in one paper) journal?
Comment: As this is an APS journal, can't you use REVTeX?
Answer: There is a package for it, it's called revtex4-1, which was designed for all the APS and meanwhile also for the AIP journals. To use it with Physical Review Letters style, consider the following MWE:
\documentclass[aps,prl,reprint]{revtex4-1}
\usepackage{blindtext}

\begin{document}
\title{Some random title}
\author{Me}
\firstname.lastname@example.com}
\author{Myself}
\author{Someone Else}
\affiliation{A University}

\begin{abstract}
Here I tell what I have done... And I have done a lot but it is hard to tell what exactly I have done...
\end{abstract}

\maketitle

\blindtext \cite{article-minimal}

\bibliographystyle{apsrev4-1} % Tell bibtex which bibliography style to use
\bibliography{xampl} % Tell bibtex which .bib file to use (this one is some example file in TexLive's file tree)

\end{document}

The important part is the first line of the code, where the options to the documentclass specify the following:

aps: The style refers to a journal of the APS (Amercian Physical Society) family
prl: The journal shall be Physical Review Letters (shortened PRL)
reprint: Print the document as it would be printed in the journal. Another option would be preprint where the document is set to single column and with larger line spread for proofreading purposes.
Comment: Version 4-2 is now available.
Comment: thank you for reply, do you know how I could add citations?
Comment: @user47497 I just edited my code to include also some reference.
Comment: Thank you, this is really helpful. Just one more thing, with your code, my email appears in the last page just before the references, do you know how I can put it in the end of the first paper, and I am actually submitting my paper to Physical Reviews D not Physical Review Letters, does that make a difference to the first line of your code?
Comment: @user47497 If you submit to Phys.Rev.D just replace `PRL` with `PRD`. The placement of the email is defined somewhere in the documentclass' code and I don't have a clue if it can be influenced by just setting some parameter. But anyway the `reprint` option is more or less just for you to see how the finished article will roughly look like. The guys at PRD will quite surely typeset your article on different software which might make it look a bit different. Also where things like the email address should go are defined by them.
Comment: But all the stuff said above should be somewhere in the submission guidelines that you (hopefully) should have read! Above that, if my answer was helpful for you and solved your problem, you can mark it as "accepted answer", which will gain you and me reputation. Have a look at our [tour](https://tex.stackexchange.com/tour) to learn more about that features.
Comment: How to achive the one column bibliographystyle like yours(one column), I always have two column...
Comment: @buzhidao Sorry for answering so late, I was on vacation. Could you post this as a seperate question, together with a MWE to show what you mean. From your description I cannot really deduce what's the issue in your case.

Physical Review Letters Style


DQN agent helped by a prediction model

Question: Suppose I have a regression model that can make predictions on stock price movements for 10 steps ahead. The labels are {"Price moves down": -1, "Price is stable": 0, "Price moves up": 1}. So at each time step, e.g. 0.5 seconds, the model spits an array of labels $[L_{t+1}, L_{t+2}, L_{t+3}, L_{t+4}, L_{t+5}, L_{t+6}, L_{t+7}, L_{t+8}, L_{t+9}, L_{t+10}]$
Now the idea is to use that model to train a deep reinforcement learning agent which can place limit buy and limit sell orders on the market. I am not interested in using that model for high frequency trading, but day trading instead. Here is an example where the agent might want to place the buys and sell orders.

Assume the features and the model regression predictions are well suited for the RL phase. How can I use the model so that the agent can use it to take a decision? Do I need to pass the predictions as well as the features inside the state variable? I thought feeding the agent with all the features as well as the price movement prediction at each time-step.
To accomplish the task correctly, the agent needs the right reward function. So to overlook the noisy up and down movements and keep only the long relevant day trading movements (look the above picture), I thought setting up a threshold on each transaction profit. Am I on the right track? In other words, once a pair (limit buy order, limit sell order) is filled, the profit needs to reach the threshold, otherwise the reward is set to 0. The python function might be
def reward(min_profit, current_profit):
    if current_profit < min_profit:
       return 0
    else:
       return current_profit

Is such a reward function appropriate?
Answer:
Am I on the right track?

Sorry, but I can't get your idea.
Firstly, the reward is determined by profit and transaction cost together. So you need to consider the cost ratio.
Secondly, why do you need to set up a threshold on each transaction profit? The negative profit is explicit signal for the agent.

DQN agent helped by a prediction model


How to get person account contact id

Question: When we are creating one person account it is allocating one accountid and one Contactid. When i am trying to assign that person account with task i need whoId. How can i get that contact Id(Related to Person account) which is generated at the time of person account creation.
Comment: you can use PersonContactId field like Select PersonContactId From Account
Answer: <code>Account person = new Account();
person.FirstName = 'John';
person.LastName = 'Doe';
person.RecordTypeId = personRTid;
//other fields...
insert person;

person = [SELECT Id, PersonContactId FROM Account where Id =: person.Id];
//Contact personContact = [SELECT Id FROM Contact where AccountId =: person.Id];

Task myTask = new Task();
myTask.WhoId = account.PersonContactId;
//myTask.WhoId = personContact.Id;
//other fields...
insert myTask;
</code>

How to get person account contact id


What is the origin of the idiom "jig is up"?

Question: In the novel I'm reading there's the phrase "the gig is up," said to a villain who has just been caught.  The form with which I'm familiar is "the jig is up."   A gig as in a jazz performance?  A jig that's a form or template for making an object?   What is/are the origins of the phrase?
Comment: Actually, "The gig is up" means that you've run out of storage on an old computer.
Comment: Can you clarify - some (including my husband) - believe this expression references lynching a black person. "The jig is up" meaning the black person is hanging from a tree. How did this alternative expression for this old phrase enter the lexicon?
Answer: The OED find the etymology of the word "jig" in its various meanings to be uncertain but traces the meaning of practical joke back to 1590.  So when someone says "the jig is up," he means that he's no longer fooled by the pretense.  The expression "the game is over" means the same thing:  the trickster has been caught out in playing the trick.
Answer: I believe the origin is in the dance, as in "dancing a jig."
"The jig (Irish: port) is a form of lively folk dance in compound meter, as well as the accompanying dance tune. It developed in 16th-century England, and was quickly adopted on the Continent where it eventually became the final movement of the mature Baroque dance suite (the French gigue; Italian and Spanish giga)"  -- https://en.wikipedia.org/wiki/Jig
Thus it could be that the best meaning of "the jig is up" is "the dance is over" --which seems to fit the OED citation: 1777 Maryland Jrnl. 17 June Mr. John Miller came in and said, 'The jig is over with us.'
Other speculations relating "the jig" to a trick or a game, would have a parallel in the word "caper," which is both a slang term for a trick, game, or crime, and a dance or element of a dance.
Last but not least, the alternative pronunciation "gig" with a hard "g" has more than slight resemblance the French dance "gigue" and the Spanish and Italian "giga."  In French, Spanish, and Italian the "g" may well be soft, in which case use of the hard "g" would be incorrect.


Is there any way of reducing the dump file size of a Sybase database?

Question: When I dump a Sybase database, it doesn't seem to matter whether there's data in the tables or not, the file size is the same. I've been told that this is down to the fact that my dump file is binary and not logical, so the file of the dump file is based on the allocated size of the database. I know that Oracle can use logical dump files, but can I get Sybase to do the something similar, or is there any other sneaky ways of getting the dump file size down?
Answer: If you're already using compress_level 9 and still want more compression, it's possible to re-compress the file with bzip2.
If you simply bzip2 the compressed file, you will get ~10% improvement.  If you uncompress and re-compress you may see improvements in the 30% range.  Bear in mind though, that you'll have to un-compress and/or gzip the file again in order for Sybase to load it.
<code>gunzip -c pubs_1.dmp | bzip2 > pubs.dmp.bz2
</code>
Answer: Since somewhere around version 12 you have been able to perform compressed dumps in ASE.
The syntax is: dump database database_name to file_name [ with compression=compress_level]
compress_level is 0-9. 0 is no compression and 9 is the most. The more you compress the higher the CPU usage whilst running the dump. You just need to peform a little testing to find an appropriate balance of size versus performance.
No special commands are needed to load the dump.
Comment: this works nicely, the bonus of which is that truncating tables that I don't need as part of the dump now has an effect as the process of compressing the dump squeezes out any of the space previously taken up by empty tables! Thanks Adam!
Answer: Whilst the link (The syntax is) above is obviously correct as it points to sybase documentation, the comments are misleading.
The syntax in simple format is:
dump database {database_name} to "compress::{#compression_level}::{stripe_device}"
go
eg: dump database mydb to "compress::1::/sybase_dumps/mydb_17022009"
In terms of loading the database dump the ::compress;option needs to be given again.
eg. load database mydb from "compresss::/sybase_dumps/mydb_17022009"
Notice the compression level is not required nor the extra separating colons that follow.
The testing to find your balance is a good point, remeber the higher you go expect the dump to take considerably longer. I find 1-3 is more than ample, I have never gone above 6 the diminishing returns are not worth it.
If I was desparate I would bzip2 the file as described above {point earned}. If this was a production host I would ship the file to another host and do this. Resource hit can be considerable.
Comment: Both methods work. The documentation indicates that the "with compression=compress_level" is the newer and preferred syntax.
"The older compress:: option works only with local archives; you cannot use the servername option. To compress to a remote machine, you must use the preferred compress=compress_level option."


I2t vs time curve interpretation

Question: How can help the i2t vs t curve in fuse selection?
Comment: You cannot use it for anything before you know what just that curve set tries to present. If we look 1A curve at 1 second we get I2t value = 6 squareampereseconds. If I calculate one ampere squared multiplied by 1 second I will get  one squareampere-second. Your curve set presents something which cannot be reasoned by watching the curve set. If you have taken it from a document you should check what the document tells about it.
Comment: Show link and guide to ask which part you do not understand
Comment: https://www.littelfuse.com/~/media/automotive/catalogs/littelfuse_fuseology.pdf
Answer: All fuses have inverse time-current characteristics, so opening time decreases as overcurrents increase.  Time-current characteristics are presented graphically on standardized "log-log" paper.\$^1\$
Your graph shown is different as  a Current Squared Time v time curve (I2t vs t) on log-log scale.  This curve shows power vs time on the fixed slope  with energy on the curved part.
Power is \$P=I^2R~ =IV\$ and Energy is \$E=I^2R * t\$
Both curves show how to select a fuse based on the surge pulse transient over-current.  After a certain thermal time value, all fuses become power limited by physical size so without using resistance they share a similar slope I^2=I^2t/t.
Normally you choose a fuse about 25% above its maximum steady current but if a load's surge current is much more, then, the short term I^2t pulse energy-related point must be less than this average fusing curve.
Keep in mind that the history of fuse temperature and ambient can determine fusing minimum time, so always plots show the  fusing time at 25'C and not the max allowed operating current.  Be sure to check if it refers to nominal or average and use tables for max time.
For more basic theory read here.
Plot interpretation
Any surge of current above this line at 1 ms or less on the left indicates it takes about 1ms to blow a fuse and anything above this flat part won't make much difference.

For a 1A fuse in 2ms I2t = 0.03 thus I = 30 A.
For a 1A after 1s, I2t =  5.3 so I = 2.3A the fuse is blown on average

So I expect these are not slow blow types ;) .
\$^1\$ https://www.littelfuse.com/~/media/automotive/catalogs/littelfuse_fuseology.pdf

I2t vs time curve interpretation


Library of odontocete vocalisation properties/characteristics

Question: I'm looking at echolocation clicks of an odontocete species and want to compare the properties/characteristics of the clicks to other odontocete species. I'm aware of sound libraries such as DOSITS but this mostly provides sound clips with spectrograms and a brief description. I'm mainly looking for things like click spectrums (on and off axis) and waveforms. I have found some in papers on detection and classification but these are usually limited to two co-occurring species or multiple species found in one region. Is there a review paper or website that hosts this information for a larger number of species?
Answer: A large database of sounds from different locations is something that the marine bioacoustics community is sorely lacking unfortunately - there have been various attempts but the complexity and size of acoustic data has hindered progress. As the field expands and we require more automated analysis methods (usually requiring training data), publicly available, well annotated datasets are going to become increasingly important.
As a side note, the first step to making a large database of sounds is a good metadata system for acoustics. Tethys is a good system but complex to use - we are hoping to make PAMGuard's metadata system compatible with Tethys and hopefully other software will follow suit. That would make uploading datasets far easier and hopefully provide a basis for a more comprehensive community driven data repository.
Comment: good to hear you will use Tethys in PamGuard. I also decided to use Tethys.
Answer: The datasets from the Detection, Classification, and Density Estimation (DCLDE) Workshops contain what I consider the best annotated sets of marine mammal sounds, but they are large, and you'd likely have to spend quite a bit of time digging through to find exactly what you are looking for and then make those spectrograms for comparison yourself.
The answer on this related question has where to find them: https://bioacoustics.stackexchange.com/a/8/42
Answer: While a comprehensive global database is lacking as mentioned by Jamie, there are a few good peer reviewed publications you can glean information from! Christine Erbe's 2017 review of marine mammals in Australian waters has some echolocation click information,  Simone Baumann-Pickering has a great summary of beaked whale echolocation clicks, then you can always search by species and compile. Of course more summative resources would be so valuable and hopefully will be made available eventually!


Apply different css stylesheet for different parts of the same web page

Question: I have a web page with different parts which require different css stylesheets to be applied to each. What I would like to know is how to specify which css stylesheet to use for each different part of the web page. if I leave them all together, the components do not get displayed properly.
Comment: It is obvious what this question is asking, so it seems clear to me that it is a 'real question'.
Comment: This question is clear and makes sense to me. I despise when the moderators close questions on here.
Comment: What the user means is that he has multiple **.css files being called into one web page but that page is not displaying correctly because of (obvious) conflicts.  I guess the css files have divs / sections with the same names which is causing the conflict.  That is what is he asking and the answer below by Ned seems to be an excellent answer.
Comment: For example, take a look at this: https://css-tricks.com/saving-the-day-with-scoped-css/
Comment: Exactly this is about "css scope" the current css implementation does not allow to implement style-independent MVC modules. Still valid in 2016.
Answer: You can't apply different stylesheets to different parts of a page.  You have a few options:
The best is to wrap the different parts of the page in divs with class names:

    ....

    ....

Then in your part1 CSS, prefix every CSS rule with ".part1 " and in your part2 CSS, prefix every CSS rule with ".part2 ".  Note that by using classes, you can use a number of different "part1" or "part2" divs, to flexibly delimit which parts of the page are affected by which CSS rules.
Comment: 6 years later... :( there is still no scoped css.
Why browsers still do not support this feature?
Answer: It is called Cascading Style Sheets  (CSS) for a reason ..
use the specificity rules of CSS to target each section..
ie..
#section1 a{color:red}
#section2 a{color:blue}

this will make all links inside an element with id section1 be red, and all links inside an element with id section2 be blue..

 i will be red

 i will be blue

Comment: That does not do help when loading bootstrap.css or any other external css
Comment: Having to post here due to the question closure, which I also feel is in error. In my case I have conflicts between CSS libraries in different parts of a page (an angular ui embedded within a bootstrap based admin ui from django). The approach I'm about to try is embedding one in an iframe.
Comment: Newer versions of bootstrap provide .less or .scss format, which can be easily wrapped by your custom wrapper to achieve scoping. like:
#section1 {
}
Answer: An external stylesheet is applied to whole html page.
In order to apply different stylesheets to different portions,
Firstly, the html page has to be divided into different sections using the html  tag ( with each html div to be assigned a unique id or class)
Secondly, the external stylesheet to be applied to each div has to be designed according to the id/class assigned to it
Example as explained above by Gaby aka G. Petrioli...
Answer: Use different class for each part in your web page and customize the CSS code for each class.


What is small kanji part that is usually placed on the left of a japanese calligraphy (shodō) work?

Question: There are generally small kanji on a japanese calligraphy (shodo) work. Sometimes they are written above an inkan or inkan set. What are these kanji for? What types of information is written like this conventionally? Is this a necessary part of a shodo work? I think they contain some meta information about the work but I'm not sure.
Example image is below.
Comment: More often than not it's the calligrapher's name.
Comment: Could be a name, could also contain a location/time where/when it was drawn/written. This one is just a name (龍戾).
Answer: that's a signature. (usually the name of the calligrapher)


ios6 file upload not working with digest authentication?

Question: I heard iPhone ios6 is able to upload files.
I have a very simple PHP upload form and it doesn't work.

I've used this PHP script for years on my desktop (Chrome or Firefox or curl), where it works fine. Interesting Chromium on ios6 which IIUC uses Safari errors out with "Missing file".
Any ideas where I might be going wrong? I'm a Archlinux user so I'm not privy to MacOSX etc.
Update: I have a reduced test case here http://ios6.dabase.com/ where the problem seems to be uploading with digest authentication enabled (that's how I roll).
Comment: http://www.flickr.com/photos/hendry/8013346479
Comment: I've logged Problem ID: 12368352
Answer: You need to modify your input tag to support the new HTML 5 media capture API.
<code><input type="file" accept="image/*" capture="camera">
</code>


Auto-Refresh Page for Google Chrome on iPad

Question: Is there an extension I can download on an iPad to auto-refresh a Google Chrome page?
Comment: Nope. There is not.
Comment: @JohnRamos please use comments for clarification and answer section for answers. Thanks!
Comment: Jailbroken or not?
Answer: Chrome for iPad doesn't have extensions, but you can accomplish what you're looking for (in Chrome or Safari) using a bookmarklet.
I tested Evan Culver's and it works beautifully:
javascript: timeout=prompt("Set timeout [s]"); current=location.href; if(timeout>0) setTimeout('reload()',1000*timeout); else location.replace(current); function reload(){ setTimeout('reload()',1000*timeout); fr4me='<frameset cols=\'*\'>\n<frame src=\''+current+'\'/>'; fr4me+='</frameset>'; with(document){write(fr4me);void(close())};}
How to install it on Chrome:

On your iPad, copy the above line of in its entirety (starting with javascriptand ending with the final })
In Chrome, create a new bookmark (of any page) by tapping the star icon in the location bar. Next, immediately tap the Edit button in the note that will appear at the bottom of the screen, which will let you edit the new bookmark and turn it into a bookmarklet.
Set the name of the bookmark to "Auto Refresh"
Delete the whole URL and paste the code above in its place. Tap Done to finish creating your bookmarklet.

To use it:

Visit a page you want to refresh
Tap the location bar and type "Auto Refresh". Select the bookmarklet from the drop down options
Choose your refresh interval (in seconds)

Note: this particular bookmarklet doesn't have an option to stop auto-refresh; to do that, just reload the page manually.


How well would a planet in orbit of a star above the Galactic bulge see?

Question: I am making a story of a species who lives on a planet several light-years above the Galactic Bulge. With advanced technology, how much could they see from their vantage point? Could they carry out advanced surveillance on much of the galaxy's stars? If not, what would the night sky look like there, assuming the orbital plane was the same as the galactic disk?
Comment: If they are "just above" the chances of them envolving is slim due to the increased frequency of unpleasantly energetic events like supernovae being likely to sterilise their world. They'd have to be quite far above, on a highly inclined orbit about the galactic centre.
Comment: "Several light-years" is pretty small when it comes to the galactic disk. . . The mean distance between stars is about 3-4 light-years in the Milky Way, and the disk is about 500-1000 light-years thick. This planet wouldn't really be significantly outside the bulge at all.
Comment: @StarfishPrime Fixed this. I said "just above as if it were a small model.
Comment: Doesn't look fixed yet.
Answer: I'll start with the easy part, they would see two distinct hemispheres of the sky where in one half the Milky Way fills the sky with thousands of visible stars like what we see, and the other half is absolute blackness to the naked eye. The galactic "hub" would appear as a very dense splatter of stars, and the four spiral arms of the milky way may show as streaks in the sky as the milky way itself does to us. This depends on how close you are - like, what "a few light years" means here. Since this is along the same orbital plane as the Milky Way, I will arbitrarily assume your planet had a normal evolution and rotates on an axis nearly perpendicular to the orbital plane. In this case, the Northern hemisphere will never see any stars at all, unless another rogue like your own has spun out there ahead of you. The Southern hemisphere is where all your naked-eye celestial observations would come from. The galactic bulge would be directly above your South pole.
It's interesting to note that in such a world celestial navigation would never have evolved in the Northern hemisphere, and you would likely see much more primitive development in the North as compared to the South. Lands to the North would be shrouded in mystery as they would be almost impossible to navigate until some Southern hemisphere culture develops technology-based navigation such as radio. It would be a confusing and undesirable region to live in, natives of the North would be survivors skilled at orienteering to get around. The night sky has inspired curiosity for millennia and it is the direct fuel for our intellectual advancements.
Observing the galaxy would be no different for them than it is for us. Perhaps they could have a greater resolution in locating stars than we have because they could have better stellar parallax reference points. In that sense, this highly polarized planet could have a slight advantage in surveillance of the galaxy, whatever that really means.
Answer: Assuming that they were exactly where you describe, you would need to find a way of that system surviving past any extinction events involving supernovae and the like.
This could take the form of some kind of field protecting the system.  This field would have to use tremendous amounts of energy so either the race that lives there would have to have moved there from somewhere else and constructed some kind of dyson structure around the star of the system or another race had and the race you are talking about just evolved after the builder race had gone (or not).
If their technology was based on our understanding right now, they would probably see distorted images of the rest of the system at best as I would imagine the gravity of the galactic core (lots of supermassive black holes in there) along with whatever energy being deflected by the protective field would probably mess with most conventional methods of observation.
If their technology was more advanced, it is possible that they would have things to scan through all of the interference but the question would be time as the milky way galaxy is over 100,000 light years across and light is the fastest thing we really know.
In practice, this would mean that even if they saw an attack fairly nearby, maybe 10 light years away, by the time they saw it it would be 10 years too late and it would take them longer still to get out there to do anything about it.
I would say the best bet in this situation would be for that central location to be more of a base with FTL ships collecting information and bringing it for analysis.
Comment: Why is a star outside the main disk of the galaxy more susceptible to supernovae? Our main defense from such is that they have not happened nearby. There's not much defense afforded by other stars.


Does a whisper gnome count as a gnome for meeting feats' prerequisites?

Question: Two feats in Races of Stone have as one of their prerequisites being a whisper gnome. This made me wonder: Does a whisper gnome count as a (generic, untyped) gnome for meeting prerequisites or is whisper gnome an entirely different race from (generic, untyped) gnome and unable to meet (generic, untyped) gnome prerequisite?
Comment: @GreedyRadish It would not; he's asking about feats like Burrow Friend (*Races of Stone* pg. 137) that include "**Prerequisites:** Gnome," in them. All such feats would share the same answer.
Answer: All gnomes have a subrace like rock or whisper
There's no such thing as a gnome without a subrace. Although not called out as such by the Player's Handbook (16-17), the gnome race described therein is the rock gnome, "the most common variety" of gnome (Monster Manual 131), and the game includes a fairly large number of gnome subraces, yet the larger classification—the gnome race (and, perhaps, kind, what PH 310 calls a "subcategory of creature")—encompasses all gnomes in its warm, gnomish embrace.
This means both a whisper gnome and a rock gnome and any other kind of gnome are all broadly gnomes. This also means a whisper gnome can meet the prerequisites of feats that include gnome and whisper gnome, but a whisper gnome can't meet a feat's prerequisite if the feat's prerequisite were rock gnome like the feat Rock Gnome Trickster (Races of Faerûn 167). (Also see this question.)
Just in case further proof is needed, the Exemplars of Evil NPC Draen Ralgael is a wererat whisper gnome rogue whose subtypes include gnome (52-3).
Comment: Amusingly, Draen pops up again in *Elder Evils* (129), both by [Robert J. Schwalb](https://en.wikipedia.org/wiki/Robert_J._Schwalb).
Comment: That's perfect, thanks to all who answered. I thought that your explanation would be the case but didn't want to go ahead & make assumptions.
Answer: Having the gnome subtype would be sufficient for whisper gnomes to qualify as gnomes for feats and prestige classes. Races of Destiny talks about how the human subtype would do this for half-human races, and certainly all the elf subraces in Forgotten Realms can use elf feats and prestige classes.
The problem is that we don't have any example whisper gnome statblocks, which means we don't explicitly know that it has the gnome subtype. I think it's only reasonable to assume that they do, but nothing comes out and says it.
Also, for the record, the race listed as "gnome" in the Player's Handbook is actually a rock gnome. The Monster Manual (i.e. also core) includes the forest gnome as well. Both have the gnome subtype, and the rock gnome, clearly, meets any "Gnome" prerequisites. The forest gnome should as well, and thus I'd say that whisper gnome also does.
As far as consensus, whisper gnomes are widely recommended online for stealth; their racial features are excellent for it. No one in these discussions considers them restricted from taking gnome-only feats and prestige classes. In the Shadowcraft Mage Handbook, about a gnome-only prestige class, both whisper gnomes and forest gnomes are considered (in this case, the forest or rock gnomes' +1 to Illusion DCs generally trumps anything that whisper gnomes offer, but still, no one was saying you can't). And certainly in any discussion of racial-specific options, consideration of subraces is often an important part of the conversation.


question about orthogonal vector

Question: Let say I have 2 vectors $(1, 0, 0)$ and $(0, 2, 0)$, and I want to find a third vector that is orthogonal to both of them. I can do a cross product and get $(0, 0, 2)$. However, I know there are infinite vector in the following form $(0, 0, x)$ where $x$ $\in$ R that are orthogonal to the other two. My question is what is the difference between the orthogonal vector results from cross product and any other orthogonal vector? Why the cross product gives only 1 specific orthogonal vector? What is the significance of this vector? Thank you!
Comment: Don't understand "I can do a cross product and get (0, 0, 2)". It will be helpful if you can explain more.
Comment: What he means is that the cross product (outer product) of (1,0,0) and (0,2,0)  is orthogonal to both of them.
Answer: The vector you get by performing the cross product is the unique vector orthogonal to both of your original vectors that

has a length equal to the magnitude of the area of the parallelogram (actually rectangle in this case) with sides $(1,0,0)$ and $(0,2,0)$ and
forms a right-handed set with $(1,0,0)$ and $(0,2,0)$

If you don't care about either of those two properties, then you could just choose any vector of the form $(0,0,c)$.  But sometimes those properties are useful.
Answer: If $\vec{a}$ and $\vec{b}$ are two vectors then the vector $\vec{a} \times \vec{b}$ is another vector perpendicular, or normal, the plane formed by $\vec{a}$ and $\vec{b}$. As you rightly suspected, there are an infinite number of vectors normal to the plane formed by $\vec{a}$ and $\vec{b}$. They are all of the form $\alpha(\vec{a} \times \vec{b})$, where $\alpha$ is a scalar. Since all of these "point" to the same direction, it is customary to choose a vector that has unit magnitude. It is given by
\begin{equation}
\vec{c} = \frac{\vec{a} \times \vec{b}}{|\vec{a} \times \vec{b}|},
\end{equation}
where $|\cdot|$ denotes the magnitude of a vector.
Comment: It's certainly not "customary" do this unitization in any scenario where computational performance is important. The division and the square root operation are often unnecessary, and they will take much longer than the cross product computation.
Answer: The vector product is a common operation in modern vector analysis.

It gives you a vector with length
$$\lVert a \times b \rVert = \lVert a \rVert \, \lVert b \rVert \sin \angle(a, b)$$
Then $c = a \times b$ has the properties
$0 = c \cdot a = c \cdot b$, using the scalar product, so it is orthogonal to both $a$ and $b$. However this and the above is true as well for $-c$.
So the last property is that $a, b, c$ are arranged like in the right-hand-rule.

 (Source)
All three properities can be derived from the connection to the vector product with the determinant:
$$
u \cdot (a \times b) =
u_i \epsilon_{ijk} a_j b_k =
\epsilon_{ijk} u_i a_j b_k =
\text{det}(u, a, b)
$$
The significance of the vector product comes from its use in physics, especially mechanics and electro dynamics.
E.g. angular momentum $L = r \times p$ or Lorentz force $F_L = q v \times B$.

question about orthogonal vector