Is there an Alternative to TextMate's mate and rmate for Windows?

Question: As part of the upcoming TextMate 2 release, there will be a new feature called rmate, which will allow you to edit files from a remote machine (Linux/Unix/OSX) via SSH using your local copy of TextMate... Is there something similar for Windows? I know i could use CyberDuck, find the file i want to edit, download locally, work on it and then re-upload, but rmate looks like you just type rmate  on the remote server, and text mate pops up with the file. (i have not tried since i am not a TextMate owner) Is there something similar for Windows?
Answer: Looks like @Julian Knight was correct in saying that Sublime Text could support this, but adding my findings on this. Check out Doug Stephen's post on using Sublime Text with RMate with details on how to set this up. I have set it up and it works exactly as i wanted it to! The advantage of this, over, say, SFTP or FTP, is if i SSH into a box, i am not root. If i need to edit a file in the etc folder, example /etc/apt/apt.conf, i would type

sudo rmate /etc/apt/apt.conf

enter my password, and i can edit locally on my machine. with SFTP, i cant do that since i am not root... anyway, happy days!
Comment: I wrote up a fairly detailed blog post how to get both remote and local bits set up: http://danieldemmel.me/blog/2012/09/02/setting-up-rmate-with-sublime-text-for-remote-file-editing-over-ssh/
Comment: Is there a solution if I don't have sudo on the remote server?
Comment: it will work with or without sudo... but if you need to edit a file that requires sudo, you need sudo...
Answer: Why not have a look at Sublime Text 2? This supports TextMate bundles and has plugins that support working over SSH/FTP/etc.
On Windows, I tend to use WinSCP and this works well with Sublime - I just double-click on a remote file in WinSCP and it opens locally with Sublime, when saving WinSCP monitors the temporary file and throws it back to the server as appropriate. But with the plugins, you don't have to work that way, you can open and save files direct to a remote server.
Comment: thanks for the link. i will try that out. handy, i did not know about WinSCP doing auto uploads... that might make life easier...
Answer: rmate probably won't do much more than provide a nice abstraction to the same basic process:

download the file
write a copy somewhere on your local machine
edit it
write it
upload the file to the remote machine

But I might be wrong.
Many editors/IDE can actually edit code remotely but they all follow the process outlined above, AFAIK. The only tool that I've heard of that allows you to launch a local editor from a remote machine is bcvi. I don't know how it works, though, and it's Vim-specific, obviously. Maybe it's the inspiration behind rmate? Or not?
I think that you have overlooked a nice feature of modern (S)FTP clients: many of them offer the ability to "Edit with…" your chosen text editor. It's not exactly what you are after but it sure is handy.
Another option is to edit your files directly on the remote machine. Vim and Emacs work perfectly well through SSH. Expect a steap (but rewarding) learning curve. If you often need to edit configuration files Vim has its place in any sysadmin's toolbelt.
If what you actually want to do is work on deployed production code, there are better and safer ways: running your code on a local server, using some version control system…
Comment: So, rmate, from reading a bit about it, seems to be a client/server setup: when you are SSHed into a box, you type rmate  the "client" (machine your SSHed into) connects to your "Server" (workstation) and sends the contents of the file. Modern SFTP clients will make this easier, but its an extra application you need to work on. If you are in a terminal, and you want to edit a file, you need to open Cyberduck, find the file, edit it, save it, etc... as apposed to typing   and a editor window pops up...
Comment: If I am in a terminal, SSHed on a remote machine and I need to edit a file I just do `$ vi[m] file`. If I'm working on a website hosted on that remote machine I use Git to work locally and push whatever branch was tested to death.
Comment: i agree... using VIM, Nano, etc, on the remote machine is all well and good... and using git for pushing files remotely is all well and good also, but editing the apache config file remotely using VIM or Nano or Emacs or what ever, is a little more painful that using your local text editor, like Notepad++ or TextMate...
Comment: Yeah. I hated it at first and spent years using `nano` to edit config files instead of using `vi`. But I learned Vim and now I just can't stand using any other editor. What about `scp`-ing the file to your local machine for editing or using the remote editing capability of your local editor? If you are going to end up in your GUI editor anyway, why don't you start from there?
Comment: yea, VIM is grand and all that, and yea, i should probably spend more time learning that, but if you are copy pasting stuff from a web page, or tweaking code, i would really prefer to be using a local text editor... doesent matter what editor, in all fairness, but any editor, as apposed to the white text on black background with very little color formatting, etc... plus, if you are on a slower connection, editing on a termainl is SLOW... if you took the file locally for edit, and then just saved, it would be a lot less pain...


Best way to handle categories and keywords security for newly created category

Question: I am implementing security as a per category basis for user groups. If we add new category in that case how we can handle automatic security.
I mean is, I need to create security again on newly created category.
Is there any best way to implement security once on multiple categories?
Showing property disable in my Tridion system
Comment: Have you already looked at http://tridion.stackexchange.com/q/4971/129 ?
Comment: How is showing properties disabled for you? Whoever creates the Category could have rights to manage permissions as well.
Answer: AFAIK, there is no way implementing security on multiple categories.
BUT you can make it automated (while creating a category) by using the Event System to implement security.
Answer: When you create a new Category within Tridion, the Default Groups are automatically assigned Permissions on that Category (of varying degrees of Read, Write, Localize and Delete).

If you have followed best practice, and used sub-Groups of the Default ones (e.g French Chief Editor is a sub-Group of the (default) Chief Editor Group on a specified number of Publications (e.g. the Publications related to the French site)), then all of your users should already have Permissions (of varying degrees) for the Publications that they can see and have Category Management Rights on.
If you need to change the Permissions from those assigned to the Default Groups (for your sub-Groups), then you could create a tool to do this using the Core Service (or do it manually on each new Category).
It is worth noting that Content Porter does not export Permissions on organisational items (or User and Group security settings), so a Core Service tool may be the best approach for applying this consistently across your DTAP environments. (See Non-exportable items in the online documentation (login required) for more information)


Serving an image as a tile layer with node mapnik

Question: I have an image that I get from a server, I need to then take that image and tile it on the fly and pass it back to the user. Everything I see keeps using stylesheets which is not what I want/need. Is there a way to do this?
Comment: Your image comes from a webservice? WMS, Geotiff? Others?
Comment: Because if your image is not exotic (special web service), using a tiles server like http://mapproxy.org (Python) avoid any coding...
Comment: My image comes from an analytics server. I wanted to rasterize the image so that 1) I could load huge images to the map, and 2) the images would translate to 3-d as image layers don't go from OL3-> Cesium
Answer: For your tile question, look at the right place e.g the node-mapnik-sample-code repo
It's working perfectly with
git clone https://github.com/mapnik/node-mapnik-sample-code.git
cd node-mapnik-sample-code
npm install mapnik express generic-pool get
./tile/pool/app.js stylesheet.xml 8000

Then, open http://localhost:8000/1/1/1 to see the result!
You can avoid stylesheets with inline stylesheets... if you look at this sample mentioning

// map with just a style
// eventually the api will support adding styles in javascript
Comment: I really wanted it to create an image pyramid, i.e. slice the tiles up from an image and then serve them as xyz. That doesn't seem doable.
Answer: At least figured out how to load an image from a buffer,
im = new mapnik.Image.fromBytes(imageFromBuffer)

I can't figure out how to then cut that up into a grid or at least give it an extent so that it doesn't repeat the image. That may not be doable.
Edit: The node-mapnik API is abysmally bad. I have found a TON of functions that are in the code that are 1) very useful and 2) completely undocumented. If you run into problems like I did, get the npm, break open the source, and go through it line by line to figure things out.
EDIT 2: Found the real docs, http://mapnik.org/node-mapnik/documentation/# The API from the github/googling is wrong. https://github.com/mapnik/node-mapnik/tree/master/docs , Don't use that.


What's going on in the South Park intro?

Question: The theme song of the TV show "South Park" has always sounded musically weird to me, but I have never understood why. I've been wondering if it is possible to use music theory to explain what makes the song sound odd in the way it does, in a way that a musical newbie like me could comprehend. Can anyone clarify this? Thanks!
Comment: To add to the answer, take a look at the sponsors of South Park. Hint - one of them is Zildjian, the 400-year old company that makes cymbals. Have you noticed a lot of cymbals in the theme?

My point is, South Park deals with a lot of nitty gritty, and the theme reflects that by using quite an off-beat groove that... literally... makes no sense - except if you were to make it a concert piece, it would be playable, but hard.
Answer: The South Park intro is based around a diminished seventh chord. The accompaniment goes back and forth between 1-b5 and b3-bb7, while the vocals center on the b5.
Comment: @ToddWilcox But everyone knows a PNVS is simply a FLIR, don't they? (I'll see what I can come up with.)
Comment: For a person who doesn't know a lot of music theory, maybe it would help to talk more about the harmonic flavor the tritone creates. To me this answer is edifying but I wonder if to someone with less depth of knowledge it might be like saying a PNVS is simply an FLIR.
Comment: @ToddWilcox Here's an edit suggestion: The harmonic flavor of the diminished seventh chord is that it creates ambiguity while still preserving harmonic/tonal tension. If prolonged, It allows the composer to introduce subjectively "relentless tension" feel both in relation to any hint of a key, while also not really confirming any key at all. The ambiguity stems from the diminshed seventh chord's "enharmonic" nature - i.e. there are exactly three diminished seventh chords (sonic-equivalent, disregarding notation and theory). Lots of classical composers used the technique to create this effect.
Comment: Similar stands for the tritone - a tritone is simply the "largest" interval because an inversion of a tritone is a tritone, compared with inverting any other interval, which can be reduced to an inversion that is "smaller" (less spacy). So, e.g., a fifth, larger than tritone can be inverted to a fourth, a sixth to a third, etc.


Jeep Cherokee Electrical

Question: I have a 1991 Jeep Cherokee Laredo 4x4. When im driving all my electrical stuff turns off but turn on right away but the engine keeps running. This only happens when im driving through rough terrain, when i come to a stop and i start to accelerate, or when i hit a bump or dip. I replaced the battery and i checked for loose cables at the battery terminal but didnt find any.
Any idea what could be wrong ?
Answer: You need to check the other end of the cables for security and tightness.
There will also be a bonding strap between engine and chassis / body or gearbox to body - usually across a rubber mount. These can break and cause the symptoms you describe.

Jeep Cherokee Electrical


LDAP ACL to restrict user to only reading their own user attrs

