Did my instructor somehow pass the buck to me?

Question: When I was TAing a course, some students came to meet me to talk about marking issues. Earlier, the instructor had said that if students cannot reach an agreement with TAs they should talk to the instructor. Thus when I saw some students disputing marks, I referred them to the instructor. However, the instructor later sent me an email saying he couldn't decide the marks as the TAs made the marking scheme. In my view, he somehow refused to fulfill his duty and passed the buck to me.
Comment: Rapidturtle, email is good for lots of things. But not for everything.  If the communication is not working well via email, then visit the instructor in his or her office hours, or stop by the professor's office and ask if s/he has a minute to talk, or request an appointment by email (e.g. "Can I stop by this afternoon to talk about a grading issue?").  The conversation may last less than five minutes -- that's okay.
Comment: Possible duplicate of [What to do about "grade grubbers?"](https://academia.stackexchange.com/questions/9014/what-to-do-about-grade-grubbers)
Comment: Basically, the TAship is a way to cover the cost of your graduate studies.  Be efficient.  Avoid major conflicts.  You will only be working for a particular professor for 3 1/2 months and then you'll move on to another TA assignment.  Just try to work things out the best you can with the professor, knowing that you won't be working for this person long term.
Comment: There is no unanswered question here.  This is a rant, not a question.
Answer: Generally, unless the mark is extremely, obviously wrong, the professor should support the decision made by the TA. However, this means that when there is a grading dispute you cannot resolve with the student, you need to refer the student to the professor, but also talk to the professor yourself, explaining your marking scheme and reasoning behind the grade. Then the professor is equipped to explain to the student why they got the mark they deserve. You cannot expect the professor to moderate a dispute unless they actually have the grading scheme and your side of the story.
Also, you shouldn't immediately pass the student on. Let them present their case to you first, and explain to them why you assigned the grade you did. Nine times out of ten, the student is happy with that. You should only refer the one out of ten who refuse to see reason to your professor.
Comment: I did meet an aggressive student who disagreed with my decision and refused to talk to the professor. I had no idea what to do then.
Comment: @Rapidturtle In that case I suggest just calmly repeating "I have explained my reasoning, and you have not provided any reason for me to change your grade. If you are unhappy, you can go speak to the professor." If the student persists without offering anything new, say "This conversation does not fell productive right now. You're welcome back when you have calmed down, but right now I'd like you to leave my office."


Difference between quick lime, slaked lime, lime water and soda lime

Question: The chemicals "quick lime", "slaked lime", "lime water" and "soda lime" all have "lime" in common. What is the difference between them?
Comment: Aha, I wondered if this would be a self-answer -- most or all of this is on Wikipedia.
Comment: 'Milk of lime' is somewhat similar to limewater. It is the suspension of slaked lime in water whereas limewater is a true solution.
Answer: Quick lime is calcium oxide, $\ce{CaO}$, in the solid state.
Slaked lime is calcium hydroxide, $\ce{Ca(OH)2}$, in the solid state.
Lime water is a dilute solution of calcium hydroxide, $\ce{Ca(OH)2}$, in water.
Soda lime is a mixture of sodium hydroxide, $\ce{NaOH}$, (also known as caustic soda) and calcium oxide, $\ce{CaO}$, (also known as quicklime).
Comment: You may know these things, but including links to outside sources increases the usefulness of your answer to others.
Comment: Thanks for posting this! Can you add links to Wikipedia or elsewhere? Most of these are on Wik.
Comment: @hBy2Py, I did not refer to wikipedia. I knew this.
Comment: Slaked lime comes from the idea of slaking the "thirst" of quick ("live" or "active") lime with water. Sort of an alchemical etymology.
Answer: To add to the family of materials in the 'lime' category: The sedimentary rock limestone is composed of calcium carbonate, $\ce{CaCO3}$.
Answer: According to Wikipedia:

Quick lime is $\ce{CaO}$ (calcium oxide)
Slaked lime is $\ce{Ca(OH)2}$ (calcium hydroxide)
Lime water is just a dilute solution of calcium hydroxide.
Soda lime is a mixture of about 75% calcium hydroxide, a few percent each of sodium hydroxide and potassium hydroxide, and about 20% water.  It is commonly used to adsorb $\ce{CO2}$ from the air.
Comment: Soda lime works great for adsorbing other acidic gases, too: $\ce{NO2}$, $\ce{SO3}$, etc. I used it in my grad work for $\ce{NO2}$.
Answer: I completely understand your frustration as all those names are trivial names (non-systematic.)
The "lime" is derived from the use of Limestone
https://www.etymonline.com/word/lime
I would have to mention that even those names are associated with chemical names that are not pure and contain some impurities.
Lime = quicklime ($\ce{CaO}$ - Calcium oxide) is made from limestone ($\ce{CaCO3}$ - Calcium carbonate) by decarbonisation at high temperatures.
To get slaked lime = hydrated lime ($\ce{Ca(OH)2}$ - Calcium hydroxide) you mix Lime with water, resulting in a white powdery substance.
In another process, you can make lime water - where you add lime into a greater amount of water resulting in water solution/suspension of hydrated lime
$\ce{Ca(OH)2}$  in water - this is also called milk of lime.


Steam: share games within family. Library locked?

Question: I have bought a couple of games on steam for my kids. Everything worked great until I bought another computer for them. So now I have 2 computers for them to use. I thought that login om same account they could use both computer as long as they not played the same game. That didn't work.
So I created another steam account and used familysharing to share the games between the two computers.
That did not work either!! As soon as one computer used ANY game on the "library" the other computer could not play anything.. what the heck!
How am I supposed to let my children play som games from steam without buying multiple copies of every game??!!
I found something about creating multiple libraries. But for that I need to partition the hdd for each library which would contain only one game each.  Can that be an option? If I create multiple libraries will they all be locked while sharing to another computer?
Please help me. Many people (parents) must have this problem??
Should I create a new steam account for each game??
Thanks!
Comment: 1 account per person would be the best way to solve
Answer: You would need to ask every time for the game from the other account. So I would reccomend just buying 2 games or just use only one account.


How many significant figures in 0.0

Question: So I know all the significant figures rules, but an edge case that doesn't quite make sense to me is 0. Say I measured the mass of an object to 0.000g.  How many significant figures is that measurement to?  As close as I can tell, it would be 0 significant figures by the rules I know, but it doesn't make sense that a measurement that precise would have no significant figures.
Answer: Although there are explicit rules for counting significant figures, they are really a rough idea for the accuracy of a number.  You have shown that the mass is less than $0.000\ 5$ gram, but it could be $0.000\ 000\ 005$ gram for all you know.  In the sense that one significant figure indicates that you know the value to about $\pm 10\%$ (it ranges from $5\%$ if the figure is $9$ to $50\%$ if the figure is $1$), it makes sense to say you have no significant figures at all because you have no bound on the fractional error that might be made.
Comment: The point being that significant figures have to do with **relative** error rather than **absolute** error.  If the true value is $0$, the relative error is undefined.  If the true value is nonzero, the relative error is $-1$.
Answer: Zero significant figures.
Suppose your scale could weigh some mote of dust as $1\mu g$, and it has $0.5\mu g$ precision. Then you would say the measurement is $1 \times 10^{-6} g$, which is one significant figure. Anything below that wouldn't be effectively measurable. So you don't get any significant figures from a zero measure.
Answer: If you write a number that is between 0 and 1, calculate how many significant figures it has. Then delete the last digit and there is one less significant figure. If you keep deleting the last digit until only zeros remain, there will be zero significant figures.
Example:
$0.020356$ has 5 significant figures,
$0.02035$ has 4 significant figures,
$0.0203$ has 3 significant figures,
$0.020$ has 2 significant figures,
$0.02$ has 1 significant figure,
$0.0$ has 0 significant figures.
It will work with anything that is between 0 and 1. So $0.003725$ and $0.020080$ will work similarly.
Comment: The 0 in front of 0.0 is significant in the case of `0`.

How many significant figures in 0.0


In Glitch, how can I see quickly how many skills I have learned?

Question: In Glitch, you can only learn X skills before "brain detoriation" kicks in, making it take longer. Without counting them manually, how do I know how many I have learned?
Answer: There's no direct way to do this, as fredley mentioned, but there are a few 'interesting' ways to do this.

Go to your profile page, look at the list of Latest Skills. It should look something like this:

Take the number you see on the right, then add up the number of icons displayed in the list.
Go to your skills page, then pop open your browser's console (Ctrl + Shift + K on Firefox, Ctrl + Shift + I on Chrome), and type in:
<code>$('li.got').length
</code>
The number of learned skills should show up in the console
Comment: I've created [bookmarklet and userscript versions](http://db.tt/3zDTtBGQ) of the second method.
Comment: If @BenBlank that was an answer I would accept it. But its not :(
Comment: @fireDude67 — As you wish!  :-)
Answer: I have put together a tiny app with the API:
Glitch Skill Checker
This will tell you how many skills you have learned, your current Better Learning level, and use this information to tell you your bonus/penalty to learn your next skill.
Answer: Inspired by Yi Jiang's answer, I've created scripts for your browser which embed skill counts into Glitch's own skills pages:
Comment: oh no! the image is not there :(
Comment: @fireDude67 — Fixed.  Dropbox is blocked at work so I'd had to copy the URL from my phone.  Must have mistyped it.  :-)
Answer: I've actually created a tool for doing this, called the Skillifier:
http://agent86.nfshost.com/glitch/
Not only does it tell you what you've learned, it shows you all the skills left and how much time it will take to learn each one in order.  It shows the penalty percentage as well.  In fact, it even shows a simple, "greedy" algorithm method of selecting the next skill, if time ordering is your priority.  It also lets you prioritize skills that you'd prefer to learn early, and tracks prerequisites.


How to improve this piano sound

Question: I play the piano and use FL with Keyscape to record my songs/cover.. But the sound seems very cold, expecially in mid frequencies, so:could you please help me to understand what I should do to improve it? Thanks :)
 This is an example of the sound I obtain (no EQ, only factory settings of Keyscape) :

Comment: What's the problem with using an EQ?
Comment: As I read it, the audio is "raw", i.e. without any further post-processing, yet. // Adding the audio effect "chorus" may make the recording sound more interesting. Also consider applying "room effects", like "middle sized room".
Answer: Perhaps the issue is the recorded piano which doesn't match your taste. The Keyscape piano is a Yamaha C7 which I consider quite bright (too bright according to my tastes).
Some other virtual pianos are mellower (Hamburg Steinway, CFX, Bechstein, Bösendorfer…) I have many of them, don't use much the different C7 I have. The Bechstein Digital Grand has a bright/mellow knob and I like to set it more on the mellow side.
Perhaps also a too dry sound can be enhanced by a reverb, but it won't help if what you don't like is the brightness.
Answer: Check this out:

He goes through a whole bunch of different effects to make a sampled piano sound better. It's in Ableton but FL has equivalent filters and effects.

How to improve this piano sound


VMWare can't find linux headers path

Question: I'm using ubuntu 12.10 with the kernel 3.7.0-7 from xorg-edgers fresh X crack. Now when I try to launch wmware workstation it asks for linux header path like shown here. I tried all the solutions on that page but nothing works...
It was working before I switched to the 3.7 kernel.
Any idea what I can do to get it work?
Answer: To make the original answer a little clearer for other folks:
In Ubuntu 13.04 (should work in 12.10 as well), with just the kernel headers installed, you can do this:
sudo ln -s /usr/src/linux-headers-$(uname -r)/include/generated/uapi/linux/version.h /usr/src/linux-headers-$(uname -r)/include/linux/version.h

I have to do that every time I update the kernel right now.
Comment: Work like a charm. THX!!
Comment: I have Ubuntu 12.04, and installed kernel 3.8 and it worked for me too.
Comment: This command got me past vmware not finding the headers.  However now when I click 'install' to start the kernel modules installing it just silently crashes, log file contains no errors.  Ubuntu 13.04
Comment: This is what worked for me.
Answer: First thing to check is for the availability of a newer version of VMplayer or workstation to download.
If the latest version does not work, then start looking at the error messages and try to add a link to fix the problem.
Looks like the version.h file got moved again, so adding a symlink is needed:
ln -s /usr/src/linux-3.7-rc6/include/generated/uapi/linux/version.h /usr/src/linux-3.7-rc6/include/linux/version.h

See the link http://rglinuxtech.com/2012/11/18/vmware-9-0-1-not-so-clever-after-all/
The headers have been a moving target since 3.2, and vmware does not keep up.
Answer: After making sure the proper Linux header files were installed for my kernel, manually creating symbolic links, installing build-essential, and basically following all advice that you linked to here, I still was receiving an error saying the path to the linux headers were invalid.
After doing a sudo apt-get update, it turns out there was a newer version of the Linux headers available than was previously reported. Upgrading the currently installed headers package to the latest version fixed the problem, and the VMWare Config Tool was able to find the headers. In my case, the packages which needed to be upgraded were linux-headers-generic-pae and linux-generic-pae.
Answer: If following the instruction that VMware gives you in the error messages doesn't work, you might have to re-install VMware.
I have the same problem with VirtualBox PUEL every time the kernel is updated because I installed it manually from the .deb files.  Fortunately the VBox error message includes instruction for re-running the installation script to install the right code into the kernel.
I surmise that if you use a PPA it might get around this problem by including it in the kernel each time it is updated, but I haven't tried it yet.
Answer: In my case, the symlink to version.h didn't work. I found that this helped on a 64-bit 13.04 system:
http://linuxg.net/how-to-install-vmware-player-5-0-2-on-ubuntu-13-04-12-10-12-04-linux-mint-15-14-13-debian-sid-wheezy-and-squeeze/
The headers package was already installed, but what seemed to make the difference was installing 'build-essential'. I then uninstalled vmplayer (running the installer with -u vmware-player does this) and reinstalled, and everything was copacetic after that.
Comment: Also, VMWare version should be fresh, because it depends on kernel headers.
Answer: I have found that with Ubuntu 14.04 the solution is very simple:
In the terminal:
sudo apt-get install build-essential linux-headers-$(uname -r)

Now run VmWare again and it will ask to rebuild and run perfectly. I do not think Smeghead needed to reinstall.

VMWare can't find linux headers path


display face for which I know its coordinates

Question: I am pretty new to blender. I have my 3D mesh and I have coordinates of a face (I mean corresponding vertices), and I don't know where it appears in the mesh. So my question is like this how can I display or even just color a face from its coordinates on a 3D mesh? I hope I was clear. I would be thankful for help.
Answer: One way you select the face by way of the co-ordinates of the constituent vertices is to make use of the 3D cursor. If the properties shelf is not visible on the right hand side of the 3D viewport, unhide it by pressing the N or clicking on the small + sign in the upper right hand corner of the viewport. Find the panel in the properties shelf window labeled 3D cursor, and if necessary, click the small triangle to the right of the label 3D cursor to open it. Enter the co-ordinates of one of the points in the entry bars to the right of the labels of the three axes, and the 3D cursor will move to the selected vertex; select the vertex. Next, enter the values for the co-ordinates of a second vertex just as you did the first in the co-ordinate slots of the 3D cursor, and navigate to the new location of the 3D cursor. Add the second vertex to the selection. You might now be able to determine which face you want from the selected points; if not, enter the co-ordinates for a third vertex, and if necessary, any other vertices for which you might have co-ordinates, and proceed just as for the first two, but in almost all cases, three vertices will be enough to give you the location of the desired face. One thing to watch out for, is that Blender keeps track of several different co-ordinate systes, global, local, normal, gimbal, and view, and you will need to make sure you are using the right co-ordinate space.
Another approach would be to take the x co-ordinates of the vertices you have, add them together, and divide by the number of vertices, to obtain the median value for the x co-ordinate, and then proceed to do the same for the y and z co-ordinates of all of the vertices. Enter the median values you calculate into the bars defining the 3D cursor location, and the cursor should in be in the desired face. Again, you will need to make sure you are using the co-ordinates relative to the correct co-ordinate space.
Comment: thank you for help. but known that I have a part of a mesh, and from the corresponding matrix, I pick up three vertices then I apply what you have described before, but the cursor doesn't seem to be placed on the part but in outsid, I think it depends on the origin. I did change all origins (one of the object, one of the scene) to (0,0,0) but it still not positioned on the mesh, and I don't really understand why ??
Comment: Without more information, @j.HR, I'm not sure why either; perhaps you might upload a copy of your object to [Blend-Exchange](http://blend-exchange.giantcowfilms.com/), and edit the link to the file into your question.


Hide ones command history from other users on a Linux server

Question: When I log in via ssh on a Linux(Ubuntu) server, I notice that all the bash commands executed by other users on the server are saved in the command history. Is there a way that could allow me to hide the commands that I have typed in the command line from other users on the server?
Comment: http://stackoverflow.com/questions/18663078/disable-history-in-linux
Comment: Normally you can only see your own command history, not other users' histories.
Comment: The command history of the `root` user in *important*. If anything goes wrong, you can look at it and see why. In your case I would set up multiple users with `sudo` access instead (the commands are then logged in both private history and in the syslog).
Comment: @anuribs Then you're confusing UNIX users and physical users. _shrug_
Comment: @anuribs why do you want to hide your commands from other users?
Answer: There are many ways to hide your command history, but it's a bad idea to turn off history altogether as it is very useful. Here are three good ways to turn it off temporarily.

Quickest solution: Type unset HISTFILE
That will prevent all commands run in the current login session from getting saved to the .bash_history file when you logout. Note that HISTFILE will get reset the next time you login, so history will be saved as usual. Also, note that this removes all commands from the session, including ones run before you typed unset HISTFILE, which may not be what you want. Another downside is that you cannot be sure you did it right until you logout as bash will still let you use the up arrow to see previous commands.
Best solution: type a space before a command
Try it and then hit up arrow to see if it got added to your history. Some sites have it already set up so that such commands are not saved. If it does not work, add the line export HISTCONTROL=ignoreboth to your .bashrc file. When you login in the future, commands that start with a space will be forgotten immediately.
Easiest to remember: Type sh
That will start a subshell with the original Bourne shell. Any commands written in it (until you exit) will not be saved in your history. Anybody looking at your history file will be able to see that you ran sh (which is suspicious), but not see what you ran after that.

There are many other ways of doing this. You can even tell bash which commands to never remember (HISTIGNORE). See the man page for bash(1) and search for HIST to see lots of possibilities.
Answer: The command line history for bash shell sessions are stored in the ~/.bash_history file.  If this file does not exist, it is created with no read permissions for other users.
You may change the number of commands that bash saves into this file by setting the HISTFILESIZE environment variable. Setting it to zero will truncate the history file to zero size. The default is 500. Unsetting the HISTFILE (unset HISTFILE) variable will also prevent storing commands in the history file.
However, the current setup of the server you're describing (in the comments) is simply wrong.
There should be no reason to allow multiple users to log in and use an interactive shell on the root account.  Do consider using sudo instead, with multiple private user accounts!
The command history for root, whether for interactive sessions or when using sudo, is extremely precious, especially if you have multiple users with root access on the system.
Your team will want to know exactly what the root user has been up to since any misconfigurations or other mishaps performed by this user must best be investigated and fixed. With a command line history, it makes it much easier to find why something went wrong. The sudo utility additionally logs every invocation to the syslog facility for this reason, with timestamps and with full command line, and with the username of the user executing sudo.
EDIT: We recently started having issues with a fiber network on a cluster of Linux machines at work. It turned out that some drivers or other were replaced with the wrong version when a silly user with sudo access made an careless package upgrade. We were able to find this through looking at the system logs and the sudo timestamps therein. The "silly user" turned out to be nobody else other than myself!
Comment: setting `HISTSIZE=0` will delete all commands from history
Comment: @mik Right you are! Updating...
Answer: Issue the following command after logging in:
HISTFILE=

This will block any subsequent commands from being logged to the history file.
Comment: Actually, no commands from the session will be stored as the history file is written to when the shell exits. But that's nitpicking.
Comment: @Kusalananda generally you are right, but `bash` can be configured to save each command immediately. Moreover, I did not say anything about previous commands, so my statement is true nevertheless ;)


