How much current would you design for the various supplies required for Spartan 6 LX9 devices?

Question: I'm designing a new board based on XC6SLX9-3TQG144C.  There are three supplies required -- VCCINT, VCCAUX, and VCCO.  VCCINT is 1.2V and the other two will be 3.3V.  I'm wondering how much current to design for in the power supplies.  Obviously the current consumption depends significantly on the RTL running inside, but are there any good rules of thumb for this?  In the past I've just over designed the thing to be able to supply something like 1 amp (can't remember which LDO I used, but at the time it was a national part) for the internal supplies and whatever I think I'll need on the I/O side of things (which is much easier to estimate).  I'm trying to minimize area on this board though so it would be nice to not just "shoot the fly with a bazooka" so to speak.  Is there a reasonable way to accurately estimate the current consumption for the internal supplies of an FPGA?  I've looked a bit at xpower, but I didn't see (didn't spend a ton of time looking) a way to enable/disable various portions of the design as one would expect in real life (e.g. memory controllers, actions responding to external events, etc).
Comment: Yeah after digging in a little more I agree with you @IgnacioVazquez-Abrams
Comment: Nowadays you can get switching DIL8s and SOP8s that can supply 1A at almost any voltage required. I wouldn't worry *too* much about it.
Answer: Why not ask Xilinx, since they are the ones who designed the chip in the first place-- and it is in their best interest for them to help you successfully design your board?
Of course the best place to look is in the datasheets.  The second best place is in the Xilinx Power Tools Tutorial.  After that there are lots of app notes, user guides, and white papers on the Xilinx web site that talk about techniques, modes, and development tool options to reduce power more.  And don't forget the many reference designs that you can download the schematics for.
Finally, Xilinx and/or your distributor will have resources to help you.  Field Applications Engineers can provide design assistance, as well as review your design.
While people on electronics.stackexchange can give you assistance in this, it is not a replacement for using the documents, resources and tools that Xilinx has already provided.
Comment: You can't ask Xilinx, they have no idea what code you are going to run in your FPGA!
Comment: @MartinThompson  You absolutely can ask Xilinx.  While they don't know what code you're going to run, they can point to to all sorts of resources that help you-- and they know the startup/programming current which can be significant.
Comment: OK, fair point :)  Apparently I can't remove my downvote unless you edit the answer, sorry!
Comment: @MartinThompson  Edited.  :)
Comment: ...and voted :)
Answer: The answers above seem to suggest that the datasheets provide sufficient information to determine the power consumption of the device.  I disagree -- The datasheets provide a lot of information on quiescent current, leakage currents, etc, but they cannot speak to dynamic power consumption, which accounts for the vast majority of the power used.  After all the datasheet has no idea how fast anything is switching the device, how much of the device is being utilized at any given time, or what peripherals (e.g. serdes/memory controller stuff) are being used at any given time.
After digging into this a bit more it's not too painful to dump a vcd file to xpower and get a fairly reasonable estimate for power consumed by the various supplies.  Ultimately though it seems that for 99% of the cases over designing the supplies by some reasonable amount of headroom is easy enough and probably not worth optimizing a ton.
Answer: The various datasheets for the Spartan6 do include enough information to have a reasonable stab at the upper limits on the amount of current consumed by each type of Vcc.
If you want the option to disable portions of your design, build that into the logic - using clock enables to freeze areas that you don't want to use at the moment can substantially reduce power consumption.
Also, if you're concerned about size, you can get multi-output switchmode controllers in small SMD packages that will supply both 1.2V and 3.3V at good efficiency.  A good place to look for such things is the large electronics vendors, e.g. Digikey, Mouser, RS, Farnell, etc that allow you to do parametric searches on their product range.
Answer: If you have already finished your design, use the Xilinx Power Estimator. But one of the reasons to use FPGAs is the ability to reconfigure them as needed, so you may want higher power later, then I can't see the point in finding precise current values. And eventually both if you require 1.63 or 1.87 A you'll end up with a 2 A regulator, don't you?
Unfortunately, there are other subtle issues to take into account when powering FPGAs:

Stability - Typically FPGAs require their supplies within a few % of the nominal value. Check the ripple voltage, especially for switchers.
Load regulation - An FPGA is or may be a large amount of logic running at high speed thus consuming a large and VARIABLE current. Suddenly changing current will cause a drop in voltage that may be out of specs. You may need lots of low-Z caps OR... a higher current regulator.
Soft Start and sequencing - Turning on everything at once may cause problems. Specially the larger FPGAs need (or recommend) a sequenced turn-on with a slope (soft start) of some ms.
Monotonicity - On turn-on, in between 0,5 and 0,9 V the logic starts runnnig and there may be a large current inrush that will cause a voltage drop. Even if useconds it can make logic misbehave. Supplies must cope with this to ensure an always rising voltage

I found these guys have a lot of expertise on FPGAs: www.akteevy.com


How to send an email by 2010 workflow only if the person picker field have a person assigned?

Question: I would like to send an auto notification to someone who's name is picked in a certain field. I would like to send only if someone is picked. So how can I check if the person picker's value is an existing person before I try to send the email?
Answer: something on the lines of. create a workflow variable (string) and pass through the people picker value.
then create an if condition to check if its not empty ;) if it isnt then create an email step. when setting the TO section select the dictionary -> workflow lookup -> select the people picker field in question, in my example i just used the modified by field and put it to return email.
1) create var and set its val to the people picker field inquestion

2) create an if function to check if not empty. if not email using the people picker field. Click on the image below for more info.
Comment: It is working very well!Thanks again for the fast and detailed response!
Comment: glad to see it working and happy to help :)


QWidget transparent background (but not the children)

Question: I have a QWidget that contains a QPixmap and a QComboxBox in its Layout. I would like to set the background of the widget transparent (but I want to show the QPixmap and the QComboBox normally). How do I do that?
Answer: You can use the attribute
widget->setAttribute(Qt::WA_NoSystemBackground);

Qt documentation :

Indicates that the widget has no background, i.e. when the widget
  receives paint events, the background is not automatically repainted.
  Note: Unlike WA_OpaquePaintEvent, newly exposed areas are never filled
  with the background (e.g., after showing a window for the first time
  the user can see "through" it until the application processes the
  paint events). This flag is set or cleared by the widget's author.
Answer: It is all well-explained in QWidget documentation:
http://doc.qt.io/qt-5/qwidget.html#transparency-and-double-buffering
Comment: both links are dead, which is the reason why answers should not just contain links but the relevant information itself.
Comment: The explanation does not really help or work, though.
I added a QGraphicsView to a transparent widget, but despite setting the graphics view's Qt::WA_PaintOnScreen attribute, it remains to appear as transparent as the widget it is in.
Comment: I agree that is a problem. However the information asked for here is not very specific and the documentation is explaining it very well. No need to repeat it here. I updated the link to the documentation.


How to recache a simulation

Question: What is the proper way to re-cache a simulation? I got the problem during Cloth and Fluid simulations that the cache is ignoring my new adjustments in the parameters. I'd like to just switch off 'cache mode' so I can freely experiment with some parameters without constantly punch myself to the head why there are no changes noticeable in my simulation.
Comment: jspr, all you need to do is delete your cache, add changes and bake it again.
Answer: For Fluids:
Select the domain object -> Physics tab -> Fluid -> Settings -> Free Data
Then don't forget to re-bake the Mesh and Particles.
For Cloth:
Select a cloth object -> Physics tab -> Cloth -> Cache -> Delete All Bakes
Then Bake again.

How to recache a simulation


One 4-way switch and two 3-way switches

