Why do I have to put at least x number of characters in the title?

Question: Why do I have to put at least x number of characters in the title?
Comment: "Can I peek" is not very descriptive (even with the tags). A few more words describing what you need will entice more people to read (and answer) your question.
Comment: In this case it wasn't, and somebody edited your question title to be more useful.
Comment: What title were you going to post?
Comment: On SO I tried to post title "Can I peek" with java tags. Then I got message (Ooops...etc). So I've changed my title to "Can I peek------------title was to short. Unbelievable". This was accepted. Where is the point of such unnatural constrain? Second point I wan't to make is that of course my title was edited and this consumed someone other's time. Sometimes short title is correct.
Comment: @Jon B but sometimes when title is intriguing it's even more interesting and more people will try to check what's this about. Having said that I'm not going to bring anymore issues with the way formatting/editting works on SO because there is little point in doing so. Nothing will get changed even if the way it is now is clearly far from ideal. Just like this bloody double space to mark new line. Ridiculous. And so unnatural and unintuitive.
Answer: Because as x approaches 0, so too does our understanding of and interest in your problem. ;)
Comment: @gnibbler: I used to be *soooooooo* interested in this other question, until Jeff ruined it: http://meta.stackoverflow.com/posts/42896/revisions
Comment: So you must be quite interested in this question then ;)
Answer: You might have noticed that you are asked to "be descriptive" when writing the title. The purpose of that is to have high chances to find a certain question using relevant keywords. Since the title always has a high rank in any kind of search (site-internal, google, or other), it should be a good (even if concise) description of the question.
This kind of descriptiveness is (supposed to be) encouraged by the minimum character count.
Answer:
Comment: http://meta.stackexchange.com/questions/44011
Comment: I don't think anyone has figured out how to do a blank title. Note to self: Find way to make blank title.
Answer: The title is important because it is the primary piece of information people (are supposed to) search for before they post a duplicate question
Comment: 99% first posts and then if they get link from someone indicating that similiar post already exists are checking beforementioned post. That's the reality. That's human behaviour.


What is the purpose of the dollar sign in JavaScript?

Question: The code in question is here:
var $item = $(this).parent().parent().find('input');

What is the purpose of the dollar sign in the variable name, why not just exclude it?
Comment: possible duplicate of http://stackoverflow.com/questions/205853/why-would-a-javascript-variable-start-with-a-dollar-sign
Comment: Possible duplicate of [Why would a JavaScript variable start with a dollar sign?](https://stackoverflow.com/questions/205853/why-would-a-javascript-variable-start-with-a-dollar-sign)
Comment: [ttony21's answer][1] is wrong stating that there are no types in Javascript, cf. [official documentation][2]

  [1]: http://stackoverflow.com/questions/846585/can-someone-explain-the-dollar-sign-in-javascript/846594#846594
  [2]: http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf
Answer: A '$' in a variable means nothing special to the interpreter, much like an underscore.
From what I've seen, many people using jQuery (which is what your example code looks like to me) tend to prefix variables that contain a jQuery object with a $ so that they are easily identified and not mixed up with, say, integers.
The dollar sign function $() in jQuery is a library function that is frequently used, so a short name is desirable.
Comment: Note: By default, jQuery uses "$" as a shortcut for "jQuery". This has some effects on the use of other Javascript libraries. See http://docs.jquery.com/Using_jQuery_with_Other_Libraries
Comment: Thimmayya your comment "By default, jQuery uses "$" as a shortcut for "jQuery"" should be in bold letters at the top of every page on Jquery's website, Their examples are horribly documented.
Comment: In other words, $ is comparable to any acceptable symbol in variable/function names. Doing `var $=function(){}` is very same as doing `var a=function(){}`.
Comment: @ThrowawayAccount3Million It's just part of the name. In the case of `$scope` the $ is one of the characters in that name. Just as if you take off the `e` at the end of `$scope`, it won't work, so taking of the `$` will also not work. In the case that you see something like `$( "a" ).addClass( "test" )`, the dollar sign is the entire name of whatever that is.
Comment: What about when $ is specified as a function parameter? I am looking at some code like `jQuery(document).ready(function($){`... Then the $ is used inside the function implementation.
Comment: Oh, I think I get it. It is just the name of the parameter / variable, which has no special meaning outside of maybe a convention. Then the variable is referenced / used in the implementation.
Comment: @still_dreaming_1, you're wrong. I just started using Angular.js, and I decided to call the parameter to my function `scope` instead of `$scope`. It failed to work until I tacked the dollar sign back on. I have no idea what's going on here, but that dollar sign has to mean *something*.
Comment: If JavaScript functions are lexically scoped, then how does it matter what you name the argument to your function? Since `$scope` is the parameter to a function you create, it shouldn't matter what you name it.
Comment: I think the question is pretty old, at that time didn't exist ECMAScript6. The meaning of $ as in the explanation / answere of @UpTheCreek is also very important. https://stackoverflow.com/a/41167804/3408530
Comment: Hi @cobbal; maybe this could be a separate question, but does the $ symbol have the same semantics in TypeScript?
Comment: @Orco The `$` character has _no_ special semantics in JavaScript or TypeScript. It is treated as just another "alphabetic" character, like `_`. Any semantics it may have are simply determined by how it is used in the code you write or import.
Answer: In your example the $ has no special significance other than being a character of the name.
However, in ECMAScript 6 (ES6) the $ may represent a Template Literal
var user = 'Bob'
console.log(`We love ${user}.`); //Note backticks
// We love Bob.

Comment: @VLAZ Don't confuse language syntax with library conventions. Neither the question nor this answer mention jQuery, but only JavaScript - and in JavaScript, the `$` sign does not have any special meaning, besides the template literal in ES6.
Comment: "*the $ has no special significance other than being a character of the name.*" it **does** have special significance. It indicates that the value for that variable is a jQuery wrapped object. It's a type of [Hungarian notation](https://en.wikipedia.org/wiki/Hungarian_notation). Thus you know how to operate with the value purely by the naming convention.
Comment: @AndreasFester "*Neither the question nor this answer mention jQuery*" the question most certainly shows using jQuery code. It may not *mention* it but *the usage is consistent with how jQuery is used*. The question doesn't *need* to mention jQuery if that's what it actually shows. OP is *asking* about it because they *don't know it*.
Answer: The dollar sign is treated just like a normal letter or underscore (_).  It has no special significance to the interpreter.
Unlike many similar languages, identifiers (such as functional and variable names) in Javascript can contain not only letters, numbers and underscores, but can also contain dollar signs.  They are even allowed to start with a dollar sign, or consist only of a dollar sign and nothing else.
Thus, $ is a valid function or variable name in Javascript.
Why would you want a dollar sign in an identifier?
The syntax doesn't really enforce any particular usage of the dollar sign in an identifier, so it's up to you how you wish to use it.  In the past, it has often been recommended to start an identifier with a dollar sign only in generated code - that is, code created not by hand but by a code generator.
In your example, however, this doesn't appear to be the case.  It looks like someone just put a dollar sign at the start for fun - perhaps they were a PHP programmer who did it out of habit, or something.  In PHP, all variable names must have a dollar sign in front of them.
There is another common meaning for a dollar sign in an interpreter nowadays: the jQuery object, whose name only consists of a single dollar sign ($).  This is a convention borrowed from earlier Javascript frameworks like Prototype, and if jQuery is used with other such frameworks, there will be a name clash because they will both use the name $ (jQuery can be configured to use a different name for its global object).  There is nothing special in Javascript that allows jQuery to use the single dollar sign as its object name; as mentioned above, it's simply just another valid identifier name.
Comment: You can noconflict the jQuery object with this `var $j = jQuery.noConflict();` now $j is the jQuery object.
Answer: The $ sign is an identifier for variables and functions.
https://web.archive.org/web/20160529121559/http://www.authenticsociety.com/blog/javascript_dollarsign
That has a clear explanation of what the dollar sign is for.
Here's an alternative explanation: http://www.vcarrer.com/2010/10/about-dollar-sign-in-javascript.html
Comment: I'm not sure I would call that link a "clear" explanation. Does it really take 6+ paragraphs to explain that $ is simply a valid character when defining function and variable names?
Comment: Javascript does have types; and in any case, how is the dollar sign even related to that? It's just a character that happens to be a legal identifier in Javascript.
Comment: Looks like the first link is working again. I have to agree with @Slight that alternative explanation is terrible.
Comment: The sample code in the link is quite easy to understand. Awesome!
Answer: Dollar sign is used in ecmascript 2015-2016 as 'template literals'.
Example:
var a = 5;
var b = 10;
console.log(`Sum is equal: ${a + b}`); // 'Sum is equlat: 15'

Here working example:
https://es6console.com/j3lg8xeo/
Notice this sign " ` ",its not normal quotes.
U can also meet $ while working with library jQuery.
$ sign in Regular Expressions means end of line.
Comment: This use of the dollar sign did not appear in the question.  Is this the result of this answer being moved here from elsewhere?
Answer: I'll add this:
In chromium browser's developer console (haven't tried others) the $ is a native function that acts just like document.querySelector most likely an alias inspired from JQuery's $
Comment: This is the up-to-date answer! Would you happen to have the ES version that introduced it?
Comment: Bumping this - its exactly the case.
Comment: I think this is the important answer everyone who didn't add jQuery wants to know. However, do you have any source of that ?
Comment: No, I found it when it worked but then remembered the page doesn't have JQuery
Comment: It seems to work in Firefox as well, even on the `about:blank` page.
Answer: When using jQuery, the usage of $ symbol as a prefix in the variable name is merely by convention; it is completely optional and serves only to indicate that the variable holds a jQuery object, as in your example.
This means that when another jQuery function needs to be called on the object, you wouldn't need to wrap it in $() again. For instance, compare these:
// the usual way
var item = $(this).parent().parent().find('input');
$(item).hide(); // this is a double wrap, but required for code readability
item.hide(); // this works but is very unclear how a jQuery function is getting called on this

// with $ prefix
var $item = $(this).parent().parent().find('input');
$item.hide(); // direct call is clear
$($item).hide(); // this works too, but isn't necessary

With the $ prefix the variables already holding jQuery objects are instantly recognizable and the code more readable, and eliminates double/multiple wrapping with $().
Answer: No reason. Maybe the person who coded it came from PHP. It has the same effect as if you had named it "_item" or "item" or "item$$".
As a suffix (like "item$", pronounced "items"), it can signify an observable such as a DOM element as a convention called "Finnish Notation" similar to the Hungarian Notation.
Answer: Here is a good short video explanation: https://www.youtube.com/watch?v=Acm-MD_6934
According to Ecma International Identifier Names are tokens that are interpreted according to the grammar given in the "Identifiers" section of chapter 5 of the Unicode standard, with some small modifications. An Identifier is an IdentifierName that is not a ReservedWord (see 7.6.1). The Unicode identifier grammar is based on both normative and informative character categories specified by the Unicode Standard. The characters in the specified categories in version 3.0 of the Unicode standard must be treated as in those categories by all conforming ECMAScript implementations.this standard specifies specific character additions:
The dollar sign ($) and the underscore (_) are permitted anywhere in an IdentifierName.
Further reading can be found on: http://www.ecma-international.org/ecma-262/5.1/#sec-7.6
Ecma International is an industry association founded in 1961 and dedicated to the standardization of Information and Communication Technology (ICT) and Consumer Electronics (CE).
Answer:
"Using the dollar sign is not very common in JavaScript, but
professional programmers often use it as an alias for the main
function in a JavaScript library.
In the JavaScript library jQuery, for instance, the main function $
is used to select HTML elements. In jQuery $("p"); means "select all
p elements". "

via https://www.w3schools.com/js/js_variables.asp
Answer: I might add that using it for jQuery allows you to do things like this, for instance:
$.isArray(myArray);

Answer:     let $ = "Hello";
    let $$ = "World!";
    let $$$$$$$$$$$ = $ + " " + $$;
    alert($$$$$$$$$$$);

This displays a "Hello World!" alert box.
As you can see, $ is just a normal character as far as JavaScript identifiers or variable names go. In fact you can use a huge range of Unicode characters as variable names that look like dollar or other currency signs!
Just be careful as the $ sign is also used as a reference to the jQuery namespace/library:
$("p").text("I am using some jquery");

// ...is the same as...

jQuery("p").text("I am using some jquery");

$ is also used in the new Template Literal format using string interpolation supported in JavaScript version ES6/2015:
var x = `Hello ${name}`;


What is the difference between lock_timeout and deadlock_timeout?

Question: What is the play between lock_timeout and deadlock_timeout ?
What is the reason for a lock_timeout to occur not leading to a deadlock timeout. I am not able to think of scenarios from database perspective ?
Answer: The difference between a live lock (handled by lock_timeout) and a deadlock is that the latter is guaranteed never to end, because two (or more) sessions are waiting for each other.
A live lock can always end – it will end as soon as the session that locks the resource ends the database transaction. With a deadlock, that is not possible, because all involved transactions are blocked and cannot continue.
By default, the database resolves deadlocks by killing one of the involved transactions, but it does not interrupt live locks.
Answer: If one database session needs to wait for another session because it needs to have the same lock for example, this is only a lock waiting issue: you use lock_timeout.
Deadlock is a very special case of waiting lock issue where several sessions wait on each other and it cannot work: the database decides to kill one of the involved transaction to fix this so that at least one database session is not blocked any more. the parameter deadlock_timeout is

the amount of time, in milliseconds, to wait on a lock before checking
  to see if there is a deadlock condition.

Deadlock is a special case of locking situation that occurs less frequently (generaly caused by application code taking locks on same database objects but not in the same sequence).


Election Campaign Restrictions In Georgia

Question: I came across a GA gubernatorial campaign sign on the government property (public library). Is this legal? This place is funded by the taxpayers and they are very split on the election candidates.
Answer: Under OCGA 16-7-58, it is unlawful to put signs

On any public property or building, unless the owner thereof or the
occupier as authorized by such owner has given permission to place
such posters, signs, or advertisements on such property; provided,
however, that signs within the rights of way of public roads shall be
governed by Code Section 32-6-51

If permission was not granted, it is illegal.
Permission could be granted, insofar as there is no basic constitutional provision prohibiting dissemination of political ideas on public property (quite the opposite, in fact). A problem would arise if the government (via an official) allowed only candidate X to put up signs. Allowing political speech is not a problem, forbidding it is a problem (w.r.t. the First Amendment).


Writing to local file during map phase in hadoop

Question: Hadoop writes the intermediate results to the local disk and the results of the reducer to the HDFS. what does HDFS mean. What does it physically translate to
Answer: HDFS is the Hadoop Distributed File System. Physically, it is a program running on each node of the cluster that provides a file system interface very similar to that of a local file system. However, data written to HDFS is not just stored on the local disk but rather is distributed on disks across the cluster. Data stored in HDFS is typically also replicated, so the same block of data may appear on multiple nodes in the cluster. This provides reliable access so that one node's crashing or being busy will not prevent someone from being able to read any particular block of data from HDFS.
Check out http://en.wikipedia.org/wiki/Hadoop_Distributed_File_System#Hadoop_Distributed_File_System for more information.
Answer: As Chase indicated, HDFS is Hadoop Distributed File System.
If I may, I recommend this tutorial and video of how HDFS and the Map/Reduce framework works and will serve you as a guide into the world of Hadoop: http://www.cloudera.com/resource/introduction-to-apache-mapreduce-and-hdfs/


make a form results show on same page where data comes from another site

Question: Ok, I have a unique issue. I have a real estate wordpress website that uses IDX (Internet Data Exchange) data to show MLS (Multiple Listing Service) listings.  So all the IDX data is stored through my IDX provider's site.  Currently, when a user submits a form, it goes to a results page that is hosted through my idx provider (example: http://www.mysite.idxco.com/idx/my.account#/results.php?).  What I am trying to do is create a form which would render the results on the same page....how would I do that?  If I am not being clear enough please let me know.
Comment: Can you retrieve data directly from IDX (via an API call, for example) or is your access limited to posting HTML forms?
Comment: I'm not sure, George Cummins, I will have to ask the idx company if API calls are an option
Answer: If I understand what you mean, you have different options, you can
1) POST via ajax, and have your hosted page send back html in response that you can show in the same page in a div. Its very easy to do with jquery. It might be easier to integrate in a wordpress page, but you need to be able to modify your hosted page.
2) you can post to a page on your server (not on the idx provider's), then use curl to send the  data you received from your form as a post to the idx provider page, grab the returned html, parse it, get the results, reload the page with your own form along with the results you got from curl.
You might need to check with your idx provider if it is ok that you 'scrape' the data.
(Of course if you had a api access which is very likely with idx you can just send a api request, which would be much more efficient )
Comment: thnx, smarques, I am a little new at this stuff, I may just want to hire someone to do .....what u said ;)