Question: I want to prevent users from accessing anything other than their own data.
I've tried implementing the following simple acl (ldif):
dn: olcDatabase={1}mdb,cn=config
olcAccess: {0}to attrs=userPassword by self write by anonymous auth by * none
olcAccess: {1}to attrs=shadowLastChange by self write by self read by * none
olcAccess: {2}to * by self read by * none

When I apply this ldif, I am no longer to query (objectClass=posixAccount). If I change the last acl to to * by * read, the query returns all users.
What am I missing?
Answer: I found out that in order to access a record, one must have "search" privilege. I changed the ACL to:
dn: olcDatabase={1}mdb,cn=config
olcAccess: {0}to attrs=userPassword by self write by anonymous auth by * none
olcAccess: {1}to attrs=shadowLastChange by self write by self read by * none
olcAccess: {2}to * by self read by * search

Using that I was able to query (objectClass=posixAccount) without showing other accounts.


What is a callback?

Question: Is it a function?
Is it a function being called  from the source?
Or, is it a function being returned from the destination?
Or, is it just executing a function at the destination?
Or, is it a value returned from a function passed to the destination?
Comment: possible duplicate of [What is a callback function?](http://stackoverflow.com/questions/824234/what-is-a-callback-function)
Comment: good definition of callback here: http://mindprod.com/jgloss/callback.html
Answer: A callback is the building block of asynchronous processing.
Think of it this way: when you call someone and they don't answer, you leave a message and your phone number. Later on, the person calls you back based on the phone number you left.
A callback works in a similar manner.
You ask an API for a long running operation and you provide a method from within your code to be called with the result of the operation. The API does its work and when the result is ready, it calls your callback method.
Comment: Callbacks are not only for asynchronous processing - they can be used synchronously.
Answer: From the great Wikipedia:

In computer programming, a callback is
  executable code that is passed as an
  argument to other code. It allows a
  lower-level software layer to call a
  subroutine (or function) defined in a
  higher-level layer.

Said another way, when you pass a callback to your method, it's as if you are providing additional instructions (e.g., what you should do next).  An attempt at making a simple human example follows:

Paint this wall this shade of green (where "paint" is analagous to the method called, while "wall" and "green" are similar to arguments).
When you have finished painting, call me at this number to let me know that you're done and I'll tell you what to do next.

In terms of practical applications, one place where you will sometimes see callbacks is in situations with asynchronous message passing.  You might want to register a particular message as an item of interest for class B.
However, without something like a callback, there's no obvious way for class A to know that class B has received the message.  With a callback, you can tell class B, here's the message that I want you to listen for and this is the method in class A that I want you to call when you receive it.
Here is a Java example of a callback from a related question.

What is a callback?


How many English words are of native origin?

Question: What percentage of current English words are of native Anglo-Saxon origin? I have seen stats about how large percentages of the English words currently in use come from French, Latin, or German origins, but I want to know how many truly native words the English language has left.
Comment: Seems a little odd to call Anglo-Saxon (or Old English) "native" since it replaced the Celtic languages spoken by the "native" inhabitants of Briton (who themselves only arrived there in the 6th century BCE).  Even Latin speakers had been in Briton for a few hundred years before the Anglo-Saxons took over. And thus, Old English itself contains loans from Latin, a few from Celtic, and some from Old Norse. On top of that, the Angles and Saxons had already borrowed Latin words before leaving continental Europe. The point is, how would you define an authentically Anglo-Saxon word?
Comment: I guess I'm just asking how many English words currently in use come from Old English. I tried doing the math myself. The best I could find was Wikipedia's list of Anglo-Saxon rooted words, which had a total of about 4,000 entries. Most sources estimate English to have about 170,000. So I did 4,000/170,000 and that came out to about 2.4%. Now that doesn't seem quite right to me, so I'm thinking Wikipedia's list does not include all such words, but I have no way of checking at the moment. If anyone could point me to a source where I can verify this, that would be much appreciated.
Comment: @Juhasz Then (or rather previously), ther'e Beakerspeak.
Comment: @EdwinAshworth, yes that was truley the Bell Epoque of English culture.  (Sorry, that was terrible).
Comment: @Juhasz  I bet they didn't make nearly as many types as us civilised typos.
Answer: I can't find a duplicate.
This Wikipedia article gives:

Estimates of native words (derived from Old English) range from
  20%–33%, with the rest made up of outside borrowings.

References are given at the end of the article, but it is not mentioned which ones contain surveys arriving at these estimates.
Comment: Percentages vary a lot with style and context. Scientific literature is very high in Latinate and Greek "intestinal" terms, with fewer "gutsy" Germanic words. And speech is very different from writing here, so, as with any analysis, one can't say much without specifying precisely what area one is counting, and how the count is conducted. When I was teaching freshman etymology, I used to tell students to pick a paragraph they particularly liked and look up the roots of every word in it. It's not a hard thing to do if you have a dictionary.


Nagios Core 3.5 change Date format

Question: How can the Date/Time format that Nagios uses everywhere be changed to
YYYY-MM-DD HH:MM:SS?
Answer: A date/time format of "YYYY-MM-DD HH:MM:SS" is configurable in the main configuration file with the date_format option set to iso8601:

This option allows you to specify what kind of date/time format Nagios should use in the web interface and date/time macros. Possible options (along with example output) include:

Option
Output Format
Sample Output

us
MM/DD/YYYY HH:MM:SS
06/30/2002 03:15:00

euro
DD/MM/YYYY HH:MM:SS
30/06/2002 03:15:00

iso8601
YYYY-MM-DD HH:MM:SS
2002-06-30 03:15:00

strict-iso8601
YYYY-MM-DDTHH:MM:SS
2002-06-30T03:15:00

You will need to restart Nagios for the change to take effect.
Answer: As usual, it was easy, if you know where to look.
In the configuration file:
/usr/local/nagios/etc/nagios.cfg
It was self documented on the configuration file:
# DATE FORMAT OPTION
# This option determines how short dates are displayed. Valid options
# include:
#   us      (MM-DD-YYYY HH:MM:SS)
#   euro        (DD-MM-YYYY HH:MM:SS)
#   iso8601     (YYYY-MM-DD HH:MM:SS)
#   strict-iso8601  (YYYY-MM-DDTHH:MM:SS)
#

date_format=us

Jeff Schaller: Thank you for answering.
Comment: Happy to help! There's no need to add an additional Answer if it just says the same thing as another one. The fact that it's upvoted or has a checkmark is an indication to the SE system that this question is Answered. Thanks!

Nagios Core 3.5 change Date format


Python Twisted and database connections

Question: Our projects at work include synchronous applications (short lived) and asynchronous Twisted applications (long lived). We're re-factoring our database and are going to build an API module to decouple all of the SQL in that module. I'd like to create that API so both synchronous and asynchronous applications can use it. For the synchronous applications I'd like calls to the database API to just return data (blocking) just like using MySQLdb, but for the asynchronous applications I'd like calls to the same API functions/methods to be non-blocking, probably returning a deferred. Anyone have any hints, suggestions or help they might offer me to do this?
Thanks in advance,
Doug
Answer: twisted.enterprise.adbapi seems the way to go -- do you think it fails to match your requirements, and if so, can you please explain why?
Answer: Within Twisted, you basically want a wrapper around a function which returns a Deferred (such as the Twisted DB layer), waits for it's results, and returns them.  However, you can't busy-wait, since that's using up your reactor cycles, and checking for a task to complete using the Twisted non-blocking wait is probably inefficient.
Will inlineCallbacks or deferredGenerator solve your problem?  They require a modern Twisted.  See the twistedmatrix docs.
<code>def thingummy():
   thing = yield makeSomeRequestResultingInDeferred()
   print thing #the result! hoorj!
thingummy = inlineCallbacks(thingummy)
</code>
Another option would be to have two methods which execute the same SQL template, one which uses runInteraction, which blocks, and one which uses runQuery, which returns a Deferred, but that would involve more code paths which do the same thing.
Answer: Have you considered borrowing a page from continuation-passing style?  Stackless Python supports continuations directly, if you're using it, and the approach appears to have gained some interest already.
Answer: All the database libraries I've seen seem to be stubbornly synchronous.
It appears that Twisted.enterprise.abapi solves this problem by using a threads to manage a connection pool and wrapping the underlying database libraries. This is obviously not ideal, but I suppose it would work, but I haven't actually tried it myself.
Ideally there would be some way to have sqlalchemy and twisted integrated. I found this project, nadbapi, which claims to do it, but it looks like it hasn't been updated since 2007.

Python Twisted and database connections


How to import a Blender Model into Source Film Maker?

Question: Is it possible to import a Blender model in Source Filmmaker? I can't find out how. If so, is there a way to do it without downloading anything?
Comment: https://developer.valvesoftware.com/wiki/Blender_Source_Tools_Help
Answer: Importing from blender to source is a full process, and there are plenty of tools to make it easier, all of which are free.
technically it's possible to do it all only by installing blender source tools (https://steamreview.org/BlenderSourceTools/), an addon to export as DMX or SMD and use the stock tools provided by valve, that are in the game/bin folder.
But everyone uses community built tools, crowbar and VTFedit at least.
with your model created, export it as smd or dmx with the BST. the material you set will not be exported, but it's important you use the same name when you create your materials.
You'll then have to write a QC file, it's a conductor, indicating to source how you want it to behave in game. Naming the object, assigning it models and animations etc. (https://developer.valvesoftware.com/wiki/QC)
You'll also have to create your materials(https://developer.valvesoftware.com/wiki/Material). they can be as simple as a single color or an advanced material with light and reflections. it's important that you use the VertexLitGeneric shader for props. the materials are saved as VMTs and the location they should be placed is the one set in the QC, relative to the Game/game/materials folder.
A VMT assigns a role to each texture in your material, the simplest being $basetexture "" (a basic albedo map)
those textures should be converted into VTFs with the tool VTFedit and are conventionally placed in the same folder as the VMT (http://nemesis.thewavelength.net/index.php?c=178)
once all your assets are created you'll want to install crowbar, the tool for importing into source, (https://steamcommunity.com/groups/CrowbarTool) and set it up for your exports. selecting your QC file and compiling it will tell you if there's an error, if there isn't it'll let your "use in view" then "view" to open your model in the HalfLifeModelViewer to make sure evrything is working. If it is you can open SFM and find your model.
https://developer.valvesoftware.com/wiki/Main_Page
this site will be very usefu in looking up how to use any of the tools, commands and files.


A series related to $\zeta (3)$.

Question: I'm not really up to date on the current status of $\zeta (3)$ but I was messing around the other day with Fourier series and found that $$\sum_{n=1}^{\infty} \frac{(-1)^n}{(2n-1)^3} = \frac{\pi^3}{32}.$$  Is this of interest to anyone?
Comment: There is a sign error, it should be $(-1)^{n-1}$ in the numerator.
Answer: This is a (rather standard) Dirichlet beta function $\beta(3)$ using the definition :
$$\tag{1}\beta(s):=\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)^s}$$
For odd positive parameters $\,s=2k+1\;$ may be written using the Euler numbers as :
$$\tag{2}\beta(2k+1)=\frac{(-1)^k\,E_{2k}\;\pi^{2k+1}}{4^{k+1}\,(2k)!)}$$
while for $n<0$ $$\tag{3}\beta(n)=\frac{E_{-n}}2$$
The Euler numbers $E_{2k}$ could be defined by the expansion :
$$\tag{4}\frac 1{\cosh(t)}=\sum_{k=0}^\infty \frac {E_{2k}}{(2k)!}t^{2k}=1-\frac 1{2!} t^2+\frac5{4!}t^4-\frac{61}{6!}t^6+\frac{277}{8!}t^8-\cdots$$
A parallel may be made with the expansion giving the Bernoulli numbers :
$$\tag{5}\frac t{e^t-1}=\sum_{k=0}^\infty \frac {B_n}{n!}t^n=1-\frac 12 \frac t{1!}+ \frac 16\frac{t^2}{2!}-\frac 1{30}\frac {t^4}{4!}+\frac 1{42}\frac{t^6}{6!}-\frac 1{30}\frac{t^8}{8!}+\cdots$$
the lambda function (or directly zeta) being (for $\Re(s)>1$) :
$$\tag{6}\lambda(s):=\sum_{n=0}^\infty \frac 1{(2n+1)^s}=\left(1-2^{-s}\right)\,\zeta(s)$$
and the classical formula :
$$\zeta(2k)=\frac{(2\pi)^{2k}}{2\,(2k)!}|B_{2k}|$$
In summary $\beta(m)$ will return simple values proportional to $\pi^m$ for odd values of $m$ while $\lambda(m)$ and $\zeta(m)$ will do that for even values of $m$. More 'complicated' values will be obtained for $m$ even for $\beta$ (Catalan constant and so on) in the first case and $m$ odd for $\lambda$ and $\zeta$.
From the point of view of Fourier expansions $(23.1.16)$ should show you clearly the relations between simple Fourier series and the Bernoulli and Euler polynomials. A parallel between their properties is given in Abramowitz and Stegun with other interesting facts.

