What is the best way to go about generating a "token" for user authentication

Question: Let's say I have a MySQL database with thousands of user accounts in it. These accounts contain lots of data, but for verification purposes, they each contain a username and a (hashed and salted) password. Now, when a user requests signing in, I will take a username and password from them, transfer it via WSS to a Node.js server then transfer it via HTTPS to a PHP file on another server. On that server I will look up the username in the MySQL database, and if I find an account, I will hash the password and see if it matches that username's password. If they both match, then I want the PHP file to create a "verification token" of sorts, save it (and associate it with the account verified) and send the token back to the Node.js server. I then want the Node.js server to send that token back to the client and for the client to save that token. Now the next time the user connects to the Node.js server via WSS, I want the client to check for an existing token, and if it exists I want it to send that token via WSS to the Node.js server, the Node.js server to send that via HTTPS to a PHP file, and that PHP file to see what account that token belongs to, and complete the sign in...
So I guess my first question would be: Is this a good model? Would this be a good idea, and would this be secure, or should I do this differently?
My second question is: What would be the best way to go about generating this token? Should it be completely random? Should it be a combination of letters+numbers? Should it be a hash of some random values? How should I go about the generation of this "token"?

To clarify, I'm not asking how to build a server or make requests or transfer data or anything of that sort, I'm merely asking what is the most secure way to generate a "token" that can be used as authentication to the same degree that a username+password can be used.
Thanks in advance! I'm sorry if this is a really stupid question.
Comment: This seems like a better fit for [security.se]. If you run into problems implementing the design in PHP, you can then post your code here.
Comment: @Barmar Ah, okay. Thank you for the heads up. I'll check out Information Security and see if it's a good fit for this post, and if so I'll go ahead and move it over. :)
Answer: I think you are describing a JWT. There are several packages implementing this in PHP.


Can I add custom shapes to draw.io?

Question: I like the wide variety of shapes available (General, Arrows, Electric, etc.) but I need some more electrical symbols. Can I add custom shapes somehow?
Answer: Under File->New Library you will get a dialog that allows you to drag images and SVGs into it. You can also add images/SVGs using the filesystem picker and by URL (the buttons at the bottom of the dialog).
Once you've added your custom shapes, give the library a filename and press save. This will save the library as a library file in your selected storage and add the library to the sections on the left-hand side. Using the icons above the library you can edit it again, or remove it from your sidebar. The shapes in that library will then behave as any other library.
Custom libraries persist in your sidebar on a per-browser basis, if you want to add them to another browser use File->Open Library to add again. When refreshing the library will remain in place, only specifically removing it from the sidebar using the cross icon will remove it.
There's a slightly old video on custom shapes using Google Drive on YouTube.
Comment: Is it possible to convert an existing group of objects into a new object that can't be edited but can be connected to other objects with connectors?
Answer: You can create your own shapes. For this go to Extras > Create shape. It requires some XML formatted shape detail as we see in SVG but different. You can check their official documents to understand different components.
Example
<shape aspect="variable" h="24" name="share2" strokewidth="inherit" w="24">
  <connections/>
  <foreground>
    <strokewidth width="0.5"/>
    <path>
      <move x="12" y="0"/>
      <line x="24" y="12"/>
      <line x="12" y="24"/>
      <line x="0" y="12"/>
      <close/>
      <close/>
      <move x="10" y="16"/>
      <line x="10" y="12"/>
      <line x="15" y="12"/>
      <line x="15" y="14"/>
      <line x="18" y="11"/>
      <line x="15" y="8"/>
      <line x="15" y="10"/>
      <line x="8" y="10"/>
      <line x="8" y="16"/>
      <close/>
    </path>
    <fillstroke/>
  </foreground>
</shape>

Above code can be used to create the following shape.

You can change the style from right side panel.
Answer: You can create a shape in standard SVG format, and go to File > Import ... and choose the SVG file.
For example:
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <g>
      <line x1="12" y1="0" x2="24" y2= "12" stroke="blue" stroke-width="1"/>
      <line x1="24" y1="12" x2="12" y2="24" stroke="blue" stroke-width="1"/>
      <line x1="12" y1="24" x2="0" y2="12" stroke="blue" stroke-width="1"/>
      <line x1="0" y1="12" x2="12" y2="0" stroke="blue" stroke-width="1"/>
    </g>
</svg >

Will give you a diamond shape.

Can I add custom shapes to draw.io?


Does the OEM video play after an ordinary OEM install?

Question: I am giving an Ubuntu PC with an OEM install to my mom to convince her that Ubuntu is actually useful for "regular users", and I want the first boot video from Dell's Ubuntu machines to play when she boots up an OEM'd laptop for the first time. Does the OEM install do this automatically? https://www.youtube.com/watch?v=FeqfxttHPmA
Answer: No it doesn't, at least not with 14.04
You can try it for yourself. Here is a how to.
https://help.ubuntu.com/community/Ubuntu_OEM_Installer_Overview


Invertible: A non-square matrix?

Question: So I am doing a question were I have the set
column matrix 1 = (3, -8, 1) and column matrix 2 = (6, 2, 5)
and the question is asking if this is either a bases for R2 or R3.
Can I just say that since the matrix is not a square matrix (nxn) it cannot be a bases for R3 since it is not invertible -- it's not invertible b/c it's not a square matrix. And that it cannot be a bases for R2, since that would be impossible. I unsure how the Invertible Matrix Theorem applies to non-square matrix, which is why I ask this. Thanks for the help and clarifications!
Answer: Hint:
1) A base of  $\Bbb R^2$ is constituted of vectors belonging to $\Bbb R^2$
2) A base of $\Bbb R^3$  has at least $3$ vectors
Comment: So a non-square matrix, say a 3x4 matrix, can be a base for R3? Or are you saying that is only one of the conditions to be a base for R3 and that there are more than just that one condition?
Comment: No , a basis of $\Bbb R^3$ has exactly $3$ vectors[exactly $\Rightarrow$ at least.]
Comment: Sorry for so many questions, so in that case would a 2x3 Matrix work. Does it matter that a free variable will be exist?
Comment: no because the vectors of such matrix not belong to $\Bbb R^3$. [ask your questions without embarrassment]
Comment: Thank you. So correct me if I'm wrong,but the matrix has to be a square matrix for this work at all -- so long as it is consistent?
Answer: A basis of $\mathbb{R}^3$ has exactly three elements in it.  So a set of two vectors cannot be a basis for $\mathbb{R}^3$.
A basis of $\mathbb{R}^2$ has exactly two elements in it, and they are vectors in $\mathbb{R}^2$.  So a set of two vectors from $\mathbb{R}^3$ can not be a basis for $\mathbb{R}^2$.
Comment: Ye If a family $\mathcal B$ is a base of $\Bbb R^n$ the matrix of $\cal B$ in the canonical base of $\Bbb R^n$ is a $n \times n$ square matrix , conversely a square $n \times n$ matrix $M$ has coloumns of a base of $\Bbb R^n$ if and only if $\det(M)\neq 0$

Invertible: A non-square matrix?


Is it sin to enjoy watching animals getting eaten by other animals?

Question: Like in the title said is it sin to watch animals being eaten by their prey alive. I kinda find enjoyment and entertainment to watch it. I'm wondering if it's sin.
Comment: What makes you think it's a sin. "I kinda find enjoyment and entertainment to watch it" please go to an psychologist for the sake of your own mental health.
Answer: It's a sin to watch people commit sins, but Animals don't commit a sin when they eat another animal, at least the action of watching it is not a sin.
Some extremist people asked one of the companions (ra) if it was permissible to kill a fly, he became angry at them for asking, since they where killing some of the best people with no problem, yet they hesitated to kill a bug.
So don't worry too much about that, worry more about your relation to people around you.
Comment: They killed companions of the messenger, peace be upon him, once they robbed and killed a man and his pregnant wife, so how can you do that and then be worried about killing a bug. Human life is very valuable in Islam.
Comment: since they where killing some of the best people with no problem. what do you mean.
Comment: OK thanks for clarification


Does this routable network include oneways information?

Question: I successfully imported osm road data using osm2po. I visualized the routable road network using Qgis. The table of the layer includes the following attributes: id|osm|name|osm_source|osm_target|clazz|flags|source|target|km|kmh|cost|reverse_cost|x1|y1|x2|y2
Does this routable network include oneways information or do I need to further process the data in order to get this information?
Answer: analyze the reverse_cost column. If it doesn't equal the cost column and has a hight cost, then it is a one way.


Mobile app: What text in load dialogs?

Question: In a mobile app when a user logs in, there is a Title and Message field, and either or both can be hidden. Should text be displayed there or should those be hidden?
Comment: What's wrong with a simple animated spinning bitmap image, without text?  (Usable in any language!)  I would think text to be appropriate if there could be an extended wait time. And then the text would specifically address why the delay, what to do after 30 seconds, etc...
Comment: What are you going to load specifically?
Answer: Give them any information you can. If you can tell them whats coming up thats a plus. This way they can focus their mind on whats coming up and possibly start to think about it and get in the mindset to use whats about to load.
You can use this to remind them what they are waiting for and to encourage them to actually wait for it. Remember users have short attention spans and if they are in a 3g location with slow internet connections they may click on the app go somewhere else , check it that its loading again and totally forget why they even opened it and close it and leave. Where if they see something like loading a list of baby sitters in the area they will remember oh yes i need a sitter for the company ball lets make sure that loads. I forgot who but one office limits their network traffic to 3g speed on friday afternoon so they are apathetic to the 3g users in the world and so they design their sites to be friendly in low bandwidth areas.
Many web developers have the attitude of who cares about non javascript users, however they dont realize that until their javascript parses everyone is a non javascript user. Even if its something simple like your the map and your address book are loading they know that they can mentally be prepared for some sort of map and address book.
In short I would put the title and text there for 2 reasons.

Tell them whats coming next so they can mentally prepare for it and get their mindset in that context ahead of time.
Remind them of what they wanted to do so they dont close the app and forget to use it (likely to occur if loading times are extended).

Mobile app: What text in load dialogs?


How can I create an alias so that when I enter "kt" it executes "killall gnome-terminal"?