How do I buy US Treasury bills?

Question: How does one usually buy Treasury Bills? I see there is both the Treasury website and secondary markets. Apparently, the rates are different in each? I'm a total newbie here, so could someone walk me through the process? Also, are there any newbie mistakes/risks I need to watch out for?
Comment: Which treasury? Every country has their own
Comment: Sorry, fixed it
Answer: If you want to but directly from the US government then you can go to the Treasury Direct site.

About TreasuryDirect
TreasuryDirect.gov is the one and only place to electronically buy and
redeem U.S. Savings Bonds. We also offer electronic sales and auctions
of other U.S.-backed investments to the general public, financial
professionals, and state and local governments.

Notice the word redeem. That covers the selling of savings bonds but the site does more than that:

Individuals
Anyone can use this site to learn about savings bonds and other
investments available for purchase. To make a purchase and manage
them, open a TreasuryDirect account.
TreasuryDirect accounts offer Series I and EE Savings Bonds, Treasury
Bills, Notes, Bonds, Inflation-Protected Securities (TIPS), and
Floating Rate Notes, all in electronic form, and all in one convenient
account.

Those Bills, notes, and bonds cover investment periods from weeks to decades.
There is a FAQ to answer many of your questions.

How can I sell my Treasury security before maturity?
If you hold your security in TreasuryDirect you can transfer it to an
account in the Commercial Book-Entry System. If you hold your security
in the Commercial Book-Entry System, contact your broker, dealer, or
financial institution or investment advisor. Normally there is a fee
for this service.