Using complex integration (like here) let's rewrite $(4)$ and obtain formula $(2)$ :
$$\tag{7}\frac 1{\cosh(t)}=\int_0^\infty \frac {\cos(t\,x)}{\cosh(\pi\,x/2)}\;dx$$
so that
$$\tag{8}E_{2k}=\left.\left(\frac d{dt}\right)^{2k}\right|_{t=0}\frac 1{\cosh(t)}=(-1)^k\int_0^\infty \frac {x^{2k}}{\cosh(\pi\,x/2)}\;dx$$
Let's use this integral to derive $(2)$ :
\begin{align}
\int_0^\infty \frac{t^m}{2\,\cosh(t)}dt&=\int_0^\infty \frac{t^m\;e^{-t}}{1+e^{-2t}}dt\\
&=\int_0^\infty \sum_{k=0}^\infty (-1)^k\;t^m\;e^{-(2k+1)t}\;dt\\
&=\sum_{k=0}^\infty\frac {(-1)^k}{(2k+1)^m}\int_0^\infty u^m\;e^{-u}\frac{du}{2k+1}\;\\
&=\Gamma(m+1)\sum_{k=0}^\infty\frac {(-1)^k}{(2k+1)^{m+1}}\\
&=\Gamma(m+1)\,\beta(m+1)\\
\end{align}
which allows to rewrite $(6)$ as (setting $m:=2k,\;t:=\pi\,x/2$) :
$$\tag{9}E_{2k}= 2\left(\frac 2{\pi}\right)^{2k+1}(-1)^k\;(2k)! \,\beta(2k+1)$$
and proving $(2)$.
Comment: Excellent answer. I was looking for this in a different context, and it answered perfectly my question.
Comment: Glad you liked it @Pickle! Concerning your question to anon let's observe that your Dirichlet character was noted [$\chi_1$ in wikipedia](https://en.wikipedia.org/wiki/Dirichlet_character#Modulus_4)  (and $\chi_2$ in 2013 btw) to distinguish the different characters modulo $4$. The subject itself is fascinating ($\zeta$ and $\beta$ but not only) and you could for example go from the Bernoulli numbers to the Bernoulli polynomials to find their 'counterpart' : the [Clausen function](https://en.wikipedia.org/wiki/Clausen_function#Relation_to_the_Bernoulli_polynomials). Excellent explorations,
Answer: You've discovered $L(3,\chi)$, where $L(s,\chi)$ is the Dirichlet $L$-function and $\chi$  is the unique nontrivial character mod $4$. The Riemann zeta function and this $L$-function are related by the factorization of the Dedekind zeta function of the Gaussian quadratic field ${\Bbb Q}(i)$,
$$L_{{\Bbb Q}(i)/{\Bbb Q}}(s)=\sum_{I\triangleleft{\Bbb Z}[i]}\frac{1}{N(I)^s}=\prod_{\frak p}(1-N{\frak p}^{-s})^{-1}=\prod_p(1-p^{-s})^{-1}(1-\chi(p)p^{-s})^{-1}=\zeta(s)L(s,\chi).$$
Unfortunately knowing $L(3,\chi)$ does not tell us anything about $\zeta(3)$ in terms of closed-forms. It is expected that $\zeta(3)$ shares no relations with other $\zeta(2n+1)$s or $\pi$, not just for lack of theoretical reasons but for solid theoretical reasons to the contrary (geometry of period integrals and mixed Tate motives, see Matt E's answer here); there is good reason to expect no surprising algebraic relations between Apery's constant or other odd zeta values and $\pi$.
Comment: Isn't the Dirichlet L-function for character modulo 4 noted as $L(s,\chi_4)$?

A series related to $\zeta (3)$.


What is radiative width?

Question: I am trying to understand gamma radiation and trying to figure out how to calculate radiative width. Is the radiative width how far the atom can be from another one and the probability of it then emitting a photon? How could I then calculate the radiative width for different states of an atom?
Answer: Radiative width is a terminology used in electromagnetic decays  attributed to spectral lines .
For atomic states this is seen in the width of the lines and it has to do with the specific molecules in their specific locations as intermolecular fields change the boundary conditions for the wavefunction describing the state and thus change the widths.
For nuclear decays the gamma ray spectrum width  are inferred  from the probabilistic nature of quantum mechanics, the Heisenberg uncertainty principle, from the measured lifetimes. The widths vary with the nucleus under study and also the lattices containing the nuclei.  The lifetimes are measured and recorded in tables, and from them the width of the energy level  can be calculated.  Lifetime to widths is discussed here.
The other answer has covered elementary particle decays.
Answer: The "radiative width" seems to be a shorthand way to refer to the decay width --- that is, the Heisenberg uncertainty in the energy $\Gamma = \hbar / \Delta t$ for a bound state with finite mean life $\Delta t$ --- due to a decay involving photons.
Some (most?) particles can decay via several different modes.  For example, the $K^+$ meson (up plus anti-strange quark) decays

64% of the time to $\mu^+\nu_\mu$
21% of the time to $\pi^+\pi^0$
6% of the time to $\pi^+\pi^+\pi^0$
5% of the time to $\pi^0 e^+\nu_e$
0.6% of the time to $\mu^+ \nu_\mu \gamma$

I left some modes out.
The fractions at the front are technically "partial widths" $\Gamma_i / \Gamma_\text{total}$.  Decay widths are great because all the decay modes have the same decay width, so you can use the spread in reconstructed kaon masses in $K\to\pi\pi$ decays, plus knowledge of how many kaons you started with and how many two-pion events you caught, to determine that 79% of charged kaon decays are something other than $\pi\pi$.
The first decay on my abbreviated list is a purely leptonic process; the next two, with only pions, are purely hadronic processes; the fourth is a "semileptonic" process; the last is radiative.  So you might encounter a sentence like

... the radiative decay width of the charged kaon is about 0.6% of its total ...

For atomic transitions essentially all excited states decay by photon emission, so I'd expect to hear about "decay width" rather than "radiative decay width."  For nuclear excited states you might distinguish the radiative decay width of a state --- that is, its probability for emitting a photon --- from the decay width for nucleon emission, or beta or alpha decay, or fission.

What is radiative width?


What Yammer clients available on the Mac?

Question: People in my new job seems to like Yammer. I'm aware that Yammer has a desktop client for the Mac, but I find the interface rather unappealing (version 300222 of the Adobe Air client is not responsive and really slow when switching between my primary network and external networks). I wonder if there are 3rd party clients available?
Comment: Would you be willing to expound on how a specific version of the yammer client doesn't work for you. We have a nice summary of the [problems with vaguely written requests](http://blog.stackoverflow.com/2012/02/lets-play-the-guessing-game/) and with some edits, this could be much more educational and likely an expert can share their experience with you to find better software recommendations.
Comment: Thanks! Now that's something we can try to get you a better answer to attack the slowness of a non-native app.
Answer: There are two out there that I like, each for different reasons:

Gabble is a free application that allows for threaded conversations, private and public groups, attachments, and tags.
Scuttlebutt is an application in beta.  The major thing that it improves over Gabble is support for multiple Yammer accounts (although there is a workaround for that in Gabble: you can launch multiple Gabble instances).

Both of these software are native OS X apps and should be much faster to use than an Adobe Air client as well as have the potential to support things like spelling services, voice dictation and other nice integrations that a native app can provide more easily than using a cross-platform toolbox.
Comment: Hi, I'm the developer of Scuttlebutt. Scuttlebutt is a native app – although not really optimized yet since it's still in beta. Would you mind explaining a bit further why do you feel that Scuttlebutt is slow?
Comment: Sorry, that's an error in my original message.  I do generally find Scuttlebutt slow, but it's the native Yammer app that's Air and not yours.  Sending and receiving messages doesn't feel instantaneous, which is something I expect out of an instant messenger.  I have to admit that I've stopped using Yammer (I no longer work for an employer that uses it) so haven't tried your app in the past few months.
Comment: Thanks for that. There were some enhancements done in early March about sending/receiving messages and it should feel faster – let me know if you use Yammer again and able to try out the more recent releases.
Comment: Just tried the Gabble app, but the authorization crashes out. Given there is a 2010 date on the app, it may no longer work with the Mac, or maybe just Mavericks?
Answer: There is Gabble, you can download from here:
http://gabbleapp.com/
Answer: Gabble is dead, as Yammer requires a new authorisation method that isn't included in the dated Gabble app.  I'm waiting for Scuttlebutt to send me the download link to see if that has the same problem.
MS has also pulled the AIR app, so don't produce a Mac-compatible app anymore.


Two spellings of SEPARATE? Desperately Seeking Closure!

Question: I am utterly convinced that I was taught two spellings of the word 'separate'
The first version, separate describes something in a different location.
The second was SEPERATE, a verb describing the action of dividing things that would then
be separate. I was prepared to accept this was a false memory until I mentioned this to
a librarian of a similar age and background. She told me that she was taught the same thing.
I have trawled the internet and dictionaries and found no reference to 'seperate', but..I'm sure
I was taught this. Anyone have any ideas??
Answer: Here is your closure. Separate is one of the most commonly misspelled words in the English language. Separate can be an adjective, 'set apart, distinct, or not related', and a verb, 'to set apart, to distinguish, or to divide'.
Separate is often misspelled as 'seperate', a word that has no meaning and is simply a misspelling.
Separate vs seperate
Misspellings can develop a life of their own; the word 'dilemma' is sometimes spelled 'dilemna', and I have heard it arose from a misprint in a dictionary supplied to many US schools around 1958.
Comment: I've used the mnemonic to help people, "You'd have to be desperate to spell it seperate" - although it's usually just spoken, so I don't have to misspell it in writing.


sIFR 3 text stretched in IE9

Question: In IE9 the sIFR3 (r436) rendered text on my site is stretched. Clicking on the text causes it to render properly.
I've tried changing the compatibility mode but without success. Anyone else having this issue and found a solution?
Answer: if you don't need wmode transparency or opaque turn that off - that's what i found to be causing our problem in ie9...then it appeared fine.
unfortunately we needed to have things sat over the top of the flash so i had to have those setting on...in that case the only workaround i've found so far to sort it out is to call the sifr without wmode settings (transparency/opaque), then in the onReplacement sifr callback create a clone of the flash element with the wmode set on and then remove the original. not ideal but it works (although there is a small lag when it's recreating the element of course - you can mess about with css display properties to mitigate the effects of this)
Comment: Thanks for the suggestion. I need to keep the wmode so using the callback function may be the answer - will give it a go. Have had some improvement setting the sIFR.forceWidth parameter to true, but hasn't completely resolved it.
Answer: In our tests we discovered that the problem had to do with the version of Flash, specifically 10.2 (reproduced on 10.2.152.26) on a Vista machine.  10.0, 10.1 and 10.3 were all fine and did not stretch the text.
There's even a fix in the Flash Player 10.3 that addresses improper resizing when wmode=transparent: http://kb2.adobe.com/cps/901/cpsid_90194.html