Question: How can I create an alias so that when I enter "kt" it executes "killall gnome-terminal"?
Answer: Creating an alias

To add an alias type the following in terminal,it will work until you close your terminal.
alias kt='killall gnome-panel'
To add this alias permanently you have to add the above command into .bashrc file
gedit ~/.bashrc
Add the first command at the end of your .bashrc file,

To refresh your .bashrc file type the following in terminal,
. ~/.bashrc  or  source .bashrc
Now you can type kt in terminal it will perform the action of killall gnome-panel
To list all your aliases type alias in terminal.

Few examples:

To create an alias for update,you have to add the following to your .bashrc
alias update='sudo apt-get update'
For upgrade
alias upgrade='sudo apt-get upgrade'
To add both update and upgrade you can do the following
alias upd='sudo apt-get update && sudo apt-get upgrade'

Note:

Source command is used for applying the changes that you have just made in a configuration file.
By ændrük suggestion you can also put your custom aliases in ~/.bash_aliases
Comment: It would be cleaner to put custom aliases in `~/.bash_aliases`. Ubuntu's default `~/.bashrc` sources this automatically.
Answer: Just type alias kt="killall gnome-terminal" in command line (I assume you're bash user).
To make this changes permanent, you can put this line to your .bashrc, for example. Execute echo 'alias kt="killall gnome-terminal"' >> ~/.bashrc (don't forget to re-apply changes using . ~/.bashrc)
Use simple alias command to see the list of aliases in action.
Cheers
update: BTW, you may find this useful as well: Problem with creating permanent alias


NVIS module not found in QGis

Question: When I try to use the nvis module in Grass, QGis, pops-up a warning window saying "Module nviz not found". how can I solve this issue and use the nviz?
Comment: Which QGIS and GRASS versions are you using (or trying to use)?
Comment: I am using QGis 2.2.0 Valmiera and the Grass plugin is version 0.1.
Comment: Have you downloaded the **Processing** plugin and ran any GRASS functions via the Processing Toolbox?
Comment: I just tried to use the processing toolbox but there is something wrong: the nviz does not recognize any raster files to use as elevation file even though I have the DEM/raster file opened in Qgis... it runs but it shows no result.
Comment: Sorry, now it detected the raster DEM (I reopened it), it ran, but it still shows nothing at the end... do I have to open any nvis created file which was stored anywhere or something like this?
Comment: Press: 'View output'
Answer: I faced a very similar problem a while ago: Unable to load 'nviz' through GRASS
For me, downloading/installing WinGRASS-6.4.1 and running GRASS 6.4.1.exe seperately from QGIS worked. I was able to use nviz (after configuring the project location and mapsets etc).
I still can't run it through QGIS for some reason but seems to work perfectly if I run it on its own.

NVIS module not found in QGis


Entity Framework Fluent API and MultiBoundedContext

Question: I have applied multi bounded context principle of domain driven design and have 3 different objects (in 3 different domain contexts) pointing to the same table in the database. As julie lerman suggested, i have a shared database model which has all my objects. This shared database model is used for code-first migrations. I also have fluent api configurations that represent foreign key relationships and column constraints on the shared database model. The question is, should i let my 3 domain specific contexts know of these fluent api configurations. I would like to validate my object graph in each of these contexts. Should i just worry about string lengths, required etc etc on these separate domain contexts? Is it necessary/good practice to configure these relationships on each of the 3 separate domain contexts?
Comment: What do you mean by "let the context know" ? Fluent mappings are defined within a DbContext, which in turn probably conceptually matches a Bounded Context in your domain. 3 different domain classes = one in each Bounded Context = one mapping in each of the 3 DbContexts.
Comment: An example would have been nicer. Let me try to give one here. Lets say we have a customer and he has made some orders. Lets say we have a customer management domain and an order management domain. The properties on the customer are Name and address. I have 2 separate bounded contexts here. The order management domain also has a customer object but only has Id, Name. The order management domain does not care about any other properties on the customer. Now i have a universal domain so i could do a code first migration to the database. This universal context has all properties from all objects.
Comment: If from fluent API i say Name cannot exceed 100 characters. so the database is constrained to those characters, should i repeat the same in the customer management domain context. I see it as the way to do validations on the customer object. If repeating my "rules" on the smaller bounded contexts is the way, should i also include the other fluent api configurations (like foreign keys etc) on the smaller domain contexts.
Comment: If you're referring to what Julie Lerman calls a "uber-context" (which is not clear in your original Q), then I guess relationship definitions should also be present at the focused context level, otherwise how could EF be able to wire up your navigation properties and all that when you query that focused DbContext ?
Comment: After working on it the last few weeks, i can confirm that the previous comment is true. Given it is a lot of work to have a multi-bounded context with multiple domains, i hope it is worth all it.
Answer: Yes, you do have to repeat the fluent api configurations in the smaller domain specific models.


What is the equivalent resolution of a 35mm film

Question:
Possible Duplicate:
What megapixel value is equivalent to which ISO film?
Is it true that '80s 35mm photofilm had quality corresponding to 24 megapixels?

I know this is a little bit like comparing apples with oranges but I am trying to find the point where digital photography caught up with conventional film photography.
Today's high-end full-frame digital cameras have 35mm sensors which is the size of a conventional 35mm film. These two technologies (digital and analog) are fundamentally different but at the end of the day, the images produced are consumed alike.
Now, consider an 35mm analog image recorded on top-quality film with top quality equipment. What would be the resolution (megapixels) and color-depth of an equivalent digital image.
Comment: It depends on the film
Comment: This is such an apples-to-oranges that I can't tell that the OP is really asking. When we enlarged 35mm film, we often got grain. It was considered artistic. It was, in fact, just noise, or the limitation of recording ability of the film.
Answer: Instead of picking arbitrary numbers out of the air, do the math to get some comparisons.
A "35mm" frame is 36x24mm in size.  Look at the resolution spec for some films and lenses.  Some films were rated at nearly 200 lines/mm, but some much less.  There was a tradeoff between sensitivity and grain size.  That added noise and lowered spacial resolution of more sensitive films.  Lenses also cover a range.  Let's say roughly 50 lines/mm would be "good", and 100 lines/mm astonishingly superb.  Of course that's only at the optimum f-stop and camera mounted and held very still.
You said top equipment, so let's see what 75 lines/mm comes out to as a starting point.  A "line" is actually one complete light-dark cycle, so you have to allow for at least 2 pixels per line width.  So the 75 lines/mm becomes 150 pixels/mm, which means a full 35mm frame would have 5400 x 3600 pixels = 19.4 Mpix.
However before you run off and declare that the answer, look at all the judgement calls that went into ultimately getting that number, and that film resolution and digital resolution are in some ways a apples to puppy dog comparison.  Film not only has some maximum resolution, but also grain.  This is effectively noise added to the image.  Pixels have some noise on them too, but this noise is random and occurs on the pixel grid pattern.
Film and lens resolution is a "soft" thing.  Neither reproduces frequencies up to the limit perfectly fine, then suddenly mushes everything to the average after that.  The contrast falls off with frequency, so the resolution spec is some arbitrary point along that curve.  Usually the -3dB point is used.  In contrast, what one pixel does is pretty much independent of its neighbors.  The resolution is fixed and finite due to the pixel pitch, but that also introduces aliasing which is something completely foreign to the analog film process.
Before I switched to a digital camera, I used to scan negatives at about 9 Mpix.  That wasn't a deliberate choice, just happened to be the limit of my scanner.  However, at that resolution the grain was clearly evident.  I now get effectively 12.1 Mpix from the same image area with my digital camera.  I can tell you that subjectively the pictures from the digital camera look better than the scanned negatives.  The pixel-level noise is much lower, mostly because the grain noise is gone.  The digital sensor is also significantly more sensitive such that 9 Mpix would be a joke with "high speed" film to match the sensor.
The digital sensor also has more dynamic range.  The camera has a 14 bit A/D internally.  Of course you don't get 16k useable levels from every pixel, but you do get a lot more than with film.  This opens up a lot more options when post processing.  Not only could many of those things not be done with optical processes, but the original dynamic range captured on film simply wasn't there.  I usually used color negative film because it had better dynamic range than slide film, but that was still well below what a good sensor can do today.
Comment: judgement:  Use a *modulation transfer function* for a more quantitative measure of "sharpness" and "resolution". This makes "lines" a measurable concept at a specified MFT.
Comment: @Michael: True.  The Bayer pattern throws yet another wrench into the works.  You get twice the special resolution in green than you do in red or blue.  With good de-mosaic software, a picture can *appear* to have nearly the resolution of the sensel pitch, but then be worse in pathological cases, like nearly vertical or horizontal sharp edges.
Comment: When discussing resolution regarding color images from digital sensors, shouldn't the effects of a Bayer mask and demosaicing be taken into account? A Beyar masked sensor can't reach the same resolution in terms of the final image as a monochrome sensor with an equal number of pixels with no debayering applied to its output.
Comment: I'm pretty sure a while back I read somewhere that when shooting standard test charts with alternating B&W lines the resolution with a Bayer masked sensor comes out to about 1/√2 of the native resolution of the sensor. I'm fairly certain it was in an article comparing a 15MP Foveon sensor to a Bayer masked sensor that returned the same result with the test charts, so that has been a while back. I can't find it with a cursory search now, though.
Comment: Well written! Here's what brought me to this SO and question: my grandparents are/were a bit on the hoarder side. I want to scan old photos they took from the 50s-70s. In many cases, I'm fairly certain they probably kept negatives, but I would have to tear apart their house to find them. So the question becomes: given the era and the likelihood that they probably used consumer grade film/cameras most of the time, what is the fidelity/resolution payoff of hunting down those negatives? If the "analog megapixel" difference between a scanned photo and scanned negative is less than say…15%, I won't
Answer: That depends entierly on what you mean by the question.
If you mean the point where there is about the same amount of detail recorded, perhaps 5 MP, 8 bpp.
If you mean the point where you can make an enlargement the same size without feeling that the quality is lacking, perhaps 20 MP, 12 bpp.
If you mean the resolution that you can scan a negative and get out all the information, perhaps 50 MP, 16 bbp.
Those are of course just ballpark figures, and varies depending on what film you are using, how you measure detail, what you find acceptable, et.c. It should however give you an idea of what you could expect.
As you say, it's like comparing apples and oranges. We can blow up a negative to a size where you clearly see every grain, without seeing that as a lack of quality. When you blow up a digital image so that you see the pixels, most will feel that the quality is lacking. Generally a digital image needs a higher quality to be perceived as equivalent.


turning the black to alpha in texture node

Question: How to turn the textures ( for example musgraves ), black color area to alpha color channel .
I have tryed to findt a manual that would solve the problem , but have only findt
how to make an alpha channel come out of a picture not from a texture node.
Answer: To the best of my knowledge the only thing you can do in a shader is to use the texture as input to the alpha input of a shader node that supports alpha input, like the principled shader node.  Here's an example of a red ball behind a brick wall:

Here's the simple shader for this.  Note that I inverted the color of the brick mask before feeding to the alpha input of the principled shader.  Otherwise, the mortar would have been black and the bricks transparent:

Note that if you are going to render this with EEVEE you need to go to the material settings and change the Blend Mode to Alpha Blend:


Dual and bidual spaces of $B(H)$ in norm topology

Question: I would like to ask whether any description of the dual and double dual spaces exists for the Banach space $B(H)$ - space of bounded linear operators on infinitely dimensional Hilbert space. Can we identify them with some other known Banach spaces, such as we do with the duals in other topologies on $B(H)$?
Answer: Since $B(H)$ is not separable in the norm-topology if $H$ is infinite-dimensional these spaces will be very large. Specifically $B(H)$ contains a subspace isomorphic to $\ell^{\infty}(\Bbb N)$. (The subspace is the diagonal operators wrt some Hilbert-basis.)
The dual space will thus contain a very large space. $B(H)^{**}$ must be even larger and $B(H)$ cannot be reflexive. Thus it is unlikely to recognise "classical" spaces in $B(H)^*$ and $B(H)^{**}$, simply because they are much larger than most classical spaces.
Comment: I could still imagine these spaces to be some classical operator spaces acting on a "very large" topological vector spaces.


Throwing something into orbit

Question: is it possible with newtonian gravity to throw something (which has no on-board propulsion) so that it will orbit the earth without colliding with it(friction is not present)? my intuition tells me that no, because all closed newtonian orbits are periodic so that if I throw some thing it will eventually come back to earth. But I can't seem to show it with the math.
Any help would be appreciated.
Comment: Possible duplicate of [Throwing a ball from the surface of the earth so that it ends up in a circular orbit](https://physics.stackexchange.com/q/468141/)
Answer: If you are standing at a height $h$ above the surface, the orbital velocity you need for a circular orbit at your height is given by:
$$\frac{mv^2}{R+h}=\frac{GMm}{(R+h)^2}\Rightarrow v=\sqrt{\frac{GM}{R+h}}.$$
You can simply throw the object horizontally, tangential to the surface of the planet, at this velocity and the object will orbit at your height.
If you wish to throw an object to a circular orbit at a height above you, this is impossible. See here for the details.
If you want an elliptical orbit, then your observation that closed Newtonian orbits are periodic is correct. This is because a unique orbit can be defined by an orbital energy and a point on the orbit. By imparting a particular kinetic energy on the object at your location, you guarantee that the object will return to your location since it must be on the orbit you created.
Answer: Yes. You can absolutely do that in a Newtonian framework. In fact all the thoughts around the issue before Tsiolkovsky were based on the idea of launching projectiles with no on-board propulsion systems, it was him (two centruies after Newton) that started to point to rockets as a novel mean to reach orbital motion from Earth without extreme initial accelerations (thus saving the lives of any traveler inside the device).
Even Newton himself, explained what an orbit around Earth is in terms of shooting cannon balls from the top of a mountain! This is sometimes called Newton's cannonball and it appeares in the Principia Mathematica itself, the fundations of Classical Mechanics.

Newton's concept is that if you shoot a connonball from an elevation pointing to the horizon the projectile will fall to the ground after travelling several kilometers at best. But if your cannon is powerfull enought then your cannonball will never touch the ground. Why? Because as the cannonball falls to the ground it reaches such long distances that the ground itself get's farther from it because it bends under the curvature of the Earth. The cannonball is always falling but never reaches the ground since it is dodgin it and remains always far below it as it flies.
The Moon is doing the exact same thing, it is falling towards the Earth, but it never collides with it as the planet's surface bends below it's trajectory. This was the key idea presented by Newton. All knew that gravity existed before, but it was Newton that understanded that the Moon is falling just as an apple from a tree does.
You can also point your cannon perpendicular to the ground. In that case the projectile will return to Earth if it has a velocity below the escape velocity of the planet (which is around $11\; km/s$ on Earth). But if you have a powerfull cannon you can. It wouldn't be a closed orbit tho but it will never return to Earth. Gravity is a force that extends infinitely but it gets weaker very rapidly, so if your projectile slows down slower than that then you are always going faster than needed to escape the planet (even if the force never really dissapears).
The whole method was also depicted in literature when Jules Verne showed his idea of a large space cannon in "From the Earth to the Moon".

Although rockets are great in comparison to cannons for a number of reasons (rockets accelerate more gradually but cannons concentrate all the acceleration while you are speeding up in the barrel) the cannons have also been taken into consideration for launching compact unmanned probes into orbit easily. These so called space guns have been proposed and some have been built. The thing is that they have to shoot the object to large speeds because they need to get out of the atmosphere with still several kilometers per second speeds, the friction and intense accelerations involved make these projects difficult and the efficiency of rockets is nowadays imposible to overcome by these means.
Comment: thanks for the detailed answer! my intent was to launch something so it will orbit at height above my own and I've been linked to an answer which shows it to be impossible. I see that my question was not clear, and I thank you,

Throwing something into orbit


How to install Nvidia driver in Ubuntu 18.04?

Question: I downloaded the Nvidia driver for Linux from the official Nvidia website to install in my laptop. It is a file named NVIDIA-Linux-x86_64-390.67.run. How to install this file?
Comment: check your gpu type before instal it,
amd/ati or amd/nvidia
Answer: Determine the latest version of Nvidia driver available for your graphics card

Visit the graphics drivers PPA homepage here and determine the
latest versions of Nvidia drivers
Verify that your graphics card is capable of running the latest
drivers.

If your graphic is supported, you can go ahead and remove all previously installed Nvidia drivers on your system. Enter the following command in terminal.
sudo apt-get purge nvidia*

Add the graphics drivers PPA
Let us go ahead and add the graphics-driver PPA -
sudo add-apt-repository ppa:graphics-drivers

sudo apt-get update

Install (and activate) the latest Nvidia graphics drivers. Enter the following command to install the version of Nvidia graphics supported by your graphics card -
sudo apt-get install nvidia-XXXX

OR
sudo apt-get install nvidia-driver-xxxxx

(xxxx - is the Supported Version for your Nvidia driver)
Reboot your computer for the new driver to kick-in. You can check your installation status with the following command
lsmod | grep nvidia

If there is no output, then your installation has probably failed. It is also possible that the driver is not available in your system's driver database. You can run the following command to check if your system is running on the open-source driver nouveau. If the output is negative for nouveau, then all is well with your installation.
lsmod | grep nouveau

This is my terminal output of Nvidia Drivers.

devansh@varshney:~$ nvidia-smi
Wed Apr 24 01:14:16 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.56       Driver Version: 418.56       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce 940MX       Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   52C    P5    N/A /  N/A |    254MiB /  2004MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      3975      G   /usr/lib/xorg/Xorg                           108MiB |
|    0      4002      G   /usr/lib/firefox/firefox                       1MiB |
|    0      4350      G   /usr/bin/gnome-shell                         137MiB |
|    0      5204      G   /usr/lib/firefox/firefox                       1MiB |
|    0     24924      G   /usr/lib/firefox/firefox                       1MiB |
+-----------------------------------------------------------------------------+

Comment: Note: On Kubuntu I had to do `sudo apt-get install nvidia-driver-xxxxx` (specifically, 415)
Comment: Similarly, on Ubuntu 18.04 I needed `nvidia-driver-430` instead of `nvidia-430` which was not found.
Comment: Note that this is probably not the recommended way that NVIDIA wants people to do it since the PPA isn't maintained by NVIDIA, but it seems to have (empirically) worked well for me on Ubuntu 18 (and 16) systems.
Answer: I am using the nvidia-driver-390 driver version 390.48 in 18.04 which was installed with the following command:
sudo ubuntu-drivers install
sudo reboot

When installing a proprietary graphics driver, it is not necessary to uninstall the open source graphics driver. The two graphics drivers can be installed alongside each other allowing the open source graphics driver to be used as a fallback alternative in case there is a problem using the proprietary graphics driver.
The sudo ubuntu-drivers install command installs drivers that are appropriate for automatic installation including their dependencies, and the Nvidia driver will also be updated automatically when an update is available. Sometimes sudo apt upgrade even upgrades the proprietary graphics driver packages to more recent packages, in which case sudo apt autoremove removes the older packages which were replaced by the newer ones. For most users there's no reason to guess about which proprietary graphics driver to install, because if your system deserves a graphics driver upgrade it will get one.
If you visit the official AMD or NVIDIA websites you will often see that the latest version of the proprietary graphics driver for your GPU is a little bit more up-to-date than the version of the same graphics driver that is available from the default Ubuntu repositories. Don't worry about this, because if the difference between version numbers of the two proprietary graphics drivers is small, then you will get similar performance by using either of the two drivers. If you install a graphics driver from the default Ubuntu repositories, you will also get automatic updates for that driver which are sometimes linked to kernel updates.
Comment: This also works for me for Ubuntu 20, when I already had CUDA but needed to clean up my Ubuntu drivers. To be safe I also did `sudo apt-get purge nvidia*` before doing the `autoinstall` command.
Comment: Or even `sudo apt-get purge ^nvidia*` to make the command more specific.
Answer: To do this, you would add the graphics driver PPA with the following commands in terminal:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update

After this, you should now remove any current NVIDIA drivers by entering the following into your terminal:
sudo apt-get purge nvidia*

Now that you have done this, it is safe to install the latest version:
sudo apt-get install nvidia-driver-396
Please note that it is nvidia-driver-396 on Ubuntu 18.04, it is nvidia-396 on Ubuntu 16.04 but you are not using 16.04.
Answer: A simple double click should do the trick. If it doesn't, right click -> Permissions -> enable execute permission and then try the double click again
Answer: After following a ton of links and suggestion I'll put here what worked for me. The reason why I needed the driver from NVIDIA was to be able to run TensorFlow on my laptop with the configuration

Linux Mint 19.1 Tessa on 18.04 Ubuntu
RTX 2060 graphics card

What follows next were the steps I took:

Go to the BIOS of your laptop (press F2 at the beginning of rebooting your computer) and disable secure booting.
Once you login back to the computer again, open up a terminal and run:
sudo apt install nvidia-settings

This will allow you to modify settings for the driver you will install.
Go to https://www.tensorflow.org/install/gpu and follow the steps for Ubuntu 18.04.
Now, the major issue I ran into that took me forever to fix was the fact that after rebooting the computer I was running into a black screen. This was happening because the laptop was not using the original "Intel" graphics card anymore and had switched to "NVIDIA". If you run into a similar situation, use the command CTRL+ALT+F1 to go to a tty screen (teletype terminal). There you may be able to login using your username/password. Then run the code:
sudo apt install nvidia-prime

The purpose of this last command was to be able to change which graphics card my laptop was using. I then ran:
sudo prime-select intel

To leave the tty and go back to your regular screen you may either reboot or do a CTRL+ALT+F7" (at least this is the command that worked for me).
Once logged in again I was able to change back to the NVIDIA card (sudo prime-select nvidia) and reboot normally.
Answer: I'm not sure I agree with manually installing specific drivers via
sudo apt-get install nvidia-XXXX

Isn't it always better to wait until the new driver is available via Software & Updates?
I thought that was the purpose of adding the PPA?
Comment: The purpose of adding a PPA is generally to be on the edge, so you can installed the most current version instead of waiting for a new version of Ubuntu which includes the newer version of the software you want on the edge.
Answer: After nvidia-435 stopped working for my 18.04, I purged the driver as before, downloaded the driver 450 from NVIDIA and ran their installer. After rebooting, I could not log in any more.
After changing to Wayland on the login screen (a very tiny widget on an UHD monitor), login was possible. Once logged in I could reconfigure my both monitors and I'm happy again.
Comment: Sounds strange. Usually the default Nvidia drivers installed via the software app run a lot better than the stuff downloaded by Nvidia. Why did you do it this way?


I would like to have a quote page just to show quotes

Question: I want to have quotes just show quotes and not the featured image like this https://demo.zigzagpress.com/xplorer/category/post-format-quote/ how would I go about stripping away the other things and keep it that way.  I am using genesis framework Thanks
Answer: I would use the class "category-post-format-quote" that is on the body tag to target and hide each element with CSS.
For example, you could hide the sidebar by the following CSS.
<code>.category-post-format-quote .sidebar {
    display: none;
}
</code>
Use your browser's inspector (F12) and find all the elements you want to hide.
Comment: thanks but would that have the category page like in that demo. You just have the category showing quotes post but there are no links to the post itself. it just outputs the quote


How can you exploit a website that resolves to localhost?

Question: Let's say you're on a pentest (or bug bounty hunting) and you meet a domain that resolves to 127.0.0.1, How can you exploit that? is that even considered a misconfiguration ? sometimes i see domains named like 127-0-0-1.domain.com and it resolves to localhost, why do the developers even need such a thing ?
Comment: See the following links to other questions on this site related to this:  https://security.stackexchange.com/questions/221658/what-would-happen-if-some-random-webpage-made-an-ajax-request-for-http-127-0-0 and https://security.stackexchange.com/questions/232345/ebay-web-site-tries-to-connect-to-wss-localhostxxxxx-is-this-legit-or-they and https://security.stackexchange.com/questions/231966/web-sites-executing-local-port-scans-is-this-coming-from-a-library-can-it-be-b#comment474837_231966
Answer: A service that's running on localhost/127.0.0.1 would only be exploitable from within the host itself.
This type of configuration would indicate an internal-only service, that is intended to be  used only from the host itself.
Depending on the service or architecture implemented, this type of configuration would be an appropriate deployment of a service that responds to internal-only requests.
From an external penetration testing standpoint, you would normally do an internal scan after gaining access to a particular internal host to identify these type of local-only services, then you would continue vulnerability scanning and further exploitation, perhaps to elevate privileges or gain access to other resources from that service.
Comment: *"... would only be exploitable from within the host itself."* - true, but such "within the host itself" can be triggered from outside the host. For example if the user visits an attackers website which triggers request to this localhost (with CSRF or XSS), clicks a link in the mail which does similar things etc.
Answer: Oooh, that's very dangerous. There are two main attack vectors against such systems.

Cross-user same-machine access. Loopback network sockets are notable for being the only mainstream form of IPC with absolutely no support for authentication or access control (you can try bolting something on at the application layer, like TLS, of course). As such, an attacker on the same machine - likely even one within a sandbox such as an app from an app store or a malicious page in a browser - can connect to the server as a client, or possibly even spoof the server (launching before the server does and squatting its port) and wait for the legit client to connect. This can allow local EoP to attack other users and/or break out of a sandbox.
Spoof DNS and impersonate the server. If you have local network access (e.g. on public WiFi at an airport or cafe) you can spoof DNS responses and make the DNS query return your own IP instead of the loopback address. You can then run a server yourself and impersonate the real server (optionally forwarding traffic back to the real server - after modification, if desired - assuming it listens on external interfaces). Obviously this won't work if the client expects the server to use a trusted TLS certificate, but this sort of system almost never does. This allows a remote attack on the system, and depending what the client does, you might be able to gain local code execution, steal credentials, or otherwise compromise the user.

sometimes i see domains named like 127-0-0-1.domain.com and it resolves to localhost, why do the developers even need such a thing ?

CORS and/or cookies, mostly. They want to be able to serve content (almost always web content) from a local process, but also want it to be treated as a "real" subdomain that shares a root domain with "the rest of" their servers. This means you can share cookies across the subdomains, use a simple CORS policy that forbids foreign domains, or even lower the page origin to the same root domain on both the local and remote servers' pages and actually be treated as same-origin for purposes such as iframes. Some browsers and platforms (mostly Apple's) also treat "real" domains better than IP addresses even when not required by the spec.
It can also be done for TLS - no real CA will issue a cert for "127.0.0.1" or even for "localhost", but "127-0-0-1.domain.com" works - but it would be very weird (and possibly dangerous) if that's happening here. A CA-issued cert for that domain would require that the private key be distributed with the application so that the server could use it, and then of course anybody with the app could steal the key and use it themselves, completely breaking the point of TLS (and also requiring, by policy, immediate revocation of the certificate). Alternatively, you can create a self-signed certificate and install it in the machine's/browser's trust store, but you can do that without bothering to use a "real" domain on DNS.


Pleas please please add Image hosting

Question: Zombies eat brains.
Comment: `status-deferred` means they're not declining the idea, but they're not going to implement it right away either.  Basically, I take it to mean "maybe later."
Comment: what does status-deferred mean anyway? this seems like a pretty important feature. well, whatever. It's Jeff's site. Just trying to be helpful. and feeling guilty for breaking SO.
Answer: Not a direct answer to your plea, but you should be able to find posts that link to your old domain with an advanced Google search.  I tested it out by searching for links to imgur.com here on meta and it turns up image links too.
http://www.google.com/search?hl=en&lr=&as_qdr=all&q=link%3Aimgur.com+site%3Ameta.stackoverflow.com&btnG=Search&aq=f&aqi=&aql=&oq=&gs_rfai=
At least using that you should be able to update your old posts to point to your new domain.
Comment: Just tried... it's missing a bunch of results (I know a few of these posts). Resuming data dump download...
Comment: Very nice thanks! I guess I can cancel my data dump download!
Answer: I think building their own image server would be a waste of valuable developer time and resources.  But easy integration with something like yfrog would probably pay off.

Pleas please please add Image hosting


Why do 7ths need resolve if the V chord is inverted?

Question: A V65 or ii65 have 3 upper chord tones that all form consonances with the bass so why did the chordal seventh require resolution in voice leading as it did in root position?
Answer: There is always a dissonance in V7 chords, regardless of inversion.
Thinking in the key of C:

root position G B D F has a dissonant diminished fifth between B and F.
first inversion B D F G has a diminished fifth. between B and F.
second inversion D F G B has an augmented fourth between F and B.
third inversion F G B D has an augmented fourth between F and B.

The tritone (augmented fourth / diminished fifth) is required to resolve. Thus, both the chordal seventh (F) and the scalar seventh (B) must resolve, regardless of the chord inversion.
Similarly, with ii7 chords, there's always a dissonance between the chordal root and chordal seventh: either a major second or a minor seventh, depending on the inversion.
Comment: Aaron Lets take ii42 in C major as an example voiced C F D A. When you play this chord, isnt it the 4th (F) and 9th (D) that require resolution as they are the dissonances against the bass. This is how a cadential 64 works so why should moving from C to Dm7/C be different. It is taught that the dissonance here is in the bass and that the bass must resolve down by step to the leading tone of of V in the progression I ii42 V65.
Answer: First off, play a few inverted dom7 shape chords and let your ear confirm that the 3rd and 7th of the chord still want to resolve!
Why?  Because whatever inversion we're in, the 'chordal 7th' still IS a seventh, the 'chordal 3rd' still IS the leading note and they still jointly form a tritone.
Comment: Yes but it isnt a 7th against the bass right? lets say the ii65 chord which has no tritone... what then?
Comment: @armani   Well, consider a ii7, V7, I 'cycle of 5ths'  sequence.   The ii7 isn't strictly a dom7 chord, but it certainly has a dominant relationship to the V7.  Whatever inversion it's in.


Valid private keys on curve25519

Question: Given that valid private keys on curve25519 must be less than the order of the curve which is (as I understand) already smaller than 2^256, AND a valid key must be clamped to be divisible by 8 and have its high bit set, what is the actual 2^X number of valid private keys approx?
Answer: The private keys are integers $x$ with $2^{254} \leq x < 2^{255}$ and $x \equiv 0 \pmod 8$, or just $x \in 2^{254} + 8\{0,1,2,\dots,2^{251} - 1\}$, so there are exactly $2^{254}/8 = 2^{251}$ of them.
Comment: When humanity has spent $2^{100}$ computing cycles in its entire history (which I don't think it has yet), it'll still take millions of times the computing cost spent in the history of humanity to break _one_ X25519 key, so no, that's not really low.  The cost of performing a curve addition is quite a few bit operations, so you can read that to bring the cost in bit operations up to $2^{128}$.
Comment: Thank you! After factoring in efficient approaches on attacking DLP, curve25519 must have at best <126bit security. Seems low?

Valid private keys on curve25519


Is normality important for ANOVA when N>30?

Question: I want to use repeatead measures ANOVA with sample size approximately n=40. Normality is violated according to S-W test. After log transformation although Q-Q plots seem better, the distribution is still not normal (there are some outliers) and for S-W test of normality, again p<0.05. What should I do? Can I just ignore it?
Comment: What are your data? Are they dichotomous, counts, ordinal ratings, something else? How are they non-normal, are they fat-tailed, skewed, both? Are they very non-normal without the outliers?
Comment: What do the Q-Q plots look like?  When you say "n≈40" is that 40 observations in total, 40 subjects (with several measurements each), or something else?
Answer: By and large, repeated measures ANOVAs don't so much require normality as approximate normality because they are pretty robust to normality violations. Violations of sphericity are generally a larger problem than violations of normality.
I'd say even with n=40, if your plots look like they don't deviate too much from normal then you should be fine. If they look like they are slightly skewed versions of normal distributions then testing out some transformations (as you have done) to get them more normal should be sufficient.
Of course, I have no idea what your data looks like so if it is a huge deviation from normal then perhaps an RM ANOVA isn't the way to go. In this case, you could use a non-parametric alternative to the RM ANOVA. Non-parametric tests have the advantage of not assuming normality. They only assume that your groups have the same distribution (whatever that distribution happens to be). I think Friedman's ANOVA is a non-parametric alternative to the RM ANOVA but I have no experience with it.


What are some verses about(against) materialism in upanishad and vedas?

Question: Hinduism is against materialistic people and materialism, so what are some verses from Upanishads and vedas the condemns it.
Comment: Hinduism is not against Materialism. It's against , being perpetually cozy and comfortable in that mithyā (false) pond of sāṃsārika māyā. Materialism is what keeps the world going on, so that new jīvas are born as per their previous births saṃskāras. However, being eternally struck in that 'pond', and **not realizing** our true nature of eternal atman (sat-chitt-ānanda): this is what is admonished in hinduism.
Answer: These are the verses against materialistic Desires,wealth and pleasure in Upanishads.

The good is one thing; the pleasant, another. Both  of these, serving
different needs, bind a man. It goes well with  him who, of the two,
takes the good; but he who chooses the  pleasant misses the end. O
Nachiketa, after pondering well the pleasures that are or  seem to
he delightful, you have renounced them all. You have
not taken the road abounding in wealth, where many men sink.I regard you, O  Nachiketa, to be one who desires Knowledge; for even
many
pleasures could not tempt you away.        (Katha Up 1.2.1-4)
The way to the future does not shine for the ignorant man who
blunders, rendered, blind by folly caused by wealth; thinking thus
'this world is and none other,' be gets into my power(rebirth/death)
again and again.(Katha Up 1.2.6)
The ignorant pursue external objects of desire; they get into the meshes of widespread death: but the intelligent, knowing sure
immortality, do not covet the uncertain things here.(Katha Up 2.1.2)
When all desires clinging to the heart of one fall off, then the
mortal becomes immortal and here attains Brahman.(Katha Up 2.3.14)
That which transcends hunger and thirst, grief, delusion, decay and
death is your innermost Self. Knowing this very Self the Brāhmaṇas
renounce the desire for sons, for wealth and for the worlds, and lead a mendicant life.(Brihadaranyaka Up 3.5.1)


How to prevent plugs from falling out of a wall socket?

Question: Despite carefully securing a plug in an outlet, many times I find that the plug falls out minutes after the fact (it happens all the time with things like phone chargers). I have been careful in making sure that the cord is loose enough so that it is not tugging on the plug in any way, yet this still happens.
How can I prevent plugs from falling out of a wall socket?
I'm in the US.
Comment: Move to Britain, where plugs never fall from sockets (but where stepping on an unplugged one is worse than stepping on Lego)
Answer: Replace the receptacle. It's starting to fail.
Learn what "break off tabs" are, and look for them.
The receptacles should be able to hold a small wall-wart.  If it can't, then the thing falling out is the least of your problems.  A poor gripping connection will also cause series arc faults, which will create heat and potential fire. It will cause galling that will damage the prongs and the socket, making further connections worse still.  The saving grace is that it's a series arc fault, so the fault can't draw more current than the device does.  But plug a heater in there later, and you could have big trouble!
So shut the breaker off (check both sockets for voltage) and pull that receptacle.  Take some photos first. Get a $3 Leviton ProLine or similar unit, not the 75 cent cheapies.
Check the "break-off tabs" on both sides, realizing brass screws are a different side than silver screws, and match them on the new one. Then remove the wires from the old socket (loosen screws or stick a paperclip in the backstab release, or just twist it out of the backstab) one at a time and move them to the new socket exactly as you found them.
Do not attempt to upgrade to a USB socket or GFCI without first coming over to diy.stackexchange.com with pix of what's there. Those fancy outlets wire up very differently than normal sockets, and the differences cause lots of wheel-spinning and frustation for a novice. Better to ask first, wait a day, read, breeze through the upgrade.
Lastly, don't destroy position information.  Wire location matters. If one white is with some blacks, that kind of thing is a Rosetta Stone. Don't tear all the old equipment out and post a picture like this, it won't end well. (Colors don't indicate what wires do). Colors are becuase of how cables are made, not what wires do.  Take photos before you unhook anything. Do that and 95% of the time it'll go smoothly, and the diy stack can sort out the other 5%.
Comment: This should be the accepted answer. Electricity is a no-life-hack zone.
Answer:
If the outlet has two spots, use the lower spot; it usually provides better friction. As a janitor I always used the lower spots for carpet cleaners and other equipment with heavy cords.
For a loose plug that you don't put in and take out a lot (e.g. the plug for a table lamp), try bending the prongs of the plug slightly apart. This will increase the friction holding the plug in place. Be careful not to damage the plug. Don't try this with your iPhone charger.
For a small adapter like an iPhone charger, you can use a Post-It note to affix the cord to the wall above or below the outlet, which will reduce the amount of torque applied to the plug itself, and may even help hold it up.
For large wall-warts (a.k.a. AC adapters) it is often more convenient to plug a power strip or even a simple extension cord into the wall and plug the AC adapter into the power strip. For a very large adapter, you can even put the adapter on its back and sort of plug the power strip down onto it.
Answer: A small piece of double-sided sticky tape will hold the plug in place.
Here's how:

Cut a small piece of the double-sided (foam) tape that will fit between the prongs of the plug.

Put one side of the sticky tape on the plug.

That done, peel off the back of the double-sided tape so that the exposed sticky back side will stick to the electrical socket wall plate.

Push the plug far enough (all the way) into the socket so that the double-sided tape is between the plug and the socket so that the plug becomes stuck onto the plate.

If you use a small piece, then it will easily come off when you want to remove the plug.
If you want to leave the plug in place for a longer period, I use a slightly larger piece of foam-filled tape - which you can sometimes find in pre-cut patches.

If you can't find that in the shops, old-fashioned draught excluder tape will do.  This padded sort of tape will hold more firmly and will better absorb knocks to the plug.


Historic Importance of Tin(Sn)

Question: How important is tin for a bronze age society when there's many copper alloys including arsenical bronze. If you're out of tin whats the next best copper alloy(s) for making shortswords and axe blades and is it such a downgrade. This is a chemistry and history question.
Comment: It's answered by dating back copper artifacts. At a glance I would answer as: _arsenical bronze if you have the right ore_. I'll keep digging and discuss it somewhere else.
Comment: Hardness is easy to look up; this ended up being way more history leaning than i expected. Whatever they used when out of tin was what worked for them; this is barely a chemistry question at all.
Answer: Some tools were made of "pure" copper. But tin was the best and only available addition to copper for strength. At the time tin was the only type of bronze. Today a variety of copper alloys are called "bronze"  that do not contain tin. Lead could possible have been available depending on time and place but it does not improve strength of copper and could actually weaken it. I see in alloy listings there are silicon bronzes ( today) that contain 1 to 2 % . Silicon was available, but it takes modern technology to alloy it into copper. Silver and gold could be added to copper ( they are all mutually soluble ) but make little increase in strength. There is a copper alloy today that contains about a quarter % of each phosphorus and arsenic ( C14200) , it is a wrought product so not available in the bronze age. The Copper Development Association  presumable has some information on the internet.
Comment: Arsenical bronze is strong and good for edged tools; it dates back pretty far although it was only made from certain ores until they could isolate arsenic as an additive.
Comment: My answer is in modern ( last few hundred years) context. The Wiki article on archaeological bronze is interesting , much higher levels of As were used than the one modern alloy. But consistent as it notes the high strength of As bronze is achieved by forging ( wrought ); which is not necessary with tin.  Traces of As are used for corrosion resistance in some modern brasses. And as noted, unrefined copper often contains As as a tramp element.
Comment: And , roughly 100 yr ago arsenic copper was used for tubes in low temperature boilers for improved corrosion resistance and better elevated temperature strength than pure copper. It was made from high As ores and sometime called "tough lake copper".

Historic Importance of Tin(Sn)


Laminate on slab

Question: House  is 1997 construction - slab foundation - original carpet.  In process of updating and want to install laminate all rooms.   Home Depot did the measurements and once order info I noted there could be problems with doors and problems with the slab - level issues.   I have noticed a hairline crack in one bedroom under a window.  Several years ago the baseboards in two bedrooms had a separation like issue occurring on the end corner.  I have no idea how much any leveling work could cost in addition to product/installation but was told if I went with carpet in the 2 back bedrooms any leveling wouldn't be required.  My house is the first house the builder built and I am somewhat worried about what issues the slab may have.    Any recommendations or input regarding this matter - I'm new to the game.    I'm afraid this project may end up going way over budget and have to spend money I have marked for other improvements.
Comment: Can you add a few pictures??
Comment: baseboard photo is above
Comment: Hairline cracks in a slab are normal, from your description it sounds like it will be fine , possibly just a little self leveling compound but I am not even sure about that the photo is not showing the floor from what I can tell and whatever is happening in the corner may have nothing to do with the slab. A in focus photo with a straight edge on the floor would provide us with the information to help you out.
Comment: Thank you for this info.    I  had no idea this was normal.  Thanks again
Answer: It depends how out of flat your slab is and how perfect you want the installation.
The slab doesn't have to be level but it should be flat.  You'd need to remove the carpet and use a straight edge and look for gaps while moving the straight edge around the room.  Generally it doesn't matter how new the house is - slabs are never perfect.
Door bottoms can be cut down if they are paint grade fairly easily also if there is already carpet then you likely will already have enough clearance.
It also depends on the installation type.  You could be doing glue down, double glue down, or floating, unlikely to be doing nail down.  I'll assuming floating as this is the easiest.  I'll also assume that the underlay is built into the laminate flooring.
If you don't care about noise - the squeaking of the tongue and grove as you walk across the floor - then you can probably install with a fair amount of variance in the slab.  If you want there to be zero noise then you'll likely have to do at least some spot leveling.  There are some techniques you can apply to avoid noise in bad areas like gluing a few planks together to span an area with flatness issues.  Some people will spot glue a few planks in key locations though you have to be careful to consider expansion and how that will work if you fix those boards.  If you apply these technique you won't have noise but may have some bounce to your floors - some of this comes down to how good the laminate is (thickness, quality of the mechanical attachment, etc).  Generally the most important part of the installation of the floor is the prep work and this includes getting the substrate as flat as possible.  Grinding out high spots and spot filling low spots.
The flooring manufacturer typically rates the expectation for flatness over a ten foot distance.  Engineered hardwood for instance typically requires 3/16" difference over 10' or 1/8" in 6'.  This is for optimal installation and I'd bet that very few professional flooring companies actually get the floor to this degree of flatness.  Glue down floors can generally accept larger tolerances as the floor is glued to the substrate and won't bounce.  I have a glue down engineered floor that was installed by a high end hardwood flooring company, they used the self level flooding method, but this floor is still out by 1/4" in 3' and the flooring looks fine and there isn't any obviously detectable flatness issues even though the manufacturer specs 1/8" in 6' which is 4x more flat than what the flooring company achieved.  The rooms I have this floor in are bedrooms though and a large portion of the rooms are covered with furniture.  Again this kind of thing can factor into the decision on how extreme to go.  If you are going to cover the floor with a large amount of furniture and use area rugs then you can opt for more flatness defects.  If you are going for a large open space that won't have furniture then you'll want to pay more attention to the flatness.
Flatness between different rooms can be worked out with custom transitions in door ways.
Floor prep is fairly complex and probably not done to high degree of perfection even with most professional installers.
My recommendation would be to get a 6' flat edge, remove the carpet, move it around the space for the floor, note any dips that are more 1/4", note any high spots.  Address the worst ones - I've seen people use mortar to fill in low spots.  You are probably unlikely to have super high spots so you can probably avoid any grinding.  Aim for flat with no dips more than 1/4" over 6'.

Laminate on slab


ArcGIS REST export map features as geoJSON

Question: Is it possible to export the features from a map as geoJSON using an ArcGIS REST service?  I'm trying to make a vector layer in OpenLayers based on the output from the map's present view based on a layer.
Answer: Not directly, no (see Sean Gillies Blog for some reasons why). To do what you're after the easiest way is to convert from ESRI JSON to geoJSON with some intermediate script/service. See the How to convert ArcGIS Server JSON to GeoJSON? question on this site for a variety of different ways to do this.
Answer: One way to publish GIS feature services is to use cartoview www.cartologic.com/cartoview the Cartoview installer will also install GeoNode on windows. After the installation you can download and install the ArcGIS feature server app to serve out Feature services. This way you will be able to serve both standard WMS and geojson as well as feature services from the same platform, which will open the door to work with openlayers or ESRI apps
Comment: Are you associated with cartologic?
Comment: I work for Cartologic
Comment: From http://meta.stackexchange.com/a/59302: The community generally frowns on overt self-promotion and tends to vote it down and flag it as spam, so be careful. Post good, relevant answers, and if they happen to be about your product, so be it. However, you must disclose your affiliation with the product in your answers. Also, if a huge percentage of your posts include a mention of your product, you're clearly here for the wrong reasons. Our advertising rates are quite reasonable; contact our ad sales team for details. We also offer free vote-based advertising for open source projects.


Nexus 7 came with Superuser & ROM Manager pre-installed

Question: I just received my Nexus 7 from Google and I was surprised to see superuser and ROM Manager apps already installed. How normal is this? Does this mean my tablet is rooted out of the box? Does it mean it was used before? Does it void the warranty?
Answer: Did you purchased it directly from Google? Very likely you simply got a returned tablet, i.e. a tablet that already had a previous owner, which installed these apps. I doubt that Google pre-installs SuperUser and ROM Manager.
Comment: Actually I won it on the Kit Kat promotion. Yet it came with the precinct and all.
Comment: Still, it seems that somebody used it before :)


Terminate process upon specific output

Question: How can I terminate a process upon specific output from that process? For example, running a Java program with java -jar xyz.jar, I want to terminate the process once the line "Started server on port 8000" appears on stdout.
Answer: That can be accomplished with the following script considering that grep -m1 doesn't work for you:
#!/bin/bash

java -jar xyz.jar &> "/tmp/yourscriptlog.txt" &
processnumber=$!
tail -F "/tmp/yourscriptlog.txt" | awk  '/Started server on port 8000/ { system("kill '$processnumber'") }'

Basically, this script redirects the stdout of your java code to a file with the command&> "/tmp/yourscriptlog.txt", the last  & on the first line makes your code run as an isolated process and on the next line we have the number of this process with $!. Having the number of the process and a log file to tail we can finally kill the process when the desired line is printed.
Comment: Just what I was looking for! Was able to get this script itself to exit as well by replacing the awk command with `grep -m1 'Started server on port 8000' && kill $processnumber`
Answer: java -jar xyz.jar | grep -m1 "Started server on port 8000"

Comment: For environments with GNU grep (which adds `-m`).
Comment: This does not seem to work, at least for the application I'm running. The grepped line will come out but the application continues to run. Apparently SIGPIPE is not handled here to indicate the program should terminate
Answer: I adjusted the answer of @Rafael for more complicated occasions like mine, were the script won't simply let itself be pushed to the background.
Open a first tmux session and put your command (use tee instead of redirection to see output live), then detach with Ctrl-B D:
java -jar xyz.jar &> '/var/log/myscript.log'

In another tmux session, handle the termination:
tail -F '/var/log/myscript.log' | awk '/Started server on port 8000/ { system("tmux kill-session -t 0") }'

Use a named session if you already have other running tmux sessions.

Terminate process upon specific output


How can I determine which matrix libraries my R install is using?

Question: I am having a matrix error when using the computer cluster at my university that I cannot reproduce on my local machine.  I think it might be due to a difference of matrix libraries (BLAS, LAPACK, ATLAS, etc.).  I don't know much about these libraries other than what I've read here, but I'm thinking there should be a way to get R to tell me which matrix libraries it was installed with (i.e. which ones it's using), analogous to sessionInfo() to tell me which version of R packages it's using.
Answer: Though there may not be an explicit R function for this, perhaps you can capitalize on shell commands (e.g., file and ldd) to get some clues without requiring rebuilding R nor root access on the cluster:
(rpath <- Sys.which("R"))
#            R
# "/usr/bin/R"