How can i make SQL exec statements run in order

Question: SQL server 2012, I have multiple execs calling the same package with different parameters.  Normally i'll highlight one at a time and run them individually but I'd like to be able to hit go and run them all in order.  One exec pulls results that were created from another so it has to be in order.  Is there a way to pull this off?  i'm not sure if it's the default nature but I haven't been able to verify it.
Comment: By "package" do you mean SSIS? Where are you highlighting and running them? Can you show an example of the call? (If you are running in SSMS and shelling out to the OS via xp_cmdshell to call sqlpackage.exe for example, or using SQLCMD mode inside SSMS, I might be a little nervous.)
Answer: Short answer is yes, that is the default behavior.
SQL is a data access language that will run statments in batches, you'd have to use other features (Service Broker for example) to run statements asynchronously.
One of the main concepts of the language is the idea of Transactions. There are several articles out there which explain this concept in detail with straightforward examples. For Example.
I'd highly recommend practicing this because understanding how to use Transactions becomes especially important when one statement relies on the successful execution of the previous statement.


How is a pack formed?

Question: How did Peter Hale form the original pack? Did they perform some rite? How does a shape-shifter become the original Alpha? It can not be done by being a True Alpha because... well Peter never was one (sorry Peter). And yet Peter was the original Alpha.
Answer: As far as we can tell, a Pack is formed by the simple act of an Alpha gathering other weres to follow them.
Keep in mind, Scott is practically unique in the Teen Wolf world, so we can learn a lot about how packs work in theory from him, but in practice, things for other packs never actually work that way.
In general, packs likely formed long ago, when the werewolf species first appeared. The strongest of those wolves became the Alpha, and the other members of the pack followed them. From then on, the packs remained constant; as one Alpha grew old and weak, another were would kill them and become Alpha. At that point, presumably, the old Alpha's pack would just transfer to the new Alpha. Peter became the Alpha by killing his niece; presumably she became an Alpha by killing a previous one, etc.
But we have seen at least two other packs form "spontaneously" in the show: Scott's pack, and the Alpha Pack.
With the Alpha Pack, Deucalion went around to other pack Alphas and showed them a way to make themselves stronger, by

 killing their own pack members

