Why has Novell never written its own boot loader?

Question: I've never used NetWare 5.x 6.x but if I remember correctly versions 3 and 4 required you to boot to DOS partition and then load NetWare server files from it. I could never understand the logic behind it. Why wouldn't NetWare just boot into its own partition and load the necessary server files from it?
Comment: Would there really be any significant benefit to doing so? Making your own OS, even as simple as DOS, is a lot of effort. Just having a boot loader isn't enough, and isn't trivial either (keep in mind you only have 446 bytes to load and execute the disk drivers and anything else you need to do an actual boot). Each PC had its own quirks you had to deal with in the tiny amount of code you had available. Using DOS (or OS/2) meant they got a compatibility layer for free.
Comment: (and "for free" is literal - don't forget that DOS was included with pretty much any PC you bought; it wasn't until MS-DOS 5.0 that you actually *bought* DOS)
Comment: @Luaan NetWare was its own operating system.
Comment: @RossRidge Yes, it was. But it was still an OS that was started by running a DOS executable. Mind, I'm sure they could have find the extra few weeks (or months, as they flesh out the kinks among various PC-compatibles) to replace DOS entirely; my point is that it would be a pointless waste of time, and they had better ways to spend their time.
Answer: In order to load files from the SYS volume NetWare needs to have a device driver for the kind of disk your SYS volume lives on.  Considering that you might put your SYS volume on an MFM drive, or RLL, or ESDI, or SCSI, or IDE, or any of a variety of different RAID controllers, we are talking about a lot of different devices your bootloader needs to be able to handle.
Being able to load the device driver from a DOS partition simplified things quite a bit.  While none of the NetWare servers in my care were ever configured to do so, I suppose you could theoretically boot from a floppy containing server.exe and your disk device driver so that 100% of your hard disk capacity could be dedicated to NetWare volumes.
On top of the driver issue, NetWare supported large volume sizes (larger than your system BIOS might support).  Booting from DOS avoided the need to be careful to place your SYS volume within the first 504 MB of the first physical drive (or whatever your particular BIOS limitations were).  Instead you just had to create a small DOS partition somewhere your BIOS could boot from, and you were then free to put your SYS volume anywhere else you liked, and make it any size you like, even placing it somewhere your BIOS didn't support booting from.
Comment: The BIOS supports MFM. RLL and IDE drives natively.  Pretty much all ESDI, SCSI, and RAID controllers had BIOS extension ROMs so they could boot MS-DOS or any other operating system. The bootloaders for MS-DOS, Xenix, OS/2, Linux, etc... didn't need support a lot of different devices, they just used the BIOS.
Comment: @RossRidge Yes, but you had to deal with the drive's logical structure, which widely varied between hard drives, not to mention floppies. I'm not sure if NetWare provided their own disk drivers for the post-bootloader system, but it would make sense to use ones already made for DOS if possible, saving quite a bit of effort (mainly ensuring compatibility). It's also handy that if something fails, you can boot into DOS and use some diagnostic tools etc. - programming "direct to the metal" has many disadvantages (I've made my own toy OS, so I had lots of fun with that - before VMs).
Answer: From Network World:

NetWare never ran on top of DOS. A server was booted to DOS solely to
  run the NetWare boot loader (a DOS program). It didn't need to do
  that, it could have booted directly but that would have required
  Novell to build its own BIOS loader to initialize all of the hardware.
  The NetWare designers felt that there was no need to reinvent the
  wheel, so let DOS handle that.

Novell was not the only operating system vendor to use MS-DOS as a boot loader: Microsoft did much the same for 16- and 32-bit Windows, especially from Windows 95 onwards where returning to DOS was not a standard feature.  (Windows NT and its successors did not use DOS as a loader.)
This paper from Drew Major et al. doesn't explain why they used DOS for booting but does offer insight into Novell's design philosophy:

The NetWare operating system is designed specifically to provide
  service to clients over a computer network.  This design has resulted
  in a system that differs in several respects from more general-purpose
  operating systems.

I would imagine booting from DOS to be one of those differences that places convenience and simplicity over traditional OS goals.
If you're interested in learning more of the design of NetWare, this paper is a good place to start.
Finally, Novell did eventually write their own boot loader.
Comment: In the early years, it wasn't uncommon to use DOS as a boot loader for Linux as well. LOADLIN, used in conjunction with a UMSDOS file system on top of a FAT partition, allowed (relatively) easy sharing of data between the two systems, and starting the Linux kernel (and subsequently the Linux init, but at that point the Linux kernel was in control of the system) from the DOS command line.
Comment: With Windows 95, 98 and ME, MS-DOS was an integral part of the operating system.  Windows NT, 2000, XP, Vista, 7, 8, 10 don't use MS-DOS as a bootloader.
Comment: I'm aware NT didn't use DOS, I'll edit my answer to reflect that.  I don't know that I would call DOS an "integral part of the operating system" of the other line since Win32's drivers overrode much of the DOS and BIOS services once loaded.


NTLM, Kerberos and F5 switch issues

Question: I'm supporting an IIS based application that is scaled out into web and application servers. Both web and applications run behind IIS. The application is NTLM capable when IIS is configured to authenticate via Kerberos. It's been working so far without a glitch.
Now, I'm trying to bring in 2 F5 switches, 1 in front of the web and another in front of the application servers. 2 F5 instances (say ips 185 & 186) are sitting on a LINUX host. F5 to F5 looks for a NAT IP (say ips 194, 195 and 196). Created a DNS entry for all IPs including NAT and ran a SETSPN command to register the IIS service account to be trusted at HTTP, HOST and domain level. With the Web F5 turned on and with eachweb server connecting to a cardinal app server, when the user connects to the Web F5 domain name, trust works and user authenticates without a problem. However, when app load balancer is turned on and web servers are pointed to the new F5 app domain name, user gets 401. IIS log shows no authenticated username and shows a 401 status. Wireshark does show negotiate ticket header passed into the system.
Any ideas or suggestions are much appreciated. Please advice.
Answer: Microsoft says it's not possible.  I've recently asked a similar but more general question.

NTLM, Kerberos and F5 switch issues


Finite element stabilization schemes for incompressible flow

Question: I am looking for an easy to implement stabilization scheme that can be used with equal order ($P_1-P_1$ or $Q_1-Q_1$) finite elements for fluid flow. Is there something like this or should I stick to Taylor Hood elements? It appears that there are a number of methods but the ease of implementation is not quite clear.
Answer: Warning
First, be warned that stabilization is generally much more fragile than use of stable elements. If you solve a narrow class of problems, you might be able to choose reasonable parameters and get on with your work, but if you solve a wide range of problems or need to solve demanding under-resolved scenarios, especially with less regular boundaries, coefficient structure, and constitutive relations, stabilization will generally require constant vigilance to detect and quantify the impact of numerical artifacts, and to re-tune parameters for.
For these reasons, I strongly recommend stable elements (especially those with discontinuous pressure space, thus locally conservative) if you want a robust method that does not need to be frequently revisited. In my opinion, reliability and clean analysis is worth the modest increase in data structure complexity.
Stabilization methods
I'll outline the two most popular choices in the context of a stabilization term $S_h(\mathbf u_h, p_h, \mathbf f; \mathbf v_h, q_h)$ to be added to the weak form.

Pressure-stabilized Petrov-Galerkin (PSPG)
This stabilization has the form
$$ S_h^{\text{pspg}}(\mathbf u_h,p_h;q_h) = \sum_{T \in \mathcal{T}_h} \alpha_T\Big(-\nabla\cdot(\eta D \mathbf u_h) + \nabla p_h - \mathbf f, \nabla q_h\Big)_T$$
where the inner product $(\cdot,\cdot)_T$ is evaluated over element $T$. This method was introduced by Hughes, Franca, and Balestra in 1986 and is a residual-based method. It requires second derivatives on elements (if applicable; they are only zero for lowest order spaces with affine elements). When the solution is not very well resolved, the element integral can be very different from the actual cell residual (because the influence from neighbor cells is discarded). The stabilization produces a non-physical boundary condition for the pressure, leading to local inaccuracies impacting functionals of interest (such as drag). There are more robust and accurate edge-stabilized modifications, but these are more complicated and grow the stencil. Residual stabilization adds a large number of couplings for more complicated problems (like reaction and turbulence models) and significant implementation complexity. The formulation is cumbersome for time-dependent problems because the "affine" term enters in an inner product, thus typically precluding a method of lines approach. PSPG also breaks symmetry (relevant for adjoint-consistency) and increases regularity requirements for an adjoint, making it less attractive for optimization and sensitivity analysis.
Local pressure projection
This conceptually simpler method uses a stabilization of the form
$$ S_h^{\text{lps}} = (\alpha \tilde \pi p_h, \tilde \pi q_h)$$ where $\tilde \pi$ is a local fluctuation operator and $\alpha$ is a scaling factor. Dohrmann and Bochev (2004) studied what is perhaps the simplest choice, $\tilde \pi = 1 - \pi_{k-1}$, where $\pi_{k-1}$ is cell-wise projection into a polynomial space of degree one less than the continuous space. There are many patch-based and edge-stabilized choices, see Braack and Lube's 2009 review. These methods are simpler to implement and preserve symmetry, but are often less robust.
Comment: Thanks for the detailed answer. Yes the class of problems is rather narrow. I will look more into the pressure projection method. At some point the code will be used for inversions so being able to solve the adjoint problem will be useful.
Comment: I looked at some papers but how exactly the stabilization matrix is constructed is not clear to me.
Comment: @stali There are many papers, books, and open source implementations available. If after exhausting these resources, you are still stuck on something, you're welcome to ask more focused questions on this site.
Answer: This is a late response, but I want to point out the option (for the time-dependent case)
of using a
pressure-approximation type of projection method, based on solving
a Poisson equation for the pressure with a well-posed boundary condition.
See [1] for derivations and tests, including tests with equal-order finite elements.
I have to admit that Jed Brown's warning still largely applies, however --- the
schemes proposed and discussed in [1] appear very flexible and are supported by some theory
and some testing,  but have not been widely tested on many different problems.
They may prove to be robust, but this has to be proved by experience.
[1] J.-G. Liu, J. Liu, R.L. Pego, Stable and accurate pressure approximation for
unsteady incompressible viscous flow, J. Comp. Phys. 229 (2010) 3428-3453.


How does human body deal with inert solid material in the bloodstream?