Some brokers allow you to buy and sell t-bills and the like, you need to research their fees.
Regarding newbie hints. You need an account on treasury direct. You tell the site where the funds will be pulled from. Some durations are auctioned every week. The site has the schedule.
Lets say you want 4 week T-bills, those are auctioned every week. You tell the site how much to buy in $100 increments, the treasury direct site will pull the proper amount based on the auction results. if you want to buy $1000 in 4 week t-bills they will take out a little less than that so that 4 weeks later they will return $1000 to your bank account. You can even decide to automatically reinvest at the new rate 4 weeks later.
Answer: TreasuryDirect is for instruments which you want to purchase "new" (not on the secondary market) and hold until maturity.
(You can sell instruments held at TD before maturity, but requires jumping through hoops.)
The secondary market (which you access via a broker) is for buying "existing" instruments (for example a 10 year note that matures 3 years from now.

How do I buy US Treasury bills?


Keeping Itunes Library in Synch With External Harddrive

Question: I have all my music files on an external hard drive.  The hard drive is fed/accessed both through an old ibook and an imac - both have selected the external hard drive as the itunes folder. New songs uploaded to the external hard drive using the ibook don't automatically appear in the itunes library in the imac, and vice versa. So need to access the external folder and click the music file at issue for it to appear in the itunes library of the machine that wasn't used to upload it.  Cumbersome. Any idea how to keep the respective itunes libraries in sync with the external hard drive?
Answer: The new version of iTunes has a "Automatically Add to iTunes" folder under your iTunes Music folder-- if files are placed in there, they automatically get added to iTunes if it's running or starting up. Not a perfect solution (I'd much rather iTunes work like Zune's software, where you can define folders of each type (music/video/podcasts) to monitor) but it might work for you. Otherwise you'll have to find a third-party solution.
Answer: I don't have this problem, but I remember reading on lifehacker that there's a tool you can download for this.  Try searching on "iTunes Library Updater."


Maximal ideal in polynomial ring

Question: Is it true that the intersection of a maximal ideal in $A[x]$ with $A$ is a maximal ideal in $A$?
Let's say A is Noetherian. I would be surprised if it isn't true but somehow I can't seem to show it. Any help or tip will be appreciated. Thanks!
Comment: Perhaps I should clarify that when I write "I think" I mean "I know", and the two statements are equivalent over PIDs.  This includes Emerton's example below.
Comment: I think if A is a PID with only finitely many primes, then there is a maximal ideal of A[x] which intersects A trivially.
Answer: No, it's not true in general.  E.g. the pricipal ideal generated by $px - 1$ is maximal
in $\mathbb Z_p[x]$ (for any prime $p$); the quotient $\mathbb Z_p[x]/(p x - 1)$ is precisely the field $\mathbb Q_p$.  However, the intersection of this ideal with $\mathbb Z_p$ is equal to the zero
ideal, which is not maximal.
If the ring $A$ is Jacobson, then the result you want is true.  (For in this case, if $\mathfrak m$ is a maximal ideal in $A[x]$, then
$A[x]/\mathfrak m$ is a finite type $A$-algebra which is a field, therefore is finite over $A$
by the Jacobson hypothesis, and so the image of $A$ in $A[x]/\mathfrak m$ (which is equal to
$A/A\cap \mathfrak m$) is itself a field, and so $A\cap \mathfrak m$ is maximal in $A$.)
Comment: This is related to a mistake I once saw in a preprint by a well-known mathematician: for sep'td scheme $X$ of finite type over dvr $R$, it was said that a closed point has to be in the special fiber.  Above is standard counterexample, and what's really happening is that the affine line is open in the projective line over dvr, and there are $\mathbf{Z}_ p$-points whose special fiber is infinity but generic fiber is in affine line over $\mathbf{Q}_ p$.  So closed section meets open affine line over dvr only in generic pt of section, "explaining" closedness of that pt in affine line over dvr.
Answer: To amplify on Emerton's answer:
An integral domain $R$ is a Goldman domain if its fraction field is finitely generated as an $R$-algebra.  A prime ideal $\mathfrak{p}$ in a commutative ring is a Goldman ideal if $R/\mathfrak{p}$ is a Goldman domain.  A commutative ring $R$ is a Hilbert ring if every Goldman ideal is maximal.
It is not hard to show that a one-dimensional Noetherian domain is a Hilbert ring iff it has infinitely many prime ideals.  In particular, $\mathbb{Z}$ is a Hilbert domain and $\mathbb{Z}_p$ is not a Hilbert domain.
Theorem: For a commutative ring $R$, the following are equivalent:
(i) $R$ is a Hilbert ring.
(ii) $R$ is a Jacobson ring -- every prime ideal is the intersection of maximal ideals.
(iii) For every maximal ideal $\mathfrak{m}$ of $R[t]$, $\mathfrak{m} \cap R$ is a maximal ideal of $R$.
I learned this theorem from Kaplansky's book on commutative rings.  For the proof, see Theorem 132 on p. 84 of
http://alpha.math.uga.edu/~pete/integral.pdf
Putting these two results together, Emerton's counterexample can be predicted.
Also see the Exercise on p. 113 of my notes, in which this issue comes up in the context of computing the spectrum of $R[t]$, where $R$ is a PID.
Comment: Thank you for making your notes available! I've never seen the material on Goldman domains before. There is a typo in line $-2$ of the proof of Prop 122: inverse missing.
Comment: Thank *you* for the positive feedback and for pointing out the typo (I have corrected it in my "home" copy, so it will get uploaded with the next revision / addition.)  Let me recommend once again Kaplansky's book: it has a lot of material that I have not found in other texts on the subject.
Answer: See also my sci.math post [1] for some further discussion and references
[1] sci.math, 22 Apr 2009
http://groups.google.com/group/sci.math/msg/b00f5e1f7397842f
http://google.com/groups?selm=y8zfxg12ckl.fsf%40nestle.csail.mit.edu

Maximal ideal in polynomial ring


Phase 10 skip cards

Question: Four people are playing Phase 10. Player 1 skips player 3. Player 2 takes their turn. Player 3 skips turn. Can player 4 pick up discard card played by player 2?
Answer: Yes, player 4 can draw from the discard pile.
While the Skip card itself is not able to be drawn from the discard pile, there is no rule preventing a player from drawing the top discard card if discarded by players other than the previous in turn order.

Phase 10 skip cards


How do I edit my profile?

Question: I have looked allover but I must have missed how to edit my name.  I think I used my Google account to sign into area 51Buddhism if that helps.
Answer: I started with an unregistered account called Samadhi, couldn't log in and I register another account with the same name Samadhi. It is possible to merge the two account into one seeing that I've accumulated some points in my first account.
thanks
Samadhi
Comment: Hi Samadhi, welcome to the site. I see you have three accounts (i.e. your answers [here](http://buddhism.stackexchange.com/a/9094/254), [here](http://buddhism.stackexchange.com/a/9071/254), and [here](http://buddhism.stackexchange.com/a/9080/254)). Apparently there's some software which should run automatically, and detect and merge the accounts; but I don't know how regularly that software is run. I asked one of the SE staff and they suggested that you request a merge using the [Help Center > Contact](http://buddhism.stackexchange.com/contact) form, with topic "I need to merge user profiles".
Answer: Your profile is displayed at https://buddhism.meta.stackexchange.com/users/151/user535875 (for meta) and/or at https://buddhism.stackexchange.com/users/151/user535875 (on the main site).
The two should be linked, editing one should edit the other; but you cannot edit your meta profile, therefore edit your profile on the main site.
On the 2nd line of the (main site) profile page, to the right of your name, immediately under the line which says "Questions" and "Tags" and "Users", there are links which say "edit" and "privileges" and "preferences".
That "edit" link is what you want to click.
That will probably take you to this URL which will let you edit your profile: https://buddhism.stackexchange.com/users/edit/151

How do I edit my profile?


SharePoint 2013 - Show and sync Outlook calendar

Question: is there a way to show a Outlook calendar in a SharePoint calendar. I know, that you can overlay a Exchange calendar, but will this calender sync by itself ?
Or is there another way to display the personal Outlook calendar in SharePoint 2013?
Answer: Yes the calendar will sync by itself after Outlook/SharePoint calendar sync.
Outlook Calendar Integration
Comment: But showing/and sync a Outlook calendar in a SharePoint calendar isn't possible? Or how does it works? The main Problem with your solution is, that you have two calendars, this isnt what I want,


Criteria for a sequence of points along an analytic function so series of interpolating polynomials converges to the function itself?

Question: Let $F=\{X \subset \Bbb R^2\; \vert \; \text{card} \, X\in \Bbb N\; \land \forall_{(x_i,y_i)\in X}\, i\neq j\to x_i\neq x_j\}$. Let $P$ be the set of all polynomials from $\Bbb R$ to $\Bbb R$ of any degree. There exists a mapping $M:F\to P$ whose definition is as follows: Let $A\in F$, then $M(A)\in P$ is the unique polynomial of smallest possible degree whose graph goes through every point in A. Let $f:\Bbb{R}\to\Bbb{R}$ be an arbitrary analytic function. Let $\{ a\}_n$ be an arbitrary sequence in $\Bbb R$ with no repeats. Consider the sequence of sets recursively defined as follows: $S_1=\{ (a_1,f(a_1))\}$, $S_n=S_{n-1}\, \cup \, \{(a_n, f(a_n))\}$. $\forall_{n\in \Bbb N}\, S_n\in F$. This naturally arises a sequence of polynomials $b_n(x)=M(S_n)$. However, if you chose a different $\{a\}_n$, that would lead to a different sequence of sets $\{S\}_n$, which would lead to a different sequence of polynomials $\{b\}_n$. How would I go about proving the criteria on $\{a\}_n$ so that the limit of the associated $\{b\}_n$ is $f$ similarly to how the limit of the sequence of Taylor polynomials for an analytic function $f$ is $f$? Perhaps there are even certain further criteria on $f$ (maybe on the domain?) to make it work for all $\{a\}_n$? For example, if we restrict the domain of $f$ to be a compact subset of $\Bbb R$ lets call $D$, then by the Weierstrass approximation theorem, we can approximate the function as close as we like with a polynomial. Would that mean any $\{a\}_n\subset D$ would work? Another example is let $f(x) = \text{sin}\, x$, sequence 1 be $a_n = 2\pi n$, and sequence 2 be $a_n=0.01\pi n$. Using the above algorithm with $f$ and sequence 1, the limit of $b_n$ is the zero function, but using sequence 2, the limit of $b_n$ seems to approach the sine wave. EDIT: The previous statement is not proven, only conjectured. See the counterexample below in the answer section by Tyler J. This shows that there must be some important constraints on $\{a\}_n$ so that the "information" or "essence" of $f$ is captured by the points in $S_n$. What are the constraints?
Comment: Did you try writing the formulas of the mentioned [Newton polynomials](https://en.wikipedia.org/wiki/Newton_polynomial) ?
Answer: If the sequence $\{a_n\}_{n\in\mathbb{N}}$ has an accumulation point, it will yield $f$, as you can apply the principle of permanence to the difference between $f$ and the limit of the polynomials, assuming they converge (edit: further, assuming the limit is analytic!).
However, your above example demonstrates that this condition is sufficient, but not necessary.
edit: Actually, your example reveals some other interesting information! Consider $g(x) = \sin(201x)$ and $f(x) = \sin(x)$. On the sequence $a_n = 0.01\pi n$, $g(a_n) = f(a_n)$. Therefore, if we try to find a limit of interpolating polynomials for $g(x)$ using this sequence, we'll recover the same limiting polynomial as with $f(x)$ (which I'll trust is $f(x)$ itself, as you claim).
Comment: I have a computer program that will calculate $M(A)$ for any $A\in F$. I manually tested the example of $f(x)=\text{sin} \, x$ and $a_n=0.01\pi n$ with the first 30 points of the sequence and the output polynomials seemed to approach the Maclaurin series for sin. Your counter example of $g(x)=\text{sin} \, (201x)$ is so interesting though. It intersects $f(x)$ at every x value in the sequence. Evidently, even that sequence isn't a sufficient sampling of the sine wave for the interpolating polynomials. I wonder how to define a rigorous sampling sequence given a certain function.
Comment: My suspicion is that it is necessary and sufficient, without a priori information about $f$ aside from analyticity, for the sequence to have an accumulation point.


Determine correct electronic keyboard stand and chair height

Question: I have a full size electronic keyboard for my 89-year-old mother who has memory issues as well as macular degeneration and curvature of the spine. I'm looking for details on setting the piano up for her use including: 1) the correct height and brand of an adjustable furniture like keyboard stand; 2) the correct height and chair type; 3) lighting and sheet music holder stand. My mother is 5'1" and weighs 135 pounds.
Answer: First get the chair/seat height right for her legs. Thighs just about horizontal - knees slightly lower than hips. Feet need to be, funnily enough, flat on the floor.
Then work out where her arms are going. Again, probably about parallel to her thighs will be a good start point, elbows slightly higher than wrists as she plays, with bent fingers.
Those are merely start points - she may feel more comfortable with a lower keyboard, due to her back problem, so any actual measurements here are futile. Try it for a couple of weeks, adjust as necessary. Great to hear someone of that age is playing. Good luck to her! And you, adjusting subtly as you both go!
Comment: Tim, thank you for your response. And, yes, always adjust subtly as needed!
Answer: The standard height (i.e. what Steinway do) of the top of the keys above the floor is about 28½ inches.  Adjust the stool so that her forearms are level while in playing position.    Or use whatever chair/stool is available/comfortable and adjust keyboard height accordingly.
Sounds like she'll prefer the music quite close, and well-lit.  Make it so!
You've also thrown her curvature of the spine into the equation.  Adjust as necessary.
Enjoy!
Comment: Laurence, thanks for sharing this information.


What does the hydrolysis of a salt tell us about its basic/acidic character?

Question: I'm curious to know how basicity and acidity arises when a salt or covalent compound is dissolved in water.
Answer: Think of the salt in terms of its components: for example, sodium sulfide can be thought of as derived from sodium hydroxide (a strong base) and hydrogen sulfide (a weak acid) - resulting in a net basic character. When you dissolve sodium sulfide in water, the sulfide ion partially reacts with water to form hydrosulfide ion and hydrogen sulfide, plus hydroxide ion. Aluminum chloride, on the other hand, is derived from aluminum hydroxide (a weak base) and hydrogen chloride (a strong acid), so it is an acidic salt. Sodium chloride, from sodium hydroxide and hydrogen chloride, is a neutral salt (fully ionized). Knowing the dissociation constants of the corresponding acid and base of a salt, one can calculate how acidic or basic the salt is.
Answer: Some salts may have basic Brønsted/Lowry anions but are extremely stable in water. This belies the true nature of the salt's anion.
Consider silver sulfide as an example. This salt has a Ksp value of about ${6*10^{-51}}$. Despite the fact that the sulfide anion is a highly basic Brønsted/Lowry base, a solution of silver sulfide will actually exhibit a pH of 7.0.
Note that salts do not have to be exclusively Brønsted-Lowry bases/acids. Some salts may also exhibit Lewis acidity/basicity in water. This is another way in which basicity and acidity may arise when a salt or covalent compound is dissolved in water. Consider boric acid. This isn't a salt, but it is a covalent compound. It is an acid, but some argue it is not an acid in the sense of being a proton donor. The central boron instead utilizes its empty 2p orbital to heterolytically cleave water molecules as to form H+ in solution.
Answer: This question is directly related to the inter relatedness of Lewis and Brønsted acidity.
Typical metal salts (let's say MCl3) undergo hydrolysis (presumably in an aqueous solution) as Lewis basic water (which donates electrons to the acid in this context) coordinates (binds) to the Lewis acidic metal (which accepts electrons from the Lewis base). After, before or during coordination (it's hard to tell which without extensive experiment), water will give up one or two protons (i.e. hydrogen atom minus an electron), thereby generating a metal oxo/hydroxide (in this case, e.g. MO2H) or metal hydroxide (e.g. M(OH)3), either of which will be accompanied by acid in solution in the form of 3 eq of HCl (which would be completely dissociated into H+ and Cl-).


How do I index n sets of 4 columns to plot multiple plots using matplotlib?

Question: I want to know how I should index / access some data programmatically in python.
I have columnar data: depth, temperature, gradient, gamma, for a set of boreholes. There are n boreholes. I have a header, which lists the borehole name and numeric ID. Example:
Bore_name,Bore_ID,,,Bore_name,Bore_ID,,,, ...

depth,temp,gradient,gamma,depth,temp,gradient,gamma ...

I don't know how to index the data, apart from rude iteration:
with open(filename,'rU') as f:
    bores = f.readline().rstrip().split(',')
    headers = f.readline().rstrip().split(',')

# load from CSV file, missing values are empty 'cells'
tdata = numpy.genfromtxt(filename, skip_header=2, delimiter=',', missing_values='', filling_values=numpy.nan)

for column in range(0,numpy.shape(tdata)[1],4):
    # plots temperature on x, depth on y
    pl.plot(tdata[:,column+1],tdata[:,column], label=bores[column])
    # get index at max depth
    depth = numpy.nanargmin(tdata[:,column])
    # plot text label at max depth (y) and temp at that depth (x)
    pl.text(tdata[depth,column+1],tdata[depth,column],bores[column])

It seems easy enough this way, but I've been using R recently and have got a bit used to their way of referencing data objects via classes and subclasses interpreted from headers.
Answer: You could put your data into a dict for each borehole, keyed by the borehole id, and values as dicts with headers as keys. Roughly like this:
data = {boreid1:{"temp":temparray, ...}, boreid2:{"temp":temparray}}

Probably reading from files will be a little bit more cumbersome with these approach, but for plotting you could do something like
pl.plot(data[boreid]["temperature"], data[boreid]["depth"])

Answer: Well if you like R's data.table, there have been a few (at least) attempts to re-create that functionality in NumPy--through additional classes in NumPy Core and through external Python libraries. The effort i find most promising is the datarray library by Fernando Perez. Here's how it works.
>>> # create a NumPy array for use as our data set
>>> import numpy as NP
>>> D = NP.random.randint(0, 10, 40).reshape(8, 5)

>>> # create some generic row and column names to pass to the constructor
>>> row_ids = [ "row{0}".format(c) for c in range(D1.shape[0]) ]
>>> rows = 'rows_id', row_ids

>>> variables = [ "col{0}".format(c) for c in range(D1.shape[1]) ]
>>> cols = 'variable', variables

Instantiate the DataArray instance, by calling the constructor and passing in an ordinary NumPy array and a list of tuples--one tuple for each axis, and since ndim = 2 here, there are two tuples in the list each tuple is comprised of axis label (str) and a sequence of labels for that axes (list).
>>> from datarray.datarray import DataArray as DA
>>> D1 = DA(D, [rows, cols])

>>> D1.axes
      (Axis(name='rows', index=0, labels=['row0', 'row1', 'row2', 'row3',
           'row4', 'row5', 'row6', 'row7']), Axis(name='cols', index=1,
           labels=['col0', 'col1', 'col2', 'col3', 'col4']))

>>> # now you can use R-like syntax to reference a NumPy data array by column:
>>> D1[:,'col1']
      DataArray([8, 5, 0, 7, 8, 9, 9, 4])
      ('rows',)

Comment: Thanks doug, datarray looks interesting.
Answer: Here are idioms for naming rows and columns:
row0, row1 = np.ones((2,5))

for col in range(0, tdata.shape[1], 4):
   depth,temp,gradient,gamma = tdata[:, col:col+4] .T
   pl.plot( temp, depth )

See also namedtuple:
from collections import namedtuple
Rec = namedtuple( "Rec", "depth temp gradient gamma" )
r = Rec( *tdata[:, col:col+4].T )
print r.temp, r.depth

datarray (thanks Doug) is certainly more general.
Comment: Thanks very much Denis, so to get 'columns' returned into 1-D arrays you just transpose the array? Cool.


What are the caveats with increasing max_post_size and upload_max_filesize?

Question: I want to increase max_post_size and upload_max_filesize on my server so that my application will handle larger files (as large as 2gb).  But before I do that, what are the caveats?  Obviously there was a reason the PHP developers set the size to be low.  Will I need a certain amount of RAM for the operation?  Any insight would be helpful.
Answer: One of the biggest issues I see, is that POSTS are a one shot deal. What I mean by that is that if your client is uploading a very large file, and a network interruption occurs when they are 90% finished, they will have to start from scratch.
I believe there are Flash and Java based solutions that will upload a file in chunks to be reconstructed on your server. I have only used one that was made for Amazon's S3 service called Jets3t, but hopefully someone else can recommend another.
Answer: The posted data is streamed into memory while it is being posted.  Multiply the max post size by the number of users you expect to have posting the maximum at any point and that is the amount of memory you'll need to hold posted data across all sessions/processes.
Your upload max size must be less than max post size.  The difference of max post size and upload file size is the amount of data left available for things like annotations or message content.
But really, making users able to post up to 2gb makes for an easy DOS attack.  Even if you're limiting the availability of the app to corporate users on the local intranet, it wouldn't be hard for a disgruntled employee to cause you some headaches.
Of course you could just put a really large amount of RAM in the box on a 64-bit platform, but I suppose it depends on how much money you want to spend.
Answer: That's more a problem of security, let's imagine a bunch of hackers decide to attack your website and start uploading 1.99 giga files from many machines.
The disk of your server would be fill in no time and the server would pretty much slow down to be unusable.
For the memory problem that Nathan mentioned I think it is a myth, PHP does stock some in memory but drop it also on the disk at same time so the amount of memory should be pretty much ok.
You might want to give some kind of FTP access to your user, so in your application they would able to browse that ftp directory and import whatever selected file. The FTP allow append and kind of easy recovery in case the connection goes down.
Also have to be noted in terms of user experience uploading a 2 gb file on a browser is really bad, like your browser would freeze during minutes and you don't know if it stuck the progress, so using some Flash/Applet based solution or FTP where the user have some feedback is really better.


Javascript library for resampling an array?

Question: I'm trying to visualize some data on an HTML canvas and I'm facing an issue similar to this one.  That is, the size of my data doesn't exactly match the size of my canvas.
In one instance I'd like to plot a 1024 point signal on a canvas that's 100px wide.  (E.g., an audio waveform.)
In another instance I'd like to show a 1024 by 5000 point matrix on a canvas that's 100 px high by  by 500 px wide. (E.g., an audio spectrogram.)
In both cases, I'll need to resample my data so that it fits on the canvas. Does anyone know of a library/toolkit/function in Javascript that can do this?
** EDIT **
I'm aware that there are many techniques I could use here. One possibility is to simply discard or duplicate data points.  This would do in a pinch, but discarding/duplication is known to produce results that tend to look "jagged" or "blocky" (see here and here). I'd prefer to use a slightly more sophisticated algorithm that outputs smoother images such as Lanczos, bilinear or bicubic resampling.  Any of these would meet my needs.
My question isn't about which algorithm to use, though, it's about whether any of them have been implemented in open-source javascript libraries. Surprisingly, I haven't been able to find much in JS. Coding my own resampling function is obviously an option, but I wanted to check with the SO community first to make sure I wasn't re-inventing the wheel.
(This answer gives a code listing that's very close to what I want, except that it operates directly on the canvas objects rather than the data arrays, and it forces the aspect ratios of the input and output to be the same. If nothing else is available, I can definitely work with this, but I was hoping for a solution that's a bit more general and flexible, along the lines of Matlab's resample.)
Comment: I don't think these kinds of algorithms have been created in the open-source community.  Mostly because if you're using such algorithms, you're probably going to use something a little more powerful like Java, C#, C++, Python, R, or Matlab.  I think you may have to implement your own library.
Comment: do yo mean just sampling every nth value? That's part of the basics of loops/algorithms in any language.
Answer: use canvas scale
ctx.scale(xscale,yscale);

you can determine the scaling by calculating the rate between your canvas and the data
ctx.scale(canvas_x/data_x,canvas_y/data_y)


What are the Hoya circular polarizer types?

Question: I have a Canon 18-55mm lens. I want to buy a new polarizer for it. The diameter of my lens is 58mm. I want to go for Hoya. But there are 5 or 6 different circular polarizers of Hoya for 58mm diameter. I'm confused about which one should I go for. Can someone explain the different types to me so I can decide?
Comment: That depends entirely on what you want to do and what your budget is.
Answer: The ones with the HD designation are better because they transmit considerably more light than any other circular polarizer. This is the minimum you should consider for high quality performance with excellent color-balance, low flare and even illumination.
They also have an HD2 line which has the same optical performance but is made of temperred glass which makes it stronger and much more resistant to impact. Wether you need this depends if you usually drop your filters or bang them against something.
They just announced the HD3 which is apparently even harder and officially delivers the same optic performance as the rest of the HD line. This is one I did not try but I can vouch for the HD and HD2 ones which are the very best polarizers I own. I still have a non-HD one too and there is 1 1/3 stop difference between them, which is much less usable and compares to what you get in transmission with other brands.


Intrinsic and Extrinsic curvature

Question: I want to understand the basic conceptual idea about intrinsic and extrinsic curvature.
If we consider a plane sheet of paper (whose intrinsic curvature is zero) rolled into a cylindrical shape, then we say that its extrinsic curvature is non-zero. So how can I visualize the extrinsic curvature?
I read somewhere that the extrinsic curvature indicates how the 2D surface is embedded in 3D space. So what does it mean?
Comment: Hope that [**this is**](http://mathworld.wolfram.com/IntrinsicCurvature.html) useful.
Comment: Would [math.se] be a better home for this question?
Comment: I understand the reason to VTC on math grounds, but I think the OP is coming at this from a GR background and answers based on that premise would help an understanding more than a migration.
Answer: Explaining  the idea of a 2 D surface embedded in 3 D Space.
You will get a (much) better answer than this, but a straightforward reason is that for using extrinsic curvature, we need an extra dimension to put the lower dimensional object "into".
Intrinsic curvature of a surface or manifold can be performed by using math techniques developed by Gauss and Riemann and allows us  to do without the extra dimension in curvature calculations.
Obviously everything we see around us is actually in 3D, but we can pretend a sheet of paper is 2D, so looking at a sheet of paper rolled up  into a cylinder is looking at a 2D surface in a 3 D space and we can measure directly how much it's curved.

Image Source: Descriptions of Curvature
From looking at these 3 shapes, it's quite obvious that in a 3 D world, we could physically measure all aspects of them, and determine which of them has, in  any small region on it, positive curvature, (the sphere), negative curvature,  (the "vase" shape) and which has no curvature, (the middle cylinder).
So 2D embedded objects in 3D space are easy to measure.
But we have to describe 4 D objects and events in a 4 D space, so we don't have the "elbow room" of an extra dimension.
So we give up on the visual attempt ( which is why most, if at all depictions of real 4D on TV and books are misleading) and we use expressions such as this:
$${\displaystyle R^{\rho }{}_{\sigma \mu \nu }=\partial _{\mu }\Gamma ^{\rho }{}_{\nu \sigma }-\partial _{\nu }\Gamma ^{\rho }{}_{\mu \sigma }+\Gamma ^{\rho }{}_{\mu \lambda }\Gamma ^{\lambda }{}_{\nu \sigma }-\Gamma ^{\rho }{}_{\nu \lambda }\Gamma ^{\lambda }{}_{\mu \sigma }}$$
to calculate how much spacetime is curved.
This above is an example using intrinsic curvature, we  don't (and actually can't) "lift " ourselves above the space.
We are in 4 D space-time, so to perform calculations in this space, we must use intrinsic curvature math ( differential geometry) as we can't go to a higher dimension.
In slightly more specific terms,you might have read about the metric tensor, which is based around the idea of using basis vector and their components to calculate distances (in 4 dimensions) utilising differential geometry to measure deviations from flat space caused by massive objects.
The other benefit of the intrinsic based metric tensor is that it is applicable in all GR calculations, (invariance).
Answer: Here is a way of thinking about the difference that I find useful.  It is not particularly rigorous but I think it can be made so.
Think about a manifold $M$ which is embedded in some higher-dimensional flat space: so the manifold locally looks like $\mathbb{R}^n$ and it's embedded in $\mathbb{R}^m$ with $m > n$.  (This is being a bit casual because it really needs to be embedded in some affine space, not a vector space, but it will serve.)
So, now, the way you define curvature of $M$, both intrinsic and extrinsic is in terms of parallel transport.  In particular what you need to do is to take a vector in the tangent space of $M$ at some point $P$ and parallel-transport it around a little loop, ending up back at $P$.  Then you compare the initial and final vectors.  if they are the same (for all loops, and all vectors) then the manifold is flat, and if they are not the same, then it's curved.
In order to actually quantify this notion, you then need to develop a lot of mechanism to describe what parallel transport is on the manifold and what geometrical object describes how vectors change when you parallel transport them around little loops: that object ends up being the Riemann tensor, of course.  But the idea is easy to understand.
Intrinsic curvature is when you do this trick entirely in $M$: you take your vectors around little loops in $M$ and see what you get back: if you don't always get back the same vector then $M$ has intrinsic curvature, if you do, it doesn't.
Extrinsic curvature is when you do this partly in the space into which $M$ is embedded.  It's easy to see that vectors in $M$'s tangent spaces correspond to vectors in the (tangent spaces of) the space into which $M$ is embedded, so at any point you can 'lift' a vector at a point in $M$ out into the larger space and start transporting it there instead, and then drop it back onto $M$ at some other point and continue transporting it in $M$ back to where it started.  So, in particular you can construct loops which are partly in $M$ and partly in the larger space, and transport things around those.  Note that there are two different notions of parallel transport in such a loop: while in $M$ you must transport using $M$'s rules, and while in the larger space you must transport using its rules (and the larger space is flat, of course).
$M$ has extrinsic curvature if you don't always get the same vector back when transporting a vector around such loops.
The best way to think about this is to consider an example.  Think about a 2-dimensional cylinder embedded in ordinary flat 3-space in the obvious way.
Well, you can easily convince yourself that the cylinder has no intrinsic curvature.
But now think about the extrinsic case.  Consider a loop which starts at a point on the cylinder, goes half-way around it, and then hops out into the embedding space and crosses back to the original point (by any path in the embedding space: it does not matter since it is flat).  It is easy to see (draw pictures!) that moving a vector $\vec{v}$ around such a loop results in $-\vec{v}$: it is pointing in completely the opposite direction.
So the surface of a cylinder has no intrinsic curvature, but it does have extrinsic curvature when embedded in the obvious way into 3-space.
Answer: Exactly what you wrote. It means that a surface appears curved when looked from the space that contains it.
Take the circle, $S^1$,  for example. The intrinsic curvature would be what people call Riemann tensor. Since you can cover this circle globally by a single coordinate, you would get Riemann=0. There aren't any surprises when you parallel transport a vector around any closed loop.
Now, intuitively the circle appears curved. This is because it has extrinsic curvature. But be mindful, this definition makes reference to the ambient space. You only see the circle curved because you are looking at it from outside. Again, if you were constrained to live on the circle, it would pretty much look flat to you.
Look here Wikipedia extrinsic curvature for more details.
Answer: Intrinsic curvature, which we normally describe in terms of the Riemann tensor $R^a_{bcd}$ and quantities related to it, fundamentally has to do with the effect of parallel transportation on the manifold, and the curvature is responsible for manifolds having non-trivial holonomy.
Now if we have a sub-manifold embedded in some other manifold, the extrinsic curvature, as you more or less say, can be used to describe the way $\Sigma \subset M$ curves in $M$. The best way I have had it put to me is that, extrinsic curvature corresponds to everyone's layman understanding of curvature before we were ever introduced to differential geometry.
If the difference in dimension (or co-dimension) is greater than one, we can define multiple normal vectors to the manifold $\Sigma$, and there is a third notion. In the case of two, $\{n^a,m^a\}$ we can define a normal fundamental form, $\beta_a = m_b \nabla_a n^b = -n_b \nabla_a m^b$ which can be used to describe the curvature as one moves around $\Sigma$ of the normals in orthogonal planes.
Answer: My understanding comes from Milnor's Morse Theory Ch. 2. He identifies a small open set of a manifold M with the Euclidean space U. This gives him two things: he can now define points on the manifold M as well as tangent vectors originating from these points, all expressed in common coordinate and vector bases of the Euclidean space U, respectively. All local operations such as inner product or covariant differentiation are expressed in these common bases. (This is like using a positive definite matrix expressed in standard bases to compute norms. The inner products of the standard Euclidean basis vectors will likely be something other than 0 or 1.) The covariant derivative operations are happening in the invisible M, but the end result is that we can express it all in terms of vectors originating from points using common Euclidean coordinates and vector bases. The relationships among the weights on these bases in these expressions lead to the two Christoffel formulas. (The weights are all zero for Euclidean spaces. So everything is trivially symmetric.)
The chain rule and bilinearity basically mean that the covariant derivative is defined as long as we have a rule for any two basis vectors. He just asserts that the answer is a weighted sum of the basis vectors with these weights magically emerging from the invisible M for each point in U. So now he can directionally differentiate a vector field in U at any point against any vector emanating from that point, all in a common coordinate and vector Euclidean basis.
Then in Section 10, he doesn't have a curve at hand, only a tangent vector. So he begins with the simplest geodesic, one that just sits at point p and never moves. Yet, being a geodesic, it parallely moves a vector v emanating from p to … itself, so its Jacobian is invertible. He thus gains a diffeomorphism mapping a point and a tangent emanating from it to the endpoints of a local geodesic path emanating from the same point. He then exploits the consequence that locally any path can be expressed as exp$(r(t)\overrightarrow{v(t)})$, so he has a characterization of arbitrary paths that he can use to show that the geodesic is locally the shortest. Globally of course he has to assume that local geodesics can be indefinitely extended, which by the Archimedean principle implies some minimal small extension locally. But the small extension he needs (a limit point, actually) happens locally in a chart, which he exploits to prove the existence of global minimal geodesics using a) local perturbation arguments and b) the global properties of the segment of the global geodesic he has built so far. He needs a global distance metric, which he shows is compatible with the usual topology using local arguments. (A sufficiently small $\epsilon-$ open ball in the tangent space at a point is diffeomorphic to an $\epsilon-$ open ball on the manifold using the geodesic distance definition.)
I found his covariant second derivative intuition footnote on p.48 to be very illuminating. Suppose you want to compute the 'cross partial' of a function f w.r.t. two vector fields X and Y. So you first compute the directional derivative Xf and then apply Y to it. But this 'overdifferentiates' in the sense of the chain rule. Y first 'differentiates' X and then the directional derivative of f. The first term (Y |- X)f needs to be removed.
The curvature 'tensor', he says, then measures how symmetric the covariant second derivative of a vector field is w.r.t the pairs of basis vector fields. It's a purely algebraic trilinear map characterization because of all the weights and the invisibility of M. He uses the word 'tensor' in quotes presumably because this tensor has a lot of relations in the universal property. For one, the range is a vector space of dim U not dim $U^3$.
I would recommend reading Frank Morgan's short book Riemannian Geometry for Beginners (the first edition has typos) along with Milnor. I found switching between them very useful. I also kept a running example of a tangent cone on a sphere touching at a high latitude. This was a useful check on my understanding of Milnor (although the intuition is not generalizable cuz the weights on the cone are all zero). E.g., the centripetal acceleration vector of a particle traversing the latitude at uniform speed has a nonzero projection on the cone, and the two become more equal as you move the latitude higher and less equal as you move to the equator. You then get parallel transport on the equator because the tangent cone is now a cylinder and the projection of the centripetal acceleration vector is thus zero on the cylinder. Of course, in Milnor's calculations, you never see the centripetal acceleration vector, only its projection.
Finally, all this assumes the existence of a global Riemann metric but one can build one from local charts using partitions of unity. A simple intuition for the metric is that you cannot integrate a function on a manifold using charts. It doesn't obey change of variables. By contrast, a density, e.g., the square root of the determinant of the Riemann metric matrix, does, so you can integrate it (even though its value at a point depends on the chart). For example, a Riemann surface has holomorphic transition maps that amplify all tangent vectors at a point in the chart by the same proportion and rotate them by the same angle. The Riemann metric compatible with this structure is a positive scalar multiple of the identity matrix. See Terry Tao https://mathoverflow.net/questions/19152/why-is-a-topology-made-up-of-open-sets/30231#30231

Intrinsic and Extrinsic curvature


R package for motion capture data analysis and visualisation

Question: I am a newbie in R, love it, but I am surprised by a complete lack of solid package to analyse motion capture data.
The simplest motion capture file is just a massive table with 'XYZ' coordinates for each point attached to a recorded subject, and for every frame captured. I know that I can find individual methods and functions in R to perform complex operations (like principal component analysis) or I can plot time series for all the points. But when I am looking for examples that could also educate me statistically about analysing human movement, and provide with nice toolbox for visual representation of data, R turns out to be a cold desert. On the other hand, MATLAB has Motion capture toolbox and MoCap Toolbox and especially the latter has quite good options for plotting and analysing the captures. But let's be honest - MATLAB has quite ugly visualisation engine comparing to R.
Some specific requests for R motion capture package would include:

reading, editing, visualizing and transforming mocap data
kinetic and kinematic analysis
time-series and principal component analysis
animating data

Am I missing something here (in my Googling) or is there really no mocap packages out there for R? Have anyone tried playing with motion capture data in R? Can you give me some directions?
Comment: You may not be missing anything.  My favo(u)rite solution, `library(sos); findFn("{motion capture}")`, didn't come up with anything useful. There are cultural issues: it may be possible to do cool stuff with R, but if all the cool kids who work on motion capture are using MATLAB or Python, then that's where things will get done.  I would definitely take a look and see what's been done in Python, and at interfacing Python with R for any statistical heavy lifting that's not already implemented in R ...
Comment: You can use the packages "forecast" and "ftsa" for timeseries and principal component analysis.
Answer: UPDATE, December 2019: It seems like the mocapr package by Steen Harsted is a much more powerful tool than the one I built. Enjoy.
Have a look at my package, the mocap package:
https://github.com/gsimchoni/mocap
It is far from perfect but it's a start, currently tested only on CMU Graphics Lab Motion Capture Database ASF/AMC files.
And here is a blog post with some more details.
Answer: I used the package rgl to create an animation from a motion gesture dataset. Although it's not a package made specifically for gesture data, you can work with it.
In the example below, we have gesture data for 8 points on the upper body: spine, shoulder center, head, left shoulder, left wrist, right shoulder, and right wrist. The subject has his hands down and his right arm is making an upward movement.
I restricted the dataset to 6 time observations (seconds, if you will), because otherwise it would get to big to post here.
Each line from the original dataset corresponds to a time observation, and the coordinates of each body point are defined in sets of 4 (every four columns is one body point). So at each line, we have "x", "y", "z", "br" for the spine, then "x", "y", "z", "br" for the shoulder center, and so on. The "br" is always 1, in order to separate the three coordinates (x,y,z) of each body part.
Here is the original (restricted) dataset:
DATA.time.obs<-rbind(c(-0.06431,0.101546,2.990067,1,-0.091378,0.165703,3.029513,1,-0.090019,0.518603,3.022399,1,-0.042211,0.687271,2.987086,1,-0.231384,0.419869,2.953286,1,-0.299824,0.173991,2.882627,1,0.063367,0.399478,3.136306,1,0.134907,0.176191,3.159998,1),
                 c(-0.067185,0.102249,2.990185,1,-0.095083,0.166589,3.028688,1,-0.093098,0.519146,3.019775,1,-0.043808,0.687041,2.987671,1,-0.234622,0.417481,2.94581,1,-0.300324,0.169313,2.869782,1,0.056816,0.398384,3.135578,1,0.134536,0.180875,3.162843,1),
                 c(-0.069282,0.102964,2.989943,1,-0.098594,0.167465,3.027638,1,-0.097184,0.52169,3.019556,1,-0.046626,0.695406,2.989244,1,-0.23478,0.417057,2.943475,1,-0.300101,0.168628,2.860515,1,0.053793,0.395444,3.143226,1,0.134175,0.182816,3.172053,1),
                 c(-0.070924,0.102948,2.989369,1,-0.101156,0.167554,3.026474,1,-0.100244,0.522901,3.018919,1,-0.049834,0.696996,2.987933,1,-0.235301,0.416329,2.939331,1,-0.301339,0.170203,2.85497,1,0.04762,0.390872,3.142792,1,0.14041,0.186844,3.182172,1),
                 c(-0.071973,0.103372,2.988788,1,-0.103215,0.16776,3.025409,1,-0.102334,0.52281,3.019341,1,-0.051298,0.697003,2.991192,1,-0.235497,0.414859,2.935161,1,-0.297678,0.15788,2.833734,1,0.045973,0.386249,3.147609,1,0.14408,0.1916,3.204443,1),
                 c(-0.073223,0.104598,2.988132,1,-0.106597,0.168971,3.022554,1,-0.106778,0.522688,3.015138,1,-0.051867,0.697781,2.990767,1,-0.236137,0.414773,2.931317,1,-0.297552,0.153462,2.827027,1,0.039316,0.39146,3.166831,1,0.175061,0.214336,3.207459,1))

For each time point, we can create a matrix where each row will be a body point, and the columns will be the coordinates:
# Single time point for analysis
time.point<-1
# Number of coordinates
coordinates<-4
# Number of body points
body.points<-dim(DATA.time.obs)[2]/coordinates

# Total time of gesture
total.time<-dim(DATA.time.obs)[1]

# Transform data for a single time. observation into a matrix
DATA.matrix<-matrix(DATA.time.obs[1,],c(body.points,coordinates),byrow = TRUE)
colnames(DATA.matrix)<-c("x","y","z","br")
rownames(DATA.matrix)<-c("hip_center","spine","shoulder_center","head",
                         "left_shoulder","left_wrist","right_shoulder",
                         "right_wrist")

So, we have, at each point of time, a matrix like this:
                        x        y        z br
hip_center      -0.064310 0.101546 2.990067  1
spine           -0.091378 0.165703 3.029513  1
shoulder_center -0.090019 0.518603 3.022399  1
head            -0.042211 0.687271 2.987086  1
left_shoulder   -0.231384 0.419869 2.953286  1
left_wrist      -0.299824 0.173991 2.882627  1
right_shoulder   0.063367 0.399478 3.136306  1
right_wrist      0.134907 0.176191 3.159998  1

And now we use rgl to plot the data from this matrix:
#install.packages("rgl")
library(rgl)

# INITIAL PLOT

x<-unlist(DATA.matrix[,1])
y<-unlist(DATA.matrix[,2])
z<-unlist(DATA.matrix[,3])

# OPEN A BLANK 3D PLOT AND SET INITIAL NEUTRAL VIEWPOINT
open3d()
rgl.viewpoint(userMatrix=rotationMatrix(0,0,0,0))

# SET FIGURE POSITION
# This is variable. It will depend on your dataset
# I've found that for this specific dataset a rotation
# of -0.7*pi on the Y axis works

# You can also plot and select the best view with
# your mouse. This selected view will be passed on
# to the animation.
U <- par3d("userMatrix")
par3d(userMatrix = rotate3d(U, -0.7*pi, 0,1,0))

# PLOT POINTS
points3d(x=x,y=y,z=z,size=6,col="blue")
text3d(x=x,y=y,z=z,texts=1:8,adj=c(-0.1,1.5),cex=0.8)

# You can also plot each body point name.
# This might be helpful when you don't know the
# initial orientation of your plot

# text3d(x=x,y=y,z=z,texts=rownames(DATA.matrix),
#        cex=0.6,adj=c(-0.1,1.5))

# Based on the plotted figure, connect the line segments
CONNECTOR<-c(1,2,2,3,3,4,3,5,3,7,5,6,7,8)
segments3d(x=x[CONNECTOR],y=y[CONNECTOR],z=z[CONNECTOR],col="red")

Then, we have this:

To create an animation, we can put all this into a function and use lapply.
movement.points<-function(DATA,time.point,CONNECTOR,body.points,coordinates){

  DATA.time<-DATA[time.point,]

  DATA.time<-matrix(DATA.time,c(body.points,coordinates),byrow = TRUE)

  x<-unlist(DATA.time[,1])
  y<-unlist(DATA.time[,2])
  z<-unlist(DATA.time[,3])

  # I used next3d instead of open3d because now I want R to plot
  # several plots on top of our original, creating the animation

  next3d(reuse=FALSE)
  points3d(x=x,y=y,z=z,size=6,col="blue")
  segments3d(x=c(x,x[CONNECTOR]),y=c(y,y[CONNECTOR]),z=c(z,z[CONNECTOR]),col="red")
# You can control the "velocity" of the animation by changing the
# parameter below. Smaller = faster
  Sys.sleep(0.5)
}

I know this solution is not elegant, but it works.
Answer: Judging by a quick search on RSeek, there isn't a motion capture package available for R.  It looks like you'll need to find equivalents for each function.  The more general ones should be fairly easy to find (interpolation, subsetting, transformation/ projection, time-series analysis, pca, matrix analysis etc) and the very process of writing your own custom functions for specific things like estimating instantaneous kinetic energy is probably the best way to learn!
You may find plyr useful for knocking the data into shape and the animation package for visualising motion.


Minimisation using Simplex Tableau

Question: I know there are a number of ways to use a simplex tableau in linear programming to find the minimum value for an equation given constraints, including transposing the simplex tableau etc. etc. However, my teacher specifically mentioned that he would like us to minimise equations by multiplying the objective by -1 and turning any 'greater than' inequalities into 'less than' inequalities by multiplying by -1.
This makes sense to me mathematically, however my resulting simplex tableau (before pivoting) has negative values in the constraint column (which is not allowed) and only positive values in the objective row (which suggests the optimum solution has been reached). What do I do to actually find the optimal solution? I know this isn't very well explained and I've probably got something wrong here but help would be much appreciated.
Answer: You'll need the "two phase" version of the simplex method for this. During the first phase applied, one (if needed) does operations whose goal is to make the entries of the constraint column all non-negative. There are rules in this case for where to pivot, and typically while doing phase one some negative entries will wind up in the objective row.
Once phase one is done, you have a usual simplex problem with non-negative constraints which is then solved. That's called by some the "phase two" part of the simplex algorithm.
I don't have a link handy but try something like "two phase simplex algorithm" to look it up.

Minimisation using Simplex Tableau


Does action at distance in electromagnetism violate energy conservation?

Question: Consider two charges A and B separated at distance D. charge B is attached on spring and can move towards and away from charge A. Now charge A is brought closer to charge B and then it is taken back to its original position. Work done in this process is zero because of conservative forces. If this action is done in time interval less than D/c, then charge B does not feel any force or reaction during this time. Now as this reaction force reaches to charge B, it will oscillate. In this process work done on charge A is zero but charge B is having energy due to oscillation. Is energy conservation violated in this retarded action ?
Comment: Electromagnetism is not action at a distance.
Comment: conservation laws hold for inertial frames,. the action " charge A is brought closer to charge B and then it is taken back to its original position. " "brought closer and taken back" are non inertial frames.
Comment: By action at distance, I mean retarded interactions in electromagnetism.
Answer: No. There is energy in the electromagnetic field that you aren't considering. When you include both the energy of moving charges and the field energy, energy is conserved in all electromagnetic interactions. So is linear momentum and angular momentum.
Electromagnetic fields not only make these quantities conserved globally: they make them conserved locally in any infinitesimal region of space you care to consider.
Comment: Oscillation energy produced at charge B is also depends on magnitude of charge B. Because more charge, more force and hence more oscillating amplitude of charge B. We can take as much large magnitude of charge B as we want. This does not affect radiation energy at charge A, but it will increase energy of oscillation of charge B. So, radiation energy can not account for whatever energy is produced at the charge B.
Comment: The total energy of the charged particles and the fields is conserved. This follows from Maxwells equation and the Lorentz force law. See [Wikipedia](https://en.wikipedia.org/wiki/Electromagnetic_stress–energy_tensor#Conservation_laws).
Answer: There is no "action at a distance" in electromagnetism, when you have the full theory. Charges affect the electromagnetic field, locally. The parts of the electromagnetic field affect other parts, locally. And the electromagnetic field affects charges, locally.
This is one of the consequences of Maxwell's equations in differential form:
\begin{align}
   \nabla \cdot \mathbf{E} & = \frac{\rho}{\epsilon_0}, & \nabla \cdot \mathbf{B} & = 0, \\
   \nabla \times \mathbf{E} & = -\frac{\partial \mathbf{B}}{\partial t}, & \text{and } \nabla \times \mathbf{B} & = \mu_0 \mathbf{J} + \mu_0\epsilon_0 \frac{\partial \mathbf{E}}{\partial t},
\end{align}
when combined with the formulae for the Lorentz force (density)
\begin{align}
  \mathbf{F} & = q\mathbf{E} + q\mathbf{v}\times\mathbf{B} \text{ or} \\
  \mathbf{f} & = \rho\mathbf{E} + \mathbf{J} \times \mathbf{B} \text{ (force density)}.
\end{align}
Energy only appears to be lost, to you, because you're not accounting for the energy and momentum carried by the electromagnetic field. You can look at the components of the electromagnetic stress-energy tensor to figure out how much energy, momentum, and stresses are in the electromagnetic field at any time. When you add up all of the energy and momentum, you'll find it's quite conserved.
Now, if you think that this is just a hack, it is the most straightforward model to understand how the pressure light sails experience is produced (recently demonstrated).
Answer: Wheeler and Feynman developed the action-at-a-distance theory for
electromagnetic field theory. This theory is usually called as the
absorber theory (1945-1949) [1,2]. The absorber theory is build
on the the top of action-at-a-distance theory [3,4,5]. The absorber
theory is further developed by John Cramer as transactional interpretation
of quantum mechanics (1980) [6,7]. The key of the action-at-a-distance
theory,absorber theory, transactional interpretation is that the action
is build at least between two objects: the source and sink. The source
can be a transmitting antenna, a light source. The sink can be a receiving
antenna or light sink. The source can have radiation of the retarded
wave. The sink can have the radiation of the advanced wave.
A the above theory from action-at-a-distance to transactional theory
is qualitative theory but not a quantitative theory. Hence all these
theory have not associated to energy conservation.
However the theory of action-at-a-distance, absorber theory and transactional
interpretation theory is further developed by the mutual energy theorem [8,9,10] (1987)
and [11,12,13,14] (2017), which is a quantitative theory. The the mutual
energy theorem, the energy conservation law for N current elements
is,
\begin{equation}
\sum_{i=1}^{N}\sum_{j=1,j\neq i}^{N}\intop_{t=-\infty}^{\infty}dt\iiint_{V}(\boldsymbol{J}_{i}\cdot\boldsymbol{E}_{j})dV\equiv\sum_{i=1}^{N}\sum_{j=1,j<i}\intop_{t=-\infty}^{\infty}dt\iiint_{V}(\boldsymbol{J}_{i}\cdot\boldsymbol{E}_{j}+\boldsymbol{J}_{j}\cdot\boldsymbol{E}_{i})dV=0\label{eq:10}
\end{equation}
The above conservation law is self-explanatory. Since $\iiint_{V}(\boldsymbol{J}_{i}\cdot\boldsymbol{E}_{j})dV$
is the power of current element $\boldsymbol{J}_{j}$ give to $\boldsymbol{J}_{i}$.
$\iiint_{V}(\boldsymbol{J}_{j}\cdot\boldsymbol{E}_{i})dV$ is the
power of current element $\boldsymbol{J}_{i}$ give to $\boldsymbol{J}_{j}$.
If $\boldsymbol{J}_{i}$ get some power $\boldsymbol{J}_{j}$ will
loss the same amount. Hence, in general there is,
\begin{equation}
\intop_{t=-\infty}^{\infty}dt\iiint_{V}(\boldsymbol{J}_{i}\cdot\boldsymbol{E}_{j})dV=-\intop_{t=-\infty}^{\infty}dt\iiint_{V}(\boldsymbol{J}_{j}\cdot\boldsymbol{E}_{i})dV\label{eq:20}
\end{equation}
Hence we have the above energy conservation law. In mutual energy
theory. The above energy conservation law is supported by the mutual
energy principle,
\begin{equation}
-\sum_{i=1}^{N}\sum_{j=1,j\neq i}^{N}\iint_{\Gamma}(\boldsymbol{E}_{i}\times\boldsymbol{H}_{j})\cdot\hat{n}d\Gamma=\sum_{i=1}^{N}\sum_{j=1,j\neq i}^{N}\iiint_{V}(\boldsymbol{J}_{i}\cdot\boldsymbol{E}_{j}+\boldsymbol{E}_{i}\cdot\frac{\partial}{\partial t}\boldsymbol{D}_{j}+\boldsymbol{H}_{i}\cdot\frac{\partial}{\partial t}\boldsymbol{B}_{j})dV\label{eq:30}
\end{equation}
Mutual energy principle is equivalent to N group of Maxwell equations,
\begin{equation}
\left(\begin{array}{c}
\nabla\times\boldsymbol{E}_{i}=-\frac{\partial}{\partial t}\boldsymbol{B}_{i}\\
\nabla\times\boldsymbol{H}_{i}=\boldsymbol{J}_{i}+\frac{\partial}{\partial t}\boldsymbol{D}_{i}
\end{array}\ \ \ \ \ \ \ \ i=1,\cdots N\right)\label{eq:40}
\end{equation}
That means the the mutual energy principle is the sufficient and necessary
condition of the above N group of Maxwell equations. Hence, the mutual
energy conservation law of action-at-a-distance theory should be the
above mutual energy principle.
It should be noticed that the above mutual energy principle as a energy
conservation law have major difference with the energy conservation
law of the traditional electromagnetic field theory. In traditional
electromagnetic field theory the energy conservation law is the Poynting
theorem, which is
\begin{equation}
-\iint_{\Gamma}(\boldsymbol{E}\times\boldsymbol{H})\cdot\hat{n}d\Gamma=\iiint_{V}(\boldsymbol{J}\cdot\boldsymbol{E}+\boldsymbol{E}\cdot\frac{\partial}{\partial t}\boldsymbol{D}+\boldsymbol{H}\cdot\frac{\partial}{\partial t}\boldsymbol{B})dV\label{eq:50}
\end{equation}
If there are N current elements $\boldsymbol{J}_{i}$ $i=1,...N$.
There should be superposition law
\begin{equation}
\boldsymbol{E}=\sum_{i=1}^{N}\boldsymbol{E}_{i}\label{eq:60}
\end{equation}
\begin{equation}
\boldsymbol{E}=\sum_{i=1}^{N}\boldsymbol{E}_{i}\label{eq:70}
\end{equation}
\begin{equation}
\boldsymbol{J}=\sum_{i=1}^{N}\boldsymbol{J}_{i}\label{eq:80}
\end{equation}
Substitute the above to the Poynting theorem we obtained,
\begin{equation}
-\sum_{i=1}^{N}\sum_{j=1}^{N}\iint_{\Gamma}(\boldsymbol{E}_{i}\times\boldsymbol{H}_{j})\cdot\hat{n}d\Gamma=\sum_{i=1}^{N}\sum_{j=1}^{N}\iiint_{V}(\boldsymbol{J}_{i}\cdot\boldsymbol{E}_{j}+\boldsymbol{E}_{i}\cdot\frac{\partial}{\partial t}\boldsymbol{D}_{j}+\boldsymbol{H}_{i}\cdot\frac{\partial}{\partial t}\boldsymbol{B}_{j})dV\label{eq:90}
\end{equation}
These can be called Poynting theorem of N current elements. This formula
is very close to the mutual energy principle, but there are clear
difference, the difference is at the summation. There is
\begin{equation}
\sum_{i=1}^{N}\sum_{j=1}^{N}\ \ \ \ \ \ vs\ \ \ \ \ \ \sum_{i=1}^{N}\sum_{j=1,j\neq i}^{N}\label{eq:100}
\end{equation}
The theory of Mutual energy believe the summation $\sum_{i=1}^{N}\sum_{j=1,j\neq i}^{N}$
is correct, and $\sum_{i=1}^{N}\sum_{j=1}^{N}$ is wrong. $\sum_{i=1}^{N}\sum_{j=1}^{N}$
over estimated the energy of the system. If we use $\sum_{i=1}^{N}\sum_{j=1}^{N}$
this summation the energy have additional terms which are,
\begin{equation}
-\sum_{i=1}^{N}\iint_{\Gamma}(\boldsymbol{E}_{i}\times\boldsymbol{H}_{i})\cdot\hat{n}d\Gamma=\sum_{i=1}^{N}\iiint_{V}(\boldsymbol{J}_{i}\cdot\boldsymbol{E}_{i}+\boldsymbol{E}_{i}\cdot\frac{\partial}{\partial t}\boldsymbol{D}_{i}+\boldsymbol{H}_{i}\cdot\frac{\partial}{\partial t}\boldsymbol{B}_{i})dV\label{eq:110}
\end{equation}
The above is all self-energy terms. The mutual energy theory believe
self-energy terms cannot transfer energy. Hence N current-element
Poynting theorem over-estimate the energy of the system.
From the follower of action-at-a-distance-theory:the mutual energy
theory offers a corrected the energy conservation law. The traditional
electromagnetic field theory offers a wrong Poynting theorem of N
current elements which over estimates the energy of the electromagnetic
system.
This over estimation is the cause of wave and particle duality problem
of electromagnetic field theory and quantum mechanics.
Any way the action-at-a-distance can offer correct energy conservation
law, but the traditional electromagnetic field theory especially the
Poynting theorem of N current elements offers an over-estimated energy
conservation law!
Reference:
[1] Wheeler. J. A. and Feynman. R. P. Rev. Mod. Phys., 17:157,
1945. https://authors.library.caltech.edu/11095/1/WHErmp45.pdf
[2] Wheeler. J. A. and Feynman. R. P. Rev. Mod. Phys., 21:425,
1949.
[3] K. Schwarzschild. Nachr. ges. Wiss. Gottingen, pages 128,132,
1903.
[4] H. Tetrode. Zeitschrift fuer Physik, 10:137, 1922.
[5] A. D. Fokker. Zeitschrift fuer Physik, 58:386, 1929.
[6] John Cramer. The transactional interpretation of quantum mechanics.
Reviews of Modern Physics, 58:647_688, 1986.
[7] John Cramer. An overview of the transactional interpretation.
International Journal of Theoretical Physics, 27:227, 1988.
[8] Shuang ren Zhao. The application of mutual energy theorem
in expansion of radiation fields in spherical waves. ACTA Electronica
Sinica, P.R. of China, 15(3):88_93, 1987.
[9] Shuangren Zhao. The application of mutual energy formula in
expansion of plane waves. Journal of Electronics, P. R. China, 11(2):204_208,
March 1989.
[10] Shuangren Zhao. The simplification of formulas of electromagnetic
fields by using mutual energy formula. Journal of Electronics, P.R.
of China, 11(1):73_77, January 1989.
[11] Shuang ren Zhao. A new interpretation of quantum physics:
Mutual energy flow interpretation. American Journal of Modern Physics
and Application, 4(3):12_23, 2017.
[12] Shuang-ren Zhao, Photon Can Be Described as the Normalized
Mutual Energy Flow. Journal of Modern Physics Vol.11 No.5, May 202.
DOI: 10.4236/jmp.2020.115043
[13] Shuang-ren Zhao, A solution for wave-particle duality using
the mutual energy principle corresponding to Schrödinger equation,
DOI - 10.1490/ptl.dxdoi.com/08-02tpl-sci
[14] Shuang-ren Zhao, Derive the Huygens Principle through the
mutual energy flow theorem, https://hal.archives-ouvertes.fr/hal-02270471


How to install an older version of python

Question: How can I install python 3.4 (Windows version) when a newer version (3.5.1) is now available.  My app specifically is looking for 3.4.  I can't seem to find a download for any of the older versions.
Comment: https://www.python.org/downloads/
Comment: I tried that and unless I'm missing something (quite possible), when I click on "download" for that release it takes me to the page with info about the release but there is no download button.
Comment: See the "Files" section below.
Answer: All the answers here are outdated since Python.org doesn't host installers for older versions of Python anymore, only source code.
And building Python on Windows is not really a walk in the park...
My solution: Pyenv.
It's crossplatform (Linux, MacOS, Windows: where it's called pyenv-win), and you can with it automatically install among a very large list of Python versions.
There aren't ALL python versions existing but the list is already very big.
Installation pf pyenv is quite easy if you use chocolatey.
Then:
pyenv install --list : all the versions that you can install.
and then:
pyenv install 3.9.0 for example.
Comment: Not true, Python does host older versions installers. https://stackoverflow.com/a/70014002/2119941
Comment: For install pyenv see this doc : [pyenv](https://github.com/pyenv/pyenv)
Answer: Python.org DOES host installers for older versions
For example if you want to download version 3.4 you just have to find major release which is:
https://www.python.org/ftp/python/3.4.4/
In case release is only bugfix you want be able to find installer so than just change last digit in url until you find release with installer, so
https://www.python.org/ftp/python/3.4.**x**/
change x until you find installer for your release.
Optionally- than you can find latest bugfix and try to install it manually.
Comment: you saved me a lot of time, thanks
Comment: Amazing! All this time I thought with my windows systems I would have to keep up with the latest and greatest.
Answer: To download older version of python :

go to https://www.python.org
hover over downloads button and click on View the full list of downloads.
scroll down a bit and click on the version you want
then scroll to the bottom (the files section)
if you are a 64-bit user then click on Windows x86-64 executable installer
if you are a 32-bit user then click on Windows x86 executable installer

after downloading it, you can install it.
Comment: If only it was so simple... Many versions only offer source tarballs.
Comment: Yes. For example, for python 3.6.X releases only 3.6.8 and older have exe files
Comment: Tried to install v3.7.8 and the installer actually doesn't let you install it if you have a newer version installed. It throws an error.
Comment: Its a little bit different in 2021 august, you need to go downloads and than to 'windows' option not "view full downloads", after going to windows option you can download the executable installer by scrolling down and searching for the right version of python.
Answer: Easiest thing would be to install conda on your machine and run the following command
$ conda create -n py34 python=3.4

Here's a very good datacamp tutorial about installing conda on your windows machine: https://www.datacamp.com/community/tutorials/installing-anaconda-windows
Comment: You don't need conda to install Python, when you can simply, only install Python. Besides, you need Python 3.4 for Conda to create a 3.4 environment, so whats the point?
Comment: @OneCricketeer I'm fairly certain you don't need to install Python 3.4 separately, and that Anaconda / Miniconda handles installation of different python versions for you. I think conda is worth mentioning, considering all that it provides. Some people, myself included, prefer conda to pyenv or virtualenv
Comment: Thank you @bug_spray i was about to say what you just said :)
Comment: My point is that conda is a Python based, cli, so it's effectively achieving the same goal as pyenv, for example. Virtualenv definitely is bound to the Python version its ran by. But my other point is that which python installation would it be managing after it installed another version?
Answer: The simplest platform independend solution to that is:
A) The oldschool way
1) Go to the Python site and grab the Files you need
2) Unpack and make sure the execution path from your environment points for Python to the destination directory.
B)
Or use: https://github.com/yyuu/pyenv
C) http://conda.pydata.org/docs/py2or3.html seems to do a similar job.
Comment: I'm not quite savy enough to do (A) but I will try (b). Thanks for your help.
Comment: Which ...hat downvoted here and for _what reason_?
Answer: 1- You can use UBUNTU, switching between python is easy.
2- pyenv helps you to switch between versions of python.
3- virtualenv can be used.
Comment: Hi Swarnim Singh,
I understand you're new here, so I'd recommend reading the guidlines on how to answer questions here: https://stackoverflow.com/help/how-to-answer.
In a case like this: you're giving duplicate answers half a decade after similar answers were given before. I would suggest expanding and giving examples along with your answers, but this is low quality
Answer: I had to download it from an unofficial website as the official sites offer only the source and the exe for Windows.( was trying to download 3.5.x)
Answer: As of Sep.2023, I installed 3.9.0 on windows 10 with pyenv-win.
install pyenv-win, then from there install older versions.
https://github.com/pyenv-win/pyenv-win
The readme is easy to follow.