As a result, those super-powered Alphas began to follow Deucalion's lead by choice, thus creating a new pack made entirely of Alpha wolves.
In Scott's case, he wasn't an Alpha at first. However, his sheer strength of character convinced other weres, including non-wolf weres, that he was someone who deserved to be their leader. They naturally fell into the habit of following his lead, and as they did so, Scott started to become a "True" Alpha.
I think we can infer from this process, and based on the name they use for it, that the original packs all had True Alpha's as their leaders. The subsequent Alphas killed the original True Alpha pack leaders, but couldn't become True Alphas that way, so the "regular" Alpha was born.
Answer: Sorry man, this show is famous for confusing itself regarding mythology, I don't think you'll be getting any complete answers.
That being said...
I'm not sure what you mean by "original" Alpha, but Peter became Alpha by killing the previous Alpha (his niece).
"True" alpha simply means Scott didn't have to kill anyone to become an Alpha, no other significance to my knowledge.
Comment: I forgot about season 1... jeez was so long ago.
Answer: Laura probably partook in a ritual with hermaphrodite so that she could become alpha when Talia died. Then when Talia died in the fire Laura became Alpha.
Peter became an Alpha by killing his niece, who was the current alpha of their pack.
Derek became alpha by killing Peter.
The Twins also became Alpha's by killing their pack alpha.
Scott became a true Alpha because of his Allies they acted as his pack and looked to him for guidance without him having to assert himself or kill anyone.
Comment: Do you have any evidence for this that you could [edit] in?

How is a pack formed?


Can't achieve 1cm unit scale, it's always larger

Question: I have the default settings for everything, and in the scene I went to set up units to metric, 1.000 and centimeters, but the grids are 100cm large and if I move an object with the snap to increment, it snaps to 100cm moves or 10cm if I snap with the shift button as well. If I set the unit scale to 100.00000, it shows the grids of world much smaller, but when I move the object, it again says 100cm, even though I barely moved the object. I just want it to snap increment to 1cm and for it to really be 1cm.
Answer: Three things to do for precise snapping:

Use Orthographic View, View > Perspective/Orthographic, Numpad 5
Use Top/Side/Front view, View > Viewpoint, Shortuct: ~
Zoom in (grid scale changes)


Do Any of the Puranas mention stories of Asuras overcoming Shiva or Vishnu in a Battle?

Question: Vishnu and Shiva are regarded as two of the ultimate Godheads in Sanatana dharma and they both revered as the Ultimate Vanquishers of Demons. However, Are there any instances in Puranas where certain demons (Asuras) are shown to defeat even Vishnu or Shiva in a battle? If yes, which puranas mention these anecdotes and which asuras are shown to defeat Shiva or Vishnu?
Answer: Yes, There are some Asuras who, in the Purana texts, are shown/stated to have bested either Shiva or Vishnu, or even both in battle.
Here is A list of a few such Asuras.
Daitya Mura
Is said to have defeated Maharudra (Shiva) as per Bhavisya Purana

ब्रह्मकल्पे पुरा चासीत्तालजंघान्वयोद्भवः । मुरो नाम महादैत्यो ब्रह्मणो बलदर्पितः । । 3.4.16.३० ब्रह्माण्डेशं महारुद्रं
महेन्द्रादिसमन्वितम् । स बभूव पराजित्याधिकारी रौद्र आसने । । ३१
During Brahmakalpa, Daitya Mura even conquered the Lord of the
Devatās, Śrīman MahaRudra alongwith Indradi devatas by virtue of
Brahma's boon.
~ भविष्यपुराणम् /पर्व ३ (प्रतिसर्गपर्व)/खण्डः ४/अध्यायः १६

Raktabeeja
Is Stated to have defeated Rudra alongside indradi devas as per Vamana purana.

~ Vamana Purana, Chapter 17
Mahishasura
Is stated to defeat Brahma, Vishnu as well as Mahesvara as per Skanda purana and Devi Bhagavatam.

Formerly there was a notorious Dānava Mahiṣāsura with a huge body in
Kṛta Yuga. He caused terror unto the Devas. He was killed by the
Trident-wielding Goddess. His body was pierced with the spear. It was
this powerful Asura who, in Kṛta Yuga, defeated eleven Rudras,
(twelve) Ādityas, along with the group of (forty-nine) Maruts, (eight)
Vasus along with Moon-god and Sun-god. He defeated Brahmā, Viṣṇu and
Maheśvara. When the terror of the Devas was thus killed in a fierce
battle, Goddess Nandā of wide eyes, after the terrible slaughter, took
her bath in the Hrada (pool).

~ Skanda Purana, Āvantya-khaṇḍa, Revā-khaṇḍa, Chapter 140

1-3. Vyāsa said :-- O King! Mahiṣa seeing the Dānavas afflicted with
grief, quitted his buffalo appearance, assumed a lion form and
spreading this long manes began to roar aloud and fell amidst the Deva
forces; then the Devas were terrified on seeing his sharp nails. That
lion-form Mahiṣa first attacked so severely the Garuḍa with his nails,
that his whole body was besmeared with blood; then he attacked Viṣṇu's
arms with his nails.
4-11. Seeing the Dānava, Vāsudeva Hari raised his discus in anger and
attacked him with great force to kill him. Just when Hari struck the
Dānava violently with his Cakra, the powerful Dānava quitted
immediately his lion-form, assumed the buffalo form and struck Hari
with his two horns. Vāsudeva, thus pierced in his breast with the
horns, became confounded and fled away as best as he could till he
reached his own abode, Vaikunṭha. Seeing Hari thus fleeing away,
Śaṅkara, too, thought him invulnerable and fled to his Kailāśa
mountain with fear. Brahmā, too, fled to his own abode with terror;
but the powerful Vāsava took patience and remained steady in the
battle.

~ Devi Bhagavatam, Book 5, Chapter 7
Tarakasura
Is stated to have defeated Rudra as per Padma purana and Vishnu as per Matsya Purana.

106-108a. However, the missiles did not cling to his body resembling
thunderbolt and a mountain. Then having jumped down from his chariot,
Tāraka, the king of the demons, hit crores of gods with his hands and
kicks. The armies of gods, that escaped being killed, being afraid,
and having given up weapons, fled in (various) directions.
108b. Seeing the gods fleeing, Tāraka said (these) words:

"O demons, do not kill the gods. Tying them, bring them quickly, and show them to Vajrāṅga. Let him see gods."

110-112. Then the demon, being praised by Diti's sons and well-served by the celestial damsels, having tied, in the battle, the
regents of quarters led by Indra and with Rudra, with strong bonds, as
a herdsman leading the beasts, again went, after getting into his
chariot, to his own house, beautified with Siddhas and Gandharvas, and
having a top like the Vipula mountain.

~ Padma Purana, Sṛṣṭi-khaṇḍa, Chapter 42

ततो रथादवप्लुत्य तारको दानवाधिपः। जघान कोटिशो देवान् करपार्ष्णिभिरेव च ।। १५३.२२३ हतशेषानि सैन्यानि देवानां विप्रदुद्रुवुः। दिशो भीतानि
सन्त्यज्य रणोपकरणानि तु ।। १५३.२२४ लोकपालांस्ततो दैत्यो
बबन्धेन्द्रमुखान् रणे। सकेशवान् दृढैः पाशैः पशुमारः पशूनिव ।।
१५३.२२५
Afterwards, Tarakasura alighting from his chariot belabored billions
of Devas with his fists and blows and heels. Then the remainder of the
army of Devas abandoning the field, flew in every direction with
horror. The demon then captured Indra and the Lokapalas and tied down
Keshava (Visnu) etc. as a hunter takes hold of the wild beasts.

~ Matsya Purana Chapter 153
Lohasura
Is stated to have Defeated Narayana (Vishnu) as per Skanda purana.

20-23. On hearing the words of the Devas, Vāsudeva, Janārdana, Keśava
fought a battle with him for a hundred years. Extremely powerful due
to the boon (of Śiva) he vanquished Nārāyaṇa. On being conquered by
Lohāsura, Lord Nārāyaṇa invoked again and again Rudra and Brahmā.
There was another attempt after their consultation as the body of
Daitya Lohāsura became fresh. The next fight between the Daitya and
Keśava was very fierce.

~ Skanda Purana, Brāhma-khaṇḍa, Dharmāraṇya-khaṇḍa, Chapter 29


How to find the variance and bias to obtain MSE?

Question: Considering $MSE[\hat{\mu}|{\mu}*]= Var [\hat{\mu}|{\mu}*] + Bias (\hat{\mu}|{\mu}*)^2$ and the following givens $\hat{\mu}= 112$, ${\mu}*= 112$, ${\mu}_0 = 100$, ${n = 10}$, $\bar{y}=113$, and ${\sigma^2} =225$, how do I determine the variance and bias to get my MSE? Any resources that would help facilitate an understanding of this would be great!
Comment: can you define all of your notation, and possibly remove mentions of things you don't need?
Answer: Bias is the expected difference between your estimate and the true value $\mu*$, variance is the expected squared difference between the estimate and its expectation.