sIFR 3 text stretched in IE9


C# 4.0 Merge .dll assembly with .NET

Question: I decided to leave my other question to die, since I thought of a new idea using Jeffrey Richter's method written on this page to merge a .dll library to my application. So I added my .dll file as an embedded resource and also added it as a reference. Then in Program.cs (I have no idea where the code he posted is supposed to go), I added this:
    ...
    [STAThread]
    static void Main()
    {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            string[] args = Environment.GetCommandLineArgs();
            if (args.Length > 1)
                _in = args[1];
            SingleInstanceController controller = new SingleInstanceController();
            controller.Run(args);

            AppDomain.CurrentDomain.AssemblyResolve += (sender, argsx) =>
{
String resourceName = "AssemblyLoadingAndReflection." +
   new AssemblyName(argsx.Name).Name + ".dll";
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
{
    Byte[] assemblyData = new Byte[stream.Length];
    stream.Read(assemblyData, 0, assemblyData.Length);
    return Assembly.Load(assemblyData);
    }
}
        ;

Am I supposed to change resourceName to something else? Have I added it correctly (in the right place)?
Now the problem is, it still fails to find and load the assembly and I'm not sure what I've done wrong. Any help would be appreciated.
Comment: Because I don't want to distribute my program will 10-15 files the user finds useless.
Comment: Just curious; why even bother to (effectively) statically link a DLL?
Comment: Why is the user digging around in program files anyway?  Just install them into a sub-directory and be done with it.  I mean, the "DL" in "DLL" stands for "Dynamic Link" you know.
Answer: Your problem is very similar to this one: C#: How to embed DLL into resourcefile (no dll copy in program directory)
Basically, your AppDomain.AssemblyResolve event handler did not get called because Main failed to compile. Even if it did compile, attaching the event handler should be the first thing you do in main.
My answer to the question above has a working code sample and explanation on why your code does not work.
Answer: Use the debugger.  Set breakpoints on the AssemblyResolve assignment and the lambda body.  Single step the code.
Yes, that's too late.  Move the assignment.  If SingleInstanceController is in such a DLL then the Main() method never even gets started.  Move that code into a separate helper method and give it the [MethodImpl(MethodImplOptions.Noinlining)] attribute.
Distributing your program in a single file is already very well supported, it doesn't require any code nor merging DLLs.  Also takes care of the desktop shortcut, the file associations and getting .NET installed on old machines.  It's called setup.exe
Comment: "I avoid using the debugger as much as possible". I can't believe i just read that...
Comment: Yeah, thanks for totally ignoring my question. I asked why my code wasn't working or what I was doing wrong, not "should I distribute .dll files with my application or not". I have my reasons for not distributing the .EXE file with a bunch of .dll files. Also, where did setup.exe come from? My application is a relatively small and portable one and I don't even want to use that.
Comment: I didn't ignore your question, you ignored the answer.  Do try to read more than just the last paragraph.  You won't get the perfect answer until you debug your problem.
Comment: "until you debug your problem" <- which I needed help with, hence I asked here. You are right in the sense I ignored your first paragraph though.
Comment: Is the issue that you don't know how to use the debugger?  What did happen when you single stepped the program?  I gave the answer but you can't see it in front of your eyes until you try this.
Comment: I avoid using the debugger as much as possible and this isn't an exception. Also, I figured out the problem myself with help from the answer below and got it to work.
Answer: Hook to the AssemblyResolve event before the AppDomain tries to resolve references i.e in the entry point and the first line.
The embedded resource name starts with the application name followed by the resource name.
ex: ConsoleApplication.Test.dll.
Comment: I'm not quite sure what you mean by your first line, could you explain? (Sorry I'm kind of new to C# and don't have much experience).
Comment: Move the AppDomain.CurrentDomain.AssemblyResolve += .... to the first line in Main method.
Comment: I get this error: "Could not load file or assembly 'Files, Version=2.3.4025.2210, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))" when I do that, and rename my resource name.
Comment: replace String resourceName = "AssemblyLoadingAndReflection." +
   new AssemblyName(argsx.Name).Name + ".dll"; with String resourceName = String.Format("MyApp.{0}", args.Name);
Comment: The error still remains, even when I added String resourceName = String.Format("MyApp.{0}", args.Name) + ".dll"; too. It's definitely indicating that it can't find the assembly but I can't think of any reason why it would do that. I added a reference to that file and also embedded it and moved the code to the first line as you stated.
Comment: What is your application name? If it is not MyApp (as in the String.Format line),put that instead.
Comment: That's what I did. It's called ASMPad and I renamed it to that.
Comment: Not sure why it doesn't work for you. Put a breakpoint (f9) inside the AssemblyResolve event handler and check the args. Also running the FusionLogViewer might help. (http://blogs.msdn.com/b/suzcook/archive/2003/05/29/57120.aspx)
Comment: I got it to work. It turns out the assembly had to be called Files.dll only. Not sure why though. I'm marking this answer correct because it did help a lot.
Comment: @Iceyoshi could you explain how did you resolve your issue a bit more?? im running trough the same problem as you did. thanks in advance for any help
Comment: @Iceyoshi If you could share a piece of code would be awesome

C# 4.0 Merge .dll assembly with .NET


Playstation 4 Broken HDMI Port Repair. How to fix this PS4?

Question: Seems that my HDMI port is broken on my PS4 due to having it plugged in and out all the time. Is there a way to fix this easily? I tried calling sony and they said I'm out of warranty and that it was due to physical damage and they would not take it in. Looking for other options if possible as this was a $500 system!
Comment: When Sony said they wouldn't take it in, didn't they just mean that repairs are going to cost something? It's possible the repair costs are going to be lower than the costs of buying a new PS4. Also, how damaged is the HDMI port? If you're lucky, you might be able to "fix" it yourself by bending the port with a knife or something. Just try and be more careful with cables and ports from now on.
Answer: Here is a write up of the repair process for the ps4 hdmi port:

Now as for the PS4 HDMI repair process, it was definitely a much
  trickier fix than doing a ps3 hdmi port. The PS3 systems has all of
  the pins and legs being held down on one side of the board. As for the
  PS4, you had the pins of the HDMI connector on one side and the legs
  held down on the other side. It wouldn't have been possible to heat
  just one side and pull off the PS4 HDMI component as the PCB board
  itself was absorbing all of the heat from one side. Below are some of
  the repair methods you might see people do:
Use 2 heat guns, but you'll need 3 hands. Also you'd have to becareful
  of not melting off other small chips around it. Wouldn't recommend
  doing this, as its mostly for those on a super tight budget and
  resorting to primitive tools. Yes, a heat gun repair is a primitive
  repair tool. Hot Air Station is another repair method, but that too is
  also still tricky as all the heat is generated on one side of the PS4
  board only. Removing pins from the board first with an exacto knife.
  Then use a hot air station to remove the PS4 HDMI legs.

http://www.phonerepair.us/blog/ps4-repair-analysis-playstation-4-hdmi-replacement
Answer: If you don't have the facilities to use a heat gun, (and who outside industry would have) then to be honest you are simply knackered if you don't have warranty.
Mine broke weeks after first release and when I phoned them they sent me a free post box to have it sent to them, after a day or two I got a message back to say it was beyond repair so they would send out a refurbished model (which I assume was repaired for a different fault). Got the refurbished model about a week after I had sent my PS4 off, still works like a treat to this very day, touch wood.
Answer: Yes, the HDMI port on the PS4 is quite a bit different from the previous consoles; thus making the repair a little more difficult without the proper tools.
We do NOT recommend using a basic "heat-gun" as it will cause more damage than good. Not sure about the exacto knife process either, as it has potential for a bad outcome if you do not have a steady hand while cutting the metal pins; but if you are lacking the tools, then it's a viable option.
The best way to replace the port is with a hot-air rework station, an ultra fine point soldering iron, and a high-powered microscope.
Here are the steps:

Remove the motherboard from the case, and clean the old thermal paste.
Apply flux to the existing port connections, then begin heating the posts and pins evenly with the rework station.
Once the existing solder has reached its melting point, use tweezers to SLOWLY remove the old port.
Now clean the board, and inspect for any damaged traces (depending on the severity of the port damage)
Now position the new port in place, add solder to the posts to hold it in place, apply flux to the pins, and then individually solder each pin to the motherboard.

Providing you followed the steps, the unit will boot like normal once you re-assemble.


Unity App working on one phone but crashes on another with the same API level

Question: I built a Unity AR app which worked on my phone. However, on sharing the APK to another phone with the same Android version, it crashes on startup. I've tried increasing the target API level to max, and using Developer Mode for the other phone, but it still crashes. All the versions work on my phone. What is the problem here?
Comment: We'll typically need a Minimal Complete Verifiable Example to be able to diagnose this. Try making a copy of your project, and deleting as much as you can from it while keeping the problem present. Or start a new, empty project, and add stuff from your current project to it until the problem re-appears. Doing this experiment, you can narrow down the minimal set of factors that might be involved, and update your question to give us the steps to reproduce the problem. Once we can reproduce it, we can test potential fixes to be sure they'll work for you.
Comment: @DMGregory I was able to figure out the fix (needed to change encoding and include Armx64). Do I delete this problem now?
Comment: It would be better to post an Answer below, so it can help other developers searching for solutions to similar problems. Including details about how you diagnosed the issue can also help, and attract more search hits.
Answer: So, I fixed this by going to Build Settings >> Player >> Other Settings >> Scripting Backend and changing it to IL2CPP as well as including ARMx64 in the target architecture. The basic problem was that ARMx64 architecture wasn't included, which is needed for some phones.


Can a large creature (on earth) eat rocks and/or lava?

Question: I was wondering if a rock/magma eating creature could survive on earth, I have searched about creatures which could do this, but all I have found involves silicon-based life forms which could not thrive on Earth.
Comment: Eat rocks? Sure. Human babies eat rocks. Derive useful sustenance? Uhhhh....
Comment: possible duplicate of https://worldbuilding.stackexchange.com/q/162438/30492 or https://worldbuilding.stackexchange.com/q/39989/30492
Comment: and also  duplicate of
  https://worldbuilding.stackexchange.com/questions/113213/anatomically-correct-goron
Answer: Rock eating yes, magma eating no.
Nothing survives lava, nuff said. Rock eating on the other hand does happen in nature, just not for food. Birds swallow rocks but it's for the gizzard they use to grind their food in their stomach, because they have no teeth. Getting food out of rocks would require plants and that would require a creature that grinds rocks to make a suitable spot to grow for plants. Pair that with feces as fertilizer and you've got a rock crushing farming animal. Teeth are stronger than most rock, so with strong jaws there's nothing stopping an animal from shattering rock with its maw. Parrotfish grind corral with their beaks which makes sand, but corral is soften compared to rock.
Edit: [Volcanic rock is very fertile for plants but needs to be eroded first. The rock eater would munch on rock to make it easier for the plants to process it and then eats the plants that grow from that.]
Answer: Almost. The deep sea thermals have shown that creatures can live off of hydrogen sulfide given off by lava. Given enough of such vents, a large creature can live off of that process. It isn't living off of the rocks / lava directly. Instead, super heated water extracts the hydrogen sulfide. The process is that bacteria are the first part of the food chain. Then, smaller creatures feed off of the bacteria. Larger creatures can live off enough of those smaller ones.
It would be a real challenge to have a creature grind up enough rocks and have sulfide extracted in a stomach to support an active life style. Perhaps a very sedentary life would work.
Answer: Yes, it's called geophagy.
The best known example is salt. Have you ever eaten salt? Then you've eaten rocks.
While plants and animals can't digest many rocks, fungi often can. Rocks contain minerals, carbon, calcium, lots of the same things as more familiar foodstuffs, just in a form that needs a different digestive system. We know such digestive systems are possible because fungi did it and originally colonised the land, nomming rocks and pulling them into the biosphere. We've never seen such a digestive system in an animal in real life, but in fiction why not?
Answer: This answer is based on the assumption that creatures eat to derive energy from external substances. Evolution and available resources will shape the tools and organs animals will develop to eat. On earth, no large animals have evolved having lava or rocks for dinner, so I assume the beast is alien..
Magma eating yes, rock eating no
Lava contains plenty of energy and would be easy to swallow, when the physiology of the beast allows that. Heat can be directly extracted from the lava. The hardening lava should be released quickly after dinner, else the beast would suffer from constipation !
Rock on the other hand, requires a lot of energy to eat in the first place. The energy needed to crack and grind a rock cannot be derived from energy available in (already strong) chemical bounds in the rock material. A rock consist of oxides of Si and metals. Breaking these chemical bounds would require energy, instead of releasing it.
Answer: Magma no, you're talking about an environment with continuous temperatures in excess of 1000ᵒC, there simply aren't organic compounds that stay stable at those temperatures. The most heat tolerant creatures we know of are the Bacillus genus of bacteria they can survive, in their dormant state, less than half of that.
In terms of eating rocks the metabolic pathways of interest are going to be similar to those of the Sulfur Reducing and Iron Oxidising microbes. These are going to be anaerobic metabolic pathways, producing relatively little energy compared to the aerobic metabolism of carbohydrates common to all vertebrates. Such life is probably limited to single cell creatures, although stromatolites show that single celled life need not only show up at the microscopic scale.


Which areas have the most competition for tenure-track positions?

Question: Being a professor in a general interest department, students from diverse backgrounds and aspirations come to me for career advice. A good number of them aspire to professors but unless they're in my own discipline I'm very hesitant to say anything. But I think it would be good to have an approximation for various fields as an advisor. For example, I know that securing a tenure-track position in CS is not as competitive as a tenure-track position in math. I assume the competition is brutal for history/literature/philosophy etc. Is there an approximate rule of thumb that I could use to advise the students?
Comment: What on earth is a "general interest department"?
Answer: I do not know of any datasets that would empirically answer your entire question. However, several different datasources may provide insight into your question. First, the NSF has survey and reports that may help. These provide insight into overall employment:

The NSF Conducts a post-graduate survey for Science and Engineering. Data in here may be insightful to what happens to students post graduation.
The NSF includes funding rates in their annual report. Check out the appendices.

Also, this Inside Higher Ed has a table of job placements by broad fields.
I would add the following caveats to this data and other data you may use to answer your questions. In some fields most PhDs go the academy. But in others, most PhD holders go to industry or government jobs. Additionally, not all university jobs are the same (e.g., small school versus R1). I would highlight this difference to your students as well.
Finally, I would suggest checking out salaries for different departments. Many state schools make this public (or newspapers in their state though public data requests; e.g., the Texas Tribune's listing for the state of Texas). Presumably, departments that pay more have more trouble attracting and retaining faculty.
Edit to clarify the last sentence: Engineering and physics can be closely related disciplines. However, there is a much larger job market for engineers outside of universities. Therefore, one might expect universities to pay their faculty more to account for competition from the private sector. At the University of Texas, the median salary for the Department of Physics was $105,536. The median salary for the Department of Electrical Engineering was $118,143. Following the links, there are even better break downs of the data by position (e.g., professor vs postdoc). Comparatively, the Department of English had a median salary of $84,839.
Without speaking to the University Leadership, I can only speculate as to why some departments pay better. My guess would be the higher paying departments have more difficult recruiting and retaining because the private sector has more jobs, pays better, and often requires fewer hours.
I would also add a personal anecdote about competition for tenure track jobs. My own PhD is in Environmental Toxicology. Most of the people I knew in grad school (both at my school and others) went on to work for industry, consulting firms, or the government in roughly that order. Few went onto universities, but those that did only needed a short (1-2 year postdoc). Conversely, my friends who are ecologists often need 5-10 year postdocs to get university jobs. This is because the ecologists have much greater competition for their tenure track jobs.
Comment: Surely that last sentence needs fixing.
Comment: @DanielR.Collins : If the department has a problem, but needs staff, they may very well pay above the going rate to get the staff they need.
Comment: @DanielR.Collins No. I clarified my answer, but stand by it. Some departments pay better because they face more competition from industry and/or government. You're a mathematician. Do applied mathematicians or pure mathematician have more trouble finding work? My guess is that pure mathematicians have more trouble finding work.
Comment: I see. Perhaps the particular sentence could be clarified as "Departments that pay more due so as a result of competitive pressure" or somesuch.


asymmetric HMAC

Question: validation of HMAC generated hash requires the key to be known to the validator. So its symmetric. What is the similer asymmetric solution other than SSL ? as I want the signature be smaller like an md5 hash. and the generation and validation procedure to be light. I was going through Rabin's Signature algorithm but couldn't find any Implementation or pseudo code ro follow.
Answer: The smallest asymmetric signatures come from elliptic curve cryptosystems like ECDSA. ECDSA signature schemes require signatures approximately four times the length of a symmetric cipher key of equivalent security. So a scheme comparable in security to 128-bit AES would have 512-bit signatures. That's the state of the art right now -- schemes with smaller signatures but equal or greater security are not known.
If you don't need security quite that high, you could use a 192-bit curve which would result in 384-bit signatures. You can go down to 320-bit signatures (160-bit curves) and still have security comparable to 80-bit symmetric ciphers. If you really don't particularly care about security, 112-bit curves can be used, providing 224-bit signatures that are about as difficult to break as DES.
The following curves are what I would recommend for each security level:
SecP112R1: 224-bit signatures, 56-bit security level
SecP128R1: 256-bit signatures, 64-bit security level
SecP160K1: 320-bit signatures, 80-bit security level
SecP192K1: 386-bit signatures, 96-bit security level
SecP224K1: 448-bit signatures, 112-bit security level
SecP256K1: 512-bit signatures, 128-bit security level
For each curve, the private key is the same size as the curve. Public keys (in compressed form) are one bit larger than the curve size. Signatures are twice the curve size. So with SecP256K1, private keys are 256-bits, public keys are 257-bits, and signatures are 512-bits. These are the minimum sizes for the raw binary values.
Caution: I would consider 160-bit curves the minimum for any purpose where security is a factor. Smaller curves might be suitable if keys are generated, used, and then thrown away in a small time frame. For long-term security, 256-bit curves should be used. The system as a whole should be evaluated by competent experts before it is relied upon.
Comment: Can you provide any implementation link ? and its mainly used for what ?
Comment: [OpenSSL](http://www.openssl.org/) has an implementation of ECDSA as does [Bouncy Castle](http://www.bouncycastle.org/). ECDSA is used whenever a signature scheme with the absolute smallest possible bit length is needed. (For example, [Bitcoin](http://bitcoin.stackexchange.com/) transactions are secured by SecP256K1 ECDSA signatures.)
Comment: Can you help me a bit more ? I am generating a private key with `openssl ecparam -name secp112r1 -genkey` now I need to generate a public key with what command ? I don't know the openssl commands well.
Comment: You can turn a private key into a compressed public key with `openssl ec -conv_form compressed -pubout` (Note that these forms are a bit larger than the minimums because they contain curve information and type information.)
Comment: Do you know about any bug in openssl 0.9.8 ? cause `openssl dgst -sha1 -sign private.key README` is giving error *`error:0606B06E:digital envelope routines:EVP_SignFinal:wrong public key type:p_sign.c:99:`* and If I am not wrong the same command worked in another machine few hours ago
Comment: Make sure that machine has ECDSA compiled in. Some distributions (notably Fedora) don't include ECDSA in their default OpenSSL build. (You can check with `openssl ec`. If you get an 'invalid command' output, you need to build your own OpenSSL executable.)
Comment: Thanks. However the solution I've designed raises another problem. I thought to say it in comment but its to big to be posted here. can you please check it on http://stackoverflow.com/questions/9957562/openssl-phishing-v-claims-to-be-a-protection

asymmetric HMAC


Should I ask if wall was inspected for moisture?

Question: My Mother lives in a community where the maintenance crew is supposed to maintain the grounds and outside of the condo buildings. I submitted a work order, because some of the wood panels on the outside of the condo were bent outward where they met with the deck. When I found out that the crew nailed the boards down, I asked via email if the wall underneath was inspected for moisture before the boards were nailed (since there were openings where the boards were warped). It has been two weeks, but I haven't received a response. Am I being too picky by asking that? It seems like any professional would have checked.
Answer: I agree, checking for the cause of the problem, including moisture in the wall, seems logical. In fact, without checking it could lead to dryrot or mold.
I think I'd email them again and ask if they found dryrot or mold and let them know that if you don't hear back this time, you'll take it to the HOA. No response, then I'd ask the HOA.
Comment: The downside to this entire situation is that, at this point with the work order fulfilled, I wouldn't trust a thing they said after the fact anyway. "Oh sure, we checked it, and everything looked good so we re-secured it. Good to go!" ....maybe they did just that, and maybe it's true. Or maybe they didn't. If it's too late to get your own eyes on it, then I can't imagine anything they say will result in any real peace of mind. But maybe that's just me
Comment: @elrobis No, I agree, that's how they are too, despite my Mother paying $670/month in association dues.


Facebook connect and share application for website (like 9gag)

Question: I'm creating a website where users can make reservations on certain restaurants, I want the whole page to be integrated with Facebook since you log in. And when the user makes a reservation Facebook will automatically post the reservation on the users Facebook so other may see it in their home page (just like an activity of 9gag).
Any help please!! I'm a programmer but it's the first time I try to integrate Facebook.
Comment: FB has its own API that you can use for that. You will need a dev token to do so.
Answer: If you start with Facebook, this is where you should go:

https://developers.facebook.com/docs/

For login:

https://developers.facebook.com/docs/concepts/login/

Also read the terms and conditions of facebook, there are some important rules for apps.


Word for an action/event that contributes to a person's notoriety?

Question: Just as achievements can contribute to a person's fame, is there an equivalent word for an action or event that contributes to a person's notoriety? Phrases that come to mind are 'bad deed' or 'cruel act', but no words come to mind.
Comment: Malfeasance, misdeed, devilry, malefaction, villainy, mischief, malpractice..
Answer: Ignominy (MWD)

disgraceful or dishonorable conduct, quality, or action

Infamy (MWD)

an extreme and publicly known criminal or evil act

Scandal (MWD)

a circumstance or action that offends propriety or established moral conceptions or disgraces those associated with it

Atrocity (MWD)

a shockingly bad or atrocious act, object, or situation the atrocities of war


MPLS routing: how are packets routed in the interior network (third party equipment)

Question: Is it correct to assume that MPLS edge routers can route packets into and through third party networks?  By this I mean, networks that are not label switched networks.  The diagrams they show of the big cloud in between edge routers suggests that there is some transparency over arbitrary networks.  The edge router sets up a pseudo wire to the destination router, but this can traverse arbitrary routers.  How is this accomplished?
Comment: Just so I don't make any assumptions, do you have an example of what kind of diagram you're talking about?
Comment: I added an image.
Answer: In the diagram you posted, the provider network is in fact a label switched network.  The "P" designation on the routers usually implies that they are LSRs.  It is depicted as a cloud because from the customer's point of view, the physical connections between the provider routers are unimportant.  Pseudowires and other tunneling modes are accomplished through label switching.


update DML fails on contact......how to undo the update on Account and opportunity how do you implement that

Question: Let's say in Apex you have multiple DML calls like update opportunity then you update Account and then you update contact, but it fails on contact so you want to undo the update on Account and opportunity how do you implement that?
Comment: See [documentation](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_dml_transactions.htm)
Answer: Assuming that all 3 of your DML statements are happening in the same transaction, this is what happens by default if you don't catch the DMLException. I.e. There is nothing for you to implement.
When an exception goes unhandled (and thus the entire transaction fails), Salesforce rolls back the changes made as part of that transaction.


How can I discover topics in a social media data-set?

Question: I'm working on a project and i need to discover topics existing in a social media data set. For instance, i wanna extract the topics existing on 200K tweets. Any one recommend to me any machine learning algorithms?
Comment: What do you mean with "topics"? Are you sure that a "topic" from topic modelling (like LDA) matches your concept of topic? Or do you want to do some clustering or labelling task?
Comment: I wanna discover topics by two methods, LDA and doing clustering or labeling tasks.
Answer: You can take a look at Latent Dirichlet Allocation. In my experience this does very well without too much effort. You need to remove words that don't help like stopwords (and in your case Twitter handles and probably URLs) before feeding it to the algorithm. The only really important parameter that you need to give it is the number of topics. This will depend on your population (are these random tweets, or only tweets from a specific subgroup/hashtag?) and you need to compare some settings. What you can do is print the most important words per topic and see if they indeed do belong together.
If there are different languages in your tweets you need to deal with that beforehand, maybe classify them on language and only keep the English ones for example.
Comment: Thank you Jan for your reply. However, is there any other algorithms rather than using topic modeling ones ? because I was asked by my teacher to find the alternatives..
Answer: A different direction (although not necessarily a better one) is to cluster the texts you receive, perhaps using an algorithm that doesn't require many input parameters like the number of clusters.
Note that not any text clustering algorithm will do - some are optimized for clustering much longer texts. This paper gives a survey of short text clustering methods:
http://www.charuaggarwal.net/text-cluster.pdf
It's not the newest, but it's a starting point. From experience, I agree with @Jan van der Vegt that it's recommended at the very least to look at English separately from other languages.
Comment: For example I clastered my data-set into N cluster. And i wanna know the topic of each one.
How can I define automatically the category X from an unsupervised ML cluster.
Comment: How about looking at the most common words or phrases from each cluster (filtering out stopwords)?
Comment: Looking at the most common words will be like an LDA unsupervised solution that return the topics.
Thus it will be more easy LDA to my twitter data-set without performing any clustering.
However I'm searching the LDA alternatives, using unsupervised or supervised techniques...
Answer: One approach could be the following:
1) Make a vector respresentation of all texts in the data set, for example with tfidf technique.
2) Take the first vector and put it in a pile.
3) Enter in the following loop:
3a) take the next vector and compute the cosine similarity between this vector and the centroid of each built pile.
3b) if one of this cosine similarity falls below a predefined threshold, stack this document representation in the corresponding pile. Another case, build a new pile with this vector.
3c) recompute the centroid of each modified pile.
This algorithm is going to find similar tweets, which we suppose that are related with same topic.