Question: I decided to be handy and change all of my receptacles in the house. Everything went well until the garage. There are 3 light switches in the garage that go to 1 light source that has me stumped. Two light switches are 3-ways and one is a 4-way switch. I messed something up because the 4-way has to be in the on position in order for the 2 other switches to work. The 4-way has 2 black and 2 purple wires, while the 3-ways are all black because it is 1950"s wiring. Thoughts?
Comment: You made a common error: not marking every wire and verifying the internal connections on the 4-way before removing :-( .  Here's where a "beeper" or equivalent can help: turn off mains power, flip a 3-way to see which of the wires to the 4-way are connected, and so on.   Handy diagram here:  http://www.do-it-yourself-help.com/wiring_diagrams_3_way_multiple.html
Answer: Just to clarify, the travelers on a 4 way are connected to the top terminals from one three way and the bottom terminals from the other.
NOT from side to side.
Google 4 way switch and check the wiring diagrams against what you have done. Like here.
Good luck!
Comment: Thank you for your note. How do I find out which wires go in the common and traveler screws?
Comment: On the three-way switches, the common screw is by itself at one end of the switch, and it either gets the hot wire feed or the switched wire that goes to the light depending on which end of the circuit it is on. The two terminals at the other end of the switch get the travelers. Study the drawing that on the page I linked to. It should help.
Answer: A 4 way just switches the travelers from a 3 way, if one leg is wrong on the 4 way or one of the 3 ways  is wrong, not working in all the positions is common. To help figure out where the problem is a list to all 3 switches in each position will be needed.
Comment: Hi Ed, Thanks for responding. I've attached a photo. I don't know which wires go to which screws. Initially, I put all the wires back in the same spot when I had installed the new switches, but the light didn't turn on for any of the switches. So, flipped the 2 wires on the left sides of the 3 ways and now the 4-way has to be in the on position in order for the 2 other switches to work. Light image: https://dl.dropboxusercontent.com/u/36322699/light.jpg

One 4-way switch and two 3-way switches


Integral $\int_0^\infty \frac{x-\sin x}{x^3(x^2+4)} dx$

Question: The following integral appeared on the $8$th Open Mathematical Olympiad of the Belarusian-Russian University. $$I=\int_0^\infty \frac{x-\sin x}{x^3(x^2+4)} dx$$ I used power series: $$x-\sin x = \sum_{n=1}^\infty \frac{(-1)^{n+1}x^{2n+1}}{(2n+1)!}\rightarrow I=\sum_{n=1}^\infty \frac{(-1)^{n+1}}{(2n+1)!} \int_0^\infty \frac{x^{2n-2}}{x^2+4}dx$$ Taking the inner integral and substituting $\displaystyle{x^2=4t \rightarrow dx=\frac{dt}{\sqrt{t}}}$ gives: $$\int_0^\infty \frac{x^{2n-2}}{x^2+4}dx=4^{n-2}\int_0^\infty \frac{t^{n-1-\frac12}}{t+1}dt$$
$$=4^{n-2} B\left(n-\frac12, 1-n+\frac12\right)=4^{n-2}\Gamma\left(n-\frac12\right)\Gamma\left(1+\frac12-n\right)$$
And using Euler's reflection formula: $$\Gamma\left(n-\frac12\right)\Gamma\left(1+\frac12-n\right)=\pi \csc\left({n\pi-\frac{\pi}{2}}\right)=-\pi\sec(n\pi)=(-1)^{n+1}\pi$$
$$I=\pi\sum_{n=1}^\infty \frac{4^{n-2}}{(2n+1)!}=\frac{\pi}{32} \sum_{n=1}^\infty \frac{2^{2n+1}}{(2n+1)!}=\frac{\pi}{32}(\sinh 2 -1)$$ I did not found the official solution, but the answer given $\displaystyle{\frac{\pi}{32}\left(\frac{e^2-1}{e^2}\right)},\,$ doesn't match. Can you help me find my mistake? And maybe share some different methods to solve this integral?
Comment: The Laplace transform is another viable way. $\mathcal{L}(x-\sin x)=\frac{1}{s^2}-\frac{1}{1+s^2}$ and $\mathcal{L}^{-1}\left(\frac{1}{x^3(x^2+4)}\right)=\frac{s^2-\sin^2(s)}{8}$ reduce the original problem to the evaluation of $\int_{\mathbb{R}}\frac{\sin^2(s)\,ds}{s^2(1+s^2)}$.
Comment: Residues seems like the most simple way, especially looking at the answer
Comment: Wow, this is also nice! And since $$\int_0^\infty \frac{\sin^2 x}{x^2}dx=\frac{\pi}{2}$$ This cancels out with $$\int_0^\infty \frac{x^2}{x^2(x^2+1)}dx$$ And the original integral equals to $$\frac{1}{8}\int_0^\infty \frac{\sin^2 x}{1+x^2}dx$$ And now the easiest way to evaluate it I think is to rewrite $2\sin^2 x = 1-\cos(2x).\,$Thank you!
Comment: Can residue calculus be used?
Comment: But $\displaystyle\int_{0}^{\infty}\frac{x^{2n-2}}{x^2+4}dx$ diverges when $n>1$!!!
Comment: According to WA the result is given by $$\frac{(e^2-1)\pi}{32e^2}$$
Answer: Let $J(a)=\displaystyle\int_{0}^{\infty}\frac{ax-\sin ax}{x^3(x^2+1)}dx$. Differentiating by $a$ three times (which is admissible under the integral sign, because the resulting integrals converge uniformly for $a$ in any finite interval), we get $$J'''(a)=\displaystyle\int_{0}^{\infty}\frac{\cos ax}{x^2+1}dx=\frac{\pi}{2}e^{-|a|}.$$ With $J(0)=J'(0)=J''(0)=0$ this gives $J(a)=\dfrac{\pi}{2}\Big(1-|a|+\dfrac{a^2}{2}-e^{-|a|}\Big)\operatorname{sgn}(a)$.
The answer is $\dfrac{J(2)}{16}=\dfrac{\pi}{32}(1-e^{-2})$ as expected.
Comment: You still need to prove the integral for the third derivative, which is most easily done by contour integration. But +1 nonetheless
Comment: (I'm giving this as an alternative to the contour integration method.)


If I wanted to animate, say, a mannequin and an origami bird, would I use a charm or transfiguration?

Question: From what I understand, the fundamentals are: charms add properties to an object (like invisibility, buoyancy, etc.) and transfiguration changes what something is (like the substance and shape). So would one use a charm, transfiguration, or a transfiguration charm (if that's a thing)? And what if I wanted to transfigure an object and then animate it, say if I wanted to turn a brick into a toy and then make it fly?
Comment: "Just asking for a friend"?
Answer: Charming an origami bird, or to use a more HP example, a chocolate frog, to move around almost certainly involves no transfiguration, only charms.
(This is especially obvious with chocolate frogs, since transfiguration can't create food - this is one of Gamp's Laws.)
In the second case, you would use transfiguration on the object to change it, then an animation charm on the resulting transfigured object.
Transfiguration charms (or something close to that) might be a thing, such as with the Weasley twins' joke wands (which, as I understand it, are charmed to transfigure themselves). But your example isn't likely to involve any.
Comment: I probably understand more than I give myself credit for, but could you walk me through the theory behind Piertotum Locomotor (http://harrypotter.wikia.com/wiki/Piertotum_Locomotor)? (Perhaps even add that to your answer)?
Comment: @JustinAlexander If you made it a bit more clear and specific what you're asking (what do you mean by "the theory behind"?), you could post that a new question. See [this question](http://scifi.stackexchange.com/questions/24713/what-are-the-rules-and-limits-of-accio-spell) for a possible precedent.
Comment: @JustinAlexander What has that thing have to do with your original question?
Ask another question about the workings of the spell or whatever that is.
Comment: @JustinAlexander As typically in that sort of answers, I'm using some common sense, not actual specific knowledge... I didn't even remember that scene from book 7 (I was thinking about the regular condition of the Hogwarts suits of armor - it might be fanon that they're normally moving), and I certainly didn't remember that particular spell. I can't even figure out why does the linked article say it is Transfiguration (my best guess is that this is mentioned directly in the book, which I don't have). I've added a different consideration to my answer, however.
Comment: @Cherubel I'm merely trying to understand the rules behind the magic. I'm apprehensive about making a new question because isn't asking about theory too broad for SE?
Answer: Probably a charm
As mentioned in the question, transfiguration does usually physically alter objects, whereas charms can have a variety of effects.
One of the most prominent examples of animating objects is a charm—Wingardium Leviosa:

On Halloween morning they woke to the delicious smell of baking
pumpkin wafting through the corridors. Even better, Professor Flitwick
announced in Charms that he thought they were ready to start making
objects fly, something they had all been dying to try since they'd
seen him make Neville's toad zoom around the classroom. Professor
Flitwick put the class into pairs to practice. Harry's partner was
Seamus Finnigan (which was a relief, because Neville had been trying
to catch his eye). Ron, however, was to be working with Hermione
Granger. It was hard to tell whether Ron or Hermione was angrier about
this. She hadn't spoken to either of them since the day Harry's
broomstick had arrived.
—Harry Potter and the Sorcerer's Stone

This also shows that making objects fly is generally a charm.
To clinch it, in Harry's first year, Professor Flitwick (the charms teacher) had his students animate a pineapple as part of their practical exams.

They had practical exams as well. Professor Flitwick called them one
by one into his class to see if they could make a pineapple tapdance
across a desk.
—Harry Potter and the Sorcerer's Stone

A combination of transfiguration and animation would then most likely require both a charm and a transfiguration spell.
Answer: If you are a hard-working wizard and take your studies seriously, then you will learn to use advanced Transfiguration to turn inanimate objects to animals.
See Harry Potter and the Philosopher's Stone chapter 8.

Professor McGonagall was again diffrent. Harry had been quite right to think she wasn't a teacher to cross.  Strict and clever, she gave them a talking-to the moment they had sat down in her first class.
'Transfiguration is some of the most complex and dangerous magic you will learn at Hogwarts,' she said. 'Anyone messing around in my class will leave and not come back.  You have been warned.'
Then she changed her desk into a pig and back again.  They were all very impressed and couldn't wait to get started, but soon realized they weren't going to be changing furniture into animals for a long time.  […]

See also Prisoner of Azkaban chapter 16.

Exam week began and an unnatural hush fell over the castle.  The third-years emerged from Transfiguration at lunch-time on Monday limp and ashen-faced, comparing results and bemoaning the difficulty of the tasks they had been set, which had included turning a teapot into a tortoise.  Hermione irritated the rest by fussing about how her tortoise had looked more like a turtle, which was the least of everyone else's worries.
'Mine still had a sprout for a tail, what a nightmare …'
'Were the tortoises supposed to breathe steam?'
'It still had a willow-patterned shell, d'you think that'll count against me?'


I cannot exec into a docker container running in ECS

Question: I'm attempting to login to a container (from ECR) deployed into an AWS ECS cluster. For what it's worth I'm using the docker compose/ecs integration to deploy this cluster. My docker compose file is very minimal. The container needs a GPU so I'm deploying it to a GPU instance (g4dn.12xlarge) with an ecs optimized ami, ami-03d0d75de9d82f509 (amzn2-ami-ecs-gpu-hvm-2.0.20221230-x86_64-ebs).
I'm trying to exec into this container but am unable to login.
I've executed this command to attempt login:
aws ecs execute-command --cluster apptest --task 36fd9d835ad24b4ca188e40c59768cee --container apptest --interactive --command "/bin/sh"

I'm getting the following error:
The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.

An error occurred (TargetNotConnectedException) when calling the ExecuteCommand operation: The execute command failed due to an internal error. Try again later.

I would really appreciate any additional info on why I might be getting this error and what I should check/test.
I've run the amazon-ecs-exec-checker script which gives the following output (I have removed some account info). Exec is enabled for the task and I believe all the correct permissions are in place (SSM policy permissions, etc). When I searched for similiar errors on google I saw that this was an issue on older ami's but it should have been fixed.
    Prerequisites for check-ecs-exec.sh v0.7
-------------------------------------------------------------
  jq      | OK (/usr/bin/jq)
  AWS CLI | OK (/usr/local/bin/aws)

-------------------------------------------------------------
Prerequisites for the AWS CLI to use ECS Exec
-------------------------------------------------------------
  AWS CLI Version        | OK (aws-cli/2.9.9 Python/3.9.11 Linux/5.10.149-133.644.amzn2.x86_64 exe/x86_64.amzn.2 prompt/off)
  Session Manager Plugin | OK (1.2.398.0)

-------------------------------------------------------------
Checks on ECS task and other resources
-------------------------------------------------------------
Region : us-east-1
Cluster: apptest
Task   : arn:aws:ecs:us-east-1:****:task/apptest/36fd9d835ad24b4ca188e40c59768cee
-------------------------------------------------------------
  Cluster Configuration  | Audit Logging Not Configured
  Can I ExecuteCommand?  | arn:aws:iam::****:user/***
     ecs:ExecuteCommand: allowed
     ssm:StartSession denied?: allowed
  Task Status            | RUNNING
  Launch Type            | EC2
  ECS Agent Version      | 1.67.2
  Exec Enabled for Task  | OK
  Container-Level Checks |
    ----------
      Managed Agent Status
    ----------
         1. STOPPED (Reason: Received Container Stopped event) for "apptest_ResolvConf_InitContainer" - LastStartedAt: null
         2. RUNNING for "apptest"
    ----------
      Init Process Enabled (apptest-apptest:14)
    ----------
         1. Disabled - "apptest_ResolvConf_InitContainer"
         2. Disabled - "apptest"
    ----------
      Read-Only Root Filesystem (apptest-apptest:14)
    ----------
         1. Disabled - "apptest_ResolvConf_InitContainer"
         2. Disabled - "apptest"
  Task Role Permissions  | arn:aws:iam::****:role/apptest-apptestTaskRole-12KZYNKIW0B65
     ssmmessages:CreateControlChannel: allowed
     ssmmessages:CreateDataChannel: allowed
     ssmmessages:OpenControlChannel: allowed
     ssmmessages:OpenDataChannel: allowed
  VPC Endpoints          | SKIPPED (vpc-020109*** - No additional VPC endpoints required)
  Environment Variables  | (apptest-apptest:14)
       1. container "apptest_ResolvConf_InitContainer"
       - AWS_ACCESS_KEY: not defined
       - AWS_ACCESS_KEY_ID: not defined
       - AWS_SECRET_ACCESS_KEY: not defined
       2. container "apptest"
       - AWS_ACCESS_KEY: not defined
       - AWS_ACCESS_KEY_ID: not defined
       - AWS_SECRET_ACCESS_KEY: not defined

Answer: Check if you can use AWS Session Manager to connect to the instance. I was having the same issue and I found it was because the SSM agent on the instance could not connect due to having restricted egress network access.


Is it possible to reset NXP LPC2100 microcontroller from code

Question: I'm curious? A watchdog timer could do this, but I would like to do it manually.
Answer: reemrevnivek has the right idea, but there's a better way.
WDTC = 1024;              // short timeout; we don't care (won't be using it)
WDMOD = WDEN | WDRESET;   // watchdog resets CPU
WDFEED = 0xAA;            // start ...
WDFEED = 0x55;            // ... watchdog.
WDFEED = 0xAA;            // start ...
WDFEED = 0x00;            // ... invalid WDFEED sequence causes instant reset.

That will give you an immediate reset without the need for waiting.
Note that simply jumping to location 0 isn't the same as a real reset. Jumping to 0 doesn't reset any peripherals nor does it reset the ARM core's state. It may sound like I'm nitpicking here, but you can run into some very unusual and difficult to debug issues if you are expecting a reset and don't actually get one.
Answer: From a quick look at the datasheet, I believe that the watchdog is the only way to reset under software control.

Reset has two sources on the
  LPC2101/02/03: the RST pin and
  watchdog reset. The RST pin is a
  Schmitt trigger input pin with an
  additional glitch filter. Assertion of
  chip reset by any source starts the
  wake-up timer (see wake-up timer
  description below), causing the
  internal chip reset to remain asserted
  until the external reset is
  de-asserted, the oscillator is
  running, a fixed number of clocks have
  passed, and the on-chip flash
  controller has completed its
  initialization.

To do a software reset, start the watchdog with a small timeout value, then go into an infinite loop.
Comment: This is exactly what I did a few years ago on the LPC2148, worked like a charm.
Comment: It might be possible to arrange some other kind of suicide reset with external logic, but if you already have a WD..

Just make sure you know what way it behaves when it comes back out of WDR so you won't be in a reset loop or such.
Comment: Yes, the watchdog is how I did it with an LPC2148 application, as well.
Comment: The watchdog timer here is mislabeled.  ARM documentation as well as Atmel and TI/Stellaris implementations of the ARM7TDMI (for starters) all refer to this interrupt as Reset, not 'Watchdog' as NXP does.  Use it like you'd use a reset interrupt.
Answer: Don't run interrupts by starting the timers with a small value - Write directly to the interrupt flag!
Leon's post wants you to run the interrupt as defined in the user manual, page 219:
WDTC = 1024;              // short timeout - WASTEFUL!
WDMOD = WDEN | WDRESET;   // watchdog resets CPU
WDFEED = 0xAA;            // start ...
WDFEED = 0x55;            // ... watchdog.

Instead, do the timer's job for it - Write to the WDINT bit (Which triggers the watchdog interrupt) of the WDMOD register directly, instead of waiting for the timer:
WDMOD = WDEN;       // Enable interrupt
WDMOD |= WDINT;     // Trigger interrupt

The datasheet says that it's read-only, which is a surprise to me, but the TI and Atmel processors I've used usually have writable interrupt triggers.  Give it a try, and see what happens.
The more portable alternative is a software interrupt.  I haven't worked with NXP processors, but the ARM7TDMI family (of which the LPC2100 is a member) can be reset by branching to 0x00000000.  Interestingly, NXP refers to this address as the watchdog interrupt. You should be able to branch to zero with code like:
void (*reset)(void); // Declare function to call
reset = 0x00000000;  // Address in memory of reset ISR
                     // (See Table 2-4 of ARM7TDMI TRM or
                     // Table 2 of NXP UM10161)
reset();             // Call your new function

Alternatively, use:
asm volatile ("mov pc, #0\n");

to accomplish the same thing.
There might be a few housekeeping things left to do, but this code will basically do the same thing as the watchdog timer, which is to start your program over from the beginning.  This code will also work across a wide number of microcontrollers.


Scripting git commands with Python

Question: Is there any way to pass the username and password to a git command so I can script it through  Python? I understand the password will be in cleartext but for my application it is not a problem.
Answer: Use SSH keys for authentication. It sounds like you might be on Windows, so you'll want to look into PuTTY's Pageant. More information on your situation would be helpful.

Scripting git commands with Python


Stopped discovering Printers

Question: Ubuntu 11.10 today on one machine has stopped discovering printers the tick is in the box and noone has changed the settings.  The CUPS print server is working fine as other ubuntu laptops see the printers and so does windows machines.  I have restarted cups on that machine but nothing seems to happen, it can see only the local usb printer and see the cups shared printers on the server but will not connect to them any idea please.
Comment: Close voters: This question has a good and accepted answer. There is no need to close this.
Comment: If this question were asked today it would be off topic but when it was asked 11.10 was supported and the answer may still be relevant.
Answer: No need to answer this one, I figured out the problem, when I restarted the machine which has been running flawlessly for a few months now I forgot that I installed firestarter which blocked the ports to CUPS server.  Added the printer port and all is working fine now :)

Stopped discovering Printers


Best way to mill grains

Question: I've brewed many extracts but want to get into whole grain brewing.  What equipment do I need?  Any recommendations for beginner / low-cost grain mills?
Answer: I personally don't mill my own grain, my local homebrew shop has a mill and I use it regularly and have produced great beers with it.
I understand that it's better to mill your grain as close to brewing time as possible, but I would suggest, if possible, delay the purchase of a grain mill a bit. I think you'd be better served by getting a great mash tun or a wort chiller (if you don't already own them)
Comment: +1 for investing in a mash tun and wort chiller first. I buy and crush my grains at my LHBS on brewday and have had great results. But an MLT and wort chiller are a huge priority IMO.
Comment: Agreed.  Invest in other equipment first.  Make sure you stick with homebrewing.  Using the mill at the local shop will work for quite a while.  Only when you are looking (again) to save money should you invest in your own mill.  And that is only because you will start buying your base malts in 40 lbs. sacks.
Comment: You are assuming that everyone lives near a homebrew shop! I don't and have to order my grains. I don't want to buy them pre-ground since I may not get around to grewing for a month or two. For me, a mill is essential. And no, I don't have a wort chiller.
Answer: I've got a Victoria Grain Mill.  It was about $50.  It looks like a Corona mill, but I've read that they are better suited to grinding malt than Corona mills.  I don't know if that's true or not, but this Victoria mill works great.  The closest store to me is a couple of hours away, including a ferry ride, so I'd much rather be able to grind my own grain.  I was a little worried just after I bought it, but it has been great.
I suggest grinding your grain a day or a few days before brew day.  An all-grain batch is a big process, and removing this one self-contained part of it makes brew day easier.
I also suggest grinding out-of-doors if possible.  Just the dust produced by dumping your grain out of the sacks justifies this, but the grinding will make more mess.
A grinding session, including getting everything out, weighing, grinding, and putting it all away takes me less than an hour.  The grinding itself is maybe 20 minutes.  My kids love helping with the grinding -- I have to give them a time limit of a minute each at a time.  Outside, on the deck, in the sun, handling and smelling the wonderful grains -- it's a great time.
Comment: yep, for me grinding your grains is a really fun part of the brewing process. I just bought a Corona mill and I just can't stop grinding!
Answer: As has been said, the cheapest option is to use your Local Home Brew Store's mill. Or see if there is a local brewery near by that you can befriend.
I found that moving away from the LHBS' mill was a huge benefit.

More consistent milled product which allowed for better accuracy of brew targets over time.
Easier to buy in bulk
Can adjust my recipes on brew day (without having extra cracked grains)
Can adjust the mill gap depending on the ingredients (rye vs wheat vs barley)
I get to eat more whole grains to make sure I am happy with the flavor profile

If you venture out into a more expensive home mill, there are a couple of things you will want to consider:

Can it handle the volume you want to run?
Can you adjust the mill gap?
Can you upgrade it as you go along?
How does it get mounted?

After googling around a bit I found three vendors in the running for my mill:

http://www.monsterbrewinghardware.com/
http://www.barleycrusher.com/
http://www.crankandstein.net/

I ended up going with the Monster Mill 3 roller w/ 1/2" drive but my gut is any of these are fine products. I "motorized" mine with a Dewalt 1/2" corded screwdriver (12amp hammerdrill). These can also be fitted with a set of wheels and belts to do a more permeant installation.
If you brew by yourself, I recommend getting a good size hopper and rollers big enough for the job. I just put the mill on top of a bucket, dump a whole bucket in the hopper and then crack those (while my water is coming up to strike temperature).
Also, check the gap on the mill ever couple of grinds. Even though I have marked (sharpie) the spot where I have set the mill gap, it does not take much to get out of position. I use my VW's feeler gauges for this.
FWIW, We have been very happy with getting the mill and cracking the grains right before dough in is not problem.
Answer: I have a MaltMill and it really gives me a consistent crush which gives me a fairly high malt extraction efficiency percentage. Around 70-80%. It's definitely a higher end mill at around $150.
You can get a Corona grain mill for around $40-50 with some Google searching. That will work pretty well, but not great.
If you get either of the mills, make sure you modify them to work with a drill or a motor so that you don't have to spend 30 minutes cranking away.
Or just do what Nathan suggested and just get it milled as close to brew time as possible.
Have fun with All Grain!
Answer: I bought a corona mill for 40 euros (58 USD). Not cheap, but I couldn't find anything else in Madrid and wanted it immediately.

The mill works pretty well, although it is probably not really designed for the coarse grinding we want for malts. It is more for making finer flour. I couldn't get enough separation between the two grinding plates so I had to loosen the lock pin (see image, pin on far left) which made the whole thing wobble about a bit.
However, I have used the mill quite a bit and the grind comes out fine. Or, at least, I usually seem to hit my target gravities with an extraction efficiency of ~70% which is fine by me.

Best way to mill grains


Searching for old bitcoin "accounts "

Question: I recall accepting bitcoin payment several years ago when the concept was fairly new. My trouble is, I don't know what happened to the bitcoin after the receipt. What methods are available to search for "lost or abandoned " bitcoin?
Thanks in advance
Becky
Comment: If you do not control the private keys to the addresses where you received your bitcoins, there is no way to recover it. However, if you were using a third party service that were holding your bitcoins for you, you can enquire with their customer service department
Comment: How did you use to accept Bitcoins? Using what software?
Answer:
What methods are available to search for "lost or abandoned " bitcoin?

There are no methods available to other people (third parties). People could search for dormant amounts that were outputs of old transactions and not yet used as inputs to subsequent transactions - but those amounts may not actually be lost or abandoned. There is no way to recover control or gain control of these amounts without additional information known only to the person who received those amounts of bitcoin.
If you previously received some amount of bitcoin into a bitcoin wallet, you can search for evidence - perhaps a note of an online website who stored that amount on your behalf and who you could now contact for assistance. Perhaps some old "wallet.dat" files on a PC that indicate you had a desktop wallet with control of your own private keys. Maybe an app on an old phone in a drawer. Perhaps a written down recovery seed or private key in a locked box you use for important documents.
Answer: In order to get access to the bitcoins, you need to have the access to the bitcoin address or the bitcoin wallet (usually a wallet.dat file) containing that address.
If you have the address, you can check if it has any balance on it with various explorers. [1] [2] [3]
You can access the address if you have its private key (password).
If you have the wallet.dat file, you will need a password to unlock it if it has been encrypted. Else, you can access it without a password.

Searching for old bitcoin “accounts “


Is the Bose-Einstein condensation a single particle phenomenon?

Question: BEC occurs for noninteracting Bosons. Can we conclude that it can be described with a single particle? What is the significance of the number of the particles?
Answer: What @Árpád Szendrei said is correct. I will add some miscellaneous points.

BEC occurs for non-interacting bosons

BEC occurs for interacting bosons as well, and non-interacting BEC is actually a pathological example. It has an infinite compressibility. The speed of sound is zero, and any infinitesimal drag will create excitations. A weakly interacting BEC has a non-zero speed of sound, and acts like a superfluid. It IS possible to make a non-interacting BEC, by modifying the scattering length between atoms to zero, using external fields (see Feshbach resonance).

The "wavefunction" that people usually discuss ($\psi(r) = \sqrt{n(r)}e^{i\phi(r)}$) is technically not the actual many-body wavefunction, but an order parameter of the condensate. This "wavefunction" obeys a non-linear Schrodinger-like equation called the Gross-Pitaevskii equation.

What is the significance of the number of the particles?

It would help if the question is more precise, but usually a common question is whether the form of the order parameter mentioned above conserves the number of particles. The fact is, it doesn't, because it has a well-defined phase. It has a well-defined average of numbers, though. There is fluctuation in the number of particles, but (fluctuation)/(average) quickly goes to zero in the thermodynamic limit. [to find fluctuation in numbers, you need to look at the full Hamiltonian in second quantization form to get answers quick, so what I said is not really rigorous but just a sketch].
Comment: @richard, It all has to do with density of states. When the temperature is low enough, the thermal average number of atoms occupying the excited states will saturate, and any new atoms introduced to the system will start to occupy the ground state. The form of the density of states is set by external potential/boundary condition, and it dictates how the saturation of excited states occur. In a box potential, critical temperature increases with density. In a harmonic trap, critical temperature increases with number (not density!)
Comment: About the point 3: What I meant is that since there is no interaction between particles how the large number of them make the phase transition to happen?
Answer: The Bose Einstein condensate is a QM effect of collective quantum state in which a macroscopic number of particles occupy the lowest energy state and thus is described by a single wavefunction.
All the bosons will be described by the same wavefunction.
So it is not a single particle, but all the particles (their probability distribution) are described by the same wavefunction.
Answer:
BEC occurs for noninteracting Bosons. Can we conclude that it can be described with a single particle?

No, generally not. Most BEC systems in literature are described by a Hamiltonian
\begin{equation}
H = \sum_{i=1}^N h({\bf r_i}) + \lambda_0\sum_{i < j}W({\vert \bf r_i - \bf r_j\vert})),
\end{equation}
where $h({\bf r})$ is a single-particle Hamiltonian and $W({\bf r})$ is an interaction potential.
Now write $\phi_0({\bf r})$ for the ground state of $h({\bf r})$.
For $\lambda_0=0$, the ground state of $H$ is $\Psi_0({\bf r}_1,\dots,{\bf r}_N)=\phi_0({\bf r}_1)\times\dots\times \phi_0({\bf r}_N)$. So $\Psi_0$ is just a single particle wave function, $\phi_0({\bf r})$,  multiplied $N$-times.
But for most physical systems $\lambda_0\neq 0$. The many-body ground state $\Psi_0$ then no longer factorizes into a simple product as above. In fact, it can be very far away from that and consists of a superposition of $N$-boson states. So a single particle wave function no longer suffices to describe your system.
For that reason, BEC is nowadays usually defined in terms of the eigenvalues and eigenfunctions of the first order reduced density matrix, see Penrose and Onsager and the answer to this question. This criterion extends the concept of "${\mathcal O}(N)$ particles in the same state" to interacting systems. The book by Leggett is a more accessible reference on this topic than the original paper and also discusses the issues that arise in other attempts to define BEC.


Can looking at the sun through solar viewing eclipse shades everyday harm your eyes?

Question: I have a pair of Solar Viewing Eclipse Shades that say "Safe for Direct Solar Viewing" and would like to know if my eyes would be harmed if I looked at the sun everyday for about a minute wearing them.
Comment: That's really a question for the manufacturer.  Without knowing the exact specifications it is impossible to say.  If they are really safe for viewing then they should block all ultraviolet and be no danger unless the sun looks too bright in them.  They should probably only be worn when looking directly at the sun though, if you keep them on when not looking at the sun then your pupils will dilate and let in more light when you first start looking at the sun.
Comment: @JasonGoemaat Thanks for your comment! I will send the manufacturer this question.
Comment: It's always a risk to look directly to the sun, even if the glasses absorb uv. If something goes wrong, you're looking to the sun in an unprotected way. Hence it's always urgently recommended to use a projector instead, and to look to the projected image of the sun. There exist Hydrogen-alpha filters designed particularly for direct observation of the sun with telescopes. Not free of risk, nevertheless.
Comment: If you need to do this every day, why not do it right and get a [welding helmet](http://en.wikipedia.org/wiki/Welding_helmet)?
Comment: How about selecting an answer from those provided, and ticking it?
Answer: It depends on the quality of glasses and intensity, nature and degree of harmfulness of sunrays which you are watching to. Every eclipse has different intensity so as it can harm you.
When there was a solar eclipse around 3-4 years ago, it was a full solar eclipse. That time I watched it from my school with total naked eyes. My eyes were not harmed from that, but my school principle did.
But I still recommend you to not to watch it directly, use projectors which would allow you to get the view without directly watching the sun. Only use original products which are being certified.
Answer: Assuming that the glasses are safe for direct viewing of the sun as claimed, and assuming you don't damage them, then yes, they should be safe for viewing the sun daily in the manner you suggest. There would not be an accumulative harm effect.
Again, assuming the glasses are safe for direct viewing, you'll probably be at more risk for the rest of the day when you are walking around with naked eyes.


Do SSDs get fragmented, and if they do, is that an issue?

Question: Do solid-state drives get fragmented? And if they do, does it cause their performance to suffer?
Comment: @JaderDias The following article provides a nice explanation: http://www.hanselman.com/blog/TheRealAndCompleteStoryDoesWindowsDefragmentYourSSD.aspx
Comment: No heads to thrash, so, no suffering.
Answer: Yes, SSDs do get fragmented. Does it impact performance as much as regular hard drives? No.
Fragmentation just refers to the placement of files out of order. It's necessary on all storage devices without having to reshuffle all the data that has ever been written every time you write something.
Comment: The fragmentation does not really hinder performance because, unlike HDDs, there is no seek-time penalty for SSDs (at least nothing of the same order of magnitude). However, wear-levelling does tend to "consume" free space whenever a file is deleted (so the SSD's performance is reduced unnecessarily); this is where the TRIM command helps.
Comment: @sblair That information is obsolete. Fragmentation on SSDs does hinder performance because each extent in the file has to be processed by the filesystem, updated when the file is deleted, and so on. The affect is particularly dramatic when file snapshotting and versioning is in use, which is typical on Windows systems.
Comment: @AaronFranke I'm not sure what you want a source for. That was a reasoned argument that includes the facts it's based on. SSDs are IOPS limited and fragments increase the IOPS required.
Comment: @DavidSchwartz Source?
Answer:
Solid-state drives DO NOT require
  defragmentation. It may decrease the
  lifespan of the drive. Wear leveling technology purposely "fragments" the data to ensure the consistent life of the drive.

Source: OCZ
Comment: This is also true. Since flash memory wears out after so many read/writes (I think mostly writes), it makes sense to spread out the activity throughout the drive. For instance if you have a 64GB SSD and you always find yourself using around 20GB, if it didn't automatically fragment you would end up killing the drive while unfortunately 44GB of the drive is still pristine.
Comment: This information is obsolete. Modern SSDs do not have their lifespan significantly affected by occasional defragmentation, and fragmentation does harm SSD performance. For example, consider the difference in work that must be done when a file with 1,000 extents is deleted compared to a file with a single extent.
Comment: Don't modern SSDs automatically level out the load across blocks, so that fragment-less file systems will have the same (if not a higher) lifespan than fragment-filled ones?
Answer: "Suffer"? No. Experience? Yes.
Fragmentation is simply when files are written to non-contiguous blocks. This is not a problem with a fresh, clean drive, but after a while, as the drive fills up and files are deleted, new files eventually begin to get written into whatever blocks are available which may not always be big enough for the whole file. There's really no way around it (short of writing everything once to an empty drive then not writing anything ever again), not even with a better file-system.
However, as sblair pointed out, it's not actually a problem with SSDs like it is with HDs because there is no head to physically move around the disk to collect data, so there is no performance penalty.
Also, as Marcin and Molly explained, SSDs need to scatter data throughout the whole drive to prevent the beginning of it from getting worn out while the rest of it remains unused. As a result, SSDs purposely fragment data to spread it around the whole drive. Also, you don't want to defragment SDDs because not only does it defeat the purpose of spreading the data around, but all the extra writes wear it out faster. Robers gave a good explanation about how SSDs are different from traditional spinning disks and that the sectors on an SSD do not reflect the physical layout.

This is yet another benefit of SSDs over spinning HDs: fragmentation is no longer an issue.
<code>SSDs : 5 (less power, less heat, faster, no fragmentation, smaller)
HDs  : 1 (longer lasting)
</code>
Caveat:
All this does not however mean that SSDs are the ideal, care-free storage solution. Aside from the fact that they wear out, there is a critical issue to be aware of. While it's true that SSDs employ wear-leveling and their firmware manages sector mapping, that does not negate the fact that SSDs, like all storage devices that allow modification, do become fragmented which is death when you need to recover lost files.
Using a more tolerant filesystem like NTFS instead of FAT32 helps to some degree, but the fact is that a fragmented file is much harder to recover (if not flat out impossible) than one that is not fragmented. Of course in this case, "fragmented" means from the OS' point of view irrespective of the physical layout.
Answer: You actually can suffer reduced performance from fragmentation on SSD.  Fragmentation remains a logical problem because the OS/filesystem has to keep track of all the pieces of files, and the pieces of free space.  As files shrink and grow and as free space becomes more logically fragmented, over time, I/O operations will naturally become smaller, while the OS/filesystem will naturally consume more CPU overhead to figure out where to put the next piece of data to store, or when reading more overhead to figure out where all the bits of a massive file are.
Basically, IOPS will rise as fragmentation grows.  More IOPS generally is bad.  Am I wrong?
This may not seem as evident with non-file-based systems like databases that store all their content in a massive blob of disk space (letting the DB manage fragmentation a layer or two up from the filesystem).
However, you can and will suffer from fragmentation even on SSD if you don't do something on some basis to mitigate the long-term effects.
SSD is really freakin amazing, but is not the panacea.  Anyone who insists fragmentation is a thing of the past on SSD is most likely selling something.
Comment: Indeed, looking at a randomly selected SSD benchmark (like https://www.anandtech.com/show/7173/samsung-ssd-840-evo-review-120gb-250gb-500gb-750gb-1tb-models-tested/8) reveals that many SSDs prefer large sequential reads instead of small random reads. You may even come to  a point where a framented SSD delivers less performance than a deframented spinning disk.
Answer: The general consensus is that they can fragment, but that it's not necessary to defragment and, worse, it could lead to a shorter drive life. I like Tom's Hardware and their explanation when investigating Diskeeper's SSD defragmentation product.
Answer: The reason you suffer from fragmentation, generally, is because the drive head has to move to many different places to access the file. It has to physically move, which takes time. With a solid-state drive (SSD), you'll still experience the fragmentation, but there are no moving parts that have to actually move to the location of the other parts of the file, so you don't encounter the same symptoms (reduced performance).
Also, solid-state drives have a finite number of times that they can be written to. So, defragmenting them may actually reduce the lifespan of the disk while not really giving you the benefit of increased performance like you would experience with a disk that has platters.


cron error Fatal error: Call to undefined function filter_xss()

Question: I am running a remote command on my server to execute cron.php and I get this error : Fatal error: Fatal error: Call to undefined function filter_xss() in /home/k1004/html/www_dem
o/oan/srcs/includes/common.inc on line 655
Does anyone have an idea about where it comes from??
Answer: Can you make sure the filter module is enable.
I think this problem is because you have a function call to filter_xss() before the filter module load.
Is your Drupal is stand install or this problem exist after install other module?
Comment: Yes I think normally the filter module is enable since I can't see a way to enable/disable it. I guess it may be one of the modules I have installed but I can't figure out which one.
Answer: I finally found a patch that solved the problem. It seems that it was a problem in the core update I have made.


How to cite a subsection of a book for IEEE

Question: For example, we use pp. 4-7 for pages from 4 to 7 and ch. 2 for chapter 2, but how should we cite a subsection of a book when a chapter is divided into multiple subsections, e.g. 2.1, 2.2, ... in a way that's compatible with IEEE writing style?
Answer:
how should we cite a subsection of a book when a chapter is divided into multiple subsections, e.g. 2.1, 2.2, ...

Rather than citing the entire book, e.g., [1], you can cite a particular subsection, e.g., [§2.1, 1], [§2.2, 1], ..., meaning section 2.1, 2.1, ... of [1]. With Latex, you can use <code>\cite[\S2.1]{X}</code>.
Comment: Thanks, but I was looking to see if there are special characters for subsections like ch. is for chapter or pp. is for pages or p. for page, etc.
Comment: @FriendlyFella I've given that symbol: §.
Answer: Going by this description of the IEEE citation style, you would just cite the page range, like this:

Chapter in book
[2] L. Stein, "Random patterns," in Computers and You, J. S. Brake, Ed. New York: Wiley, 1994, pp. 55-70.

It doesn't seem to be necessary to give the exact chapter/section number.
Comment: I don't understand the downvote, since this is what the citation style guide says you should do.
Comment: Would someone explain why this answer is downvoted? I accepted the other answer, because it suggests using "§" for sections and that is concisely what I was looking for, but I don't see why this answer would be wrong.


Kali linux run airbase-ng along with wpa_supplicant

Question: I have a notebook with installed kali linux with a built-in wireless card and I have also an external USB wireless adapter. I'm able to connect to networks with both of them, and I have no problems when using airbase-ng to set up an AP with the built-in card. But what I wanted to do was to connect to my network (uses WPA) with the usb dongle, and share it's Internet access with the airbase AP. The problem is that airbase-ng doesn't want to work when wpa_supplicant is running, and without it, I just can't connect to WPA networks. If you know how to make this work, I would be really grateful.
Answer: <code>airmon-ng check kill
ifconfig wlan0 up
wpa_passphrase "essid" "password" > /etc/wpa_supplicant/wpa_supplicant.conf
wpa_supplicant -B -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0
dhclient wlan0
</code>
This way you can connect through the terminal


birkas hagomel: based on the toda?

Question: Is birkas hagomel based on the korban toda? B'rachos 54:2 seems to derive it from p'sukim without reference to the toda; Rambam puts one in Maase Hakorbanos and the other in B'rachos without any mention in either place of the other rite. Yet I seem to recall that there's a connection between them: does anyone know whether there is one and what it is?
Comment: "_Rambam puts one in Maase Hakorbanos and the other in B'rachos_ ..." 'One' and 'other' what? Also, can you cite specific places (especially the _Ma'aseh ha-Qorbanot_ one)?
Answer: In the times of the Beis HaMikdash, a person who survived a potentially life-threatening situation brought a Korban Todah, to express his gratitude to Hashem. (Vayikra 7:12 Rashi and Rashbam)
Nowadays, when we no longer have the Beis HaMikdash and Korbonos cannot be brought on the altar, we substitute Birchas HaGomel a public proclamation of gratitude to Hashem for an offering. (Rosh, Berachos 9:3, Chasam Sofer Orach Chaim 51 and Avnei Nezer Orach Chaim 39)

birkas hagomel: based on the toda?


How to map fence post holes to reality?

Question: I'm looking for a good technique to take points, which mark the locations of fence post holes, from a Google map layer to then precisely mark with paint where to drill the holes. I noticed that my neighbor's fence isn't straight, and I want mine to be geographically straight. :-) I'm looking for a simple device or iPhone app to find the points I have for the fence boundaries out in the field.
Comment: Though you'll likely have this question closed: I don't know I would trust the accuracy of google maps compared to real GPS coordinates... further to that, if the two end points of the fence are straight, do what the old timer down the block from me die - tie a string to those two posts, and re-drill the holes along that line!!
Comment: If you want to mark your property boundary employ a surveyor, it's bound to be **much** cheaper than purchasing accurate DGPS equipment and learning how to use it. Ask your surveyor for the coordinates of pegs as a table then convert X,Y to points, draw a line between and break the line or generate points along the line every n to locate your pegs. If your pegs are painted white/red they should be easy to see and line up in the field, if you're having difficulty erect a pole panted with bright colour near the peg to draw your eye to it.
Comment: yes, you got my voice to keep this on the board. also, are you willing to invest in either a tachymeter or dronebased LiDAR survey and some time to get into a full webbased geostack to publish your results online?
Answer: Google Earth not accurate enough (you are looking for cm accuracy here) especially if you are taking your points from the rubber-sheeted aerial images.  When you combine this with the inaccuracy of your phone's GPS (+/- a few meters - the US government quotes about 5m - see here) you will get a wiggly fence line using the method you suggest (or all your posts offset potentially on somebody else's land).  The GPS systems surveyors use are a different thing altogether.  They also use lasers instead of string.  They are much more expensive and more accurate too.
The two suggestions in the comments are worth considering.  If you have a smaller or very simple boundary and can clearly identify the corners, go with DPSSpatial's suggestion of string (but not in a high wind as it will bend).  If your boundary is larger and/or more complicated, get a surveyor to mark it out.  If there are any legal considerations, then the absolute cheapest option in the long run is to have a surveyor come on site and mark the line for you (it will potentially save you thousands in expensive court disputes).  They say good fences make good neighbours, but putting a fence on the neighbour's land will make for a very sour relationship no matter how beautifully straight you manage to make it!
Comment: to add to your last sentence: there should be some documentation on where the border is between the two land parcels which might be obtained from the local government or planning institution
Comment: Yes indeed!  A professional surveyor will need and want access to that document.

How to map fence post holes to reality?


Are duplicate addresses rare or not?

Question: I've read all over the place that two people receiving the same address is so astronomically high as to be almost impossible. But reading this question it seems that it's actually very possible that two people share the same address. Even if everyone has a different private key it will necessarily happen that two people will share the same address. Am I missing something?
Answer: It is indeed 'very possible' that two people share the same address. It is also extremely unlikely to happen with an astronomically small chance.
Yes, the chance may be much larger than two people sharing the same private key, but that does not mean it is large.
Ethereum addresses have 40 hexadecimal digits. Each digit can have 16 possible values. This means that the amount of possible addresses can be calculated like this:
16 ^ 40 = 1461501637330902918203684832716283019655932542976
Let's assume that all 6 000 000 000 humans each have 10 addresses.
The chance of you generating one that someone else already had is:
(10 * 6000000000) / (16 ^ 40) * 100%
=
0.0000000000000000000000000000000000041053665947 %

As you can see it's slightly misleading to describe it as very possible, and it will certainly not necessarily happen.
Comment: The probability is extremely small, but it is not zero.
Comment: I get that it's small, but because it isn't zero, I have to still ask... what happens IF two addresses are the same?
Answer: I suppose they would be able to access anything owned by that eth address.  I'm wondering if there can be two private keys for the same eth address, but I don't think it would make a difference in terms of governance over that eth addr.

Are duplicate addresses rare or not?


On a determinant inequality of positive definite matrices

Question: Assume that $B$ and $A$ are two positive definite matrices. Take $B^*$ a block diagonal matrix with block $B_{11}$ and $B_{22}$ of $B$. This means the following:
$$
B=\left[\begin{array}{ll}
B_{11}& B_{12}\\
B_{21}&B_{22}
\end{array}\right],
B^*=\left[\begin{array}{ll}
B_{11}& 0\\
0 &B_{22}
\end{array}\right]
$$
It can be seen that $2B^*\succ B$ and therefore:
$$
\det(I+2AB^*)\geq \det(I+AB).
$$
So I managed to prove that, however I have another conjecture that the following is true:
$$
2\det(I+AB^*)\geq \det(I+AB).
$$
My question is about the proof of this conjecture.
Answer: A quick counterexample to your conjecture is
\begin{equation*}
A = \begin{pmatrix}
 13    & 3  & -13 &   -5\\
     3 &    4   & -3 &    4\\
   -13 &   -3   & 13 &    5\\
    -5 &    4   &  5 &   10\\
\end{pmatrix},\quad B = \begin{pmatrix}
 15    & 3 &  -14 &   -1\\
     3 &   18  &  -6 &    3\\
   -14 &   -6  &  19 &   -1\\
    -1 &    3  &  -1 &    1
\end{pmatrix}
\end{equation*}
For this choice, $2\det(I+AB^*) \approx 6\times 10^4$, while $\det(I+AB)\approx 8\times 10^4$. The $A$ above is semidefinite; if that displeases you, then just add a trivial $\epsilon I$ to it, the counterexample will still hold.
Comment: Many thanks for the answer. Unfortunately I forgot to write an important assumption about $B$. All diagonal elements are equal: $b_{11}=...=b_{nn}=K$. I am not sure if this is significant or not for the problem. As a matter of fact I was trying to find an upper bound like $C\det(I+AB^*)\geq \det(I+AB)$ for some $C$ independent of the dimension of $B$. I wonder if this is possible. My numerical evaluation of the current problem shows that with this additional assumption, we can have $C=2$. I might have mistaken somewhere. Should I post this as question, if it can be an independent problem?
Comment: Even with the all diagonal elements equal this does not hold; take the matrix $B$ that I have above, set its diagonal to 15 (it still remains posdef); the conjecture still fails. Perhaps for it to hold $C$ has to depend on $n$ (the size of the matrices)---but am not sure about that. You might want to pose it as a separate problem.
Answer: From the comments, a true version is $$2^n\det(I+AB^*)\geq \det(I+AB),  \quad (1)$$ where $n$ is the dimension of $A, B$.
The proof is easy, as  $2^n\det(I+AB^*)\geq\det(I+2AB^*)$. Can $2$ be replaced by a smaller constant in (1)?


Encoding Android Camera Frames h263/h264

Question: I want to implement a Video Chatting app on Android . I created a SurfaceView , get Camera preview and captured the frame as a byte[ ] using Camera.PreviewCallback.onPreviewFrame( ) method . Now I want to encode that byte[ ] to a h263 frame , pass over the network . Also get similar type of frame over network , decode it to a byte[ ] ( or a displayable format ) , and show it in a View . I want to do it at least 15 FPS rate . I am asking help for the encoding/decoding part .
For that purpose , which library would be suitable for me ? From where I should start ? Is my starting point wrong ? Is there any support on SDK or would I have to use NDK ? I have heard about FFMpeg/x264 library , but I could not figure out how I can use them in my purpose . It's highly appreciated If you name any library , any reference , learning path , link or code snippet . Can you help me saying any workflow I should follow ? What if I want to use h264 encoding ? I just want to get it done , GPL/LGPL license of library would not matter a lot .
I am a beginner in Android development . Any kind of assistance would be highly appreciated . Thanks in advance .
Comment: Is H264 codec a requirement? Google has royalty-free VP8 encoder which is easy to use on Android.
Answer: Use VLC's x264 for that,it would be a better option.....
Answer: You can try javacv, which is a wrapper for ffmpeg, and there is also an example RecordActivity to refer.


What font is used in Pokemon X and Y?

Question: It is mostly used in subtitles and in the credits.
Here the example:
Answer: From the answer to this question there are some sites with recreations of the fonts used in Pokemon games.
The actual font is most likely a custom font created for the game and not available elsewhere.
http://projectpokemon.org/forums/showthread.php?5799-Essential-Pokemon-related-Fonts
http://jackster3000.deviantart.com/art/Pokemon-Script-Collection-V2-22208470
I think the one closest to the one you're looking for would be the Pokemon Mystery Dungeon or Pokemon Diamond and Pearl fonts in the second link.
Answer: It is the regular form of "Rodin" from Fontworks. New Rodin's latin characters are what I could call "square sans," but if you look closely, the letter "e" in Rodin has a straight bar that is off angle. The straight part before you curve the "e" isn't perfectly horizontal; it's slightly tilted counter-clockwise so that it's a bit upward than usual. Anyway, that's how Rodin is usually identified—by the lower case "e."
Because of the better screens in the 3DS, it seems like higher quality fonts and better graphics are being used in place of the lower quality fonts and graphics used in pre-3DS games.
Answer: It's Rodin/New Rodin from Fontworks Japan.
Comment: Any cites or creditable sources?

What font is used in Pokemon X and Y?


What is the automation linked to?

Question: How can I find out what an automation clip in FL Studio actually automates? The only way I have found so far is to go to the browser -> current project -> remote control, and there you have to look through all of them and see if the internal controller is set to the automation clip. There has to be a better way.
Answer: If you haven't changed the name of the channel, it will tell you the exact plugin, insert, and parameter it is automating.
If you've changed the name of the channel/pattern, you can go the browser > Current Project > Patterns > Initialized controls, it will tell you the following information about all of the things you are automating:

Plugin Name
Insert Number
Name of Parameter

This also works with third-party plugins and will look something like this:

Delay 3 - Insert 1 - Modulation rate

Unfortunately, there is no way as far as I know about finding this information out any other way.

What is the automation linked to?


About convergent subsequence

Question: Let $ \{ t_n \} $ be a bounded sequence on the real line. If all the convergent subsequence $\{ t_{n_k} \} $ of $\{ t_n \} $ converge to same value $t_0$, then can I say that $ \lim_{n \to \infty} t_n = t_0$ ?
Answer: The question can be restated as: If there is a single limit point, then does the sequence converge to that point? The answer is yes: the limit inferior and limit superior are limit points of any sequence, so if there is only a single limit point the inferior and superior limits coincide, which implies that the limit of the sequence exists and equals that common point.
Answer: I would argue as follows... Since $\{t_n\}$ is bounded, there exists $R>0$ such that $t_n\in [-R,R]$ for every $n\in\mathbb N$. Then pick a subsequence $\{t_{n_j}\}_j$. As $[-R,R]$ is sequentially compact, there exists a sub-subsequence $\{t_{n_{j_k}}\}_k$ which converges. As this is a particular convergent subsequence of ${t_n}$, then it must converges to some $\bar t$, which is unique for all these subsequences by hypothesis. As $\mathbb R$ is Hausdorff, it follows that $\{t_n\}$ converges to $\bar t$.
We have used the well known fact that if we have a sequence, and we know that from every subsequence we can extract a convergent sub-subsequence, and all of these sub-subsequences have the same limit $t_0$, then also the sequence converges to $t_0$.
This is called Urysohn property and it is valid if the notion of convergence comes directly from the topology. Remember this is not valid e.g. for the almost everywhere convergence.
Answer: Since the sequence $(t_n)_{n \in \mathbb{N}}$ is bounded,has a convergence subsequence to $t_0$. If $t_n \not \to t_0$, then $\exists \epsilon >0$ s.t. $\forall k \in \mathbb{N}$ exist $n_k>k$ with $|t_{n_k}-t_0|>\epsilon.$ You can take $n_k$ to be strictly increasing. So the subsequence $(t_{n_k})_{k \in \mathbb{N}}$ is bounded and does not have subsequence converging to $t_0$. This is a contradiction.
Answer: Yes. Depending on the things you know, you can use Bolzano-Weierstraß or limit superior/inferior or ... to prove this.

About convergent subsequence


protecting CD rom from creating its ISO

Question: I have a cd-rom based application developed on Director, i want to protect it from creating its ISO images, is there any solution?
Please let me know.
Thank You all
Answer: It is not possible. If a sector (on your disc) can be read then it can be saved to a file too. Doing this with all the sectors you end up with an ISO image.
Disc-based copy protection solution often based on the fact that writable CDs and DVDs have a pre-written area (containing information about the raw disc itself). You can not copy data to these sectors, but the original disc contents can be read into a file with other meta information about the disc.

protecting CD rom from creating its ISO


Can a pangea like super continent have diverse life and climates?

Question: In my story, a group of scientific explorers go on a expedition to a planet, and I am not sure if it should be a super continent or multiple continents because of the diverse life there could be on a planet.  There are deserts, forests, savannahs, and mountain ranges with snow.  Would creatures be as diverse in these if it was all connected or across oceans on different continents or would it not change as much as animals on earth became diffreant species when they went to other continents or islands. For those wondering, the continent lays on the equater of the super earth.
Comment: Why wouldn't it be? The non-super continents on Earth have a similar range of biomes to what you're proposing (with the one obvious exception).
Comment: If I'm not mistaken China alone has a variety of different climates and life, including deserts, mountains, wetlands and tropical forests, and it's not even a full continent. Africa itself also has a similar variety of climates and biomes throughout its territory.
Comment: You can have great diversity in a much smaller area.  For instance, take a northwest-southeast line from the California coast: redwood forest in a damp maritime climate gives way to low mountains mostly covered in pine, the Sacramento Valley with its (pre industrial agriculture) native wildflowers, more pine-covered mountains rising to alpine tundra, then descending to more pines, then sagebrush desert giving way to lower desert with Joshua trees &c.
Comment: yes, yes it can
Comment: North America, South America, Asia, Australia, and Africa all individually fulfill those requirements, so that is 5 of the 6 continents, and and Antarctica fulfilled it back when it was far enough north to not be frozen wasteland.  .
Answer: While oceans make very effective isolation mechanisms, there are others.  This will be not so much the physical effect of, say, very high mountains as the incompatibility of habitats.
As a plain grows colder, the farther it gets from the equator, the fauna and flora will shift.  Perhaps clinally, so that in theory genes could pass from artic to tropical regions, but the tropical and artic subspecies could not interbreed directly.
Then there are difference of the habitats such as grass grazers who can not live in the swamp because the footing is so uncertain, and arboreal monkeys that can not leave the swamp's trees for the grassy plains.
An enormous variety is possible.
Note that two forests may be effectively "islands" because of the expanse of the grassland between them -- or vice versa.  True, plants and animals will occasionally cross, but that happens on islands, too.
Comment: good to know thank you
Answer: You don't need to look very far for a real life example. Only a few thousand years ago you could (with some minor humping over ice and a brief swim) walk the majority of the way around the planet from South Africa to the southern tip of South America, from 68 degrees South to 77 degrees North. Even considering only the present day, Africa/Eurasia forms what is by any measure a supercontinent that is 14,000 km from the Cape of Good Hope to the Taymyr Peninsula, and 14,600km or so from Dakar to the Bering Strait, and has been in essentially that position for 30 million years. Yet no shortage of diversity in climate, ecosystems, or biology.
Answer: Sure. Even if a Pangea like continent complicates a bit the atmospheric circulation and the precipitation distribution, you still have differences in elevation and solar irradiation which account for variation in local climate.
With different climates come also different life adapted to it.
Answer: It depends on what kind of diversity of life you are talking about, and exactly where your super continent lies on the planet - ie, does it straddle the equator, or does it run north to south, etc.
We have gotten very unique species of animal for isolation in places like Australia, or of course, the classic example of the Galapagos islands. As has been mentioned by the others here, mountains, other landforms, and just distance in general can bring about biodiversity. If you are not aware of it, I recommend looking at the Youtube series "Alien Biospheres" by Biblaridion, as it is fantastic, and part of his imagined history on an alien world is on a super continent.
For a less scientific example for what you can do with a super continent, I recommend looking at Brandon Sanderson's Stormlight Archive, which takes place on the stormswept super continent of Roshar, and has amazing biodiversity. While the very large series is fantastic, this video gives a great introduction to what you'll find more useful in making an interesting supercontinent:
(Invicta, Welcome to Roshar | The Stormlight Archive - Lore Primer)
https://www.youtube.com/watch?v=xL4M7Yx0SSE
Comment: It runs on the equator the middle of the planet and does have islands the biggest two have volcaneos one in the east and one in the south though is betwen west and south. there other small ones in the east of the equator and i have watched biblardions video just didnt know he made more so thanks.i have not watched roshar so the info helps and i have one big island way up in the north at the top of the planet think about it like its antartica but i dont think snow could be there since the sun would hit it


Filling 1.5 inches wide gaps between newly fitted metal door frame surround and brick wall

Question: I had a wooden back door removed and replaced with a metal door following burglary twice. The workmen have left an inch gap between the wall  and the door frame both internally and externally. What is the best material that can be used to fill this gap all around the frame? Can someone help please?
Comment: I would be glad to give an idea, but a picture of the conditions will help tailor an answer best suited for you
Answer: If it's a hollow metal doorframe, it's generally intended to be filled with a cement mortar mixture, and I'm surprised if the job was considered complete without doing that. I've lived in a cheap apartment where they didn't bother to do that, and was burgled since the unfilled doorframe easily flexed far enough away from the door to clear the lock bolts when the thieves pried it.
I suppose it's also possible that it's simply the wrong size door/frame, in which case filling in with material similar to the wall (right - the title says bricks, so split bricks and mortar) might be appropriate - or getting the right sized door, but that's a step backwards.
That building was so poorly constructed that a few years after I moved out, the roof tore off in a thunderstorm (it was not a tornado.)
Comment: _Flex the door frame_ I worked in an automotive repair shop housed in a metal frame building. One of the duties I had was to lock at night and set the alarm. One evening the door came open with a gentle tug on checking it was shut, I closed it and repeated the offense. Needless to say, I spent the next couple hours creating a jack bolt system and washer pack that firmly held the metal door frame in place against any prying. It would have easily opened with a screwdriver, and yes, the frame was actually a cement form that was supposed to be filled after installation to provide a solid structure
Answer: A 1 1/2" gap is pretty big and its possible that it was poorly fitted or poorly installed. I would have expected the workers to filled this and installed trim to finish the installation.
Generally speaking, you would fill this gap with an expanding foam meant for windows and doors (Great Stuff is a well known product for this).
But back to the large gap, the first thing I'd look at is if it's uniform around the door.  Having a 3/4" gap on both sides wouldn't be as much of a problem, but if you have a large gap on one side with no gap on the other, my suggestion would be to move the door so that you have an even gap, and then proceed to fill the gap with expanding foam. You will want to add trim around the door after to finish it off, and then caulk the gaps where the trim meets the house and the door.
Comment: Be **careful** to get the **"Door & Window - minimal expansion"** expanding foam if you go this route; the normal stuff **will** pinch the door shut. My DIL's husband had the bright idea of using the "normal" foam, and the doors & windows all got bound up tight so they couldn't be opened.


Protect ourselves from ourselves - SVN Branching Policy for small development team

Question: Our small team (6) development team is comprised of individuals with varying skill levels and product knowledge.
To protect ourselves from ourselves (or lack of experience) what branching policy should we use?
Comment: See also http://stackoverflow.com/questions/2100829/when-should-you-branch/2107672#2107672, http://stackoverflow.com/questions/2921305/what-is-branched-in-a-repository/2921623#2921623 and http://stackoverflow.com/questions/16142/what-do-branch-tag-and-trunk-really-mean/114384#114384
Answer: Branch as often as it seems beneficial.
The more you do it, the more you understand it.
The more you understand it, the more benefit you derive, and the fewer problems and errors you cause.

If you relegate branching to only those extreme cases where it must be done, you are almost guaranteed to do it in such a way to cause headaches.  Practice makes this much less likely.
Keep the barrier to branching as low as possible.

I guess that this can be summed up:  practice, practice, practice.
Answer: It would probaby be easier in the long run to switch to a source control system that has better branching and merging support. SVN is good at branching, but lacks decent support for merging. I think you should take a look at both Mercurial and Git. With either one of those you probably won't need to worry too much about policing your branches.


Ethernet POE voltage measurement to determine Voltage clamping between line ot Ground

Question: I am planning on using a tvs diode to clamp power peak to protect network switch; the Port is POE. The issue is that when I measure the voltage of ethernet line to ground, I get around 0.6V. When I use a POE measurement device, its shows the Pin 1,2,3,6 and voltage of 54V.
Why can I not get 54V when measuring using Multimeter.
Please help me understand.
Answer: POE source uses a low voltage/current to detect whether a POE sink is present and how much power it needs before giving power to it, so unless you fake a POE device you don't get voltage. And voltage is between pairs and most likely isolated from ground, so trying to measure against ground will just not work.
Comment: What clamping voltage between line to ground should I use then if I cannot measure the voltage ?
Comment: Are you sure you even want a TVS between ground and Ethernet pins? That is usually for lightning protection. It depends a lot and might be too broad a question. Is your equipment grounded or not, and does it have any interfaces that could ground it? What is the installation class of the device and does it need to pass 1kV, 2kV or 4kV potential tests? What standards the device must comply with? TVS manufacturers and PHY manufacturers like TI and transformer manufacturers should have reference designs for PoE interface protection that might help you with this.
Comment: Thanks for asking questions. Yes, it is meant for lightning protection. The network Switch has a chassis ground. Network Switch complies with IEC 61000-4-5 but doesn't mention what class it complies it. I have looked into IEC 62000-4-5 and it does give an example using a tvs diode, but I was not sure about it. The Network Switch I am using is a Aruba 2540 JL356A.
Comment: I just want to know how would you decide the line to ground tvs clamping voltage?


How do I change my UserId on Apple Developer Forums?

Question: How do I change my userid on the Apple Developer Forums?  As shown in the below screenshot, it seems there is no way to change this. Do I need to simply call Apple support?
Answer: Yes, you are correct.
You'll need to contact Apple Developer Account Support. However, in most cases you will get an answer as once your account is created, you will not be able to change your username that appeared when creating a username, and suggest registering a new Apple ID for the developer.
So, if you don't care, you can probably create a new user.
Or at least first give a try asking Apple Developer Account Support team.
Answer: I called Apple Developer support and was informed that I am not able to change my developer forum userID as it is tied to my Apple ID.  That is fine.  I cam live with it.


Dynamical mass of a galaxy

Question: What does the dynamical mass of a galaxy represent? Is it the mass of the gas in the galaxy or the total mass of the galaxy?
What can we infer from the rotation curves, is it dynamical mass or mass distribution?
Answer: I found this reference for you. In the abstract, it is stated:

Rotation curves are the basic tool for deriving the distribution of mass in spiral galaxies.

Coming to answering your questions:

Is it the mass of the gas in the galaxy or the total mass of the galaxy?

The dynamical mass is the total mass in the galaxy is predicted using Newton's Inverse Square Law. It definitely doesn't represent the mass of gas in galaxy because the gas which you refer to is the visible mass from different spectrum of observations. If you tried to do so, then, it is similar to trying to measure the mass of Earth using a weighing machine.

What can we infer from the rotation curves, is it dynamical mass or mass distribution?

Actually we can't measure and pinpoint each and every mass present in a galaxy. So, using some mathematical modelling techniques and some basic assumptions and approximations, we compute the dynamical mass which represents the mass distribution of Galaxy. For inverse square law, we assume there is not much random acceleration among the masses.
Extras: We run into the trouble of Dark Matter because we assume Newton's Square Law holds in this situation.
But if you take MOND - Modified Newtonian Dynamics - the story is different. Here you don't run into trouble of dark matter as the inverse square law is modified with
$$F_N = m \mu \left ( \frac{a}{a_0} \right ) a$$
Here $F_N$ is the Newtonian force, $m$ is the object's (gravitational) mass, $a$ is its acceleration, $\mu(x)$ is an "interpolating function", and $a_0$ is a new fundamental constant which marks the transition between the Newtonian and deep-MOND regimes. You can read more about MOND here.
This modification actually fits nicely with the galaxy rotation curves and doesn't bring up unexplained mass in the dynamical mass distribution.
So, ultimately rotation curves help us understand dynamical mass which ought to represent Mass Distribution to the maximum extent.
Answer: Some of the basics of galaxies rotation can be understood using basic mechanics (and a lot of assumptions that are probably not completely right but give a good approximation).
First, let's assume that the galaxy is a rotating, homogeneous plane disk (plane means that the radius $R$ is much bigger than the height $h$, which is mostly true for spiral galaxies, for example, Milky way has $R=100\,kpc$ and $h=0.6\,kpc$).
Let's focus now in a single star located at a distance $r$ from the center of the disk, and let's assume it's moving in a uniform circular motion. The velocity is then perpendicular to the position vector from the center to the star, and its modulus is
$$v = \sqrt{a\times r}$$
where $a$ is the centripetal acceleration. This acceleration is caused by gravity, and it can be shown that it's caused only the mass of the disk inside $r$: think of this as a Gauss law for magnetism, but applied to gravitation. As in magnetism, this "Gauss law for gravitation" allows us to change the mass of the disk inside $r$ for a point of the same mass located at the center. With this, the acceleration is
$$a = \frac{GM}{r^2} \Rightarrow M = \frac{v^2r}{G}$$
Where $M$ is the mass of the disk inside the distance $r$.
With this, you can infer the total mass in the disk measuring the velocity of stars at different distances from the center, and make a plot of distance $r$ vs. the mass of the disk $M$ inside that radius. This is called dynamical mass, since it was obtained from the dynamics of the system, and represents all the mass that contributes to gravity.
So far so good. The problem is that you can also calculate the mass of the galaxy using light: making some additional assumptions, you can relate the amount of light with the number of stars, and that number to the mass. If you do this using only the stars inside a certain radius, you end with the same plot as before, but now with the mass obtained from the amount of light, hence called visible mass.
As you may know, visible and dynamical masses do not match, and that's why the introduction of a new type of matter is needed, a matter that affects gravity but can't be seen, and has been called dark matter.
Going back to your question, dynamical mass represents the total mass affecting gravity, and from rotation curves you can obtain the mass enclosed inside a certain radius.
Comment: Your use of Newton's shell theorem for a mass distribution that is not spherically symmetric is incorrect. Propagating this error is responsible for half the crank literature on "solving" the dark matter problem. e.g. https://astronomy.stackexchange.com/questions/8172/what-are-the-arguments-against-the-feng-and-gallo-thin-disk-explanation-of-galac

Dynamical mass of a galaxy


Do accidentals count double if they overlap with the key signature?

Question: I am playing Round Midnight by Thelonius Monk and I ran into a problem. If there is a C♭ and I am in the key of E♭ Major, which has a B♭, do I play a B♭ or just a B (since C♭ is technically a B)?
Comment: Cb is not "technically a B"; both Cb and B are enharmonic spellings of the same pitch (as is A##). Play a Cb (the same pitch as a B) if that is what the score says.
Comment: I'm not sure that my title is the best, feel free to change it -- but please note that it should be specific!
Answer: You play exactly what's written (provided it's written correctly!). If Monk had wanted a Bb played, wouldn't he have written a Bb dot in the Bb line or space?
He wanted a B played, but probably for technical reasons, it shouldn't be written in the B place, so had to be called Cb and written as such. One example of that might be if the chord Abm comes along. Ab major is spelled Ab C Eb. To make that minor, the 3rd needs flattening, making it Cb. Not B, which with the key sig. would automatically be played as Bb. Also not B natural, as that note does not feature in an Abm chord.
Comment: Beat me to it, Tim.  Although there are occasionally reasons to write Cb instead of B that are purely for ease of reading (say, in a very dense tone cluster or a chromatic passage), as you say, the usual reason is _functional_: a scale or chord demands _some kind_ of "C" (say), because that's the letter name that goes in that position in the scale or chord.


What is the most general wave function of a minimum uncertainty (Gaussian) state in quantum mechanics?

Question: For some state $|\psi\rangle$ it is possible to recover the uncertainty principle using the fact that $$\left|(\hat{\sigma_{Q}}-i\lambda\hat{\sigma_{P}})|\psi\rangle\right|^{2}\geq0,$$where$$\hat{\sigma}_{Q}=\hat{Q}-\langle\hat{Q}\rangle,\hat{\sigma}_{P}=\hat{P}-\langle\hat{P}\rangle$$
and $\hat{Q}$ and $\hat{P}$ represent canonically conjugate operators, $[\hat{Q},\hat{P}]=i\hbar$. The minimum uncertainty state is the one which saturates the inequality, such that
$$\left|(\hat{\sigma_{Q}}-i\lambda\hat{\sigma_{P}})|\psi\rangle\right|^{2}=0,$$
This means that the miminimum uncertainty state can be obtained by by solving the the differential equation resulting from the above expression in $\hat{Q}$-space:
$$\left(q-\langle\hat{Q}\rangle+\lambda\hbar\frac{d}{dq}-i\lambda\langle\hat{P}\rangle\right)\psi(q)=0
$$
This differential equation has the general, normalised solution:
\begin{equation}
\psi(q)=\left(\frac{1}{2\pi(\Delta\hat{Q})^{2}}\right)^{\frac{1}{4}}\exp\left(-\frac{(q-q_{0})^{2}}{4(\Delta\hat{Q})^{2}}+\frac{i}{\hbar}qp_{0}\right)
\end{equation}
wherer $(q_{0},p_{0})=(\langle\hat{Q}\rangle,\langle\hat{P}\rangle)$. Integration to obtain the Wigner function using the formula, we obtain
$$W_{\psi}(q,p)=\frac{1}{2\pi\Delta\hat{Q}\Delta\hat{P}}\exp\left(-\frac{(q-q_{0})^{2}}{2(\Delta\hat{Q})^{2}}\right)\exp\left(-\frac{(p-p_{0})^{2}}{2(\Delta\hat{P})^{2}}\right)$$ This represents the Wigner function of a squeezed coherent state,
$$|\alpha,z\rangle=\hat{D}(\alpha)\hat{S}(z)|0\rangle$$
where $\hat{D}(\alpha)$ and $\hat{S}(z)$ represent the displacement and squeezing operators respectively. The displacement operator displaces the center of the gaussian in phase space to $(q_{0},p_{0})$and the squeeze operator has changed the value of $\Delta Q$and $\Delta P$ ( such that it takes a squeezed shape in dimensionless phase space). Crucially however, this is only the case if $z$ is real. I have seen that, generally, the argument of the squeeze operator may be complex, and in these scenarios,the Wigner function will squeeze relative to an axis in phase space which depends on the argument of the complex number $z$. However I don't fully understand why this happens, and my aim was to derive the effect by obtaining the Wigner function from the minimum uncertainty state wavefunction. I have concluded that the minimum uncertainty state obtained using the method above is not in fact the most general minimum uncertainty wavefunction, since there are the minimum uncertainty states produced by the squeeze operator with a complex arguments. So, my question is, is it possible to derive the most general wavefunction for a minimum uncertainty state? If so, how?
Comment: Presumably you are familiar with the [FFT](https://en.wikipedia.org/wiki/Fractional_Fourier_transform) of [Condon](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1076889/pdf/pnas01779-0028.pdf)?
Comment: your "problem" is that you're implicitly working in the position representation since you have $\hat q\mapsto q$ and $\hat p\mapsto -i \hbar \frac{d}{dp}$.  "Rotating" in $qp$ space amounts to working with "quasi-quadratures" of the form $q\pm i p$ (up to scale factors).
Comment: Thanks for your response. Do you know any good treatments of this rotation effect? stuggling to find much online
Comment: I'll have a read, thanks
Answer: You don't get anything "new" by rotating in the $xp$ plane.  Simply define
\begin{align}
X&=x\cos\theta  -p \sin\theta \, ,\\
P&= x\sin\theta +x \sin\theta \, .
\end{align}
Since $[X,P]=[x,p]$, the action of $\hat X$ in the X-basis is multiplication by $X$: $\hat X\psi(X)=x\Psi(x)$ whereas $P\mapsto -i\hbar \frac{d}{dX}$.  The original eigenvalue problem in terms of $x,p$ is now simply one in terms of $X,P$.
Comment: I see, if there a name for this kind of transformation of canonically conjugate basis? I'd like to do some more reading
Comment: I don't think there's any special.  The result follows from the Stone- vonNeumann theorem.  You're just doing a canonical transformation in phase space, and because it's linear there's no ordering issue.
Comment: ah i see, thanks.


How to root Android with Samsung Odin

Question: How to root A Samsung mobile phone or tablet using Samsung Odin?
Answer: Android rooting is not an uncommon term using tech nerds anymore. It is very common and everybody at least heard the term. So why we do this? As my opinion, we already have enough control over our device. Don't you think? that's how the less than half of the population of the Android community keep their devices without unstable it. But the other half sees the situation completely different. They root their devices to flash new ROMs, gain more control by customizing download unauthorized apps and modifying default functions in the system. So to do this you have o download rooting tool that most suitable for your device. For a Samsung user, it is not any software other than Samsung Odin. So let's talk about how to root with Odin.

What is Samsung Odin
It is a free utility that serving a wide range of devices and specially created for the Samsung devices by Samsung itself. With the time the software is updated so you can see there are several versions for the same tool. Select the best one for your device is your responsibility. This one-click rooting method is not like traditional root tools available out there. The flow starts with flashes the root package and then root it through the computer. And do not waste your time for searching direct rooting methods for Samsung Odin, because there isn't.
Compatible list
As I mentioned earlier there are different versions of Odin for the different operating system. So check the list below and select the suitable version for your device.

v. 1.85 - GingerBread and Ice Cream Sandwich
v. 3.09 -  Jellybean and KitKat
v. 3.10.7 - Lollipop
v. 3.11.1 - Marshmallows
v. 3.13.1 - more latest versions

Android rooting with Samsung Odin
Preparation

Samsung Odin is only compatible with windows. So install necessary
drivers to the PC and make it ready.
It's not hurt be ready to whatever happens. So backup all of the
mobile phone for more security.
Enable USB debugging on the device. (Settings --> about --> Build
number --> Tap 5 times --> You are a developer now --> USB debugging
--> enable)
The process could not be continued. So keep a sufficient battery
power.

Let's start the process of Android rooting

Go to this site and download the suitable root package. Check your device name, model number, Android version, and build number beforehand.
Now extract the downloaded package in a new folder.
Power off the device and boot it into download mode. To do this press and hold  Power Key, Home Key, and Volume Down Key simultaneously.
Open the Odin file in the extracted folder.
Connect the mobile device with the PC using a USB cable.
The software will automatically detect the device you will see "Added" in the lower left panel
Click the "AP/PDA" button and select the extracted file.
Then click "Start" button
Now the rooting will start. After it completes you will see the message "PASS"
The device will be rebooted for one last time. There will be SuperSu installed already on the device if the root was a success.

**Wrap up*
Odin is an application specifically created for Samsung smartphones and tablets. But it does not say it limited to that brand. It can serve various brands like HTC, LG, etc.*

How to root Android with Samsung Odin