Story/1980s sci fi anthology novel where a man is sucked into another world through a gold painting

Question: The story in question goes as follows: a private investigator is sent to find a missing girl who had a thing for him and was trying to break into Hollywood. He finds a painting of a golden city in her apartment and takes it home. He gets sucked in and is transported to a marvelous golden city where stuff is weird. It's heavily ancient South American inspired with new tech. He finds singer lady there and they go home after adventure. I swear the world/country was called "Medula" or some such similar.
Comment: If it was a rose-red city rather than golden, and it was called Malesco, you might be talking about "The Portal in the Picture" aka "Beyond Earth's Gates" by Henry Kuttner and C. L. Moore, which you might have read in [this 1987 collection](http://www.isfdb.org/cgi-bin/pl.cgi?33117). I don't know if the details match up with your description; it's been a very long time since I read it. You can read it at the [Internet Archive](https://archive.org/stream/Startling_Stories_v20n01_1949-09#page/n8/mode/1up). Is that by any chance the story you had in mind?
Comment: User14111 THANK YOU SO MUCH THATS IT EXACTLY
Comment: The marvelous golden city that is heavily ancient South American inspired with new tech sounds a lot like the eponymous city in Tad Williams' *The Golden City*, book 1 of his *Otherland* series. Maybe you got that mixed up with the Kuttner/Moore story.
Comment: @DracoMundo You're welcome! I've posted that comment as an official "answer". You may "accept" it by clicking on the check mark next to it.
Answer: The Portal in the Picture aka Beyond Earth's Gates, a novel by Henry Kuttner and C. L. Moore, first published in Startling Stories, September 1949, available at the Internet Archive. You might have read it in the 1987 paperback collection The Startling Worlds of Henry Kuttner.
The otherworld city is called Malesco. It's described in the story as rose-red rather than golden. I don't know if there is anything South American about it. The Malescan language is derived from Latin, so there's that.
The hero and first-person narrator, Eddie Burton, is a Broadway actor, not a private investigator. The girl, Lorna Maxwell, is a nightclub singer trying to break into Hollywood.
Eddie did not get the picture from Lorna. He inherited it from his Uncle Jim, who used to tell him bedtime stories about Malesco and even taught him the language:

The air flickered again. I squinted and shook my head. This was getting a little alarming. It couldn't be the Scotch. It never happened outside the apartment. It never happened unless I was looking at that particular wall.
There was a Rousseau picture on it, Sleeping Gypsy, something Uncle Jim had left me along with the apartment. I made a great effort to focus on the blue-green sky, the lion's blowing mane, the striped robe of the black man on the sand.
But all I got was a blur. And then I knew I must be drunk because a sound seemed to go with the blur, a roaring that might have been the lion except that the lion had entirely vanished and I seemed to be seeing a dome of shining rosy-red light that moved like water.

Lorna visits Eddie in his apartment and gets sucked ino the portal. Eddie is suspected of murder but of course they can't find the body. Then Eddie gets sucked into the portal too and finds himself in Malesco, where Lorna has been enhanced and is a big star. After some adventures he returns to New York with Lorna.


How to extract a river profile using specific distance intervals

Question: I'm using QGIS 2.16 and I'd like to extract a river profile from a DEM applying user-defined intervals (e.g. every 100 m of horizontal distance). I get profiles using both the "Profile tool" and the "Profile from lines" SAGA process. However, I cannot control how those profiles are generated.
Answer: If you have a river centreline you could convert the centreline into spaced points using for example the Qchainage plugin to create points spaced at the desired interval.
Then use the point sampling plugin to add the DEM elevations to the points.
Then export the attribute table out into excel or R or somesuch programme and plot the profile.
Be careful of the direction of your centreline so that it calculates the points from upstream to downstream.
Comment: For the creation of points, in processing he can also use OGR: create points along lines or QGIS vector geometry tools: create points along lines or GRASS: v.to.points.


Are drivers part of the operating systems?

Question: I have difficulty in understanding what's included in an OS and what's not. Is a device driver such as a printer driver or graphic driver part of an OS? Thinking about the definition of an OS I believe that drivers are part of OSs.
Comment: Yes and no.  They are a part of the OS in that they operate at a low level and have access to internal interfaces.  And many are critical to the operation of the OS.  But they are generally separate "plug-replaceable" parts, and often built by a different company from the OS.  Depends on your definition of "OS", and there is no single firm one.
Comment: Please define "included".  Guaranteed to be on the Windows DVD for installation on a new drive?  Or conceptually part of the OS?
Answer: Yes, drivers are part of the OS. They run with the same privilege level as the OS kernel, and to write a driver you must know a good deal about the OS internals. The role of drivers is to provide an abstraction of the hardware so applications can use it through the OS API (application programming interface) instead of having to know specific details of it. In many cases it also allows for sharing the same piece of hardware among many applications simultaneously.
Something that misleads users into thinking drivers might not be part of the OS is that many vendors supply drivers for hardware they make separately from the OS. Indeed, many drivers are presented as loadable modules which can be loaded and then take part in the OS dynamically. Once they are not used anymore they can be "disconnected" from the OS and it continues to run normally.
Loadable or not, drivers are always specific to the devices they should make available to the system, so while they are sometimes "optional" parts of the OS, they do take part in it when operating.
Comment: @Luke - Apparently you do concede that the *kernel* is part of the OS, if not the whole OS.  Have you ever seen the **source code** for an OS or kernel?  Unless you work for MS or sign an NDA we'll never see the Windows kernel code.  But the Linux kernel is open source, and all the (non-proprietary) Linux drivers are part of the kernel source code.  The Linux kernel source code is *not* separated into a kernel part and a driver part; the source tree contains core and driver modules all together.  I would expect that MS to handle their source code for Windows in a similar manner.
Comment: I disagree (but will hold off on a down vote), simply because of how you stated it, drivers are NOT always included or used. The operating system is the kernel. Period. Windows Explorer is not part of the operating system, although it *comes with* it. The kernel is the actual processing part, so I would consider that the OS. Other items getting included are not part of the OS
Comment: It's really a yes/no question. While technically drivers are not included with the OS, you will need them for communication with different devices. For example, video. You will make a request to the kernel, then kernel will forward the request to the display driver and then information back so you can actually see something.
Comment: Also, you can run drivers at the user level, so you don't have to run them at the kernel level, although most are.
Comment: I can see your point Luke. There are many optional devices which are not needed for the system to operate, so I can agree their drivers are not part of the OS in *this sense*. Like @Matt said, some drivers can even be user mode drivers (many printer drivers are), but my point is the majority of drivers, specially structural ones (video, disk controllers, etc) are kernel mode drivers, and as such are or become a real part of the running kernel when loaded. Since a kernel can't do anything useful alone, I think it is fair enough to say drivers are (or become) part of the operating system.
Comment: @sawdust I haven't seen the source code to Linux so I can't verify it. That's one reason I haven't down voted this answer though
Comment: The full linux source code can be obtained here: http://www.kernel.org
Answer: The term "OS" can mean many things.
While under most operating systems, the kernel is the piece of code that is managing and "running" everything, and arbitrates accesses to hardware, it usually cannot do anything interesting on its own - its job is to provide a framework for applications to run "on top" if it.  So many people's definition of an OS include utilities, shells, and programs that make up a familiar, standardized environment.
Drivers depend on the kernel, and it's probably most correct to say they "extend" it, like plugins.  Linux supports the notion of "loadable kernel modules" - and all device drivers can be a loadable kernel module.  It is also possible to build a kernel where one or more of these modules is "built-in" and not separate from the kernel.  So you really could build a "moduleless" kernel under Linux, and it would not be able to support any hardware other than the modules you built into it.
I'm less familiar with the guts of Windows, but I believe except for a very few "miniport" drivers all drivers are external files that are loaded on boot.  If you dig a little into creating services on Windows, it seems that drivers are really just special forms of services under Windows.  Some programs install drivers to access hardware on a low level, but not necessarily to drive a device, these are typically the "Non-plug and play" drivers under Device Manager.  Thus it also seems drivers serve the same function conceptually as loadable kernel modules under Linux.
I would for simplicity say they are part of the OS, as they really can't be used without the OS, and aren't useful unless the OS is booted, but the line drawn is rather arbitrary in any case.
Answer: No drivers are not a part of the OS. You can say that drivers helps the OS to communicate with the device or hardware. OS does not contain all the drivers by default like in windows xp and vista but in windows 7 most of the necessary drivers included, so you don't confuse they are not a part of the OS.
Comment: The fact you say drviers are not part of an operating systems proves you don't know what you are doing.  Windows XP includes many of the same drivers that Windows Vista and Windows 7 include.  Microsoft spent a great deal of effort to include even MORE generic drivers for devices for those releases.
Comment: yes. without driver we can not use any device. So we can say that driver helps the OS to communicate with the device and about the question I will say that some are part of the OS and some are not. Ther are lot of drivers that dont come with OS.
Comment: Technically, even when a driver doesn't come with the OS it **is** part of the OS when you install and use it. Proof of it is that a badly written driver can lock up your whole system since it is not a regular application which can be killed by the OS, but a part of itself.


Temperature gradient in body

Question: Is there a Temperature gradient in the human body? especially I have heard that the eye is colder than other places? Is that right?
Comment: Definitely there is not constant temperature throughout the body. Temperature measurements in different places yield variations in body temperature. There's some more info here: http://en.wikipedia.org/wiki/Human_body_temperature
Answer: Whenever you burn yourself, your grandmother will tell you to grab your ear. Your ear is less irrigated than other parts of your body, thus cooler.
Whenever you go to the mountains and you're cold, your extremities will start freezing because the body redirects blood flow towards the inner organs for survival, sacrificing what is not needed.
Generally speaking, it is the density of blood circulating in certain regions which sets the temperature there. For humans, the genital area, the chest (heart) and the head (brain) are the warmest places. The body has a defense mechanism against overheating which is sweating. Above 42 $^{o}C$ your proteins would denaturate and you would likely die.
The eye needs little irrigation to function, so I can easily imagine it is cold. African elefants have gigantic ears because they direct blood flow towards their ear to cool down their body. Dogs stick out their tongue out because they have no other mechanism to cool the body.
Bottomline is : yes, there is a complex temperature gradient in the human body.
Comment: Is there a natural refrigerator to cool eyes?
Comment: Well the whole body's refrigerator is heat loss through your tissues. If this is not enough, you start to sweat to take away even more heat. If in a sauna, your perspiration is not enough, and that's why you cannot handle it any longer than, say, 20 minutes. In your brain, there is a massive blood flow + electric activity and hence is warm. The heat will be dissipated through your neck and skull. I guess they eye is simply colder because there is less blood flow and activity there.

Temperature gradient in body


if author meta is empty

Question: i am developing a multiauthor website using wp. I want to out put author meta in the single page. The output is working fine but to make it better, i want to output something else if the field is empty, especially for field that is not required such as website, twitter or facebook.
Basically i use this to output the field:
Website: <a href="<?php the_author_meta( 'website' ); ?>" target="_blank">

What i want to do is if the author don't have any website, so i want to output something like "No website"
How to do this?
O yes, by default this field in wordpress is not empty, it just have content like "http://"
Answer: <?php if(get_the_author_meta('website') != 'http://'): ?>
Website: <a href="<?php the_author_meta('website'); ?>" target="_blank">

<?php else: ?>
No website
<?php endif; ?>

if author meta is empty


is it possible to have the full code instead in the comments.php page

Question: I strongly need to edit some parts of the comments left by the users, I want to add a link to the commenter's author.php page if he/she is a registered user by placing a text link somewhere next to his/her name.
I've this code <?php wp_list_comments(); ?> but I wonder if it's possible to have the full code instead to replace it in comments.php
Thanks!
Answer: This function replaces the comment author's link with the comment author's profile page,
if the comment author is a registered user. Otherwise, the standard WordPress comment
author link is displayed.
This function is not mine and has been found googling.
function graphene_comment_author_profile_link(){
    /* Get the comment author information */
    global $comment;
    $comment_ID = $comment->user_id;
    $author = get_comment_author( $comment_ID );
    $url    = get_comment_author_url( $comment_ID );

    /* Return the default WordPress comment author link if comment author is not
    a registered user */
    if ($comment_ID == 0){
        if ( empty( $url ) || 'http://' == $url )
            $return = $author;
        else
            $return = "$author";
    } else {
    /* Return the link to the comment author's profile age if otherwise */
        $return = ''.$author.'';
    }

    return $return;
}
add_filter('get_comment_author_link', 'graphene_comment_author_profile_link');

Answer: the function wp_list_comments() has a 'callback' parameter; using a callback function should allow you to edit the code as you described.
for example see in the default theme Twenty Eleven how it is used;
in comments.php:
        wp_list_comments( array( 'callback' => 'twentyeleven_comment' ) );

the actual functions code is in functions.php, starting with:
function twentyeleven_comment( $comment, $args, $depth ) {

Comment: Thanks Michael but I found a function that makes the name of the registered user linking to his/her profile without modifying anything else.


Proof of Autocorrelation function property

Question: I am trying to intuitively make sense of a specific property of the autocorrelation function:
$$ \lim_{\vert\tau\vert \rightarrow \infty} R_{XX}(\tau) = \bar{X}^2 $$ where $\bar{X} = \mathbb{E}[X(t)]$ is the expected value of the random process $X(t)$. Here, $X(t)$ is ergodic in nature and has no periodic components. Can anyone help me prove this mathematically, without using the power density spectrum function?
Answer: A very hand-waiving but still could be powerful way of visualizing this property could be to list that:
$$ \mu_x(t)=E[x(t) ]=\lim_{T\to\infty}\frac{1}{2T}\int_{-T}^{T}x(t) dt=\widehat{\mu_x(t) }$$
for ergodic processes. And when the autocorrelation is concerned:
$$R_{xx}(\tau) =E[x(t) x(t+\tau)]\implies \lim_{\tau\to\infty}E[x(t) x(t+\tau)]=E[x(t)]E[x(\tau)]=\left(\widehat{\mu_x(t) }\right)^2$$
as tau goes to infinity, $x(t)$ and $x(\tau)$ tend to be independent hand-waivingly while we are not talking about periodic processes. And that simply becomes the square of the mean.


What are the resonating structures of toluene?

Question: I initially made the resonating structures by first converting toluene into a toluene carbocation. But the resonating structures of a neutral molecule should be neutral. So what are the correct resonating structures of toluene?
Answer: The resonances in toluene should be roughly the same as in benzene, because it is hard to believe that no bond or a double bond may occur by resonance between the phenyl cycle and the methyl group, whatever the situation in the rest of the molecule.
Answer: The motion of electrons inside the benzene ring is a component of the resonance structures in toluene. Toluene contains a methyl group (-CH3) attached to the benzene ring. The benzene ring's pi electrons are uniformly distributed in the major resonance structure, resulting in an arrangement of alternating single and double bonds. As a result of the electron density delocalization, a more stable configuration is produced.
The double bonds are displayed around the benzene ring in various positions in the minor resonance structures. These structures however, add less to the overall picture of toluene and are therefore less significant. The electrons in the pi bonds are distributed throughout the whole benzene ring rather than being fixed in one place, which results in a more stable and even distribution of electron density.
Toluene is a combination of all these resonance structures. The molecule's nature can be described as a resonance hybrid, as the electronic structure is a combination of these forms.


Which one is the common wire on this 3-way switch?

Question: I'm unsure which is the common post and which are the travelers. I THINK the common is the black post on top... but I really don't know. I though the travelers were parallel to each other. Can you tell from the pictures which one is the common wire?
Comment: Focus on the color of the screws.
Answer: Black is the common.
This can be confirmed with a multimeter on an unconnected switch. Testing for resistance, there should be infinite on the two brass terminals regardless of the switch position. The connection between the black and each brass should change from infinite to direct connection with the flip of the switch.
Answer: The common wire is associated with the differently colored screw on a 3-way switch, so it's the black screw in your case.  (Ignore the green ground screw, of course.)
Answer: As others suggested, and in accordance with your situation, the black is the common wire, and the red is the traveler wire (assuming this is for a three way switch).


What does the information on DSLR lenses mean in terms of filmmaking?

Question: What does the information on DSLR lenses such as the mm range and the f/stop mean in terms of filmmaking, specifically relating to depth-of-field.  Lenses are the only aspect of filmmaking I don't understand and I want to be able to make informed decisions about them.
Answer: They mean the exact same thing they do in the photography context.  The mm measurement is the focal length.  It determines the angle of view the lens produces (ie, how "zoomed in" it appears.)  Lenses with a range are zoom lenses where the angle of view can be adjusted.  "Zoom" is otherwise not a meaningful thing.  Optically, zoom just means you can change the focal length.  The x numbers associated with consumer zoom lenses are meaningless as they just describe the relationship between the smallest and largest focal length, not how much magnification a lens provides.
f/ numbers are measurements of how far the aperture of the lens can open.  The smaller the number, the more light the lens lets in and the smaller the depth of field is.  If there is a range of f/ numbers, it means that the lens' maximum aperture (the smallest number it can go to) changes over the focal length range of the lens.  Generally, the largest aperture (smallest f/ number) will be at the wide end (the smallest mm number) and the smallest (largest f/ number) will be at the telephoto end of the lens (largest mm number).  This can actually be a desirable feature to have on lenses used for video as it allows for smooth lighting and depth of field adjustments on the fly without needing to use third party firmwares to make smooth adjustments from the camera.
On many modern lenses, the f/ selection is done on the camera and the aperture is electronically adjusted.  There are, however, lenses that include manual aperture rings that include both notched and unnotched aperture values (ie, they either move freely between different aperture values for smooth adjustments to aperture (sometimes called iris in video) or to be able to precisely select specific values.
Note that most photographic zoom lenses will not exactly hold focus as you zoom (parafocal), so that is also something to be aware of when zooming optically with a photographic lens.  This is also a big part of why cinema lenses (which are parafocal) cost so much more than similar quality photographic lenses.  You can do just fine using a good photographic lens that is nearly parafocal, you just need to remember to make focus adjustments along with your zooms.
Comment: @curious_cat - yes, there is one ring for focus and another for zoom.  Autofocus doesn't work when shooting video on a DSLR unless it has a hybrid sensor with PDAF capability on the imaging sensor.
Comment: I have two follow-up questions. First, what is the difference between focal length and zoom?  Secondly, on most lenses there is two controls, one for zoom and one for focus.  How would you control the f/stop, is it an internal camera setting or am I missing something on the lens?
Comment: Updated my answer to reflect those additional elements of the question.
Comment: @AJ Henderson: Naive question: As a point-n-shoot user I think of zoom & focus as unified because I don't have a seperate "knob" to do each. i.e. Usually I zoom & the camera autofocuses. On  DSLR's I've mostly used the ring to zoom & let the camera autofocus. But when you write "you just need to remember to make focus adjustments along with your zooms" I'm wondering, do DSLR's come with independent, manual adjustments of zoom & focus?


Wordpress staging environment

Question: I work for a company that does sites for the pharma industry and we often need to get legal approval before we push any changes live. So, I'd like to migrate a lot of our work to a CMS environment, specifically wordpress but we need the ability to have a staging environment. Is it possible to instead of publishing a page have it publish to a staging environment that someone can browse as with a link as a site. So basically have 2 sites, one staging one live?
Comment: I voted to close this question because it is not a programming question and it is off-topic on Stack Overflow. Non-programming questions about your website should be asked on [webmasters.se] and questions about WordPress development and administration should be asked on [wordpress.se]. In the future please ask questions like this in one of the more appropriate places.
Answer: Generally speaking other "answers" here are correct, there are alternatives to WordPress that have better built-in support for staging environments and build migrations.  However the suggested alternatives aren't exactly equal substitutes to the WordPress platform, so I think it's best to answer the question at hand instead.
WordPress does not natively support hosting the same site from two different hosts.  The core relies on absolute URLs stored inside the database and are used in just about every aspect of the core logic.  This results in a number of superfluous bugs like the 500 or so related to SSL access because they try to dynamically alter all http:// schemes to https:// on the fly.
As a result when you host on dev.example.com and migrate to staging.example.com and again to www.example.com you have to do very careful search & replace manipulations on the database export each time you switch hosts.  And this causes additional problems when you find out that many popular WordPress plugins serialize the URL into values in the database.  So when you search & replace dev.example.com with staging.example.com the serialized data which contained the character length of the original value no longer deserializes with the new longer format.  Some core contributors believe the solution to this later problem is to only ever setup staging sites with the same number of characters as the production account...
In a similar vein they also suggest swapping host mappings and only ever using the production.com URL on all hosting environments.  Depending on your particular use-case requirements this is probably not a valid solution if you need to provide access to off-site clients, tech-illiterate users (versus tech-literate users of course.)
But WordPress itself has a number of great features otherwise and is a very adaptive and powerful rapid development platform.  As a result you can extend the core framework to do much of what you need from it.  When I was presented with this situation, I had to develop a solution that was viable for all circumstances.  Traditionally this problem is solved with root-relative URLs, they work in cross-hosting environments, and they don't suffer from scheme changes, port changes or subdomain swapping practices that are common with staging migrations.
With this plugin: http://wordpress.org/extend/plugins/root-relative-urls/
(biased? yes, I wrote this plugin.) you get root-relative URLs where it's important and dynamic hosts where root-relative URLs don't work (like rss feeds.)  All that remains from migrating the site to different hosts is to move the wp-config.php file outside of the www root (one level up is supported natively by WordPress.) so you can maintain different copies on different servers.  Or alternatively you can use basic if-statements to distinguish hosts by server name and define key WordPress constants based on the server.  In the end your content, code & data will transition seamlessly.
As a note of concern, the referenced plugins require setting write access to the wp-config.php file, a very bad practice from a security perspective for production or publicly accessible servers.  Perhaps you can comfortably implement this in a restricted staging environment but then you'd need to disable and remove the plugin in production transitions.
Long story short, yes you can host WordPress in multiple host environments.  The long-touted solutions are very case-specific and option-restricted because of the core architecture.  But the framework is flexible enough to overcome the core deficit.  This core design decision will probably change at some point in the future given the amount of effort the core developers continually spend on overcoming the cascading issues.  But there are also devout defenders of the absolute URL religion that will keep the practice in place for the time being. Maybe a different platform that supports server migrations natively (pick just about any of them because most do) would be a better option for you now.
Answer: It's possible: Take a look at this Github Gist to see an example on how to switch environments with your wp-config.php file. Furthermore, take a look at wordpress.stackexchange to see some other Qs about this that give you a more in-depth look at the stuff you should consider.
Answer: I think that you can try to use some plugins.
For example (fast search on official wordpress plugin repo) wp-deploy or Dev and Staging Environment Plugin (maybe outdated).
Or as alternative you can try to use different wp-config.php files - one for production and one for dev environment and switch them by checking requested url.
Answer: Greg,
An even better CMS with staging environment would be Silverstripe (silverstripe.org). This cms allows for you to browse an entire staging site.
Comment: I agree with this. Silverstripe is a great CMS and more to the point if you're creating websites you should use a CMS not blogging software.
Answer: If you need to use WP, and need to publish only one or several pages from staging to live site, why not implement kind of tag on pages that needed to be published (seen by live site visitors)? Simple tune up your templates to display tagged or not pages and you're done! Then you can use only one site and maintain both public-available and not-approved pages on the it.
You can as well maintain local copy of your site (stage) and have some script to upload it (at whole) to your hosting - easy to automate task. In such a case, you may want to consider render the whole site into HTML pages and upload (simple rsync) this HTMLs to hosting - the live site will be hard to break as no dynamic script will be there!
But maybe you really should not choose the WP? There are a lot of CMS that support write-approve-publish scheme.
Answer: You can create a WordPress Staging environment with just two click with the help of this plugin: https://de.wordpress.org/plugins/wp-staging/
Disclosure: I am the author of this plugin. So ask me anything about it.

Wordpress staging environment


Where do I find a picture I sent from messages app as MMS?

Question: I took a picture of a tracking number receipt and sent the text message. Now I can't find the picture of the receipt. How do I find it? It's not in gallery.
Answer: If you're using the Google messages app, then the picture wouldn't automatically be saved to your gallery app, rather, it stays in the messaging app.
Open the messaging app, find the person you sent the message to, and the pictures should be there. If you deleted the picture, then it's fully deleted and the only way to recover it, would be by using some picture recovery method.
If your phone is rooted, you can double check in the directory where all SMS/MMS are stored, it might still be there. This would be under /data/data/com.android.providers.telephony/databases/mmssms.db


If a gas is pushed through a widening section of a pipe with a piston, will the pressure increase?

Question: Imagine I have a section of pipe that increases in cross-section at some point. If the gas in the pipe before this section is being displaced with a piston, will the gas increase its pressure and reduce its velocity while going through increasing area, or will it maintain its velocity and pressure at expense of energy delivered by the piston?
Comment: Consider the expression for pressure losses in a pipe: it has an L/D term so diameter does have an effect Check out ConDi nozzles (Convergent / Divergent)...
Comment: The source of energy input is irrelevant unless you are actually pressurizing the system because the piston moves faster then materials exit the system.  In general, it's safe to say that increased velocity equals decreased pressure, and vice versa.  And there is no way in a steady state system for velocity to stay the same for varying pipe diameters.
Comment: i had this realization yesterday. The velocity has to drop in order to maintain the same flow. Therefore to maintain energy the pressure will have to increase to maintain energy. For it to do otherwise would be the opposite of acquiring energy. Sometimes when you look at formulas you lose the intuitive understanding
Answer: I'm going to assume the piston is moving subsonically here (since you indicated velocity decreases with increasing area).
The key here is that the end of the pipe is not a closed boundary, so the piston is not compressing the gas or doing work in the sense of $P \Delta V$. As long as the flow is subsonic and not choked via a constriction, pressure will not build up at the piston end because pressure waves will propagate downstream faster than the flow. The piston is still adding energy to the gas, so total (stagnation) pressure would increase, but the static pressure would not. So the piston is imparting kinetic energy to the gas, but I would treat this as a boundary condition, not an energy input, such that $v_{piston} = v_{i, gas}$. From conservation of mass, and neglecting losses, the velocity of the gas everywhere in the straight section of the pipe would equal the piston velocity.
Again neglecting pressure losses in the pipe and assuming an isentropic expansion at the cross-sectional area change (as opposed to a sudden step with pressure loss), the expansion of the subsonic gas would lead to a decrease in velocity and increase in static pressure.
Answer: See the gas law. The pressure x volume / temperature remain constant. For the speed component see the kinetic theory in the wiki article.
https://en.wikipedia.org/wiki/Ideal_gas_law
Comment: you're missing the motion of fluid here.
Comment: The speed of the gas is a consequence of the pressure difference. So no speed without pressure difference. Assuming that no energy is lost, the pxv / t value remains constant. If the piston is moved back again, for example by an external energy source, the original tooth setting can be reached again.


How to tell which variable is perfectly separated in R

Question: I am running a logistic regression model in R using glm. I received a warning that complete separation occurred. How do I determine which variable is causing this? R doesn't tell you what variable is the issue.
Comment: There might not be any single variable that, by itself, causes the problem.  How you approach this question therefore might depend on how many variables are involved in the model: with just a few variables you can explore all subsets of them; but with more you would need a better approach.
Comment: $10$ is small enough that--provided you don't have a huge number of observations--you could simply loop through all nonempty subsets of the variables to see which combinations create perfect separation and which do not.  Focusing on just the larger subsets might be good enough to characterize what's going on.
Comment: There are 10 variables in the model. I've been debating using the logistf package to perform a penalized version of logistic regression.
Comment: There is no reason to close this. It's not about R, it's about statistics.
Answer: The brglm2 package provides pre-fit and post-fit methods for the detection of separation and of infinite maximum likelihood estimates in binomial response generalized linear models - see the functions detect_separation() and check_infinite_estimates(), which are discussed at https://cran.r-project.org/web/packages/brglm2/vignettes/separation.html.
For an example of using the brglm package and eponymous function to address complete or quasi separation, see  https://bscheng.com/2016/12/11/modeling-completely-separated-data-in-r/. This link on brglm may also help: http://www.wekaleamstudios.co.uk/posts/logistic-regression-and-bias-reduction/.
Comment: Although implementation is often mixed with substantive content in questions,
we are supposed to be a site for providing information about statistics, machine
learning, etc., not just software. It can be good to provide information on software packages, but please
elaborate your substantive answer in text well enough that people who don't use R
can recognize & extract the answer. Eg, what is it that these functions are doing such that they can provide an answer?


SO and Meta SO do not link to each other at the top

Question: Unlike the other domains, the two following sites do not have a meta/parent cross-link at the top of the page:
https://meta.stackoverflow.com/
https://stackoverflow.com/
It'd be nice to have a consistent interface. At the top is a good place.
See also:
Easy navigation between meta and "parent" site
Comment: Now this is [status-completed] we'll get the questions asking why the rep here is different to the parent site.
Comment: Related: http://meta.stackexchange.com/questions/55778/migrate-questions-from-meta-stackexchange-sites-to-meta-stackoverflow-com/55780#55780
Comment: Yay - http://meta.stackexchange.com/questions/63169/why-doesnt-reputation-from-stack-overflow-trickle-to-meta
Answer: Update
It looks like this has been changed now. Now there is a parent/meta link between Stack Overflow and Meta Stack Overflow.
My original answer remains below; I still hold the same perspective.

This is primarily because Meta Stack Overflow does not have a direct Parent/Meta relationship with Stack Overflow, like what the rest of the site pairs have.
Meta Stack Overflow, while it serves in the stead of Stack Overflow's meta site, is also the meta site for the Stack Exchange Network as a whole. One could envision it as Stack Overflow Internet Services Inc.'s Meta. This is why it gets its own special Meta link in the footer, unlike every other Meta site.
It is also mechanically different - it does not carry over reputation from Stack Overflow and operates basically as its own independent site. So ultimately, creating a faux parent/meta relationship would be misleading.
Comment: and I was wondering what took you so long to post your dupe-link :p
Comment: I've been thinking that MSO should perhaps be renamed, because of the kind of confusion to new users that this question illustrates... not sure if it would be more trouble than it's worth.


SpatialPolygonDataFrame to raster while keeping categorical values

Question: I have a SpatialPolygonDataFrame which I need to convert to raster in R while keeping the categorical values of the polygon. I have tried various approaches but I have always either lost the values or converted them to numerical, which is not what I want. Can anyone help?
Answer: Factors are stored as numbers, so a raster of categorical values is just a raster of numbers with a lookup-table for the labels (which is the same as a standard vector of factors in R).
To do what you want using modern R spatial classes, use sf and terra:
 library(sf)
 library(terra)

Read the shape:
 sh = st_read("./kasanka habitats.shp")

The "Coverage" variable (which I think is what you want to rasterize) is character at this point so we convert it to factor:
 sh$Coverage = as.factor(sh$Coverage)

create a basis for rasterizing based on the extent of the shape:
 y = rast(ext(sh),200,200)

now rasterize:
 tsh = rasterize(as(sh,"SpatVector"), y,field="Coverage")

and plot:
 plot(tsh)

Note this is still a raster of numbers, so if you try writing it to some file format you might lose the labels.
Answer: Here is Spacedman's solution using a more direct path
library(terra)
sh = vect("./kasanka habitats.shp")
y = rast(sh, 200, 200)
tsh = rasterize(sh, y, field="Coverage")


How do I show that the following map establishes a bijection between $\mathbb Q$ and $\mathbb Z \times \mathbb{Z}_{>0}$

Question: Define $$f:\mathbb Z \times \mathbb{Z}_{>0} \to \mathbb{Q}$$ by $$f(p, q) = \frac{p}{q} $$
Edit: Is there an explicit map then that is a bijection?
Answer: It doesn't; $f$ is not injective:
$f(2, 4) = \frac{2}{4} = \frac{1}{2} = f(1, 2)$
Answer: You asked for an explicit map that is a bijection.
The map $f$ that you've defined is a surjection, but it's not injective.  How can we make it injective?  Well, we first construct a bijection $g$ from $\mathbb Z_{>0}$ to $\mathbb Z\times\mathbb Z_{>0}$
\begin{align}
\color{#c00}{g(1)=}(0,&1)\\
\color{#0a0}{g(2)=}(-1,&1)\\
\color{#0a0}{g(3)=}(0,&2)\\
\color{#0a0}{g(4)=}(1,&1)\\
\color{#00a}{g(5)=}(-2,&1)\\
\color{#00a}{g(6)=}(-1,&2)\\
\color{#00a}{g(7)=}(0,&3)\\
\color{#00a}{g(8)=}(1,&2)\\
\color{#00a}{g(9)=}(2,&1)\\
g(10)=(-3,&1)
\end{align}
Can you see how the pattern continues?
Now $f\circ g$ is a surjection from $\mathbb Z_{>0}$ to $\mathbb Q$.  How do we convert it into a bijection?  Define a function $h\colon \mathbb Z_{>0}\to\mathbb Z_{>0}$ by
$$
h(n)=\min\{m\colon\textrm{ There exists a sequence }m_1<\dots<m_n=m\textrm{ such that }\\f(g(m_1)),\dots,f(g(m_n))\textrm{ are distinct.}\}
$$
Exercise: Show that $f\circ g\circ h$ is a bijection from $\mathbb Z_{>0}$ to $\mathbb Q$.
Then our required bijection from $\mathbb Z\times\mathbb Z_{>0}$ to $\mathbb Q$ is given by
$$
f\circ g\circ h\circ g^{-1}
$$
This should illustrate the general point: bijections from $\mathbb Z$ (and similar sets) to $\mathbb Q$ exist, but in general they are difficult to construct, they don't have nice formulae and they aren't intuitive.


Implied interest rate from FX swap

Question: This is not homework. I am trying to calculate the implied interest rate of one currency (C2) using an FX swap and the interest rate of another currency (C1 - base). I have the following:
Spot: 7.7587 (C2 per unit C1)
Buy Notional (spot) C1: 12,888,757.14
Sell Notional (spot) C2: 100,000,000.00
Start date: 6-May-13
End date: 7-May-14
Buy Notional (forward) C2: 100,000,000.00
Sell Notional (forward) C1: 12,905,390,58
Forward FX rate:  7.7487
I have a borrowing in C1 for 0.9650% for the year.
Using interest rate parity:
$$ F_0 = S_0 \frac{1+r_{C2}}{1+r_{C1}}  $$I solve for $ r_{C2} = 0.8349\%$.
However, I am told that the right answer  is $0.8486\%$. Which should be the implied interest rate in currency C1. Am I crazy or missing something?
Do I need to consider FX basis?
EDIT
If I use ACT/360 for C1 and ACT/365 for C2 with $ACT=365$ I get actually pretty close $(0.8483\%)$. Is that it? Is the difference caused by daycount?
C1 is USD
C2 is HKD
(I believe these are the correct day-count convention based on a paper by UBS). Not sure where to find the "official" declaration.
Comment: well, its impossible to say if you dont tell us which day count conventions must be applied. The question, wherever it is coming from should make a mention of that.
Comment: Apologies. I clarified the currencies in the edit.
Answer: Because the day count of your inquired date is 366 days:

Hkd daycount is act/365 therefore 366/365
Usd daycount is act/360 therefore 366/360

$$
\frac{7.7487}{7.7587} = \frac{1+r_2(\frac{366}{365})}{1+0.00965×\frac{366}{360}}
$$
Solving for $r_2 = 0.8486$.
Comment: Awesome! How did you find out the conventions? Thanks.

Implied interest rate from FX swap


Ordinary Lines in $\mathbb{R}^2$ and Other Fields

Question: Suppose that we are given a bunch of points in $P \subseteq \mathbb{R}^2$which are not collinear. We say that a line is $k$-rich if it goes through $k$ points. If $k=2$, then we call the line ordinary. How would we determine the number of $k$-rich lines in $P$ if $k \geq 2$? Also what happens if we replace the parent field with $\mathbb{C}$ or another field? Do Hasse Diagrams come into play at all?
Answer: One way is to choose every pair of points, compute the line between them, and see how many other points are on that line.  If the answer is exactly $k$, increment our counter by one.  When we are done, divide our counter by ${k\choose 2}$. This method works equally for any field.


Fill the magic 4 x 4 square

Question: Following question is courtesy to Mathex Exam: 1984
Given a 4 x 4 matrix, we need to fill in crosses at 10 out of 16 places such that each row and each column has an even number of crosses.
Comment: I think I've asked a similar puzzle in the past. Need to find it...
Answer: I believe this is a valid solution:

  X X X X  X X  X   X  X     X

Brief explanation:

 As the OP noted in their answer, we must have a (4, 2, 2, 2) distribution of crosses among both the rows and the columns, otherwise there must be at least one row or column with an odd number of crosses. So we fill the first row and column with all Xs, leaving us with 3 crosses which we can place in the remaining 3 x 3 empty grid such that each cross is in a unique row and column. The solution above is one way to do this.
Comment: Ah, you beat me to it. I didn't see your solution when I submitted mine. +1
Answer: It is fairly straightforward to deduce a solution.

 10/4>2 so there has to be at least one row with more than 2 crosses. To be even, it must be a completely filled row. The same goes for a column.

If you permute the rows of a solution it remains a solution, and similarly you can permute columns.

 So we can assume without loss of generality that the first row and the first column are completely filled. This uses 7 of the crosses, so we have 3 remaining. Rows 2-4 and columns 2-4 all need an extra cross (since they are odd). The easiest way to do this is to fill the diagonal, and this solution is essentially unique up to permutation of the rows or columns.

 x x x x
 x x . .
 x . x .
 x . . x

An alternative is to start with a filled grid, and then place the 6 blank spaces, also using an even number in each row and column.
Answer: This pattern is only almost exactly the same that HTM and Jaap already posted, but the approach may be of some interest. Or then again, it may not :-)

 X X
 X X X X
   X   X
   X X

To find this solution, I first flipped the puzzle over: a full grid satisfies the parity condition, so instead of 10 crosses, we can just do the puzzle with 6. Any solution for 6 will automatically work for 10 as well: the 6 crosses will be the "holes" in the final solution.
Then I picked the shape of a deadly sudoku pattern with 6 cells, because those very often come with row- and columnwise paired squares. By chance, I happened to pick one that didn't produce the exact shape the others had.
And apart from choosing how to stretch that pattern to aesthetically fit it onto the 4x4 grid, that was pretty much all of it.

Fill the magic 4 x 4 square


How to deal with unreferenced pages but exists in sitemap

Question: Is it OK to have pages that are not referenced by any anchor links, but they do exist in the Sitemap file? Will Google penalise this behaviour or consider this as spam site?
Comment: This is precisely what a Sitemap is for. To allow Google to find hard to reach pages.
Answer: That is fine. It is not always possible to link all of your pages. I have almost 600,000 pages not linked except with cross links between some of them. They are all in the sitemap. Google and Bing are fine with this. They have to be. They do not write the rules for the web.


Basepage not showing

Question: I recently installed civicrm on a wordpress install. I followed the installed and went through the installation. I thought I would see a log in page for civicrm on the /civicrm link. I am seeing a page that outlines that it is coming from civicrm, but no content. How do I see a way for users to log in and use the database?
Answer: User management is handled thru the CMS so the login will be at example.org/login if you've not altered the login URL. Users will need at minimum the access CiviCRM backend and API permission to see CiviCRM on the Wordpress admin menu on the left.

The base page by default is "/civicrm" but this is for natively displaying contribution/event pages and other dynamic content from CiviCRM.

Basepage not showing


Client async call to WCF service

Question:
Possible Duplicate:
Accessing PerSession service simultaneously in WCF using C#

I have implemented a c# wcf service which has method s1 and method s2. method s1 is the main process that does the processing and method s2 is a secondary method that keeps track of the method s1 status based on two static int variables(total,current).
total ----> indicates the total number of tasks.
current-----> indicates the current task that is being processed.

I have also created 3 c# clients that calls the web service asynchronously. these below mentioned are the client methods.
client1: c11,c12
client2: c21,c22
client3: c31,c32

all these 3 client methods make calls to the service parallel. So now my problem is as the 2 variables total and current are static variables. when all the three clients are calling the service at the same time the total and current values are being mixed up instead of being separate for each client.
example in a normal eligible scenario they are supposed to be like this:
client1: (total,current)------>(3,1)(3,2)(3,3)
client2: (total,current)------>(2,1)(2,2)
client3: (total,current)------>(4,1)(4,2)(4,3)(4,4)

but now i my regular scenario i am getting the values all mixed up as the total variable value is not supposed to be changed for any client it is supposed to be the same. as these two variables total and current will be accessed all over my wcf application and will get modified i made them as static in a class so that they can be made as global and can be accessed by the class name where ever i want in the wcf program. So i am unable figure it out how to solve this can any one please help.
Answer: Essentially the service is its own instance per client. With ConcurrencyMode, you can adjust this.
Take a look at this http://msdn.microsoft.com/en-us/library/system.servicemodel.servicebehaviorattribute.concurrencymode.aspx

Client async call to WCF service


ASP.NET: How can I show a loading image when my page performs stored procedure?

Question: I have a page I'm working on and it works correctly in the sense that I press a button and it executes a stored procedure.  The problem is the stored procedure takes awhile to complete, and I want the user to know that there is progress being made and that it's not stuck.  So is there a good method to give the user some idea of the progress being made? I was going to just simply display an animated gif, but not sure how to do this. Or if there is a more preferred way to do this I'm all ears. Thanks!
Answer: Generally it is a bad idea to have a website command take time, but when you have to Microsoft have an Ajax library which works with ASP.Net - this includes a Progress bar control which can appear when you are doing a long task
The site for the ASP.Net Ajax can be found here; http://www.asp.net/ajax
The Ajax Control Toolkit which includes the progress indicator is here; http://www.asp.net/ajaxlibrary/act.ashx
Answer: If you do an AJAX call you can use jQuery to show a loading graphic.  See this post How to show loading spinner in jQuery?
Answer: Yes, you can definitely use an animated .gif to display to the user while the stored procedure is executing. You'll want to use ASP.NET AJAX to accomplish this, specifically using UpdatePanel and UpdateProgress controls.
View the following URL which guides you on implementing the UpdateProgress control: http://www.asp.net/AJAX/Documentation/Live/mref/T_System_Web_UI_UpdateProgress.aspx
The section on "Specifying the Content of the UpdateProgress Control" talks about using the ProgressTemplate to show an animated image that notifies the user of the progress on the page.
--Tyler


how to get .mobileprovision to build phonegap iphone app at windows?

Question: I'm using windows 8 to building applications with phonegap,
every thing is good except building apple application at:
https://build.phonegap.com
this appears:
phonegap build "no key selected"
how to get the key or .mobileprovision file?
Answer: You have to create them on https://developer.apple.com/, as AJD mentioned.

Go to your Apple developer portal
Click Devices to register your iOS device. You need to connect your device to iTunes to obtain your UUID
Click Certificate
Create a certificate for Production (to use PhoneGap Build, otherwise Development)
Download the certificate
Convert the certificate to a p12 file (See the screenshots below) - Double-click the .cer file to open it in Key Chain Access. Then click My Certificates under the category, Ctrl-click the certificate and export. When you save the .p12 file, you are asked to create a password that you will need later.
Create a provision file on Apple developer portal, then download. Again, to make this work on PhoneGap Build, you need one for Distribution, otherwise Development.

Actually, I blogged about it because using PhoneGap Build is not as easy as it should to develop iOS apps.
http://www.pubnub.com/blog/converting-your-javascript-app-to-an-ios-app-w-phonegap/
I know this question is made a year ago, but I hope this helps to everybody who has the same question.
Answer: You create and download the provisioning profile and an associated certificate on the Apple developer site.
Go
https://developer.apple.com/
Go member center > manage certificates and profiles...
A valid provisioning profile is connected to a valid distribution certificate.  You will need both active.
Answer: Building for iOS
We're now able to offer support for building to iOS devices through Adobe® PhoneGap™ Build. The process for completing iOS builds is slightly different than that for other platforms: all iOS builds need to be signed by a developer certificate and a provisioning profile, that is tied to your Apple developer account and the device you wish to test on. This document covers how to set this up.
Note: Since PhoneGap Build uses Apple's standard development process to build applications, you will need to sign up for their developer program to build iOS applications on PhoneGap Build. You will also need a Mac to configure your certificate and provisioning profile.
When you upload a new application to PhoneGap Build, if you don't have a default certificate-profile pair attached to your account, you will be alerted that the iOS build can not be completed:
iOS Key Required
Your key will actually consist of two files: a certificate and a provisioning profile. Apple has extensive documentation for setting up your environment locally: the best approach is to ensure you can build an iOS application to your iOS device locally, to be sure that both your certificate and your provisioning profile are set up correctly for code signing.
Once you have these set up, you can export them for upload to PhoneGap Build. For the provisioning profile, you will need a file with the mobileprovision extension, which looks like this:
Provisioning Profile in Finder
Ensure that this provisioning profile is correctly paired with the device(s) you wish to test on.
Note that when you create your profile, you will specify the App IDs that are linked to the profile. This is important when using PhoneGap Build: the package name you specify for your app, in your config.xml (the id attribute of the widget element) or through the Edit App page, will have to match the ID for the provisioning profile. If they fail to match, your app will not be built correctly.
Apple appends a "Bundle Seed ID," or "App ID Prefix," to the provisioning profile when you generate it through the iOS Developer Center. Note that you do not to include this App ID Prefix in your config.xml for PhoneGap Build to build successfully. You just need the reverse-domain style Bundle Identifier - com.domainname.appname. This will also be best compatible with building for other platforms.
To prepare your certificate, you will need to open the Keychain Access utility on your Mac, and identify the certificate that you use for iOS development. Right click on that certificate and select Export ...
Export from Keychain Access
Save the certificate in a location you can remember, and enter a password. Remember the password: you will need to give it to PhoneGap Build, otherwise we cannot use your certificate.
Enter Certificate Password
Now back to the website. On the app detail page, simply select the "new key..." option from the signing key dropdown for the app in question, and then, from the list of platforms with signing available, hit add a key for iOS. Fill out the form: add your p12 certificate file and your mobileprovision file, and enter the password associated with your certificate.
Add Certificate to PhoneGap Build
Once your key is added, we'll attempt to rebuild the application for iOS. If all goes well, you should see a link for the built ipa file available.
You can then download the ipa file and use iTunes to install it directly on your provisioned iOS device.
Happy building!


Story about a girl surviving a nuclear bomb in an isolated rural town

Question: I read a book in English class at school around 1997/1998, about a girl who is the only survivor in a post nuclear war. The girl lives on a small farm and has somehow managed to avoid radiation, she has a .22 rifle for hunting/defence.
There is a man in a Biohazard suit that turns up at her house and she believes he is a scientist, he turns out to be a murderer that stole the suit and made his way out of the war zone to the farm. The girl realises this as she finds bullet holes in his suit once he has taken it off and hung it up in the house.
It then becomes a fight for survival for the girl...
We didn't finish the story at school for some reason, I can't remember any of the names to help either.
Comment: This kind of sounds like [Emergence](http://www.goodreads.com/book/show/2300.Emergence) by David R. Palmer.  Emergence doesn't have a nuclear war of a biohazard suit though, so I can't really raise this as an answer.  Very good book though, thank you for reminding me of it.
Comment: Emergence sounds similar, but after reading the description on Wiki I realised it's not the one...
Answer: This sounds like Z for Zachariah by Robert C. O'Brien. Some of the details are slightly different (the man in the suit is actually a scientist) but the broad outline matches your description.
Comment: That's the story, it was a long time ago that I read it so some details were wrong in my description. Thanks


Best practices for exporting images for the web - DPI/PPI

Question: How should I be preparing images for the web?
Each device seems to have a different resolution. I've always exported images at 72PPI. Is that even the proper number these days? Do some people use 96PPI? Which is better for non "retina" images?
Most of the tutorials I've encountered have suggested for UI graphics in the stylesheet that you take this sort of approach.
http://miekd.com/articles/using-css-sprites-to-optimize-your-website-for-retina-displays/
Basically, make two images one exactly 2x the size of the other. Then...
<code>background-size: 50% auto;
</code>
...on the @2x image. Note this article never specifies what PPI to export the images as.
Is it possible to export 1 image at 72PPI and one at 144PPI? Then you wouldn't need to even background-size the higher resolution one in the media query.
What should I be aiming for here? What are the defacto best practices for exporting images for the web?
Also, does anyone have a better article on the media query for higher dpi displays and handling it?
Answer: The PPI setting is completely irrelevant for images that you use on the web. The browser doesn't care at all what the PPI setting is, it only uses the pixel dimensions of the image.


Can others see us many years ago relative to them?

Question: In theory can entities in future spacetime look "back in time" to us, as we look back in time to other entities light years away, or is time simply a function of the distance and distance determines the relative time of all entities in relation to one another?
Answer: An entity that is 100 light-years away from us sees us as we were 100 years prior, and we see them as they were 100 years earlier as well. It is simply a matter of the finite speed of light, and the distance between the observer and the observed.
Comment: Should it be noted that this isn't a consequence of special relativity?
Comment: Perhaps. But the OP didn't make the explicit connection so neither did I.


Coordinates in KML slightly different from those shown in Google Earth

Question: When I open the KML file in Excel, The coordinates of the same placemark are different from those shown in Google Earth. For example, coordinate point of a placemark shown in Google Earth itself is 24.484138°, 54.400700° but in KML (when open in Excel) is 24.48586802, 54.40060011. Please help me how to correct it. Thanks.
Answer: The underlying KML may have many decimal places in the coordinates. This is what you'll see in Excel or if you view the KML file in a text editor.
Here is a KML placemark location with 10 decimal places:
<code><Placemark>
    <name>Google office</name>
    <description>This is the location of Google</description>
    <Point>
        <coordinates>-122.0123456789,37.0123456789</coordinates>
    </Point>
</Placemark>
</code>
Google Earth stores all the digits, but it only displays up to 6 coordinates. This is not a loss in precision or accuracy -- only a display issue.
But realize that 6 decimal places precision in coordinates is at a 10 cm resolution. Each .000001 difference in coordinate decimal degree is approximately 10 cm in length. The imagery of Google Earth is typically at the 1 meter resolution, and some places have the highest resolution of 1 inch per pixel. One meter resolution can be represented using 5 decimal places so more than 6 decimal places is not necessary.
Answer: It could be that Google Earth is storing the coordinates in a different coordinate system than it is displaying them. When I used to work in GIS,it was common to use multiple data sets which use different coordinate systems together. ArcGIS would do some of the basic transformation automatically to place all of the data into a common coordinate system. I'm not sure if Google Earth does something similar. You may get a better answer from gis.stackexchange.com.


How to set origin point in center?

Question: Can't believe I'm asking this question right now, but how do I set my origin point to the center of my plane? I'm trying to apply a mirror modifier but the center of origin is throwing everything off track. I have the shrink-wrap modifier on if that makes a difference.
Answer: I figured it out. Set my 3D cursor to center, set origin point to 3D cursor, apply the shrink wrap, set the target to the character, then applied the mirror modifier.

How to set origin point in center?


Can you use Webmatrix.Data to connect to MySql stored procedures?

Question: I know that you can use Webmatrix.Data with MySql, but is it able to be used with MySql's stored procs? It does with SqlServer's procs obviously, not with Oracle's procs and I need to know if it will with MySql?
Thanks!
Chris
Answer: The CommandType for the DbCommand object that the Database helper wraps is CommandType.Text, so you can't simply pass the name of a stored procedure into the Query or Execute method. You have to prefix it with EXECUTE (or EXEC) with SQL Server. The equivalent for MySQL seems to be CALL. I suspect there is something similar for Oracle too.