Should you offer users an option to clear their basket themselves?

Question: We're looking at adding this functionality to our basket to allow users to clear all products in their basket. Is this standard practice or is a 'Save for later' button or wish list function a better approach?
Comment: Could you explain why you don't want users to be able to clear their shopping basket? Omitting the functionality would likely score poorly in a task where users are asked to remove items from the basket, which is a common real-world activity.
Answer: If the user is in their basket then this would be one of the functionalities users currently expect.
In the basket allow the user to:

change qty of their items
see the number and qty of items in the
basket
see the sub-total of their items
and, if you have their shipping
address, it would be nice to have an "estimated tax" summary
Since users expect to be able to remove items from their shopping cart having a one-click option is an excellent idea.

And then, obviously, allow them to return to the shopping area, and continue through the purchasing process.


How to prove simple function is measurable

Question: I'm  aware of the definition of the measurable function. But I was wondering how to prove simple function is measurable? It would be better have some detailed proof.
Answer: Consider a simple function
$$
f = \sum_{i=1}^na_i1_{E_i},
$$
where $E_1,\ldots,E_n$ are disjoint measurable sets. To see that $f$ is measurable, it suffices to show that
$$
f^{-1}(-\infty,a]
$$
is measurable for every $a\in\mathbb{R}$.
Given $a\in\mathbb{R}$, note that
$$
f^{-1}(-\infty,a] = \bigcup\{E_i \mid i\in\{1,\ldots,n\}\ \text{such that}\ a_i\le a\}
$$
is a union of measureable sets. Therefore $f$ is measurable.
Comment: It could happen that $x \in D =\left(\bigcup_{i = 1}^{n} E_{i}\right)^{c}$. In this case we have that $f(x) = 0$. If $a \geq 0$, we would have $f^{-1} (- \infty, a] = \cup \{E_{i} \mid i \in \{1, \dots, n\} \text{ such that } a_{i} \leq a\} \cup D$.