To make sure that ldd will work, see what type of file it is:
system2("file", rpath)
# /usr/bin/R: Bourne-Again shell script, ASCII text executable

If yours shows an actual executable (such as ELF 64-bit LSB  executable, x86-64, ...), then skip this one step.
script <- readLines(rpath)
script[grepl("/bin/", script)]
# [1] "#!/bin/bash"
# [2] "     if [ -x \"/usr/${libnn}/R/bin/exec/R\" ]; then"
# [3] "     elif [ -x \"/usr/${libnn_fallback}/R/bin/exec/R\" ]; then"
# [4] "## some systems have a more portable sed, e.g. /usr/xpg4/bin/sed on Solaris,"
# [5] "SED=/bin/sed"
# [6] "      exec sh \"${R_HOME}/bin/Rcmd\" \"${@}\" ;;"
# [7] "R_binary=\"${R_HOME}/bin/exec${R_ARCH}/R\""

This tells me that the actual executable is /usr/lib/R/bin/exec/R (or /usr/lib64/...). It is taking some inference, but it's a step. This is working for me with R-3.3.2 on ubuntu, so I can only assume it'll be similar on different OSes. If this is uninformative, you can also grep for "/lib" or "/exec" (or just examine the whole script file for other clues).
Once you know the path called by the script (or if it isn't a script to begin with), find the shared library dependencies:
system2("ldd", "/usr/lib/R/bin/exec/R")
#         linux-vdso.so.1 =>  (0x00007ffcfadcd000)
#         libR.so => /usr/lib/R/lib/libR.so (0x00007f746f615000)
#         libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f746f3eb000)
#         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f746f025000)
#         libblas.so.3 => /usr/lib/libblas.so.3 (0x00007f746eda8000)
#         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f746eaa2000)
#         libreadline.so.6 => /lib/x86_64-linux-gnu/libreadline.so.6 (0x00007f746e85b000)
#         libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f746e61d000)
#         liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f746e3fb000)
#         libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f746e1ea000)
#         libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f746dfd1000)
#         librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f746ddc9000)
#         libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f746dbc4000)
#         libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f746d9b5000)
#         /lib64/ld-linux-x86-64.so.2 (0x0000560abd5fa000)
#         libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f746d78b000)

The 5th line of this output suggests that R is using the BLAS library, specifically libblas3.
Comment: It's probably useful to note that if `system2("file", rpath)` shows an executable then  "skipping the next step" means calling `system2("ldd", rpath)`.
Comment: Thanks for your thorough and detailed answer.  I never would have figure it out on my own.  It's a shame that R doesn't have an "about me" function, like "R --version" , but maybe it could be called "R --buildoptions".
Answer: As far as I am aware there isn't a specific function (especially not in base R) that will give you the BLAS version. R will most likely use the standard library that comes with your system (unless someone built it from source with a specific BLAS version).
You'd have to do it from the terminal, type
locate libblas.so

It's probably going to be in /usr/lib/libblas.so or /usr/lib64/libblas.so, and the location is probably a symlink. So follow the links
ls -l /usr/lib/libblas.so

If you want to to change the symbolic links to point to a different BLAS library, you can do
update-alternatives --config libblas.so.3gf
and select the version you want to use. This post explains it very nicely in more detail: https://www.r-bloggers.com/for-faster-r-use-openblas-instead-better-than-atlas-trivial-to-switch-to-on-ubuntu/
Another way to definitely know what version you are using, would be to install whatever implementation of BLAS you want – for example OpenBLAS, and then replace the standard R BLAS library with a symlink to your new library. Make sure to install R with --with-shared-blas option, as explained in here: https://cran.r-project.org/doc/manuals/r-release/R-admin.html#BLAS
Then you just need to:
# navigate to your R directory
cd  …/path-to-R-installation/lib/R/lib
# backup the original
mv libRblas.so libRblas.backup
# create simlink
ln –s …/path-to-new-0blas-library/new-lib.so libRblas.so

Comment: Nice explanation. I guess also that @rcorty could use this to discover if the Blas really is the cause of problem. By installing a range of Blas libraries and updating symbolic link to test one at a time to see if it replicates the error.
Comment: Thank you for your response.  I am specifically interested in the situation where someone else, who I share a machine with, built R from source with a specified matrix math library, eg. ATLAS, BLAS, OpenBLAS, etc.  Apologies if I wasn't clear enough in my question.  I'm curious if I can figure out what he did.
Answer: Is a bit of googling enough?:
http://www.stat.cmu.edu/~nmv/2013/07/09/for-faster-r-use-openblas-instead-better-than-atlas-trivial-to-switch-to-on-ubuntu/
Comment: Thanks for your response.  From my reading of that article, it provides information on how to build R with different matrix libraries, but doesn't help me figure out which matrix library was used in an existing build.


Choosing Writing Samples for Ph.D application

Question: The following is the description for the required writing samples:
"You must submit at least three papers that best represent your ability to conduct research and write effectively about your area of specialization. We encourage you to submit published work."
I view "three papers" as three different articles (rather than three publications such as conference papers) and, say, could make choices from the below options:
a. A conference paper on which I am the first author (4 authors in total)
b. A conference paper on which I am the second author (3 authors in total)
c. My Master's thesis which is extended from a. (pretty much the same with a. in the abstract section)
d. Final project report in the class taken during my Master.
What I am wondering is that if I can just combine all four without modification in a single pdf file (about 60 pages total), or I am supposed to extract the main idea in the articles and make it as short as possible.
Another thing is that since c. is just the extension of a., so their abstract sections are pretty much the same. Is it redundant to include both of them?
Answer: I'd suggest not to submit a whole thesis. Imagine the frantic look the admission committee members would have when they found out they just printed hundreds of pages.
Ultimately, they care if you can publish. So, definitely keep a and b, and focus on them heavily. For c, I'd suggest do a bit of curating and pick the most interesting chapter that does not overlap with a and b in contents. If none, then I'd suggest the literature review chapter. It's a good section to show your understanding of the field and your skill of information synthesis.
As for d, they only ask for three; course work (in my opinion) is not worth breaking the quota for. I'd, however, consider submitting if i) it features an extremely innovative idea which may become one of your study objectives, or ii) it acts as the foundation of your then Master's work and publication. It would show that you have the ability to carry and idea forward to fruition, and that's always a plus.
Good luck with the application!
Comment: Thank you. d is a report of a work done during my internship and was used for the course work, so maybe it would be a plus (since it represents my internship outcome). As for the thesis, I am considering the chapter of Conclusion and Future Work. Because the additional experiments are presented and some ideas came after the publication and was shown in the chapter. But it actually has only 44 pages, and will be 60 when combined with publications. Do you think it is still a bad idea to include the whole thesis?
Comment: @Fred, to me I think 60 pages are acceptable, but really it's just a personal opinion. In most of the packages I reviewed, 30-40 pages are the ballpark.
Comment: got it, thanks. I will follow your suggestion to pick sections not overlapping with the publication. Really appreciate :)