Question: How does human body deal with inert solid material in the bloodstream? For example, if there is a powder of glass injected into our bloodstream, will the white blood cells do anything or will kidney excrete these materials? Thanks.
Comment: I once read a crime story (fictional), where injecting solid material like glass powder into the bloodstream was used as a means of deliberately murdering the patient :-). That would imply, that the body would not deal with such a condition very well. My mother is a medical doctor, read the same story, and did not say it was nonsense, recommended the book.
Comment: in some cases it will form scar tissue around it and even try to expel it by moving through the tissue.  in many cases it won't actually go anywhere, but form lump in the tissue.
Comment: As @shigeta points out, it would matter where the insult occurs and also what "inert" real [means](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2025426/?page=1).  Glass could easily not be inert, and even if it were, you could easily kill someone with fine glass in a [central line](https://en.wikipedia.org/wiki/Central_venous_catheter), just from the damage that would produce.  You want to look into inert foreign bodies.
Answer: Non-opsonized particles (Particles that can't be coated with opsonins like antibodies or complement proteins) can be engulfed by macrophages which could end up, for example, in the lung secretions and be coughed up one day. Note that a cell can only engulf a particle so large, so you'll not feel yourself coughing up anything out of the ordinary. Only tiny particles can be dealt with like this. Bigger particles can become trapped in fine vasculature (small veins; venules, and small arteries;arterioles). This can lead to abscess formation necessitating amputation of the affected limb.
Comment: It will not lead to abscess formation (that's a bacterial problem), but will lead to ischemia. Remember, most likely it will be injected into the venous side, which gets progressively larger until the pulmonary system is reached, so obstruction can occur in arterioles and capillaries of the lung.


RSS enabled web part

Question: We are rolling up content from multiple site collections and are looking for a way to allow a RSS feed from that rolled up content.  Any ideas on implementation of a RSS option for a custom webpart?  I know the Content Query Web Part has an option to subscribe to it via RSS and am looking to implement that on a custom web part.
Answer: As @Steve mentioned, create an Application Page in the _Layouts folder that outputs the RSS feed.  Then link to that page from your web part.  Here is an example of how to generate an RSS feed from C#: http://www.dailycoding.com/Posts/create_rss_feed_programatically_from_data_in_c.aspx
Comment: Thanks for the additional information and post.  I was hoping to keep the logic for querying the data in just the web part.  I hadn't thought of using an application page, but I guess I could create a generic one that takes parameters from the web part.
Answer: I think you'll need an application page (_layouts page) for this that returns the xml needed for the feed.  If you've seperated the data/business logic from your presentation layer in your webpart, then this application page should be pretty easy to write because you are just creating a new XML based presentation layer.

RSS enabled web part


After an oil change, my car, 2004 Hyundai Elantra has an oil leak in the front of my car, and it smell like gas

Question: After an oil change, my car has a oil leak and it randomly dies whenever I drive very slow, my foot on the brake all the time, for example while I am driving and looking for an address. What should I do?  I took my car to an auto shop, they said the oil change did not tighten the cap, so they tighten the cap for me. They said my idle control valve is getting bad, so they change that and the idle control valve for the random dying . I took my car home and found the oil still leaking, not sure about the random dying because from the shop to my house is 1 mile.
What I should do? Is this related to the oil changed?
Answer: It's possible the original shop dripped oil on the engine while refilling it and that oil continues to drip onto the ground.  It might stop after a while.
It's also possible they did not tighten the oil filter correctly (over or under tightened it).
Can the second shop take a look for those conditions?
I don't think the stalling has anything to do with the oil.  You might be OK in that regard after the idle control repair you had.


SQL Server 2008 Replication - Loss Potential

Question: Is there any type of replication over a WAN (cross-country) that can guarantee no data loss in a disaster?  Are we always subject to losing a few seconds or minutes up to the point?
If so, any suggested get-arounds?  We are debating using cloud storage or changing or financial app to log one or two of our key transactions onto an off-site server.
Answer: It looks like it is possible.  SQL Server calls it Database Mirroring, and the key point is to use the "high-safety" mode, which is synchronous.  That means that every transaction committed will be committed to both instances before returning as completed.
Do note, this will definitely have an impact on performance.  And likely a big impact.  Every time you make an update to the database, it is going to be committed locally, then sent to the remote (mirror) server, processed and committed there, then the remote one will return a notification that it has completed the transaction, and only then will the primary DB server return to the client that the transaction was completed.  This extra round trip and processing will cause some level of increased latency.
For more information, start with these MSDN articles:

Database Mirroring Overview
Synchronous Database Mirroring (High-Safety Mode)

Note: I'm not a SQL Server DBA.  Most of my experience is with PostgreSQL and Oracle.  There may be a better or alternate way of doing this.  If so, hopefully a SQL Server DBA will supply it or correct any mistakes I've made.
Answer: I would recommend That on site you should deploy Database Mirroring or Clustering
And then over the WAN link Transaction log Replication.
Mirroring over WAN has a very sensitive latency threshold and in the event of poor performance due to network throughput this can cause the mirror to fall out of sync intentionally to protect the database however... in the event of corruption in a database mirror set the corruption would then replicate to all the replicas.
There are of course some deciding factors here such as storage requirements.  As you have mentioned you are thinking of cloud storage for disaster recovery although this may help guarantee no data loss this would not satisfy the automatic fail-over of a mission critical database for this application if it needs 100% uptime.  Going back a sec If this is a very small database mirroring over a WAN will possible although with encryption is recommended.
However, If there is any secure information in the database it might also be important to see if there are any compliance regulations for the contents of the database that it not be stored on a public cloud but rather a private cloud to satisfy things such as PCI in special cases.
If you need anymore assistance I am more than happy to help or give recommendations.
best of luck!


Why did Gandalf only use his magic powers against the Balrog? Why not before?

Question: Why did Gandalf only use his magic powers against the Balrog in The Lord of the Rings: The Fellowship of the Ring? Why not before? Could he have used that kind of firepower earlier to the Fellowship's benefit?
Comment: Because "you do it because you can" is arbitrariness and we all should hope that mankind may be wise as Gandalf. (As example: Slavery wasn't done because you were a sadistic prick, but because well... it could be done. Nothing more. Still it's evil, even if you didn't intend to be. That's also one of the main reasons of being vegan.)
Answer: One of Tolkien's themes is the appropriate use of power, and in his universe, power comes from your inner nature. You cannot—or should not—obtain more power through any artificial system, because that just distorts your nature.
For example, we have Aragorn who usually prevails just by showing up and being all Aragorny. He doesn't make speeches, he just exudes this natural authority (or even semi-supernatural powers) that make people want to follow him. This is nobility, in Tolkien's view—some people are just born better. Others, like lesser men and Hobbits, have a lower status, but can play their roles with equal faithfulness to this principle.
So, what about Gandalf's power? If you read the supporting materials, you learn that he is really an angelic being clothed as a mortal. The Balrog is a being of the same order. So, in Tolkien's morality, Gandalf can reveal all of his power when in battle with an equal—the Balrog, or Saruman. In fact, when Gandalf gets his promotion to being the White, he has the natural authority to even cancel Saruman's power.
It would be immoral for Gandalf to use his power directly against lesser beings, even when that would do good. Instead, he must use his power more indirectly, to convince the people of Middle-Earth to unite.
Saruman is depicted as having succumbed to this temptation. Frustrated with the disunity among the peoples of Middle-Earth, he decided to create an artificial system that would be strong enough to defeat Sauron, namely his industrial revolution around Orthanc, yielding the abomination of the Uruk-Hai. And as he became interested in power for its own sake, he became a tool of Sauron.
I happened to read this here - Link
Comment: @FrancisDavey: There are minor uses of magic, such as when he raised his voice to Bilbo, tried to open the door to Moria, or even just lighting the way after the entrance collapsed. I think the answerer was mostly focusing on _offensive_ use of magic, as opposed to simply utilities such as light.
Comment: Why does Gandalf use his powers when he meets up with Aragorn, Gimli, and Legolas - do they not qualify as "lesser beings"? (referring to the scene when they believe Gandalf to be dead, and he shows up in white).
Comment: But in the books he does use his magic power before they meet the Balrog. Eg he uses it to hold a door shut in Moria (not realising that there is a Balrog coming). So while your explanation may be true to the film, it sounds not entirely right for the book.

Does it not also contradict his use of magic in the Hobbit?
Comment: @user2813274: Gandalf _disarmed_ the trio, he did not attack them. That's a massive difference.
Comment: Hmmmm, Gandalf (on two occasions - or three depending on how you count) uses offensive magic against nazgul - they are human (distorted) and not of Gandalf's order (significantly they are created after Arda rather than before). I realise they are very powerful, but I have my doubts about this explanation. Fighting the wargs in the hobbit was just about indirect (though not via persuasion only) but he was certainly ready to use offensive magic there too.
Comment: @FrancisDavey: To jump canon a bit, Sauron's particular brand of magic is treated as "dark magic" (think Voldemort/the Sith), which warrants a magical counter (wizards can magically attack Voldermort but not muggles, the Jedi can use the Force on Sith but not civilians for personal gain). The Nazgul are no longer human, their life is magically and unnaturally extended, and they are therefore fair game to Gandalf's magic powers (with some measure of reason).
Comment: I'm still not at all happy with this answer. It clearly needs some adaptation if we are going to make exceptions for Nazgul (as @Flater) suggests, but what about Gandalf killing (with magic) some of the goblins who try to take the party in the Front Porch (in Over Hill and Under Hill) and it is clearly Gandalf's intention to kill goblins in Out of the Frying Pan into The Fire, though in the end eagles rescue them so he does not need to. Both highly offensive magic surely?
Answer: This question has a very large answer.
Actually, the Valar (powerful angelic beings living in Valinor across the Great Sea) had decided after the Akallabeth (fall of Numenor) to not interfere in Middle Earth directly. However, due to the rising power of Sauron, they sent six to Middle Earth to assist the Free Peoples - first Glorfindel the Elf, and then five Istar ("Wizards") who were actually Maiar (lesser angels). They took the form of old men as they landed. They were Gandalf, Saruman, Radagast, and two Blue Wizards. They were forbidden from using there true powers by the Valar, as they were NOT to take direct action against Sauron.
Now, the Balrog was not in Sauron's service. It was a fallen Maia in the service of Morgoth (the earlier Dark Lord). Morgorth's fall had seen most of these devils destroyed, but some survived, and the Balrog, better known as Durin's Bane, hid under Moria. After being aroused by the Dwarves, it drove them out, and gravitated evil toward itself (including orcs).
Since the Balrog was not allied with Sauron, Gandalf had the permission to use his full strength to destroy it, especially as they had equal powers. That is why he only uses his "magic" powers against Durin's Bane.
It was due to this restriction on his innate power that Gandalf could not use his powers before, ot to the Fellowship's benefit.
Answer: Gandalf is both meddeling and hands-off, this is part of what makes him an interesting character.
For instance, for as powerful as he is, don't you think he could have devised a better way to get to Mt. Doom rather than just walking/horse back?  Sure, but the journey wasn't up for him to decide, it was for the rest of Middle Earth.
The Balrog, if you look into Middle Earth's back history, is actually more related to Gandalf than the rest of the beings on Middle Earth, both having been angelic beings at one point.  Since this balrog was going to interrupt the happenings of Middle Earth Gandalf had to seriously intervene.
Gandalf has always been powerful, but he only expresses that power when absolutely necessary.
Answer: Interesting that you should say that. In the books he actually does. In the snow when they were passing over Caradhras, the rest of the Fellowship, tried and failed to make a fire, so Gandalf reluctantly uses his magic to start a roaring fire by which the fellowship could warm themselves. Gandalf is uneasy for the next few hours because he believes that it will make it easier for the Orcs to track them.
His exact words were:
"I have written 'Gandalf is here' for all to see."
So my understanding, metaphors aside, is that he uses his magic sparingly in fear of being tracked, there are after all, only four good wizards in the world at that time.
Answer: The Balrog was a powerful magical creature and was a "foe beyond any of [them]".  In this situation Gandalf had to turn his dials up as it was the only option.
His mission was to inspire and assist, he was not permitted to take over and fight everyone's battles for them.
Comment: @legomaker If you read even the first chapter of The Silmarillion, it explains the whole system of the higher and lower spirits. However if your not into the whole reading buisness I found a short video that sums it up. http://youtu.be/YxgsxaFWWHQ but the basic take-away is that everything that Gandalf does is working towards some bigger goal. I.e. Destroying the ring. This was a quest, assigned to him by Iluvatar (God).
Comment: Not permitted by whom?
Comment: No permitted by the Valar (aka the powers that be who sent him and later returned him).


How do I know if my car tires have enough air without a guage?

Question: It is appropriate to do a quick vehicle inspection on occasion. It would be good to know if a tire needs air. Is there a way to know without having to use a tire gauge?
Comment: That will be difficult. If you know your car and these tires then you may know how a tire with enough pressure looks like, but it will be still very inaccurate method. So I think this is not a good answer to your question
Comment: It's good to do a walk around before driving off. A tire may have gotten a nail and gone down. People who don't look at their tires may drive for several days on an underinflated tire and ruin it. Usually people detect underinflated tires by handling.
Comment: Visually I agree it is hard to determine pressure, but you should be able to detect if there is a major difference in pressure on wheels by comparing front or back wheels  (or if you have a flat)
Comment: If it says 32 psi I usually run them up to about 40, then even if they leak I can catch it in time. I do this in summer, not when there might be snow. Did you read *Fear and Loathing in Las Vegas*?
Answer: Thump them like truck drivers do with a small bat or hammer. They will make a different sound if they are low, you can also look at how squat they are. Look at the tread and how it is wearing. Over inflated tires will tend to wear quicker in the middle, under inflated tires tend to wear quicker on the outside of the tread.
Gauges are cheap typically less then five bucks for a simple one that will do the trick, and also most places you can get air have a built in gauge, although these gauges are notorious for being inaccurate.
Comment: I would say if you have a long enough thumper you don't need to bend down. Lots of things work like kicking or an ice scraper as example. Also if your car is pulling or steering funny might mean you have a low tire.
Comment: If it is a newer vehicle, with sensors, you can use a script with the proper antenna to receive tire pressure info from the relays in the tire. I will go looking for it. There is a github that has the source. Video I watched on hak5 a mac was used, but I don't think required. Just need the appropriate antenna I believe
Comment: If I was going to bend down and use a hammer I might as well use a gauge, and would more likely have a gauge than a hammer. When I was a kid and worked at a filling station I could tell how much air a tire had by looking, plus or minus 5.
Answer: A gauge is best, but gauges on gas station pumps are often inaccurate.. Looking at low profile tires can be deceptive.
By pressing on the sidewall with a thumb, I get a better sense of pressure than by looking, but accurate only to ~30%. Kicking the sidewall (gently) can be used to make a tone, similar to the hammer, but I wouldn't expect better accuracy than by pressing.


What does 'virus prototype strain' mean?

Question: Does the term 'prototype virus strain' mean the first virus isolated and without mutations?
Answer: A prototype virus may or may not be the first isolated virus of a group. It's essentially the same as a "reference" virus -- in fact, the International Committee on Taxonomy of Viruses
(ICTV) uses the terms interchangeably, as in the  Hepeviridae Study Group which has a column entitled "Prototype/Reference Strain".
In many cases the reference virus is the first isolate, but it isn't necessarily the case. The ICTV is the official body that determines reference strains, and they may choose a different virus as the reference/prototype. For example the first isolate may turn out to be unusual or an outlier in same way, so that a more typical strain may be chosen as a reference or prototype (I don't know offhand of examples of this though).
"Prototype" is often used in a broader sense as well, where a group of viruses can act as prototypes for a still broader group.  For example, "The genomic structure of Pencillium chrysogenum virus (PcV), the prototype of the genus Chrysovirus ... " (pdf link) uses "prototype" to refer to all the viruses in the Pencillium chrysogenum group, as compared to the broader genus.
Answer: virus strain:

Different lines or isolates of the same virus (e.g., from different geographical location or patients)

prototype:

the first example of something, such as a machine or other industrial product, from which all later forms are developed

I think prototype of virus strain is first isolated virus of that strain.
Refferences

Principles of Molecular Virology fourth edition; Alan J. Cann; page 64.
https://en.wikipedia.org/wiki/Strain_(biology)
https://dictionary.cambridge.org/dictionary/english/prototype


NTSC scan lines and vertical resolution

Question: From https://en.wikipedia.org/wiki/BBC_Micro "the height of the graphics display was reduced to 200 scan lines to suit NTSC TVs". But NTSC is supposed to have 241 visible scan lines per half frame. Why wouldn't you want to make the graphics display vertical resolution 240 instead of 200?
Comment: Interesting. Timing reasons, I expect (240 lines uses almost all of the available frame time), but as the BBC Micro *isn't* one of those 8-bit machines that have the CPU and graphics contending for the memory bus, it's not the *obvious* timing reason.
Answer: While nominally 241 scan lines were visible in the sense they contained video information, all TV sets hid a varying amount of scan lines on top and bottom (and left and right) by overscan and by the bezel in front of the screen.
So with a vertical resolution of 240, on most TV sets parts at the top and bottom would not be seen. While this doesn't matter much for movies, it's not a good thing if you want to do text editing.
This is also the reason while basically all homecomputers and game consoles had some sort of border (which often could be colored) around the center part of the image that carried information: It was to make sure this central part would be visible on all TV sets.
Comment: Right. Most TV-based home computers were restricted to about 200 pixels vertical resolutions due to this reason.
Comment: @rwallace: Yes, the designers overshoot in the direction of making sure no part of the image would be lost (also taking all other considerations that determine the video image, like aspect etc., into account). You can see the same phenomenon in PC graphics cards that had analog TV output, though sometimes the amount of overscan was adjustable.
Comment: Similarly [Teletext was also designed](https://en.wikipedia.org/wiki/Teletext#History) for a 24x40 character grid.
Comment: @rwallace, to give you an idea of the importance of the border, look at a screenshot of the C64 startup screen.  Then consider that the television I had mine hooked up to almost entirely hid the top border.
Comment: Okay, so if you look at the Commodore 64, 200 vertical resolution and the border wastes a large part of the screen on every screenshot you see, you're saying it varied with the TV, and the designers decided to heavily overshoot in the direction of making sure no part of the image would be lost on any TV, even if that meant wasting much of the screen on most TVs?
Answer: No, NTSC does not have 240 (or 241, or 243, or whatever other similar figure a particular source might state) visible scanlines. It has 240 active scanlines. This includes a fair bit of overscan, to allow for both some variation in the analogue camera and the analogue receiver, so that the viewer sees a seemingly continuous picture all the way to the visible edge of their tube without any of the spurious studio paraphenalia that may sneak into the edge of shot momentarily until the camera operator corrects for it, weird glitches due to nearby sync pulses and so-on.
You may notice that a VCR, DVD player, or games console (particularly a later model) which is designed to give a fully overscanned image will claim to output 240 (or 480) lines, or something close to that, but there are a great number of home computers, and indeed earlier consoles, which instead output something closer to 200. The lower end like the VIC20 run maybe 184, the majority are 192 or 200 (or double up to it from 96 or 100), and a few push the boat out to maybe 212 (the MSX2 range, for example) or 216, which is pretty much the theoretical max that can be just about seen on a good majority of sets.
This is because they are made not only as screen-filling graphical entertainment devices where a little bit of detail lost at the edges is unimportant, but as general purpose machines where a good portion of user interaction is through text, or detailed on-screen diagrams, which you ideally want all, or certainly a good 99% of to be clearly visible. There's no point going to the programming and processing trouble of generating and rendering that text or graphic to the screen if no-one's going to see it, and the memory and/or effort that would go towards provisioning the extra lines is a waste that could be used to improve the rather less fixed/prescribed horizontal resolution, or the colour depth, or just storing additional character definitions and program data.
Some others straddle the line with 220 or 224, which is generally enough to achieve overscan on most NTSC TVs without bothering to generate the extra 16 lines that no-one will ever see. They can however generally be considered cousins of the 240-line models, and for the same reasons.
In general these modes persist in PAL-land, largely through inertia, laziness/ignorance, and economics, as well as compatibility reasons. If you're going to make a certain design of machine that will, hopefully, become as popular as possible and have global reach, you don't want the software causing problems in different parts of the world because the screen resolutions don't match (and depending on the program it can be as trouble some to have too many lines, as not enough). So you fix the screen mode to be the same everywhere... and just set up the video hardware to have an extra 50 lines of blanking in the PAL models vs the NTSC ones. In most cases this just means the Euros get slightly annoying but workable letterbox-o-vision with about 10% of the screen both above and below the active image being a flat border instead of containing useful imagery that extends almost to the screen edge; in some, ironically often those which have hardwired regional lockouts which you'd think would be partly aimed at providing fully localised and resolution-adapted versions of NTSC software, it can be a bit more troublesome where the generated image runs almost all the way to the edges but has loads of visual garbage along each edge...
Except in a few very limited cases, which tend to have suffered their own daft compatibility issues. Firstly the BBC Micro, which defaults to 256 lines in its original PAL incarnation; this is about as good a fit for our screens as the 212-line MSX2 display is for NTSC... that is, with an optimally calibrated screen, it's pretty much a perfect maximum. 240 lines would be a more logical equivalent, given the ratios of active linecount and the framerate vs linerate relationships, and appear about as tall as 200-line on NTSC, but I guess the draw of that perfect binary alignment is just too much, as we see 256 rather more often. Anyway, though 200-line is an entirely routine, official alternative mode (all of the regular 256 modes have a 200 counterpart, perhaps with a mind towards globalisation or just using a 60Hz monitor for less flicker, perhaps to make porting software from lower resolution rivals and predecessors easier), enough native software was made to run strictly in 256 mode that it probably caused a good deal of headaches trying to localise and market it for e.g. the US market, and is a pointer for why it didn't ever take off there. That and it was essentially stepping on the toes of both the Apple ][ and the Atari 8-bits, both 6502 based machines of, clock speed aside, rather similar capabilities and expandability... and domestically produced to boot.
Similar to that, the Amstrad PCW. Its green screen and high resolution gave an impression of something similar to the IBM MDA, or - thanks to the graphics - a Hercules Mono card. Actually it was just a CPC with tweaked firmware and the guts of a regular B/W TV, calibrated for a slightly smaller scan than usual (so 720x256 at the regular clock rate would still fit with a fair bit of underscan) and mated to a long-persistence green phosphor tube. For reasons known only to Alan Sugar, when exported to the states, it too defaulted to the optional 200-line/60Hz mode despite the screen being built-in and looking perfectly fine at 256/50, considerably reducing how many rows of text / cells you could fit on-screen with the word processor and spreadsheet programs, and breaking compatibility with pretty much every single other program, especially the games, ever made for the platform. At least in that case it was just a software command to switch it back before retrying...
Then the Amiga, which is a bit of an odd fish given that it's a US product, the PAL mode seems to almost be an afterthought (and the flicker, especially in interlace, was enough to make 60Hz modeswitch utilities fairly common), but it then ended up becoming more popular in, and being heavily programmed for in Euroland than its actual home. Some softies just went with the ROM-default 256-line mode and then had their programs fall down hard on NTSC machines because they can't even set that as a deep-overscan mode (unless they're first tripped into PAL mode somehow, by hardware tweaks or clever software), topping out instead at about 243 lines, and the alternative of 128 lines doubled up by interlace just looks horrific. A rare few made dual 200 and 256 line versions of their programs. And the rest just threw in the towel and defaulted to plain 200-line mode for wider compatibility, or maybe just through laziness as that (or 192-line) was what the original/most other versions of the game they were porting TO the Amiga used, so why rock the boat and end up spending ages redrawing all the graphics from scratch? The problem with that being ... they rarely bothered checking for a PAL machine, and offering the option either of attempting to force it into 60Hz mode (which generally looked better because of the corrected aspect ratio and reduced eyestrain), or staying at 50Hz but with properly adjusted borders so the image was squashed but centred. Instead they just ran with the defaults, and the picture therefore clamped itself to the top of the screen, and had the lower 20 to 25 percent blanked out with border colour. Jeez. (If you had something like the quite widely adjustable Philips CM8833 or Commie 1084 monitor, it wasn't so bad, as you could stretch and reposition, but on a TV or simpler monitor you were stuck). And that's before considering the oddities of things like DblPAL mode promotion on later machines...
And finally, if memory serves, the Playstation and PS2... which could go up to 256p or 512i in PAL regions, but precious few titles ever went beyond 240/480 or even the more common 224/448 or 216/432. I think TOCA Touring Cars was amongst them, which makes sense for a UK-developed game. Even the otherwise reasonably well adapted Gran Turismo and SSX series seemed to have a hint of a letterbox border, presumably running 240 line, just slightly breaking their otherwise pretty decent immersion. (GT4 on the PS2 actually reveals their CRT, as well as NTSC focus/prejudice; if you hook the machine up over component cables to get 1080i HD output, there's a clear border around the image on an LCD, where the resolution has been trimmed a bit to keep the framerate up, possibly to 1024i, maybe even 960, but would likely not be visible on a hi-def CRT with the same degree of overscan as a standard def model...)
FWIW: PAL does not have 288 / 576 (or whatever) "visible" lines either. As per the above, you get about 256. Some sets maybe only low 250s, maybe 252, but unlikely to be even as low as 240. Probably some you might nudge into the 260s. But the only time I can push my A600's interlace overscan past 560 lines (or, indeed, the horizontal overscan up past 350/700 pixels) is if it's connected to that same minimal-overscan LCD as per other examples above. On a regular CRT it's barely worth playing with the settings, as the default 320/640 x 256/512 more or less completely fills the visible area already (and, if you use a 60Hz switch, the default 200/400 lines are only a little bit shorter; you could maybe add another 20 through overscan mode at the most)

NTSC scan lines and vertical resolution


Where can I recycle plastic caps in the US?

Question: The city recycling bins in Denver don't allow plastic caps but some other cities do so it is possible to recycle them.  Does anyone have any ideas where or how I could recycle the caps?
Answer: Most cities do not want you to put both the plastic bottle and its plastic cap together in the recycling bin. One reason for this is the two items are usually made of different types of plastic material, so they cannot be recycled together. Find out if there is any recycling of plastic caps only in your area. Unfortunately, even after decades of plastic bottle recycling, plastic caps are still not recycled because there is no mechanism to do it and most go into landfill.


Algorithm to generate a random number? Don't use System.Random

Question: Had there been no System.Random class, how would have you generated a random number?
Are there any known algorithms or have you guys ever designed one?
Comment: @Dimitar: http://stackoverflow.com/questions/462219/xkcd-random-number
Comment: may be you should read this and try to create one solution [Random number generation](http://en.wikipedia.org/wiki/Random_number_generation)
Comment: The Mersenne Twister is a very good option (it has a large period). There are other available and sample code is available if you Google for them. These include Knuth Subtractive, RANLUX, Trustworthe and ZiffGFSR4, among others.
Answer: True random numbers can only be generated "outside" a computer, using radioactivity counts and such.  Some VIA processors have hardware to do so.
Volume two of The Art of Computer Programming by Don Knuth spends a lot of time discussing exhaustively various pseudo-random number implementations from a mathematical background.  Recommended reading.
Comment: Via any _deterministic_ programming language. But many aren't, in fact. E.g. create two threads, and let them race to a mutex. You get less than one bit of entropy that way, but it is really random.
Comment: +1 you can't get a real random number via any programming language.
Answer: You can't really generate a truly random number with our current deterministic computers. There are, however, many different ways to generate pseudorandom numbers. See pseudorandom number generator on wikipedia for some information on the algorithms.
Answer: Take a look at the Mersenne Twister. I belive this is the same algorithm implemented by System.Random, it is very common non cryptographically secure PRNG with a good random distribution.
Answer: Like the other answers say, its not possible to generate true random numbers with a computer, but as for pseudo-random, one algorithm that I've used before is the Linear Congruential Generator, its simple and fast, but I'm sure there are much better alternatives.
Edit: Grammar


Meditation causing headaches

Question: In the last couple of months, I have experienced a chronic headache in my forehead and after checking with doctors etc nothing could be found. I then kind of had the intuition it could be related to my meditation practice. It's more the 2 years I meditate daily for 20/30 minutes or more. I have come around some articles online reading that focusing on the breath (especially in the nostrils, which I used to do) could lead to an accumulation of energy around the third eye chakra, and it seemed to me my pain felt exactly like this. I have now taken a break from my daily practice and the headache got much better and nearly disappeared, but as I stopped meditating I really miss the peaceful state of mind and presence I had when I meditated daily, so I would like to start again soon. I would be so grateful to get tips from you on this.
Comment: @Chloe You're an experienced user, you should probably know when and how to comment -- see e.g. [When *shouldn't* I comment?](https://buddhism.stackexchange.com/help/privileges/comment), as well as [this](https://buddhism.meta.stackexchange.com/q/1589/254).
Comment: @Chloe. FYI, I deleted the comments since the comment section is not for answers. Please follow our guidelines as outlined by my colleague.
Answer:
In the last couple of months i have experienced a chronic headache in my forehead and after checking with doctors etc nothing could be found. I then kind of had the intuition it could be related to my meditation practice. Its more the 2 years I meditate daily for 20/30 mins or more.

Are you meditating while "looking" at your nostrils with eyes closed?
If so, that creates tension in the eye muscles, namely the medial rectus muscle and the inferior/obliquee rectus muscle. The function of the medial rectus muscle is to turn the eye towards the midline and nose, while the inferior/obliquee muscles are responsible for vertical movement, in this case depression of the eye, i.e. looking downwards.

This is a common problem for many meditators who use the area around the upper lip and/or nostrils (anapana region) as a meditation object. They tend to look at that spot with their eyes closed, hence the build up of muscle tension.
Some meditators falsely think that doing something with their physical eyes will actually produce the nimitta. Nothing in the practice is the result of doing anything with the physical eyes.

... I have now taken a break from my daily practice and the headache got much better and nearly disappeared ...

This further supports the hypothesis that the pain is caused by muscle tension in the eye muscles.
The solution to the problem is to first and foremost stop looking at your nostrils. That is very difficult in the beginning but after a while it will become easier. Start by doing short meditation sessions such as a couple of minutes and then progress to 5, 10 minutes and so forth.
Before meditation try to relax your eyes. This can be done in several ways:

Consciously place attention on your eyes/eye sockets and try to relax them. Be aware of how your eyes move during meditation and if they begin to turn towards the nostrils or upper lip, then again try to relax them. When meditating your eyes should not do anything at all. They should just be relaxed and not moving.
Do these stretching exercises for the eyes. Follow the instructions given. These exercises should be done 3 times a day. They work both as a preventive measure and treatment for headaches caused by tension in the eye muscles.

Hope this helps.
By the way, I'm a meditator and a licensed physiotherapist.
Answer: The Buddha did not teach to observe breathing at the nose tip. The Buddha taught to simply let go and give up craving. Just sit quietly and naturally. The mind should be "open" rather than "focused".
Answer:
i really miss the peaceful state of mind and presence i had when i meditated daily

There are other forms of meditation. We sit a lot in our offices. Perhaps sitting meditation is too much on top of that. Since I started walking meditation listening to suttas, much has improved for me. If you walk outdoors in western cultures, please do wear a yellow road work vest. I have had the police called on me when I wasn't wearing such a vest. Kind neighbors had thought I was in need of assistance wandering aimlessly. Yellow road vests offer instant and proper seclusion accorded to those who work. Earbuds also help regardless of whether you are listening to anything--"here is someone busy listening".
If you wish to download audio material for walking meditation, please see SuttaCentral Voice Assistant. SuttaCentral Voice Assistant lets you search for any sutta by English and/or Pali phrase (romanized or accented). You can play the suttas on your desktop bilingually with each text segment in Pali/English. You can also download an MP3 for any supported sutta (over 3000 and growing). SCV does also have links to other audio resources such as Pali Audio for certain suttas, but its own voice coverage of the suttas is, I believe, the largest currently. For example, I listen to DN33 daily. It is two hours long. We are continually expanding SCV's sutta coverage in English and, hopefully, eventually to other languages.
Comment: Could I ask what resources you use to listen to suttas?
Comment: D'oh. Thanks for commenting. Updated answer.
Answer: Could you tell me what is your object of focus?
Have you been concentrating on, for example, the space between your nose and your mouth?
If that's the case, I would recommend that you choose a different region of the body. Lower abdominal area, about three fingers below your naval, would be an option. Some Chinese masters believe that women should concentrate instead on the big toes or the bottom of the feet.
In any case, I think pushing the focus on the lower parts of the body will help. If this doesn't help, you should go talk to an experienced meditator.
Answer: If this is indeed a problem with forcing your eyes into a strenuous position to maintain focus somewhere, I've found a way that allows me to have my eyes rest, while still having them act as a center of focus.

Reach your hand out in front of your eyes, with you eyes open.
Focus on the position of your hand in front of your face, and learn to "feel" that position.
Once that's comfortable, close your eyes (with your hand still outstretched where it was), and again, focus on the position of your hand without seeing it.
Once you can easily focus on your hand without seeing it, lower your hand, and again focus on that same area; now occupied by empty space.

I've found the empty space in front of my face to be a very relaxing place to focus. I often use this to help me fall asleep. I haven't tried transferring this over into meditation (I really should practice meditating more), but I can see this technique being applicable.
Answer: Try a meditation practice like 'Loving kindness meditation.' Here, you first direct loving-kindness to yourself and gradually extend to people you know and even to enemies (if you have any) at the end (you should be able to find more info regarding this meditation on the web).
Another thing to try is to simply observe your thoughts – how they come and go. Then, "I miss the peaceful states" becomes merely another arising and ceasing thought. This meditation would also lead you to peace.

Meditation causing headaches


How to move wp-admin login page to another location?

Question: I want to move login page physically (not virtually). Please, suggest a plugin way to do this which could alter core codes on fly (even after core code update). It can be another layer of security.
Comment: Did you come to a conclusion about this Question? What about the top voted Answers?
Comment: You can also try this plugin:
http://wordpress.org/extend/plugins/ozh-simpler-login-url/
Answer: You can disable the wp-login page from your functions by hooking into login_head:
add_action( 'login_head', 'wp_die');

(that's obviously a very clumsy way of doing it, but it prevents anyone from being able to login through that page. You could make that a redirect function, or a warning message, rather than just a die.)
And copy the existing wp-login file to another location, making sure to update the relative path to wp-load.php near the top (and any other relative paths that may be in there, including the links to itself and the form actions.
(Obviously you'll have to remove the action that you added to login_head here, otherwise you won't be able to login from this page either.)
Then, you should just need to add a filter to login_url that returns the address of your new login page, otherwise people requesting wp-admin files will be redirected to the old login page, which is now disabled.
Answer: This isn't a great security idea because the wp-login or wp-admin page in of itself does not pose a security threat. Though it can be argued that if someone had your password/username they might not be able to find where to login, thus security through obscurity.
As kronus said you could probably to some fancy re-directs, not sure how well that would scale with future releases or if it is even worth the trouble, personally I don't think its worth it and I take security seriously.
I would suggest some better ideas for your login.
Enable ssl for the login/admin (htpps).
Password protect your page using .htaccess ( so you will have a double login).
Use a plugin like Limit Login Attempts, which locks out a user after failed logins.
Comment: It's absolutely a good idea. Hiding the fact that your site is driven by wordpress discourages people from trying to hack the core structure. If I was trolling for wordpress blogs and www.site.com/wp-login.php and came up with a 404 error I would move on without trying to break through known php exploits. Every bit of security helps make your site that much more bulletproof.
Comment: I never said core exploits. There are hacks-a-plenty for wordpress plugins, themes, etc. Just take a look at any exploit reporting site. Looking at the failed http request logs, sites I manage get brute force and XSS attacks _tailored for wordpress_ all day, every day. By your logic, you also shouldn't move `wp-content` outside of the root install folder, `wp-config.php` above the root folder, remove "powered by wordpress" in the page footer, change the default `wp_` table prefix or delete the default admin account. Modifying defaults *is* securing, and the login page is no different.
Comment: Thanks for your nice suggestions, but I want to move login page to another location.
Comment: And a known core exploit would be? Ya you don't have or know of any, so your talking for nothing. Security professional actually secure applications and don't hide things, that's for children.
Answer: None of these answers were especially useful. I question the motives of the OP, but here is how to do it. Add this to your functions.php, but make sure to replace "$login_page_id":
// This will redirect the actual login page to your new page
add_action( 'login_redirect', 'custom_login_redirect' );
function custom_login_redirect()
{
    if ( 'wp-login.php' == $GLOBALS['pagenow'] )
    {
        // Set your $login_page_id
        wp_redirect( get_permalink($login_page_id) );
        die;
    }
}

// This will replace the login url used by Wordpress
add_filter( 'login_url', 'custom_login_url', 10, 2 );
public function custom_login_url( $login_url='', $redirect='' )
{
    // Set your $login_page_id
    return get_permalink($login_page_id);
}

On your new login page, you can simply add this function to show a login form:
<?php wp_login_form(); ?>

http://codex.wordpress.org/Function_Reference/wp_login_form
Comment: I ended up creating a plugin that handles this. https://wordpress.org/plugins/sewn-in-template-log-in/
Answer: OP, the best thing you could for this matter is IP filtering and allow only those networks that are allowed to login to the WP-Admin area (e.g. your office IP, developers' IP, etc.).
## .htaccess inside the wp-admin folder
order deny,allow
deny from all
allow from xxx.xxx.xxx
allow from xxx.xxx.xxx
allow from xxx.xxx.xxx

Comment: With recent Apache versions, this would be replaced simply by `require ip xx.xx.xx.xx`, I think.
Answer: In the five years that this question has been here, nobody has addressed the core issue: Security by obscurity is a valid technique to ward off automated bots and keep the logs clean. The goal of moving/hiding wp-admin is to appear to a bot that this is not a WordPress site.
The way that I hide (but not move) wp-admin is to present to bots the standard 404 page when they try to access that URL. Only access from my home IP address allows the wp-admin page to return properly. This method looks to an attacker/bot as if wp-admin does not exist, yet it does not break core WP code or plugins that hard-code the wp-admin path. This .htaccess code does the deed:
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^12\.34\.56\.78$
RewriteRule ^/?wp-admin - [R=404,L]

Of course, when using the code replace 220.127.116.11 with your own IP address. Don't forget to escape the . characters as the IP address is interpreted as a regex.
Comment: This is not a solution since vast majority of people have dynamic IP as well as I might want to login to my admin panel from the phone
Comment: @TheGodfather: Then [update the RewriteCond accordingly](https://stackoverflow.com/questions/11653461/redirect-a-range-of-ips-using-rewritecond)
Answer: I came up with a solution for moving the Wordpress login from /login/, /wp-admin/ or /wp-login.php to /cms using only .htaccess rewrite rules.
No plugin needed!
Paste this into the .htaccess file of the root of the project:
<IfModule mod_rewrite.c>
      # Move login to /cms.
      RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$
      RewriteCond %{HTTP_REFERER} !/cms(.*)$
      RewriteCond %{REQUEST_METHOD} POST
      RewriteRule ^(.*) ./cms?message=wrong_login_path [R=302,L]
      RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$
      RewriteCond %{QUERY_STRING} !^cms=unlocked
      RewriteCond %{REQUEST_METHOD} !POST
      RewriteRule ^(.*) ./cms?message=redirect_to_custom_login_path [R=302,L]
      RewriteRule ^cms wp-login.php?cms=unlocked [L]
</IfModule>

Cheers!
Update:
I improved some rules so even the POST requests to /wp-login.php will trigger a 403 forbidden error. This will help against bots that are trying to login to the dashboard using brute-force methods. Feel free to comment on this post if you have any improvements to these rules.
Answer: Just build out new login pages in subdirs. Copy the existing wp-login page into a new directory in your webroot (maybe "/login"), rename it index.php, add a WordPress bootstrap to the top of the page, and do whatever you like with it (theming, etc).
You do have to adjust the login page's default code a bit, mostly to find/replace for hardcoded links and redirects to "wp-login.php". But as long as you leave all the hooks and filters in place, this approach won't mess up any plugin integration. And WordPress core updates are fine, unless the update includes changes to the wp-login page itself (which rarely happens in minor versions).
You can also build out user account pages this way (I put them in the dir "/profile"). Once you've done that, subscriber-level users should never need to go into wp-admin, so you can protect it with an htaccess file. This is the part that actually gives you the added security you were looking for. Just be sure to make an exception in your htacces for the admin-ajax file, since some plugins use it on the frontend.
Pretty sure you're not going to find a plugin-only solution. But if you do, let us know!
Answer: You could use this plugin:
http://wordpress.org/extend/plugins/wp-login/
You can just create a page and tell the plugin that's where the login is. But all it basically does is redirect wp-login.php to your "page". So any bot searching for wp-login.php will just be redirected to your "page".
To protect you login page from bots you should use a combination of a cookie and .htaccess as most bots don't use cookies. Something like this:
RewriteCond %{HTTP_COOKIE} !^PHPSESSID=\w+ [OR]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?example\.com/ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule ^wp-(comments-post|login|register)\.php http://example\.com [R=301,L,NS]

In the example above I'm using a PHP Session Cookie, since it's the easiest to implement.
Answer: This answer is an addition to dotancohen because it is incomplete.  dotancohen's answer does not account for wp-login.php, which you should consider if you're trying to obscure WordPress.
Here's how you 404 on both wp-admin and wp-login.php:
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^12\.34\.56\.78$
RewriteCond %{THE_REQUEST} \ /+wp-(admin|login)

Answer: You could try editing the .htaccess and perform a redirect to another path of your convenience.
Comment: Are you talking about URL Rewrite using .htaccess? Isn't it break internal core functions?
Comment: Well... if you do it correctly doesn't need to break anything. Reading your _update_ I will suggest rename (or move) your login things to another directory/path. What do you have in mind? Another sub-domain? or just another path?
Comment: Just another path..
Comment: Well then you can do a _Search&Replace_ in all the wordpress files, then rename the files who has the same pattern, and then rename the folder `wp-admin`. Its a little bit tricky and you will be attached to that version (any update, will broke this changes)
Answer: To modify logout URL (in admin) edit your functions.php:
add_filter( 'logout_url', 'custom_logout_url');
function custom_logout_url( $login_url)
{
   $url = str_replace( 'wp-login', 'your_logout_file', $login_url );
   return $url;
}

Answer: I solved this problem by deleting three of my blogs and changing the parameters of limit-login to the maximums possible. 9999
For the one scum spammer at 22.214.171.124 who has hit my login page 750 times in the last two days, I am working on eliminating him other ways.


Is 纟 obtained by simplification of 糸 ?

Question: Neither纟 nor 糸 are used as words in modern Chinese, i know the word for silk is 丝( trad 絲).
Many radicals in the list of 214 kangxi radicals have both traditional and simplified character, but that one is not clear about what it is, simplified or traditional.
Any information about etymology or origin of 纟 and 糸  is welcome  :-)
Answer: 纟 derived from 糸, which is the silk. (looks very like)
Like many other simplified Chinese Characters, 纟comes from 草书, such as

訁 -> 讠
飠 -> 饣
糹 -> 纟
釒 -> 钅

most of the characters with 纟are related to textiles ( 纺织品 ) , such as
"丝"、"线"、"经"、"纬"、"绑"、"纹"、"纷"、"纱"、""绞"
refer to: https://baike.baidu.com/item/%E7%BA%9F/8457525?fr=aladdin
Answer: The standalone character 糸 pronounced si1 is a variant of 丝 (丝的异体字)

「糸,细丝也」

It is written 糹(traditional) and then 纟(simplified) when it appears as a radical on the left side of a character. According to the 简化字总表:

[...] 不论在一个字的任何部位,都可以使用,其中 "讠、饣、纟、钅"一般只能用于左偏旁。这些简化偏旁一般都不能单独使用。

When it appears in other positions, it keeps its full form 糸:

系、紧、繁

In cursive script 书法,the bottom part of 糸 often appears as three disconnected dots, or even a straight line. For example 紧:

From this you can see how it becomes 糹as traditional radical, and later on 纟(two strokes less), maintaining a tie to its original form.
Comment: Nitpicking: [1] `The standalone character 糸 pronounced mi4 is a variant of 丝` is not correct, it should be `The standalone character 糸 pronounced **si1** is a variant of 丝` (variant characters are different representations which refer to the same word, when they don't refer to the same word they are no longer variants), and [2] The appearance of 糹 is based on national standards, in many cases it is still identical to the full form of 糸. Its squashing to the left is still as "full-form" as its squashing to the bottom in 繁.
Comment: Also 偏旁 = "component" not "radical" (which is 部首)
Comment: @dROOOze the term 偏旁 = "component" includes radicals.
*The appearance of 糹 is based on national standards, in many cases it is still identical to the full form of 糸*, which cases?
Comment: "Radical" is not correct terminology. For example, the radical of 辫 is 辛, 纟 is not a radical in 辫, nor is it entirely on the left side. As for appearances of the full form, you can check out the Japanese national standard e.g. in zdic (https://www.zdic.net/hans/細).
Comment: @dROOOze I'm not sure why you bring up characters where 纟is not radical. I'm talking about cases where it is. Nor I claimed that  纟appears *only* on the left side. Which part of my answer do you find confusing?
As for the Japanese standard, I fail to see how it is relevant in this case. And it's still not written the same as 糸. The Japanese form in your link clearly doesn't have the left-pointing hook in the central vertical stroke.
Answer:
Is 纟 obtained by simplification of 糸 ?

Yes, 「纟」 is a cursive calligraphy abbreviation of 「糸」 with its strokes straightened later, and in print form, it exclusively appears in Simplified Chinese as a component, but only under certain conditions. If you want to write 「糸」 by itself, it is still 「糸」 and not 「纟」.
Like other conditions on these kinds of abbreviations, you only use 「纟」 in place of 「糸」 if you haven't finished writing the character that 「纟」 is part of, and the next stroke that you're writing appears to the right hand side of 「纟」. You can perform this sanity check on characters you may come across:

「纟」 is not used in 「系」
「纟」 is used in 「辫」 (Simplified Chinese only)

「糸」 originally came from a picture of a small loop of thread 「幺」. Sometimes, 「幺」 was drawn with frayed thread ends, forming 「糸」.
商甲京津4487合集28401篆糸部說文解字楷
The two characters 「糸」 and 「幺」 are now used to represent different words, but by themselves or as a semantic component as of other characters, they generally retain meanings developed from small thread:

幺 (tiny, youngest 「老幺」, colloquial for one in speech when reciting numbers 「幺二三」)
麼 (small 「幺麼」)
細 (thin)
Some characters for colours, referring to dyed silks
Many characters having meanings to do with linking and continuation.

Duplicating 「糸」 or 「幺」 into 「絲」 or 「」 forms another series of words, generally not overlapping with 「糸」* or 「幺」 in history. See 兹 as a phonetic component for more details.
*Unless you're using Japanese, which has merged 「絲」 and 「糸」 into 「糸」.

Is 纟 obtained by simplification of 糸 ？


How to make `Wakeup` plugins work?

Question: Wakeup application is meant to greet a user at specific time, saying things like current wind and temperature outside. But I can't get how to make the thing work on Ubuntu: what am I meant to install for weather information to be provided correctly (all the Wakeup plugins are installed and turned on, their settings don't offer anything to help). I use XUbuntu 11.10.
Answer: Check out the version released with Precise (wakeup 1.2). This version will also work in Oneiric, although at this point is not in the oneiric repositories. The newer one should be a lot more stable, and has been particularly updated with respect to the weather plugin: https://bugs.launchpad.net/wakeup/+bug/891033

How to make `Wakeup` plugins work?


Can I upgrade my HTC Wildfire's processor so I can run Android 2.3?

Question: I am using HTC wildfire. Is there any possibilities to upgrade mobile processor so I can run Android 2.3?
Answer: You cannot upgrade the processor, however you can upgrade the kernel.
Find your device on forum.xda-developers.com and read, read, read, read, and read some more.
It may sound scary, with the risk ofx bricking your device, but I assure you it is much easier than it would be to replace the processor.
If CyanogenMod 9 is ported to your device, then you could even have a 4.0 update.


Can I get married without the witnesses or any other marriage formalities?

Question: I want to marry a boy whom i love but i don't have any chance to go out and marry him officially or marry him through other marriage formalities... Like, we both have high sexual urges and we want to fulfill it at a halal way without any third witness... Will our marriage be acceptable if we tell ourselves that we are husband and wife by promising to Allah, and also the groom will gift paid money as delmohor? if its not then please tell me a way out
Answer: No. Having two witnesses is either a pillar of Nikah, or a condition for it, or is obligatory according to the madhabs. Similarly having the permission of the guardian of the wife is either a pillar or a condition of Nikah according to the majority opinion. In the absence of both of them the Nikah will not be valid.

لا نكاح إلا بولي وشاهدي عدل، وما كان من نكاح على غير ذلك، فهو باطل
There is no marriage except with a guardian and two witnesses of good character. And the Nikah which is without them is invalid.
— Saheeh Ibn Hibban  , Sunan al-Kubra Bayhaqi,  Saheeh al-Jaami'
Answer: Bismi Allah Ar Rahman Ar Rahim.
In the name of God, the Most Gracious, the Most Merciful.
All Perfect Praise be to Almighty God,
and prayers and peace be upon the Messenger of Allah and his family and companions,
Having said that,
Peace be upon those who follow guidance
It is not permissible for a woman to marry herself without a guardian, because it is saheeh that our Messenger (peace and blessings of Allaah be upon him) has said: "There is no marriage without a guardian" Narrated by Abu Dawood (2085). Classed as saheeh by al-Albaani in Irwa 'al-Ghaleel (1839)
as he also said (peace and blessings of Allaah be upon him) : "Any Woman was married without the permission of her guardian, then her marriage is (void or invalid), her marriage is (void or invalid), her marriage is (void or invalid)" Narrated by Ahmad (24417), Abu Dawood (2083), and Tirmidhi (1102), and classed as saheeh by al-Albaani in Saheeh Abi Dawood,
and most of the scholars agree that there is no marriage without the brides guardian permission and 2 adult witnesses at least, otherwise you are in the position of committing Zina (Adultery) and that's a big problem with serious consequences.
My Sister the best way out is to confront your family and make a real marriage (even without ceremony or formal party or any other form of society conventional events, you see the most important thing is the blessing of God and that only what matters as he will judge us based on what we do in this life.
and if you were scared of their reactions or anything else, pray Istikhara prayer (assuming you do pray the 5 fardh prayer cuz if u don't that's a greater big danger you are facing), when you prays Istikhara you make your intention to fix your mistake fearing and desiring in Allah repent, rewarding and blessing upon you
God Almighty said :
("Know that Allah knows what is in your hearts, so beware of Him; and know that Allah is all-forgiving, all-forbearing. ")(Surat Al-Baqarah:235)
I also advise you to read Quran on regular basis, as it helps healing our souls guiding us towards better lives,
and God knows best.


Accelerometer - coordinate system transformation

Question: I'm getting some accelerometer readings from an Android phone, but it comes in on the phone's coordinate system. I want to apply a transformation to put the acceleration in the world coordinate system (e.g. so Y will always be up and down, regardless of how the phone is rotated)
Android allows you to get the accelerometer values. It can also calculate a rotation matrix (using a gyroscope and a magnetic sensor), so all I need to do is multiple the acceleration vector through by this matrix and I have transformed values. I followed the steps here: https://stackoverflow.com/questions/14963190/calculate-acceleration-in-reference-to-true-north
However, there are 3 sensors at play here: acceleration, gyro, magnetic. The way android operates is event based, so whenever it detects a change in any of these sensors, it will give you back a value.
Given these are 3 different sensors, the events for each one is very likely to come in at different times, and you may get more readings from one sensor than another within some time period
My question is, does varying amounts of spacing between readings for the 3 different sensors matter for doing coordinate system transformations? And if so, what is the best solution for doing this type of transformation with event based sensors?
Answer: It will call your function each time any motion event gets fired. This can affect the timing of css animations responding to sensor input.  Try getting the orientation values and updating your transformations from within an interval.


Can a method of research used in one context be reused in a different research context?

Question: Is it permissible to reuse a methodology in another context. e.g.  One did a research on land surface temperature(LST) based on a model, say for it. Now is it legit to follow all the procedures of this research for forest loss modelling? Care that just majority are same (in methodology part) but one uses for LST and another for forest loss.
Answer: Yes, it is possible - it happens a lot. Epidemiological methods that originated in health have been applied to other fields, for example.
Doing it is easy.
Doing it rigorously, in keeping with the standards expected in academia, is really hard. It's hard because the source field's methodology usually has a lot of tacit assumptions built in. Identifying those, and testing they're applicable to the application field, is difficult. Lazy researchers don't bother doing that testing, and produce shoddy work as a result.
Comment: @MaartenBuis it's hard because the source field's methodology usually has a lot of tacit assumptions built in. Identifying those, and testing they're applicable to the application field, is difficult. Lazy researchers don't bother doing that testing, and produce shoddy work as a result.
Comment: And in turn, Epidemiology has a grand and glorious history of borrowing methods from other fields (says the Epidemiologist currently working with an algorithm designed for computational chemistry...)
Comment: I don't understand the last statement. As long as you have a good understanding of what the others are doing, copying their design would make doing research easier (or more accurately, less hard).
Comment: @EnergyNumbers  Thanks! Could you tell that this happens in physical science too.
Comment: @SIslam it does - though I'd classify forest-loss modelling as life-sciences (as is health epidemiology)
Answer: Yes, you can use a good design used in other contexts. You will need to cite the article. In practice, you will need to be very careful when writing the methodology section: It will necessarily be very close to the original article. If it gets too close, you'll run the risk of being accused of plagiarism.
Answer: Can is the wrong term. Must is the correct one.
Research and science rely on the possibility to replicate and novel methods have always been the engine for new developments and achievements.
If you don't use your own method when it is appropriate to do it, why should other people bother?
Success in research and science often goes to those who have discovered new methods, rather than simply new ideas and theories. For instance, look at The Top 1000 Papers by Van Noorden et al, in Nature 2014. It is clear that the most successful articles are those reporting methods which can be successfully replicated and exploited for further research and applications.


14.04 Install disk not booting properly

Question: Whether I use a USB or a DVD, the install program goes directly to an Ubuntu desktop with no mouse. So I added another mouse, but there are no programs, save for Accessibility, Network information, and the log off/exit dropdown.
My ultimate goal is to create an Ubuntu OS on a stick, but if I can't get the DVD to boot properly, I'm out of luck. At one point, on another computer, or maybe it was still within Windows(7) I forget, I got the install menu off the USB, but it won't allow me to inistall to another USB.
Any suggestions?
Answer: See this official USB Bootable disk creation document from Ubuntu. There is an option to select which operating system you are using as well.
Answer: Sounds like a bad iso. Download a new iso to your Windows machine and selsct burn to disk. If you have ubuntu installed and it's sending you to the desktop change your boot order to 1 being the cdrom. When your BIOS screen appares press pause / break to pause the boot. Read the screen to see which key takes you to boot options. If your looking for a Live USB, you can also create a Live USB from an iso file in your Windows machine using a program called Unetbootin you can download from sourceforge. Also availible in software center. If you want an actual installed Linux on a USB instead of a HDD or SSD. Put in your Live DVD and select try Ubuntu. When you get to the Ubuntu desktop there should be an icon that says Install Ubuntu. Install your USB and then click the install icon. When you get to the install screen go to do something else and select the USB. Remember your filesystem is ext4 and your mount point is root ( / ) and leave 4gb in your partition. Then in that 4gb create a partition and select ( linux swap ). Then proceed with your install. Ubuntu on USB runs a little slower then from a drive. TTFN, toachGmon

14.04 Install disk not booting properly


How do I eliminate reflection on glass?

Question: When I take a picture through a window, I often see a reflection on the glass. I have noticed that this occurs mostly when it is dark or overcast outside or it is especially bright on my side of the glass. How can I stop this?
Answer: The easiest way would be to use a polarizer filter, which allows light coming from a single direction but blocks most of the light coming from the other directions.
Depending on your camera model that could be harder to do. Usually bigger cameras have adapters for filters built in the lenses, but some smaller cameras also offer this option, just not all of them.
So you could use to it to capture the light coming from the direction of the scene itself, but block most of the light coming from the others sources behind the glass (the reflections you are seeing).
As Matt Grum noted, if you can remove or block the light from inside you will have a lot less reflections. But even if you don't have lights turned on behind the window, the light that comes from outside may reflect on you and your background and appear on the window (therefore on your shot too).
Again, even if you had no lights behind the glass, the polarizer would allow you to capture mostly only the light coming directly from outside.
Comment: *"The polarizer would allow you to capture only the light coming from outside"* - not quite. The glass will **partially** polarize the light in the reflection, meaning your filter will reduce the intensity of the reflection, but not eliminate it. Blocking the light is a far better solution.
Comment: I agree @matt-grum, thanks for the heads up! I've edited the answer to include this option too.
Comment: Good catch Matt
Comment: I took a trip up the Shard in London a couple of weeks ago and tried my circular polarizing filter to get rid of the reflections,  whilst this worked to a certain degree it was replaced with grey/black strata on the images.
Answer: This question has been asked in many guises, ultimately you want to prevent light from inside the room reflecting off the glass and going down the lens.
This can be done by moving the lights, so the direct reflection misses the camera, or more preferably (especially if it's a well lit room and you have light bouncing off everything in many directions) blocking the light.
You can block the light with your body, or get the camera so close to the glass that there is no way for the light to get in.
Answer: Several good answers have been given, but for the larger issue of understanding light, how it reflects, and how it interacts with photos, I highly recommend the book Light: Science and Magic.
Answer: There are sort of two answers here.
The first, if you can control the orientation of the lights in relation to you and the glass, you may be able to avoid reflections. To go along with that, you could possibly use a go-between (or gobo), a piece of black paper or cloth that can possibly block the stray light.
Second, you could use a polarizer filter (circular polarizer for a dslr) to filter our the stray reflections. This has the upside of being very portable and puts you in control, it has the downside of loosing a stop or two of light (making for slow shutter speeds), which can be bad for indoor or low-light photography.
Check out the book "The Science of Lighting and Magic" if you really want to get into the details of angles and reflections.
Comment: +1 to the Science of Lighting and Magic. Understanding direct reflection and what constitutes a light source will help you know whether you can achieve the result you want.

How do I eliminate reflection on glass?


Is there another explanation, apart from the doppler effect, for the redshift observed in distant galaxies?

Question: On episode 10 of the original Cosmos TV series, Carl Sagan mentions that some scientist don't agree that the redshift observed in distant galaxies is evidence of the big bang, stating that probably the doppler effect is not responsible for this effect. What other explanations are there?
Comment: The alternative was around the shift being an actual wavelength shift due to the age of those galaxies. Not sure that argument stacks up any more though (and it was always a bit difficult to argue)
Comment: The original Cosmos TV series is from the 80's. A lot of things have been discovered in cosmology since.
Answer: Tired light has been used as an explanation before, whereby light loses energy whilst travelling through space---a sort of drag effect.
I don't think anyone actually supports it nowadays, though.
Comment: Especially given the new gravity wave observational support for inflationary theory.
Answer: In Cosmology, the main contribution to redshift would be cosmological redshift. Namely the redshift that occurs due to the Hubble flow. According to Hubble's law,
\begin{equation}
v = H_0 d
\end{equation}
The further two objects are away from each other, the faster they are moving. Of course, all this is under the assumption of an expanding universe, such as the widely accepted $\Lambda CDM$ model.
The Hubble flow is in a sense a type of "speed", but this velocity can be faster than the speed of light. This is chiefly because the space between two points is expanding, causing the wavelength of the light to be stretched out.
There is also gravitational redshift, something that occurs due to gravity's effect on spacetime. Although it might be better to think that anything that can stretch the wavelength of light can cause redshift, suppose there exist some kind of god hand that allows one to just pull and subsequently stretch the light wave this would also cause redshift.


"Pending Payment" status for Check/Money Order payment method

Question: Is it possible to change the default status of the order at any stage of the processing to "Pending Payment" if the payment method selected is "Check/Money Order"?
Answer: Im taking it you are on Magento 1.7 from your tag.
Here is a way you can try.
STEP 1
Go to System -> Order Statuses
Click - Create New Status
Status code enter 'pendingcheque'
Status Label enter 'Pending Cheque Payment' (Or whatever you want it to say)
Save the Status
STEP 2
Go to System -> Order Statuses
Click - Assign status to state
Select your new created status from the drop down
Select 'New' from the Order State drop down
STEP 3
Go to System -> Configuration
Click Payment Methods on left
Select Check/Money Order
Your new Order Status should now be available in the New Order status Drop Down.
Hope this helps.
Jamie
Answer: Pending Payment is already a status in Magento, and is the default status and state for orders created using Check / Money order for payment. The state it is assigned to is 'New', and by default there are no other statuses assigned to the New state except for Pending.
<code>System > Configuration > Payment Methods > Check/Money Order:
</code>
Payment Method

Pending Status/State:
Comment: The whole point of the question was how to make it so that orders created with this payment method are assigned to "Pending Payment" and not "Pending"
Comment: Are you looking to rename it, or is there something special about the Paypal status code `Pending Payment`?
Comment: I am not looking to rename it but I need to add another transitional status of "Payment Pending" where it goes to "Processing" not when I select "Ship" but "Payment Received" either manually or automatically like in the case of PayPal.
Comment: If this is for receiving checks in the mail and you're manually depositing them, you're the one who is going to have to click 'Invoice' to move the product into that status. In that case, you'll be adding a new status as described by Jamie.
Answer: If you want to change the status to processing, then you simply need to invoice the order once payment is made.
I took it you wanted the original status to be set as pending payment so its clear, is this not the case.
You can add Processing as a default state to Check/Money Order before any payment is received or assign a status to this also is this what you want to do? If so a few minor code changes would be required to allow processing to be a default state.
Your other option is to create your own statuses and assign them to a state, eg processing, new etc. When you do this you can go into the order, at the bottom you have a drop down with the available status options you created, you can then select these from the available options and click submit comment this will change the status and display in the orders list.


Copy SSH Public Key from Windows to Ubuntu

Question: I am trying to get my ssh public key from my windows client to ubuntu host, but I have no idea how to. I tried to find the authorized_keys file, but had zero success. ssh-copy-id command did not work from windows. I generated the public/private key pair in PuTTYgen. I am using OpenSSH on the Ubuntu host. Any ideas on what to do?
Answer:
Any ideas on what to do?

1. EDIT Download cmder or use your favorite console emulator. Move your public key (id_rsa.pub) and your private key (id_rsa) to C:\Users\yourUserName\.ssh\ create the .ssh folder if needed.
2. On your windows host via cmder:
cp C:\Users\yourUserName\.ssh\id_rsa.pub C:\Users\yourUserName\authorized_keys
3. On your ubuntu host:
service ssh status Start sshd if necessary
mkdir ~/.ssh/ (if it doesn't already exist)
4. On your Windows host via cmder:
cd C:\Users\yourUserName\
scp authorized_keys login-id@ubuntu-Host-Ip:~/.ssh
5. On your Ubuntu host:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
6. On your Windows host via cmder:
Test if you can ssh into your ubuntu host without login/pw auth. If yes:
rm C:\Users\yourUserName\authorized_keys
(you might encounter difficulties running your ssh-agent on windows, write a comment if so)
Comment: Are you sure that PuTTYgen has generated a C:\Users\yourUserName\.ssh\id_rsa.pub?
Answer: Do this on your Windows

Give default values without passphrase, just press enter for all
 ssh-keygen -t rsa

If the authorized_keys file is not there in target Linux machine else just copy the Windows ~/.ssh/id_rsa.pub content to authorized_keys file in target machine
 scp ~/.ssh/id_rsa.pub [linux_user]@[linux_IP/linux_hostname]:~/.ssh/authorized_keys

That's it!!!
Comment: Works perfectly, but careful since this will overwrite the existing "authorized_key"-file. If you want to use multiple keys you can just create multiple files named "authorized_key2", "authorized_key3" etc.
Answer: ssh-copy-id is missing from windows but it easy to create one!

open powershell and type:

notepad $profile

You'll either open the existing Profile.ps1 file, or be prompted to create a new one.
At the notepad paste the following function:

function ssh-copy-id([string]$sshHost)
{
    cat ~/.ssh/id_rsa.pub | ssh "$sshHost" "mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys && chmod -R go= ~/.ssh && cat >> ~/.ssh/authorized_keys"
}

Close the notepad and save.

Finally open a new powershell window and the ssh-copy-id will works as at linux.
Example:

ssh-copy-id user@host

Answer: Assuming your ssh agent is running, just run this from Ubuntu.
ssh-add -L >> ~/.ssh/authorized_keys

Answer: Another way to send your public key from your Windows to your Linux machine is  command in your powershell:

cat ~/.ssh/id_rsa.pub | ssh user@host "cat >> ~/.ssh/authorized_keys"

That should be a one-stop shop for it to work to make it a passwordless entry.
Comment: This is no different from the other PowerShell answer ...


Can I just swap the hard drives of two macbook pros (different years)?

Question: I'd like to swap the hard drives of two Macbook Pros. One is a Core 2 duo model from 2010, the other a 2011 i5 model. Will this work? I just want to save time and not go through a lengthy data copying process.
Answer: Yes. In almost all cases, OS X software is hardware-agnostic (as long as the hardware comes from Apple).
Comment: This is **wrong**. MacOS X isn't and never was hardware independant, even with Apple only hardware. (missing return) I advise to read the answer from @bmike which is much more sensible.
Answer: Yes, as long as both machines have Intel processors in them then both hard disks are formatted with GUID partitioning. If one of the machines was older and had a Power PC processor in it then you'd need to reformat and partition that drive for the newer processor and partition scheme. In your case, swap away.
Answer: It would be best to check with Apple on both serial numbers. They can tell you if the part number for each drive is the same or whether the firmware on each drive is 100% correct for both models. Of course, most SATA drives are fine in any mac for general use, but you can get slowness or less than optimal speeds or sleep/wake issues if the firmware on the system and the drive are at odds with each other.
Answer: As long as you have a SATA hard drive, it doesn't matter what it is. You can also buy a SSD and replace your current one.


How can I integrate $\int\frac{\ln(1+xy)}{1+x^2} dx$?

Question: $$\int\frac{\ln(1+xy)}{1+x^2} dx$$
Give me some idea how to solve to solve this. Is it possible to use some complex analysis to solve this. Or some nice substitution will work?
Comment: Is y a constant?
Comment: What is the integration interval?
Answer: As is, the integral is pretty hard.  We can work with its derivative with respect to $y$, however.  If the integral is $f(y)$, then, assuming the integration interval is $x \in [0,\infty)$:
$$f'(y) = \int_0^{\infty} dx \frac{x}{(1+x y)(1+x^2)}$$
We can evaluate this integral using residue theory, with a keyhole contour $C$ about the positive real axis, for the following integral:
$$\oint_C dz \frac{z \log{z}}{(1+z y)(1+z^2)}$$
This integral consists of four pieces:
$$\int_{\epsilon}^R dx \frac{x \log{x}}{(1+x y)(1+x^2)}+ i R \int_0^{2 \pi} d\phi \, e^{i \phi} \frac{R e^{i \phi} (\log{R} + i \phi)}{(1+R y e^{i \phi})(1+R^2 e^{i 2 \phi})} + \\ \int_R^{\epsilon} dx \frac{x (\log{x} + i 2 \pi)}{(1+x y)(1+x^2)}+i \epsilon \int_{2 \pi}^0 d\phi \, e^{i \phi} \frac{\epsilon e^{i \phi} (\log{\epsilon} + i \phi)}{(1+ \epsilon y e^{i \phi})(1+\epsilon^2 e^{i 2 \pi})} $$
As $R \to \infty$ and $\epsilon \to 0$, the second integral vanishes as $\log{R}/R$ and the fourth integral vanishes as $\epsilon^2 \log{\epsilon}$.  The contour integral is then
$$-i 2 \pi \int_0^{\infty} dx \frac{x}{(1+x y)(1+x^2)}$$
The contour integral is also equal to $i 2 \pi$ times the sum of the residues of  three poles $z=\pm i$ and $z=-1/y$ of the integrand.  Use the fact that, for a function $g(z)=p(z)/q(z)$, the residue of $g$ at a pole $z_0$ is $p(z_0)/q'(z_0)$ and compute the sum of the residues.  Note that the factor of $i 2 \pi$ in front of the integral we seek cancels out the $i 2 \pi$ in front of the sum of the residues.  Thus, the integral we seek is the negative of the sum of the residues.  Thus
$$\begin{align}\int_0^{\infty} dx \frac{x}{(1+x y)(1+x^2)} &= -\underbrace{\frac{i \cdot (i \pi/2)}{(1+i y)(2 i)}}_{\text{Residue at }z=i}-\underbrace{\frac{-i \cdot (i 3 \pi/2)}{(1-i y)(-2 i)}}_{\text{Residue at }z=-i}-\underbrace{\frac{1}{y} \frac{(-1/y) (-\log{y}+i \pi)}{1+1/y^2}}_{\text{Residue at }z=-1/y}\\ &= -\frac{\log{y}}{1+y^2} + \frac{i \pi}{1+y^2} - \frac{i \pi}{4} \left [\frac{1}{1+i y}+\frac{3}{1-i y} \right ] \\ &= \frac{(\pi/2)y - \log{y}}{1+y^2}\end{align}$$
Thus
$$f'(y) = \frac{(\pi/2)y - \log{y}}{1+y^2}$$
$$f(0) = 0$$
The sought-after integral is then
$$f(y) = \int_0^{\infty} dx \frac{\log{(1+x y)}}{1+x^2} = \frac{\pi}{4} \log{(1+y^2)} + \tanh{y}\, \log{y} - \frac{y}{4} \Phi(y^2,2,1/2)$$
where $\Phi$ is the Lerch phi transcendant
$$\Phi(z,s,a) = \sum_{k=0}^{\infty} \frac{z^k}{(k+a)^s}$$


Samples clipping in Ableton

Question: When I slow down the tempo of a song that has samples in it (samples cut from other songs not loops) the samples start to clip. Shouldn't changing the tempo of a sample just change the pitch? Is Ableton automatically preventing this, which is causing them to clip? How can I prevent this?
Answer: There's several different warp mode in Live. Have a look at the cli view panel. If the clip is unwarped, slowing down the tempo will pitch the clip down and make it longer, and vice versa, like in the analog world.
If the clip is warped Live will stretch it but keep the original pitch. Those "clipping" you mention are because your clip are warped with the "beat" mode.
Comment: @illicit - or adjust the level before applying the effect.  If you don't warp it everything is going to get pitch altered as well.
Answer: If you have a sample loaded in Live, it generally is warped meaning that Live will generally attempt to preserve the pitch of it no matter how you stretch it in time. This is of course impossible to do perfectly, but it uses some very clever algorithms to attempt it by making educated guesses about the data. The different algorithms are referred to internally as "warp modes."
However, these guesses are an attempt to recreate data that isn't there - and one possible outcome is that it guesses that the waveform may be higher in parts than in your original sample! So a "warped" sample can peak slightly higher than the original sample would.
This is true for most warp modes with the notable exception of "re-pitch" which does not attempt to guess anything - it simply moves through the original sample at different speeds.
In general it's a good idea to leave yourself some headroom when working with any recording - you can always turn up your speakers if it's too quiet.

Samples clipping in Ableton