Deploying a java web application online

Question: I have built a java web application on Eclipse. But i am naive in terms of making an application live i.e. deploy it online. I have tried using Cloudbees, and succeeded in deploying it at run@cloud there, but could not see it actually running. I haven't purchased any domain name as of now, therefore I would like to try it on any free domain first. If I want to make that application live, what would be the exact steps that I'll have to follow ?
Comment: I suppose u should buy a domain or hack one!
Comment: Have you tried on your own local server?
Comment: yes, it works on my local Apache Tomcat Server version 7.0.
Comment: also, by free domain, i mean a free sub-domain
Comment: @rishabh85, you can get a free (sub)domain (such as .tk, .co.cc, etc.) at http://www.getfreedomain.name. once you set the DNS records correctly, that should work with any hosting/cloud provider.
Comment: See this,
How to deploy Java web project WAR to a real website
https://youtu.be/J1pViMfR7RA
Answer: Use Redhat Openshift Cloud...
Redhat Openshift is a Cloud based service which provide PAAS(Platform As A Service) i.e. Use their Server and upload our Project.
Redhat Openshift also provides MySql , Postgre and MongoDB.
It Easy to understand, Simple to Configure and Auto-Scalable.
Redhat Openshift supports:
https://dl.dropbox.com/u/24576260/Redhat%20Support.png
There are alternatives of Redhat Openshift - Google App Engine (GAE). But GAE restrict some of the class usages in Trial Verison.
Whereas Openshift have kept open and whatever user wants he can use and configure it.
Answer: Try Jelastic.
They have a free trial as well.
PS: Works for me each time.
Answer: If you have deployed successfully to RUN@cloud then your app is already running; there is no need to purchase a custom domain. If you log in to https://grandcentral.cloudbees.com/ and click on the Apps tab, you should see your new application listed; the show in new window link will open the live web page. (This will be http://appid.accountid.cloudbees.net/ where appid is whatever you chose when creating the app, and accountid is rishabh85 or whatever your CloudBees login name is.)
You can also load this page directly from Eclipse, if using the CloudBees SDK (use http://eclipse.cloudbees.com/ to download or http://blog.cloudbees.com/2012/07/getting-started-with-cloudbees-and.html for more information). Configure your account information, and open the CloudBees view (available from the CloudBees toolbar button), and you will see your running apps. A context menu item lets you open the selected app live in a web browser.
Comment: yes, you are right. but when i ran the default Hello World project as local app using cloudbees, it showed me Hello World as an output in the web browser as the application was expected to do. Now, I want that my project should behave the same way on cloud i.e. the same project should show the same output to anyone who accesses that link i.e. to public. Instead, it shows the page 'This application under development'. How can I see the actual output or will i be able to access it in this way only ? I am new to it.
Comment: Thanks it is solved now. I changed the jsp which loads from the default version.
Answer: Try Google app engine. You can deploy your Web applications and you ll get a free sub domain.
Answer: As I have small knowledge of working like this, its very easy. This is to inform you that its works like your own pc. In my last company they had a Windows server.. and Tomcat & MySQL was pre installed on that server. I just place my <code>.war</code> in the proper place & imported the blank DB.. and its starts working :)
Comment: yes, that is fine but i was looking for an exact answer i.e. which service to use to deploy the project online using .war or directly running app on their server so that i can see the output online itself.
Answer: Checkout my blog posts on creating a web service from scratch using Cloudbees.  It's a series of 7 posts that have everything you need in order to get your service up and running (including an opensource code base with almost everything you need already integrated)
If you just want the fastest way, checkout this youtube video.