Download full journals from IEEE as pdf (ebook)

Question: I was wonder if anyone knew if it is possible (and how) to download an entire journal (as if it would be printed) from ieeeXplore ?
Answer: I believe that violates the terms of use for IEEE Xplore.  I don't know if you are an IEEE member, institutional subscriber, etc., but the terms of use for institutional subscribers states the following:

Institutional subscribers are NOT permitted to do the following: [...]

Download or attempt to download an entire issue or issues of a publication contained in IEEE Xplore.

You should first view the terms of use for IEEE Xplore at http://ieeexplore.ieee.org/xpl/termsOfUse.jsp, and if you have questions contact Xplore support via the contact form http://ieeexplore.ieee.org/xpl/techform.jsp.
Answer: Well, to put legality aside merging pdfs into single file is rather easy (I assume that you can download individual articles as pdfs).
You need ghostscript program (avilable on any modern linux, and I guess also for windows) and then issue command:
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH 1.pdf 2.pdf 3.pdf

which will merge 1.pdf, 2.pdf, 3.pdf into combined.pdf.
If you want to mass download articles you can use this firefox plugin: https://addons.mozilla.org/pl/firefox/addon/downthemall/
Anyways: please mind that you might be bending or violating terms and conditions using these techinques.
Comment: I don't think that the problem that the OP wants solving is that he has all the articles in different PDF files ...
Comment: @xLeitix There is also information how to mass download the files ;)