Link to a Google Wave

Question: How can I link to a Google Wave, say e.g. in a website or an email like

Hey, just have a look to this new Wave I created.

, where ??? is what I'm looking for.
Answer: You can try first answer from this page:
1) Edit any Wave
2) Drag the Wave you want the link for into the Wave you are editing
3) Right click on the hyperlink that is automatically added from Step 2
4) Click on "Copy link address"
5) Paste the link address wherever you need
Answer: I generally agree with ZhukovRA, but this doesn't seem to work completely.
The problem is that unless you are a participant of a wave, you don't see anything. So linking directly to a wave only makes sense if the wave is public.
The direct link generated looks like this: https://wave.google.com/wave/#restored:wave:googlewave.com!1234567890 - where 1234567890 is the wave's ID, from what I can gather.
There's a Wordpress plugin for embedding waves, which is featured here: http://mashable.com/2009/09/08/google-wave-wordpress-plugin/

Link to a Google Wave


XML attributes to Array

Question: I need to create a javascript array or object from an XML file that is structured as follows:
<ITEMS>
    <TXT id="8" typ="1" pid="7" x="708" y="216" fcol="6777213" txt="sometext" hcmd="0" click="1"/>
    <TXT id="9" typ="1" pid="2" x="708" y="144" fcol="1231341" txt="some other text" hcmd="0" click="0"/>
    <GRAF id="7" typ="0" x="20" y="84" hcmd="0" click="0"/>
    <CAM id="32" typ="0" x="383" y="531" url="some url" hcmd="0" click="0"/>