Deploying a java web application online


How to get rid of "Ego"

Question: I have a Girlfriend that I met few years back. She loves me a lot,she is quite brilliant from her childhood, and now she is working in a big firm. I am working in a smaller firm than her. When we were in college, it seems we will not fight ever, but after we got passed and she got placed we are having a lot of fight. She sometimes says some bad words to me, that i can't handle.But i don't want to fight anymore, but I think I've ego problem. Every time i think not to fight but finally we ended up with big fight. What are the practical measures in Buddhism to get rid of such ego inside one's inside. Thank you.
Comment: Are you saying that your girlfriend thinks lowly of you? Have you thought about counselling?  In a relationship one party working on understanding and effacing his or her ego alone while the other does not is not helpful for the relationship, although it's helpful for the former.
Answer: More than ego, it could be the high level of stress involved in working for a big company.
In any case, Marananussati meditation would be a good start for both of you.

"The disciple who devotes himself to this contemplation of death is
  always vigilant, takes no delight in any form of existence, gives up
  hankering after life, censures evil doing, is free from craving as
  regards the requisites of life, his perception of impermanence becomes
  established, he realizes the painful and soulless nature of existence
  and at the moment of death he is devoid of fear, and remains mindful
  and self-possessed. Finally, if in this present life he fails to
  attain to Nibbana, upon the dissolution of the body he is bound for a
  happy destiny."   -Visuddhimagga

Another reason could be the wanting to control each other. Have a cordial discussion with her and come to a solid understanding of each other's expectations. As long as you two don't exceed that framework, don't try to control each other too much.
Come to an agreement on how to resolve issues. Make a determination with her to always use kind words and wisdom to find a solution rather than disrespectful words and emotional thoughts.
Answer: You could practice the The Buddha's Eight-Fold Path.

Right Understanding (Samma ditthi)

Right Thought (Samma sankappa)

Right Speech (Samma vaca)

Right Action (Samma kammanta)

Right Livelihood (Samma ajiva)

Right Effort (Samma vayama)

Right Mindfulness (Samma sati)

Right Concentration (Samma samadhi)
I suppose you don't have to practice all 8 if you  only seek temporary results.

The correct practice of samatha  meditation can temporarly bring peace and lessen the ego delusion. Metta is a samatha practice that can be very effective in greatly lessening anger temporarily and the ego delusion temporarily.
The practice of vipassana will lessen the ego delusion slowly towards a permanent end to the ego delusion, over a long period of practice that can take a lifetime or lifetimes depending on the person practicing.
There are many approaches and interpretations to the practice of samatha and vipassana.
The best way to learn is with a good teacher.
Answer: the root of all our problems is wrong view. Once we correct our view and start on the Eightfold Noble Path, we start coming out of suffering.
Here is what Ven S.N. Goenka has to say about our view, our ego, and how it is formed and cultivated.
Here is what Ven Yuttadhammo has to say about Right View.
When one listens to this Dhamma, Cintanmayi Pannya (wisdom gained through analysis) will arise. But this wisdom is not sufficient to release one from suffering. For that one needs to have Bhavanamayi Pannya (wisdom gained through experience). This can be acquired by attending a meditation retreat near you. Registration for a 10 day retreat under Ven S.N. Goenka can be done here
Answer: With regards to your situation,
You are thinking that you are working for small firm while your girlfriend works for big firm. That causes trouble.
So do not make trouble for yourself.
Ask yourself why you are with your girl friend.
Focus on the feeling you had back in while you were in the university days.
Treat her just like you did back in those days without prejudices.
With regards to getting rid of ego,
Don't seek then it will come.
It's there within you always.
You just don't know.
Sit with legs folded crossed on the floor. Face wall or mountainside. Close your eyes. Put hands naturally on the knees or at the center of body as described in buddha's sitting form.
Question yourself where you came from?
Where you go when you die?
Keep do that every minute, everyday when you have time.
Answer: From what you say I think she also might having a ego problem. This arises in conceiving:

I (X) am better than Y
I (X) am equal to Y
I (X) am lower than Y

when in general it can be perceived by majority of people as an external impartial observer that:

X is better than Y
X is equal to Y
X is lower than Y

There are 9 combination of the above 2 which form different shades of ego.
Now when ego sets in what happens is that you think your view or take in the matter is more superior and discount that the other party has to say. Also your ego makes you attached to your viewpoint. The conflicts happen due to one-sidedness of thinking and emotional attachment to one's view. Best is work on how you can approach and viewpoint or argument more logically than emotionally.
Also see:

Atammayatā by Piya Tan
Is There a Soul? by Piya Tan
Sakkāya Sutta
Nadī Sutta

... which have discussion on ego.
To get rid of ego you have to get rid of craving or attachment of one's views and attachment to be better than someone else in a given aspect. To do that it is best to do meditation. You can try http://dhamma.org or http://internationalmeditationcentre.org. Since both you and your girlfriend seems to have some form of superiority it might be a idea for both of you to go to a course.

How to get rid of "Ego"


What happens if a president-elect changes his/her mind?

Question: Let's say it's December 10th, 2016 and Joe Smith has just been elected president, but since the election he has decided he no longer wants to be president. In January 2017, who would be inaugurated instead of him?
Comment: The real answer is, of course, "the vice president-elect will become president, by some legal machinery or other," but it's at least conceivable the House of Representatives could select someone else to be president (especially if the president-elect renounces their citizenship and is thus not qualified to be president).
Comment: Do you have any reason to believe this would be different from just a resignation? Given that it hasn't happened before, all we can do is find the closest situation.
Comment: @Avi You can't "resign" from the president-electhood, because it's not an office. The 20th Amendment doesn't mention a president refusing to take office, just if they die or if they fail to qualify (but there are different outcomes depending on which one happens; if they die the VP becomes President, if they don't qualify the VP is only acting). It's also not clear if refusing to take the oath is "not qualified" as president or if they still technically become president (but exercising presidential powers requires taking the oath), and in the latter case the 25th Amendment might apply.
Answer: There are no laws, Constitutional or otherwise, to directly address this situation.  The easy answer would be for him to take office and then immediately resign, breaking William Henry Harrison's record of 32 days for shortest Presidential term, and triggering the already-tested resignation process.
However, assuming that the candidate refuses to do that, there's at least one logical flow which seems likely to be the path taken.  And just as with Harrison and the succession of "His Accidency", John Tyler to the Presidency, new precedent would be set regardless of what happened.

Article II, Section 1, Clause 8 of the Constitution specifies:

Before [the President] enter on the execution of his office, he shall take the following oath or affirmation:--"I do solemnly swear (or affirm) that I will faithfully execute the office of President of the United States, and will to the best of my ability, preserve, protect and defend the Constitution of the United States."