Can I use a bus ticket straight away after rolling a double?

Question: I would like to know: if a player rolls doubles twice then lands on the birthday gift and collects a bus ticket, can that player use their bus ticket immediately or do they have to roll again because they rolled doubles?
Answer: From the rules here

If doubles entitle you to roll again, you may use a Bus Ticket in
place of rolling the dice.

The rules for birthday gift say

BIRTHDAY GIFT If you land here collect $100 from the Bank, or draw a
Bus Ticket for use on a later turn. Your choice.

So the question is is rolling again due to a double is the same turn or a new turn. The rules state the following.

After you have completed your play, the turn passes to the left.

So reading that it sounds like rolling again it part of the same 'turn' or 'play' and not a new and separate turn.  So if a bus ticket is taken for 'use on a later turn' then they would not get to use it immediately.
However this terminology is contradicted in rules for getting out of jail by rolling a double.

Even though you rolled doubles, you do not take another turn.

So it seems the rules are confused on what is 'a turn' and if that differs from 'rolling again'
Personally I would let them as that seems to make more sense thematically that you can use a ticket straight away, maybe one to discuss as a house rule before you start as there is an argument in the rules for both.


How to use iOS debug app on iPhone while disconnected?

Question: I made a flutter app and tried to build on iPhone. It works while debugging is connected. But if I try to exit and relaunch the app or disconnect cable, it would not launch again and keeps crashing.
How can I use the app while Xcode debugging is disconnected?
Answer: Run flutter run --release in the terminal and that'll allow you to run a production version app on your iOS device without debugging connected.
Answer: From Xcode, you can change the Build Configuration of the Run Schema easily. To do this, click on Runner -> Edit Scheme, then go in the Run tab, choose "Release" in the Build Configuration drop down menu. To install the application, run the configuration again.
See Step 4 in this page for screenshots.
Answer: If you only Start Debugging after this you can disconnect cable and will work. If you after Restart Debugging after this if you disconnect cable app will be crashing. I think you restart debugging.
Answer: Assuming you can already able to debug with cable.