</ITEMS>

As you can see there are a few different element names in  and they do not all have the same attributes.
I need to be able to retrieve the items by ID and preferable be able to retrieve the ID's of all TXT-items, or CAM-items, or y-items etc.
I'm using jQuery to parse the XML: $(xml).find('ITEMS').children('TXT').each(function() { } and with code like $(this).attr("txt"); I'm building up the DOM - item by item - and it starts to get slow. I have a feeling there must be a better way. Store the XML in an array or object, process (sort) it and then build up the DOM at once.
Any thoughts?
Thanks!
Answer: I presume you've already thought about using json?
Comment: Yep. The server is a closed solution, so I'm stuck with the XML.

XML attributes to Array


How many known nuclides are there?

Question: What is the current estimate for the number of nuclides? This is a very basic question, but I'm  finding it remarkably hard to get a reliable, up-to-date answer. A few books published in the last 2-3 years say it's greater than 3000, but this number seems to be changing rapidly: a Canadian Nuclear Association website says greater than 3100. There should be an easier way to find the answer than counting all the pixels in the Live Chart of Nuclides. I hoped that the Nuclear Wallet Cards search might be useful, but it isn't for this sort of question. I have a similar problem finding the current estimate for the number of stable nuclides.
Comment: There are going to be shades of gray between a nuclide that has definitely been observed and one that definitely has not. As a hypothetical example, someone could get one count in a gamma detector in coincidence with a nucleus recoiling through a mass spectrometer and having the right charge-to-mass ratio to be 98Sn. The gamma's energy matches shell model calculations for a 2+->0+ transition in 98Sn. Based on this, they publish a paper mentioning that they may have identified 98Sn. But the gamma could be compton scattering rather than the full energy peak, the coincidence could be random...
Answer: A paper published in Nature (2012) states that there are just over 3000 nuclides but up to 7000 are possible. Even within those 7,000, the vast majority would be unstable, lasting only a tiny fraction of a second.  Of the 3,000 known nuclides, only 288 are stable.
http://ne.phys.kyushu-u.ac.jp - states there are 2975 nuclides.
Comment: The quantity of 288 nuclides is given by Witold Nazarewicz of the University of Tennessee, the Oak Ridge National Laboratory in Tennessee and Warsaw University in Poland.
Comment: Is there a version of that paper in English?
Comment: Although your answer contains some useful information, it also illustrates the problem I'm facing. You have two estimates for the number of known nuclides (just over 3000 and 2975), while your figure of 288 for the number of stable nuclides is unsourced and can be added to the values of 253, 254, and 280 that I have seen in the literature.

How many known nuclides are there?