If the President-elect doesn't take this oath, he is unable to execute his office.  I don't think anyone disagrees with that.  However, by my reading, his becoming President is not conditional upon taking the oath - only executing it.  So what happens?
Clause 6, while partially overridden by the 25th Amendment, states:

In case of the removal of the President from office, or of his death, resignation, or inability to discharge the powers and duties of the said office, the same shall devolve on the Vice President, and the Congress may by law provide for the case of removal, death, resignation or inability, both of the President and Vice President, declaring what officer shall then act as President, and such officer shall act accordingly, until the disability be removed, or a President shall be elected.

The 20th Amendment adds

If, at the time fixed for the beginning of the term of the President, the President elect shall have died, the Vice President elect shall become President. If a President shall not have been chosen before the time fixed for the beginning of his term, or if the President elect shall have failed to qualify, then the Vice President elect shall act as President until a President shall have qualified;

Finally, the 25th Amendment modifies this by adding:

In case of the removal of the President from office or of his death or resignation, the Vice President shall become President.
...
Whenever the Vice President [and others], transmit to the President pro tempore of the Senate and the Speaker of the House of Representatives their written declaration that the President is unable to discharge the powers and duties of his office, the Vice President shall immediately assume the powers and duties of the office as Acting President.

The cleanest possibility here is that by refusing to take the oath, the President-elect renders himself "unable to discharge the powers and duties of his office".  The VP will notify Congress, and become Acting President. He will stay Acting President for the entire 4-year term, and then be eligible for a single extra term as President.
Anything beyond that could spark a constitutional crisis.  These tend to be resolved by whoever is most dedicated to their interpretation or who can apply the most force.  It's possible it would end up before the Supreme Court, but unless someone's proposed solution was wildly outside the implied default of the VP acting as or becoming President, that's unlikely 1.
Some possible scenarios:

Like in Tyler's case, the new VP decides he is President, not just Acting President.  He declares that the President-elect effectively resigned, rather than just being unable to take the office.
The question is thrown back to the Electoral College, and the various state's electors would need to re-convene and revote for President/VP.
An emergency amendment is passed to clarify the situation between the pre-resignation and the inauguration.  I would expect that most Congressmen and most state's legislatures would be willing to rush a one-line amendment through to avoid months of arguments.  However, this may fail if the minority party prefers one of the other solutions and has enough representation to block the amendment.
The President-elect is impeached, or plans are made to impeach him as of inauguration day.  Again, I would expect most Congressmen to go along with it, regardless of party affiliation (the President's party wants the VP in office, the other side wants to make a big deal about it).

1 One other thing worth noting is that any solution which ends up with a new or acting President from a different political party than the President-elect will run afoul of the spirit of the 12th Amendment which was specifically created to ensure that the President and the VP (his successor) came from the same party, instead of being antagonistic (as per the original Constitution).  While there may not be any direct answers there, if it came before the Supreme Court, they would probably base at least part of their decision on the intent of the 12th.

TL;DR
There is no concrete answer to this question.  Most likely, the VP would at least become Acting President for the duration of the term.  If enough politicians really don't like that result, it would likely create a constitutional crisis, which would set new precedent, which might later be encoded into law.
Comment: Death before taking office is explicitly dealt with in the 20th amendment. Anything that doesn't mention the amendment is an incomplete answer.
Comment: I'm pretty sure that failing to take the oath would indeed render the President-Elect `"unable to discharge the powers and duties of his office"`, so the VP becoming President on that grounds is almost certainly the path that would be taken, IMO, unless the VP also didn't want to become President for some reason.
Comment: @reirab But Clinton wasn't impeached for violating 18 USC 1621 (the statute for perjury), and Johnson's impeachment charges included one for making an appointment without advice and consent of the Senate when the Senate was in session, which violates no criminal statute. If Congress decided that the President violated his constitutional duty to take care that the laws be faithfully executed by failing to take his oath of office, that'd be perfectly OK.
Comment: @cpast - You're right.  I quoted the 20th, but didn't take that out of my intro paragraph.  Fixed.
Comment: Yeah, I'd at first just seen the bit in the intro paragraph. I'd be curious what would happen if Joe Smith failed to qualify (in which case the House could arguably pick a new President, as happens if no one wins a majority of electoral votes), but I think the only way that could happen is if he renounced his citizenship (you can't make yourself younger or suddenly have spent fewer years in the US). Oh, also: If needed, Joe Smith could always be impeached to make the VP full President instead of Acting President.
Comment: @cpast - Nice idea.  I've added it to the list of alternative scenarios.
Comment: @cpast Regarding impeachment, that would technically be a violation of the Constitution unless the President-Elect has committed `"treason, bribery, or other high crimes and misdemeanors."`
Comment: @reirab The definition of "high crimes and misdemeanors" is up to Congress and Congress alone. As for VP becoming President, the VP might only be *acting* president, which is less than ideal.
Comment: @cpast But Congress can't make something illegal after the fact, so they can't just invent a crime. Ex post facto laws are explicitly unconstitutional. And making failing to do his job as President a crime also seems like it would be shaky on 13th Amendment grounds, though courts have already let some things slide on that front (*cough* conscription *cough*.)
Comment: @reirab "Ex post facto law" doesn't apply to impeachment; impeachment doesn't involve any sort of law at all (else it'd be an unconstitutional bill of attainder), it's a separate power. Impeachment is not based on "Person X violated preexisting statute Y;" charges take the form "In violation of his oath or duty, person X did Y bad thing." Y is not picked off a codified list, it's newly established as impeachable for every impeachment proceeding. The President failing to take his oath or do his job means he's failing his constitutional duties, so it's not even unreasonable to impeach.
Comment: @cpast Hmm... I've always taken `"crimes and misdemeanors"` to mean actual criminal offenses, which would indeed require violation of preexisting statutes. For example, Clinton was impeached for perjury and obstruction of justice (both existing criminal offenses) and Johnson was impeached for violating the Tenure of Office Act (a pre-existing statute that was later deemed unconstitutional.)
Comment: It's interesting, because 3 USC 20 talks about the evidence required for a "refusal to accept" the office of President or Vice President, but I have not found that term used anywhere else in the statutes or the Constitution.
Answer: On Inauguration Day the Vice President elect takes the oath of office first. The President elect is then asked by the Chief Justice if he is ready to take the oath of office.  If he says "no, I am no longer interested in the job"  the Vice President would automatically become President.  A new Vice President would then have to be selected.
Comment: I think you are right but how can we be sure.  Can you edit your answer to explain what rules and laws apply and dictate this.
Comment: "If he says "no, I am no longer interested in the job" the Vice President would automatically become President." According to what provision of the Constitution?
Answer: President and vice president are elected as a single ticket. You vote for the president and get a vice-president included. You do not vote for each individually. So if the President Elect drops out before being sworn in the VP Elect would be sworn in as The President and He/She would appoint a VP (subject to the approval of the Senate).
Comment: Are you sure that's the actual policy? or are you just guessing?


Question popped up under me

Question: This question here popped just recently under me and i do not remember asking it at all never even got notifications of answers
WordPress Admin Bar Moving Links
Comment: Can you elaborate on your question? I'm not clear what *"popped up under me"* means in the context of this site.
Comment: it just showed up under the main page so i clicked it and my name is the asker  but the rep and stuff is low or non existent. I have made my own mods to my admin bar and not asked this question at all. So i am just a little confused. as well it never even gave me inbox messages that people have answered it show i was not sure if it was a bug or not. in my profile it shows the questions i have asked and that is not in there at all
Comment: Even when you click on the profile it takes it to someone else. my username is xLRDxREVENGEx not Tyler Yates but that is my profile image
Comment: Oh and my name is Tyler Yates
Answer: That question is attributed to profile with unregistered status so someone must have used your details for authentication when creating that question. IPs check shows that access was made from one of two IPs that you use (less common).
Are you sharing your computer/browser with someone who might have asked that question?
Comment: I am the only one who knows how to use this site my roomies are dumb when it comes to coding. I do have a dynamic ip on my internet and go back and forth with laptop and desktop but they share the same internet
Comment: @xLRDxREVENGEx well, either someone intentionally identified as you or by mistake (hitting browser form-fill feature, etc). Or you have gaping hole in your memories. :)
Comment: Who knows. I just saw that and was like i asked that question and then my name but then it clicked that i dont use the username listed on that question never have. Unless a friend of my posted it ill have to call him.
Answer: This question was asked by an unregistered user, so it could be someone that shares a PC with you.
We do store the contents of the unregistered user fields (that is, name, email, and url) in a cookie so if you asked a question, didn't clear cookies, didn't log out -- someone else could ask and have those fields pre-filled as you based on the browser cookie.

Question popped up under me


Lie-Kolchin theorem, unipotent matrices and Ad-unipotent elements

Question: Let $G\le \text{SL}(n,\mathbb R)$ be a connected real matrix Lie group, not necessarily solvable
The two basic questions I have, and I have been told by people that they "follow from"  Lie-Kolchin theorem (or some other theorems from Lie theory) are

1.1 How to show $u\in G$ is a unipotent matrix (all eigenvalues are equal to $1$) $\iff Ad_u:Lie(G) \to Lie(G)$ is a unipotent map (all eigenvalues are equal to $1$)

or more generally

1.2 How to show $u\in G$ is a unipotent matrix (all eigenvalues are equal to $1$) $\implies$ for any representation $\rho:G\to \text{GL}(V)$, $\rho(u)$ is a unipotent linear transformation on $V$.

The second question I have is

2.Let $H\lhd G$. How to see that for any quotient map $f:G\to G/H$ sends Ad-unipotent elements to Ad-unipotent elements.

One obstruction for my questions is the conditions of Lie-Kolchin theorem. At least the versions I have seen are only for solvable groups over algebraically closed fields. I want the questions above to be answered at least for groups like $G=\text{SL}(n,\mathbb R)$.
Even if the conditions of Lie-Kolchin can be "smartly manipulated", I still don't see how to relate Lie-Kolchin theorem to the questions above. Since Lie-Kolchin theorem only talks about simutaneous eigenvector for all elements of a group and I don't see how unipotency comes into play. There is also a chance that I heard the term "Lie-Kolchin theorem" wrong. So please feel free to use any other parts of Lie theory if applicable. Please also feel free to answer any one of them if you are not sure about the others.
Answer: If $G$ is an algebraic group, then this seems to be a standard fact, as in Theorem 2.4.8 of T.A.Springer's linear algebraic group book.