flutter build ios
connect cable
flutter install , if more than 1 device option is available, terminal will prompt you to choose the device for installation.
now you can disconnect cable
Comment: theres no need for a provisioning profile for this?
Answer: Its not possible for now, you should build app only on Release mode (from XCode) to make it run on Physical phone.


ASP.NET MVC Code-First EF - Possible to use EF without database create permissions?

Question: So I'm working on an ASP.NET project for university. We have to upload our code to a server running IIS and SQL Server 2008. I've written my project using MVC Code-First EF. I understand that the Entity Framework system needs permission to create the database to work properly (you can't just give it an empty database and let it fill it with data). This has created a problem for me since I do not have database creation privileges on the shared SQL Server. Is there any way around this?
Answer: As you don't have permissions, it sounds like you'd need to get a DBA to create your database  on the server you are trying to deploy to - this could be done from either a database creation script or from a database backup of the db on your dev machine. You can then instruct EF code first not to try to create / update the database automatically by adding this line to your global.asax (or indeed anywhere before you first access the database)
<code>Database.SetInitializer<YourContextType>(null);
</code>
Answer: You can use an existing database, rather than let EF create one for you. I have done this myself, but admittedly only when using EF Migrations. Otherwise, you run into trouble with missing table exceptions and what not.
When using migrations, just point your connection string to your empty database, create an initial migration to populate the database with your schema and then update the database itself.
See this answer: How do I create a migration for an existing database in EntityFramework 4.3?
.. which include this nice link to getting started with EF Migrations: http://thedatafarm.com/blog/data-access/using-ef-migrations-with-an-existing-database/
All this is available through Nuget, and if you have access to Pluralsight content, I can highly recommend Julie Lerman's video on the topic.
If you don't want to use Migrations, you can still use Code First if you just create the database objects manually using SMMS, but obviously you have the manual work of keeping your model and the database in sync.


Can I add DNS but keep those provided by DHCP in OSX?

Question: I'm trying to add an additional DNS entry in my OSX network preferences but I want to keep the DNS provided by DHCP. These show up in gray, but when I click the plus button below them, they disappear to make way for the user-provided DNS. So it seems I can only have either static entries or DHCP entries but not both. Is there some way I can accomplish this by changing settings in a .conf file somewhere perhaps?
Answer: Since Mac OS X 10.6.3 you computer keeps a list of all DNS servers it has ever seen and automatically picks the fastest one for you. So you can simply add the new one and be happy with it, as your Mac will remember the ones provided by DHCP.
If you want to define a strict order after which Mac OS does it´s lookups, best follow this how-to.
Additionally, to see the current DNS search order (and search domains), run: scutil --dns from the Terminal. Or, to quickly check which DNS server you are actually currently using, run for example nslookup apple.com.
Comment: Thanks, these utils are very useful! But I didn't see the behavior you describe. Running scutil --dns before and after I change the DNS settings away from the DHCP-provided servers seems to show that it does not keep the DHCP-provided DNS servers after I add manual DNS of my own.
Comment: nslookup does not reflect the DNS configuration that is used for other Applications. At least not anymore. It might have done in 2011.


The non-trivial zeroes of the Riemann Zeta Function

Question: Hi I have read extensively about the Riemann zeta function and there is something that I am partly confused about. It is my belief that a positive number raised to any power is also positive since it is just a root and/or power of that same positive number. Using this info, I do not understand how there could be any non-trivial zeroes in the positive numbers because raising 1,2,3,4,5,6,... to any power will be positive and the reciprocal of a positive number is still positive. What my essential question is how does the sum of exponentially smaller and smaller $positive$ numbers end up reaching zero?
Comment: The Riemann zeta function is defined as the analytic continuation of the map $ \left\{ \begin{matrix} \mathbb{R}_{> 1} & \to & \mathbb{R} \\ s & \mapsto & \displaystyle \sum_{n = 1}^{\infty} \frac{1}{n^{s}} \end{matrix} \right\} $ to $ \mathbb{C} \setminus \{ 1 \} $. It is this analytic continuation that has non-trivial zeros.
Comment: [this thread](http://math.stackexchange.com/questions/378803/zeta-function-zeros-and-analytic-continuation) and [this answer](http://math.stackexchange.com/a/815480/21783)  concerning the partial sum may clarify things too.
Comment: non-trivial means you have to read a complex-analysis course prior to $\zeta(s)$
Answer: Your reasoning holds over the real numbers (which we call $\mathbb R$).  It fails over the complex numbers.
Consider $3^s$ where $s$ is a complex number.  In fact, in honor of the Riemann zeta function, let $s = \frac{1}{2}+bi$, where $b$ is real (this is precisely the critical line).  Then, we have that:
$$3^s = 3^{(1/2)+ib} = 3^{1/2}+3^{ib}=\sqrt{3}\times 3^{ib}$$
How do we make sense of $3^{ib}$?  The normal way is to notice that $3^{ib} = e^{(\ln 3)ib}$  Finally, we have an identity:
$$e^{ix} = \cos x+i\sin x$$
This gives us that:
$$3^s = \sqrt{3}(\cos(\ln(3)b)+i\sin(\ln(3)b)$$
Now, this is negative for infinitely many $b$.  One ``obvious" choice is to first write that $\ln(3)b = x$, then notice that $$3^s = \sqrt{3}(\cos x+i\sin x)$$
Is negative for $x = \pi+2\pi k$ (among other numbers).  This corresponds with $b = (1/\ln(3))(\pi+2\pi k)$. We have that:
$$3^{(1/2)+i\pi/\ln(3)} = \sqrt{3}(-1+0) = -\sqrt{3}$$
Answer: The question does not depend on summing the series, it can be asked for the partial sums.  There are complex zeros of any of the partial sums, for example, $1 + 2^{-s} = 0$ when $s$ is an odd integer multiple of $\frac{i \pi}{\log 2}$.
This is a consequence of any exponential function $a^s$ with $a$ real and positive, extending to a function of all complex $s$, but the extension can assume any nonzero complex value.
Comment: (you should better talk of the partial sums of $\eta(s)$, whose zeros converge to the zeros of $\zeta(s)$ or $1-2^{1-s}$)
Comment: @RaymondManzoni no, the zeros of the partial sums $\sum_{n=1}^N n^{-s}$ don't converge to the zeros of $\zeta(s)$, since for $Re(s) \in (0,1)$ : $\zeta(s) = \frac{1}{s-1} + \sum_{n=1}^\infty (n^{-s} - \int_n^{n+1} x^{-s}dx) = \lim_{N \to \infty} \frac{N^{1-s}}{s-1} +\sum_{n=1}^N n^{-s}$
Comment: @RaymondManzoni so you should look instead at the zeros of $\frac{N^{1-s}}{s-1} + \sum_{n=1}^N n^{-s}$
Comment: @RaymondManzoni so you don't want to understand that adding $\frac{(N+1)^{1-s}}{s-1}$ to $\sum_{n=1}^N n^{-s}$ reduces drastically the error (and hence improves the localization of the zeros)
Comment: @RaymondManzoni yes, because I'm sure you didn't get it : for $Re(s) > 0$, $\zeta(s)  = \frac{(N+1)^{1-s}}{s-1}+ (\sum_{n=1}^N n^{-s}) + \mathcal{O}(2N^{-Re(s)})$ where the error term is really bounded by $2 N^{-Re(s)}$ independently of $Im(s)$. Hence, when $N$ isn't very small (independently of $Im(s)$) you can't decently imagine that any zero of $\zeta(s)$ is close to a zero of $\sum_{n=1}^N n^{-s}$


Upgrading CiviHR to 1.6.8

Question: Does anyone have clear instructions on how to upgrade CiviHR? The ones included on GitHub are for drupal.  I tried to do it manually by copying over the CiviHR folder with 1.6.8 but it just broke CiviCRM altogether.  I don't have access to drush or anything like that, so I can only copy it and then run the updates manually in extensions manager in CiviCRM.
Answer: CiviHR isn't a normal extension that you can install on a general purpose CiviCRM installation.  It is intended to be run as a dedicated CiviHR system and is only supported on Drupal.
There is a new site at https://civihr.org/ and wiki at https://civihr.atlassian.net/wiki/display/CIV/Welcome
There is a lot of development activity ongoing and some of the docs are lagging behind.  I think they are still offering free hosting if you join the Early Adopters program and meet certain requirements.

Upgrading CiviHR to 1.6.8


Windows Communication Foundation (WCF) for beginners

Question: I need to learn WCF for my project as I am building a client-server application under Windows. What's the best place to start. I've googled for tutorials and books but I couldn't find something suitable for starters. I would prefer a book.
Answer: As for resoures: there's the MSDN WCF Developer Center which has everything from beginner's tutorials to articles and sample code.
Also, check out the screen cast library up on MSDN for some really useful, 10-15 minute chunks of information on just about any topic related to WCF you might be interested in.
Answer: Look at PluralSight videos may be its easy way for you to start. Some of the videos are on MSDN for free.
Find book for yourself. For example this one could be easy to understand for beginner.
Look at WCF samples. Some samples can help you in learning.
Answer: If you prefer a good book, check out Programming WCF Services, 3rd Edition by Juval Lowy.
Other WCF book recommendations are listed in this question.


Exodus 20:26 Don't Put a Stumblingblock

Question: How would private parts be exposed on altar steps?

Exodus 20:26 (NIV)
  And do not go up to my altar on steps, or your private parts may be exposed.
Answer: Benson comments on this verse as follows.

Exodus 20:26. Neither shalt thou go up by steps unto mine altar —
  Indeed afterward God appointed an altar ten cubits high. But it is
  probable they went not up to that by steps, but by a sloping ascent.
  The garments worn in those countries, being perfectly loose, were
  easily blown aside, so as to discover the lower parts of the body; to
  prevent, therefore, this inconvenience, and that no indecency might be
  intermixed with the service of God, this precaution was necessary. And
  for the same reason the priests were afterward appointed to wear
  breeches, which were worn by none of the people besides, Exodus 28:42.
Comment: Although this does address the question, it would be preferable to include some of your own content rather than solely quoting an outside source.
Answer: I see the Hebrew of Exodus 20:6 like this:

And you will not ascend by steps to my altar, that your nakedness be not exposed because of it.

Details:

Interesting:
The Hebrew word for "by steps", בְמַעֲלֹ֖ת (from מַעֲלָה: Strong's H4609 - ma`alah), only occurs this once in the Torah. In fact, the next occurrence is not until 1 King 10:19 in regard to Solomon's great white (ivory) throne, which had six steps going up to it.
Since there is no mention of steps in the construction of the Tabernacle, this cautionary instruction was likely due to the nature of the construction of the altar and the careless practices of the priests of other nations in their worship of gods of silver and gold (Exodus 20:23).
The dimensions of the altar were:

And thou shalt make an altar of shittim wood, five cubits long, and five cubits broad; the altar shall be foursquare: and the height thereof shall be three cubits.
  -- Exodus 27:1 (KJV)

Image courtesy of Altar (Bible) - Wikipedia
In modern units, a short cubit* (for small constructions) was equivalent to about 17½″ (44.5 cm), so the dimensions of the altar were 7′ 3½″ (2.225 m) long x 7′ 3½″ (2.225 m) wide x 4½′ (1.334 m) high.
Given these dimensions, it would be tempting for the priests to want to elevate themselves with steps to reach all areas upon the altar without stretching. However, Exodus 20:26 forbids them to do so. The LORD had provided instruments for the priests to be able perform their service without need of them:

And thou shalt make his pans to receive his ashes, and his shovels, and his basons, and his fleshhooks, and his firepans: all the vessels thereof thou shalt make of brass.
  -- Exodus 27:3 (KJV)

Conclusion
Regardless of the struggle to understand how the nakedness of the priests might have been exposed, the text clearly indicates that it was a contingency that needed to be taken into account, and steps were strictly forbidden in the service of the LORD at his altar because of the risk.

Notes:
* How Long Was the Original Cubit?

Exodus 20:26 Don't Put a Stumblingblock