Beowulf cluster storage setup

Question: I'm a Computer Engineering student working on a project with a Verari blade cluster, a bit outdated for today standards. I had acquired some Unix experience but I'm not an expert at all.
This Verari cluster has 30 working blade nodes, 20 with two dual core AMD cpus (Opteron 250), 4Gb DDR ram and two IDE HDDs of 250gb. The other 10 node blades have two quad core Opteron cpus and 8Gb ram, with the same IDE HDDs. Those 30 nodes are attached to a patch panel that ends on two gigabit switches, connected each other with two cat-6 cables and bonding enabled on both switches. Also, I have an IBM Workstation that hosts a DNS, DHCP, HTTP, LDAP, PXE/TFTP and a FOG server for my domain.
My mission is to install a beowulf cluster with this hardware. It will be used for MPI programs, scientific calculations and geological simulations.
My initial plan is to use CentOS 6.5 with a good kickstart file to facilitate deployment with a software RAID 1 setup on each node, central user authentication with an OpenLDAP server, OpenMPI software and SLURM resources manager.
Since I don't have a central storage to use yet, I have to look for a way to keep user home directories accessible for each compute node, with a minimal performance overhead and ensuring a bit of redundancy if things go wrong (this is a 2004~2006 hardware and is more susceptible to fail).
What I have thought of is to use automounted NFS shares, with each compute node exporting a /home folder and the homeDirectory path stored on the user ldap account. This ends in up to 30 NFS server on a gigabyte link, mixing storage nodes with compute nodes, not a good practice but is what I got. Remember that these are IDE HDDs, so we have the good old writing and reading bottleneck there.
Other idea that comes through my mind is to use a distributed file system, again mixing compute nodes with storage nodes. I have red of GlusterFS, Ceph, AFS, PVFS2, OrangeFS and Lustre.
For what I need, I think Lustre is the way to go, but it's meant for being on a group of NAS/SAN servers attached to the compute nodes with Infiniband, Myrinet or other high speed and low latency link. To use Lustre on my infrastructure, I will need to have a central node for MDT and MDS and the other 29 nodes as OST/compute nodes. I can recover in case of failure with both options, but I don't know how Lustre will scale with over 30 nodes acting as storage and compute units at the same time.
Anybody has a better idea of what to use in my project? Any experiences or feedback with similar setups?
Thanks in advance for your answers.
Comment: I haven't heard the term "Beowulf Cluster" since *Slashdot* was my browser's home page!
Comment: Computing is the main purpose and redundant home-dirs with same content are tertiary goals? Why do you bother about home-dir performance?
Comment: @ewwhite This is a professional academic cluster setup. (not targeted towards you:) I see no reason to classify this as off-topic.
Comment: @Nils I agree.  I put a reopen vote on it, but am not holding my breath.  Even if it's not off topic... it seems too broad or opinion-based to me.  But we shall see.
Comment: I was asking for professional assistance, I don't have any experience with distributed file systems implemented in this kind of setup. This is not a personal project, I'm working as student for a University in a Intership looking forward to graduate and this really slows me back. I'll try to rewrite my question.
Comment: We don't cater to academia unfortunately. The premise of SF is *"for professionals, by professionals"*. Your question may be appropriate for other SE sites, but it is not appropriate for this particular one.
Answer: My use for clusters has ever been ha as primary and speed as secondary goal.
I found that a very conservative approach can fulfill both goals if we are speaking about less than 1000 concurrent users.
For the home-dirs I would go for a simple nfs-based two-node active/passive cluster with an even number of shares distributed between the two nodes in primary/secondary drbd role.

Beowulf cluster storage setup


Not getting inbox messages by email

Question: On the upper bar on all SE sites, there is a "Stack Exchange" dropdown with "hot questions / all sites / inox / notifications" sections. On the bottom of it, there is a "email settings" option with "Email me my unread inbox messages". I'm not getting any email notifications, and my email address is correct in the textfield there. What could be happening?
Comment: I hope it's clear that you get your unread messages on email, and checking the notification bar marks all as read.
Comment: They are delayed by about 24 hours if I remember correctly.  Have you waited that long?
Comment: I have **never** received notification email, ever.
Comment: Hm, makes perfect sense.
Answer: To expand what I mentioned in the comments, you get notifications of unread inbox messages, not all inbox messages.
(Un)fortunately, clicking on the MultiCollider (aka the Stack Exchange notification dropdown menu) marks all messages as read, which is what I assume is causing you to not get any emails.
Comment: Interestingly, on the mobile, it doesn't remove any unclicked notifications from the menu, so there's *some* read/unread logic behind it. But the counter is still reset. They should fix this at some point.
Comment: @slhck weird, it still does so for me. You should try jmort's extension http://stackapps.com/questions/3778

Not getting inbox messages by email


Preemptive treatment for alcohol

Question: It's commonly accepted that most treatments for enteral poisons aren't very useful for alcohol, because it is absorbed so rapidly. For example, by the time a hospital could administer activated charcoal, most likely nearly all of the alcohol would already have passed into the blood. But what about preemptive treatment? If one were to expect a night of heavy drinking, what could be done in advance to decrease absorption and/or limit effects?
Comment: I just came across this question - this is at least partially answered here: https://health.stackexchange.com/questions/3841/what-is-the-healthiest-way-to-drink-excessively-and-chronically but I am not sure whether it's a real duplicate
Comment: @YviDe The link you provide notes "chronic" whereas this question is relative to a single night.
Answer: So you are searching for hung-over drugs :). I don´t see any problems with that. I have many times wondered the same thing. If you search online one will find hundreds and thousands of journal articles stating "the remedy for hang-over". Of course these "remedies" are based just on folklore.
There is also some scientific literature on this topic. The most comprehensive is a systematic review published 2005 in British Medical Journal.. Unfortunately the authors conclude: "The most effective way to avoid the symptoms of alcohol induced hangover is to practise abstinence or moderation".
I am quite sure that if an effective treatment to reduce or limit the effects of alcohol were to exist, that would have gained popularity beyond any limits.
However, I would present on interesting theory to try. Alcohol or ethanol itself is not the bad guy. Body processes ethanol by oxidating it to acethaldehyde with the help from alcohol dehydrogenase enzyme. The acethaldehyde is responsible for all the bad, including nausea, vomiting etc. It is also a carcinogen associated most importantly to gastric cancer.
To deal with this potential carcinogenity, a Finnish biotechnology Company Biohit has introduced a drug called Acetium. It is a very simple drug, it only contains l-cysteine, an essential amino acid. The trick is that L-cysteine reacts with acethaldehyde forming a compound molecule which has no meaning or effect in human body. As so the Biohit aims to market this product as a pre-emptive treatment for gastric cancer.

But the interesting part if, that is L-cysteine neutralizes acetaldehyde, why could not it therefore be an effective treatment for hangover? Just take some Acetium before drinking and do not worry about the next Morning.

Totally unrelated to the OP. My secret dream is to perform a randomized controlled trial about this idea. Of course, prior to it, I should contact Biohit to make sure that I receive the appropriate rojalties from their sells. Let´s say this treatment really worked in my trial, I would most likely become a multi-billionaire. Alongside I would be responsible for tripling or quadrupling the amount of consumed alcohol around the world since no one would ever suffer from hang-over. People would however get more drunk since this drug only prevents hangover. As so, the rate of homicides, beatings and drunk driving would go thorough the roof. Maybe I should not be waiting any medal from the parliament or president. Perhaps I should abandon my research idea....
Comment: To be honest, I was looking at both limiting hangovers and limiting intoxication as well (though of course the latter is significantly less useful). My assumption about Acetium is that preventing hangovers is a bit more complex than immediately apparent, but this seems like a great place to start. If you decide to go ahead with your dream, I expect an equity position :)
Comment: (Not @TheEnvironmentalist) A down vote.. Really? I guess a bit of humor is not quite tolerated here...
Answer: I am going to take most of this from my answer to What is the healthiest way to drink excessively and chronically? Most of the advice does not change when we are talking about a one-time scenario instead of a more regular occurrence.
You mention decreasing absorption - an important thing is to get the alcohol to be delivered into the blood (and liver) slowly,  definitely.  That means eating before drinking, drinking slowly, and not taking any medication that worsens the effect of alcohol.
After the damage is done, so to speak, comes reducing its effects and speeding up recovery. Drink enough additional fluids (water, juices, etc) before, during and after drinking alcohol. Get enough sleep and give your body time to recover.
The paper Interventions for preventing or treating alcohol hangover: systematic review of randomised controlled trials has an overview over various hangover treatments studied in eight publications, from herbal remedies to dietary supplements, but ultimately has to conclude

No compelling evidence exists to suggest that any conventional or complementary intervention is effective for preventing or treating alcohol hangover. The most effective way to avoid the symptoms of alcohol induced hangover is to practise abstinence or moderation

Sources
How to Protect Your Liver if You Drink Alcohol
Absorption Rate Factors
NHS hangover cures
Comment: It looks like you left part of the word "intervention" hanging on there at the start of the chunk of text you quoted. Did you mean to include none of the word, all of the word, or earlier parts of the sentence, too?
Comment: @HDE226868 oh wow, I left out a big chunk. Which included the very important word "no". Ouups.

Preemptive treatment for alcohol


Any success stories about using slicing tools to help debugging

Question: Program slicing is one of those software technologies where there is much more activity in the research community than in the industry community. Does anybody outside of the research community using slicing tools on production code to help with debugging or other tasks? If so, what tools did you use?
Answer: An online XPath Tracer performs slicing, but it might not meet your definition because it's for an expression language, XPath 2.0, rather than a full-blown programming language.
Currently, this permits specific parts of the expression to be selected; the 'path' for that part of the expression is then resolved and displayed. In this case, XSLT 2.0 is being used to perform a partial parse of the expression.
This tracer has 2 objectives for when it's complete:

It will allow an auto-complete list to show available nodes for a
specific path (for a chosen source file) - when a part of the expression is being edited.
When an expression doesn't behave as expected, different expression
parts can be evaluated to narrow down the area of interest.
Comment: Not quite what I had in mind, but interesting nonetheless
Answer: The following Chrome screenshot shows the trace output from an XSLT 2.0 processor running in the browser:

The XSLT program is 'sliced' so every instruction records in the trace output when it was executed. The nesting of the output XML explains the execution hierarchy.
The above sample helps show the actual template that was executed as a result of the xsl:apply-templates instruction. Thus the trace shows the same information that you would get from an IDE debugger - but without having to step through each line of code.
If an exception is thrown within the executing code, then the trace terminates at that point, showing exactly where the code failed, providing more information that a typical call-stack.
Also, additional trace instructions can be embedded in the XSLT (in the form of a fn:trace function call) to provide extra diagnostics for a specific part of the code.
Comment: I've added this as a separate answer because it's different from my earlier attempt, but a related technology. Still not quite sure if this is what is meant by slicing - but it's closer, I think.


Is the amount of blood that flows through every vein and artery per minute really a constant?

Question: I was listening lectures from Mark Saltzman via Open Yale Courses. Now, if I did not understand him wrong, he said that the amount of blood that travels through every vein and artery in our bodies per minute is a constant. Five liters of blood go through the aorta every minute, and since the blood circulation is a closed system, also every other vein/artery must pass that amount of blood per minute. Is this true? How could I (mathematically) show that it is true?
Comment: I found the video you have seen at https://youtu.be/It_cV56Dxtk and watching from about 40:00 I can not recognize what you are stating here, more on the contrary though. I suspect you misunderstood him, or can you refer to an exact statement?
Comment: I think he is referring to the Bernoulli's principle which states that the sum of kinetic energy, potential energy and the internal energy due to pressure, is constant.
Answer: I think the question is not whether the blood flux is constant in time, but rather in space: if 5L/min is the flux through aorta (in given physiological conditions), then at the same moment 5L/min will cross the capillaries. This is volume conservation, for a closed system filled with an incompressible fluid, see this sketch:

If 5L are pushed through the main pipe, the same volume needs to be pushed through the system downstream of it.
Then comes the fact that the system is not perfeclty closed, and some water (and solutes) will "leak" in and out, as @inf3rno points, so this is only approximatively true. Another limitation is that vessel walls are actually elastic, so a change in vessel radius does occur during blood flow. However I believe it is a fair approximation.
Answer: It is ofc. not true, because it is not a closed system. The kidneys filter blood and excrete water and other compounds (which are reabsorbed or go to urine), the sweat glands remove water and salts. By drinking daily 2 liters (the total blood volume is about 5 liters) of fresh water and salts are absorbed from the intestines to the circulation, by eating just the opposite happens. Every cell has aquaporins which are responsible for water transport, so they can dilute the blood for a while, if necessary. The spleen can withhold red blood cells (before injury) which reduces the blood volume. The white blood cells can leave the circulation. By inflammation water leaves the vessels because of increased permeability, and so on...
Answer: Nope. All blood flows in the body can change at any time(more or less).
If the heart rate and blood pressure, etc, is constant the amount of blood that travels through the aorta is constant, yes. But there is far more capacity in the arterial and venous systems for the actual amount of blood flow there normally is. Veins and arteries contract and expand to route blood flow to different parts of the body, so the amount of blood flowing through any particular artery can change without changing the aortic flow.
A good example of this: Vasomotion. It happens all the time in your hands (sometimes it's even visible as patches of red/white skin. On my hands they're a little smaller than the head of a thumbtack) on the order of minutes. fMRI is a neat technology based around watching brain blood vessel changes in flow as a proxy for activity.
All the flows through all your arteries don't even have to sum to the aortic flow, due to compliance(a fluid dynamics term. essentially, the aorta or other arteries/veins can 'inflate' so more blood is flowing in than is flowing out. Then later they 'deflate' and more blood flows out than in. Arteries tend to be more compliant because they have to be springier to deal with heartbeat). There are also osmotic effects where fluid leaves the arteries and becomes lymph, which then later drains back into veins. It's not a huge effect but it's there. If you measure total blood flow through the aorta and then total blood flow through all the capillaries, there will be less total blood flowing through the capillaries. Not much less( 10% at the most) depending on blood salt and blood vessel position and whether you count the kidneys, etcetera etcetera.
So: the amount of blood that passes through a given artery given the aortic blood flow is not fixed. The amount of blood that passes through all arteries given the aortic blood flow is much closer to fixed, but even that can be different(even if you're not bleeding). And if you were asking if the amount of blood that flows through the aorta is constant, that's absolutely not true. That can vary through the heart rate, the contractility of the heart, the venous return pressure, the overall blood pressure, and a bunch of other things that very slightly affect flow rates.
Answer: The amount of blood flow is not constant in general.  As you exert yourself, your heart rate and therefore blood flow increases.  Furthermore, individual vessels dilate or constrict to increase or decrease flow by modulating their resistance to flow.
Your circulatory system is closed however, so all of the blood leaving the heart must eventually come back to it.


Made a mess of privileges for /var/www

Question: I've got an installation of Ubuntu 10.10 running in virtualBox which I'm going to use for some local development. I've installed PHP, Apache and MySQL and want to use vsftpd to access /var/www so I can develop on my Windows installation (from which virtualbox is running) and FTP over the files.
I was originally getting an error saying that access was denied when I was transferring files over FTP to /var/www so I figured some chmod tweaking was needed. I'm no expert so did some reading beforehand and executed the following:
sudo chmod -R 777 /var/www
sudo chown james:james /var/www

I can now FTP files over, but when loading up newly transferred files in the web browser, I receive a permission denied error. The new files don't have the 777 permission which I set - surely you don't need to use chmod every time you transfer something new over?
This is simple stuff I'm getting stuck with so I just know there's going to be permission problems with PHP and MySQL accessing things in the future so I could really use some help! If anyone would be so kind as to suggest some privileges I can use, I would be most grateful. Security isn't a concern as this is all local and I just want to get it up and running ASAP!
Probably would have been better off installing XAMPP on my Windows installation but I wanted to keep it separate and learn a thing or two along the way to getting this set up!
Here's the output from ls -l /var/www
-rw------- 1 james www-data 3458 2011-03-31 00:36 g.jpg
-rwxrwxrwx 1 james www-data  177 2011-03-27 23:16 index.html
-rwxrwxrwx 1 james www-data   21 2011-03-28 01:18 test.php

index.html and test.php were in /var/www before I executed the chmod command and g.jpg was FTP'ed over after I messed around with the privileges. I've run chown james:www-data, but that hasn't helped with the Apache access problem.
Comment: Can you please do an `ls -l` on some of the files which you uploaded via FTP? This would let us see the ownership & permissions on these files.
Comment: Have added the info above Stefan! If there's anything else, let me know :)
Answer: I guess umask is what you need. umask is the *nix (POSIX) command used to set the permissions of the newly created files.
Most FTP servers directly implement the umask directive. For instance, the widely used ProFTPd has this directive, that you can configure the way you want.
Hope this helps.

Made a mess of privileges for /var/www


Can you use sparkling water to brew coffee?

Question: Has anyone ever tried it yet? What flavor/mouthfeel/extraction benefits are there, if any?
Comment: Is the sparkling water also mineral water? Cause, mineralization has positive effects to extraction. However, water hardness is not preferable. But, hardness is the kind of mineralization that depends on Calcium or Potassium... Difficult question.
Answer: If you heat the water as per most brewing methods, it would no longer be carbonated/sparkling by the time you brewed with it.
You would thus be confined to a cold-brew method, and if you wanted the water to remain carbonated you'd have to cold brew in a sealed container. That would be moderately inconvenient but should be possible.
Or you could brew coffee by any means and force carbonate it after the fact, which would thus have no effect on the brewing.
Never tried it, don't find the idea personally interesting, but all it should cost you to try would be a bottle of sparking water and the hassle of getting the coffee grounds into it, waiting a day or so, and then pouring it out through a filter and cleaning up the mess before recycling the bottle. Please report your results.
Comment: Will do. Will think about ways to figure it out... Thanks!
Comment: Probably funnel (or paper funnel) grounds into an empty bottle (preferably pre-chilled) then fill with chilled sparkling water and cap as fast as possible, set in fridge, shake occasionally (not right before you decant.) Decant through a filter.
Answer: Good coffee is extracted via highly measured methods, methods that attempt to always replicate uniform extraction.
Blooming is a step taken in drip/pourover and sometimes full immersion methods to help coffee grounds degas before the proper extraction. This is because as gas leaves the coffee, it cannot simultaneously absorb water.
Thus, using sparkling water is heavily detrimental and it introduces a large amount of bubbling which reduces actual coffee-to-water contact and result with an poorly extracted cup born from an inconsistent extraction.
Comment: This does make sense - less contact because of the water bubbles.

I guess I only wondered because sparkling water is often served with coffee, just like still water is often served.

It got me thinking if a "bubbly" would help at all. Guess not enough to get the whole world drinking.
Answer: The other issue you'll run into is that sparkling water is actually pretty acidic, and that's going to change the overall extraction process as well.
If you want sparkling coffee, make cold brew and then put it in something like a Sodastream to force-carbonate it.
Answer: I tried it this weekend. The Nespresso machine sputtered and wheezed a bit, then shut down with blinking lights, and the pod inside had the foil blown off and there were grounds in the hopper. Bad idea.
Comment: That seems very strange that sparkling water would cause a mechanical issue with your machine.
Comment: Brewing is something, evaporating already gaseous water in a pressurized chamber is another thing. Probably, pressure really built up. Then, dusty salts of Calcium and Potassium (formed when heated) clogged some fine tubes inside; as a few months of scale already is already inside a glass of mineral water. French-press, filters or maybe moka pot could be safer, I assume.
Answer: !Play scientific experiment for carbonated water. Same type of grind added to the exact same level a French press. Carbonated cold water provided via SodaStream. Then heated to 200° rapidly on stove. Then added to a measuring device to measure carbonation levels. Or CO2 levels being excreted from the top. As a standard I did this once with regular 200-degree water and ones with carbonated 200-degree water. And both times I let the grinds degress or the gas at the beginning. But the same amount of water. Upon filling the French press the rest of the way. I started a stopwatch for approximately five minutes. I could tell a instant difference in the darkness and richness of the Brew in the carbonated water versus the plane water. Also noted richer taste. After the Brewing process. The carbonated water was no longer carbonated but did extract more from the coffee. Carbonated water is not simply bubbles and how carbonated water works in Brewing process is far different than just blowing bubbles through the grinds. There's interesting interaction that happens when carbonated water touches something course. I got these ideas from watching a detailed video on bubbles and the different kinds and was particularly interested in CO2 carbonation. My next experiment I want to try and add ultrasonic waves or the same technology they use to examine fetus growing. Known as ultrasound being pumped directly through the carbonated water in the time of the coffee grinds. Video I watched adding ultrasonic waves to microscopic carbonated water points causes the bubbles to go from a nice round shape to a rather violent sharp point more like a bracket gear then a perfect sphere. And removing dirt on steel sheet it showed a 98% increase in cleaning power. I'm wondering what this could do to coffee grinds. Got to love it when science turns delicious.sean w


Tips for King of the Hill challenges

Question: Inspired by this question, what are some tips you guys have for creating king of the hill challenges? What are some things to keep in mind in the planning and implementing of the rules and the controller, and advice on what makes for a good challenge?
Comment: There is currently no consensus for questions about challenge writing being on topic on main. I kinda wish they were, but even if so, I think this kind of question is way too broad. If we did have challenges about challenge writing I'd expect them to be more specific like "I've got this idea for a KotH, but I'm worried about the balance of this mechanic. How can I make it work?", or at least something like "What are the dis/advantages of elimination vs. round robin for KotHs?".
Comment: Could we migrate this to meta if that is the better place for it?
Comment: @MartinBüttner I was curious why it hadn't been brought up before, but having seen the one about writing bots, I figured it would be in roughly the same ballpark for type of question, though I see what you mean. Nonetheless, while the actual challenge concepts may be broad, I feel like there is a need of some sort of "guide" of tips to keep in mind when thinking up and writing these sorts of challenges in particular. If this is not the place for it, might there be a better place (perhaps meta)?
Comment: I'm voting to close as off-topic because I think this would be better on meta than main.
Comment: (I'm not saying that meta IS in fact a better place for it)
Comment: @muddyfish The question Martin Büttner linked to on meta does seem contextually similar, so I would be inclined to think it may at least be a better place. But given that he's writing something up about the issue in general, it probably is best to just wait it out until there's a consensus
Comment: This shouldn't be migrated.  The tips on code-golf ones aren't, and this isn't really about the site.
Answer: Account for turn order advantage
I've come across a number of challenges that would have wildly varying outcomes depending on who went first (or last) in the turn order, such that figuring out who was actually winning was a difficult task.
As a rule of thumb, if each action a player makes has an immediate effect on the game world (as opposed to the results calculated after the round and applied collectively), be sure to account for the advantage that turn order gives. You could run a large number of matches in randomized order and get the average, or randomize turn order per round (if round based), or offer some sort of in-game balance to neutralize the advantage (like what Settlers of Catan does with initial placement).
Alternatively, you can also write the challenge in such a way that turns are handled simultaneously (the same "world state" is given to each player each round), and then between rounds the changes are calculated. This also has the benefit of allowing for parallel/asynchronous calls to bots, which can speed things up.
Answer: The Complete How-To KoTH
1. Have an idea
This is the part I can't help you with.  If you're looking for ideas, check the sandbox, chat with others, or check your local board game store.
2. Refine your idea
Figure out what mechanics are interesting.  This is a refining stage, so remove as much as you can from your idea.  For example, if you've got a fighting-based KoTH, consider removing the maze you are putting them in, or even the grid entirely and make it a 1-on-1.
Things to consider:

Randomness is your enemy.  You want there to be as little randomness as possible.  Sometimes you need randomness (such as a random turn order), but remove as much as possible.  The more randomness in your challenge, the more games you will have to run to ensure you have the right winner.
Are there winning strategies?  What's a feasible strategy that has a chance of winning?  Is there a strategy that counters it?   Is there a strategy that can't be beaten?  Are there interesting strategies (takes more than a couple of lines to write)?  Are there a decent amount of easy strategies?.  You want to make the entry bar as low as possible to get people's feet wet.
Is your KoTH a 1-up KoTH?  Figure out what you think the best strategy will be.  Is it possible to employ the same strategy, but with a slight offset in order to beat the top submission?  1-up strategies are really common in perfect-information games (everybody can see everything), so perhaps try hiding some information from opponents.
Post it in the sandbox.  Be careful about upvotes here.  People like king-of-the-hill challenges, and they tend to get a lot of upvotes in the sandbox.  You really need as much feedback as you can get, as flaws are not easily fixed later on.
How are you going to run multiple games?  Which players go in which games?  How are you going to combine scores across multiple games?  Your tournament structure can drastically change strategies, so consider what you really want.

3. Write your controller
This is the fun part.   While you are doing this, you'll probably discover that you missed some edge-cases.  Make sure to add them to your sandboxed post, and get feedback on how to resolve them.
Things to consider:

How are you going to run submissions?  This decision will have the biggest impact on how fast each game will run.

If all submissions extend a class (or is a function call), response times are measured in micro-seconds
If submissions are separate processes, but stay alive between method calls, response times are measured in nano-seconds
If submissions are separate processes, and you boot it each method call, response times are measured in milli-seconds

I'm not exaggerating here.  I've run my fair share of KoTHs, and spent a fair amount of time trying to get cross-language communication as fast as possible.  Cross-process communication is orders of magnitude slower.
That said, if you allow more languages, you are likely to get more submissions.

Write some sample submissions.  You need some submissions to test your code and to provide an example of how to write a submission.
Make your interface as easy as possible.  Make it ridiculously easy to write a submission.  Not only should the methods be simple, but consider adding helper functions for tasks that will be common in your KoTH (such as pathfinding or tracking other submissions)
Test your KoTH controller.  I cannot tell you how often I see KoTHs posted with ridiculously buggy controllers.  I know you are excited, but please, please test your controller.

4. Share and Run your KoTH
KoTHs need lots of submissions, so try to make it as popular as you can:
Your post should:

Be brain-dead easy to read and understand.  KoTHs are complicated beasts, so explaining your challenge well is critically important.
Contain a complete walk-through of how to write a submission and run your controller
Have an image.  This can help increase the interest of people reading your post.

You should:

Commit to running and fixing your KoTH at least once a day for the next week, and every 2-4 days after that depending on how many submissions you get.
Watch the leaderboards.  Make sure that the top submissions aren't changing places on each run-through.  If so, you need to increase the number of iterations.
Open a chat room.  People are going to get stuck, and helping them through the comment system is sub-optimal.
Comment: Or if you can't do cross-language submissions, use a language that's relatively well known, like Java, JS, or Python; something that has a low barrier to downloading a controller and running it. The first KOTH I participated in had a git repo that was just "clone, open in eclipse, run." And be prepared to troubleshoot. Team of the Hill was one KOTH I gave up on because while the controller was available, I was not getting the data I expected from a particular action (an empty array of the area around my bot despite the visualization showing otherwise) and the OP never responded.
Comment: This really needs more upvotes
Answer: Read the tag wiki
The wiki for the king-of-the-hill tag contains useful information and tips for creating KOTH challenges. I have copied the material here, but the information is more likely to be up to date on the wiki itself.

king-of-the-hill indicates a game where the submissions interact with each other. The game needs to have well defined rules and scoring, and the goal is to write a maximally competitive program.
Make sure you write your test framework / scoring program before posting one of these challenges. In fact, it is strongly recommended that before posting you upload the test framework, one or two simple example bots, and a build script as a public repository on a site such as GitHub. Then competitors can easily download and build the other bots when developing a new one, and might even send you a pull request with their new bot and its build script. See, for example, https://github.com/pjt33/ppcg36515 , which has a make setup that allows building the test framework and the bots in one step.
These challenges are usually a big undertaking for the host of the challenge, so here are a few common practices.
How to communicate with the bots?
There are several options to realize this. Common choices are

Players implement an abstract class or interface in the language of the controller. All implementations are added to controller's project and can be interacted with directly through function calls. Example: Survival Game - Create Your Wolf
Players write a script that can be run from the command-line. These scripts are invoked at each turn and given input via arguments, while their output is read from STDOUT. Example: Caveman Duels (or: Me poke you with sharp stick)
Players write a script that can be run from the command-line. These scripts are invoked once (and the processes kept running), communication is done via STDIN and STDOUT using persistent pipes. Example: Hunger Gaming - Eat or Die

Hybrid approaches are also an option, which usually increases accessibility of the challenge.
How to handle randomness?
If the scoring program contains (pseudo)-randomness or submissions are allowed to use randomness, this can greatly affect the leaderboard of a single trial. You should either seed your pseudo-random number generator (PRNG) and tell your participants to do the same or you should run a specified number of trials and take the average or median, say, of the individual scores.
Common pitfalls
King-of-the-hill challenges tend to be quite prone to loopholes. Consider including these restrictions to your challenge:

Any attempt to tinker with the controller, runtime or other submissions will be disqualified. All submissions should only work with the inputs and storage they are given.
Bots should not be written to beat or support specific other bots. (This might be desirable in rare cases, but if this is not a core concept of the challenge, it's better to rule it out.)
Reserve the right to disqualify submissions that use too much time or memory to run trials with a reasonable amount of resources.
A bot must not implement the exact same strategy as an existing one, intentionally or accidentally.
Comment: About the common pitfalls, which are more loopholes than anything, wouldn't it makes sense to include them in an official meta-post about standard disallowed things in KotH?
Comment: @Katenkyo If there *were* such a post, then that part of this content would likely be included. For this post, I'm just including the entirety of the tag's wiki.
Comment: Curiously the first KOTH I participated in was *specifically for* trying to tinker with the other bots. Mind it was done in a sandbox way (no reflection or ASM to work outside the controller) but that each "bot" was actually a series of pointers *to* submission code methods. And the goal was to inject your "flag" method into other bots (i.e. so that more bots had pointers to your flag-code than other code). It was great fun.
Answer: Scale the challenge for the number of players
Many challenges involve a "field" (where the player has a location and may move) or "world" (where the player can interact with and change aspects of the world that affect all players). When incorporating these sorts of play environments, be sure to take into account how the game may change between small and large player counts.
On a field for example, a 100x100 grid might work for 2-10 players, but not so great for 40 players if the challenge gets really popular.
In a world setting, having bots send out commands to change some stat about the world (like killing off "5%" of each enemies forces) might work better at a small scale, but with more players becomes too effective if they all run it at once (20 players * 5% = 100%), in which case, a static value might work better.
One thing to try is making for demo bots to handle a few different play styles, and then cloning them to see how the game changes for larger numbers. Test different situations to find the flaws, then work out the numbers to scale better.
Comment: Another solution to this is to have a fixed number of players on each map.  If you don't have enough players, duplicate some of them, and if you have too many, then you simply select N of them.
Answer: Allow as many bots as possible
Nobody wants to be disallowed from a contest right? Allow as many languages as you can. If someone posts a bot in a language you don't have, try as hard as you can to install it. If you can't? Ask for instructions.
Allow people to post as many bots as they want. This means when they come up with a Super Amazing Idea™ they don't have to worry about changing/removing their other bot from the contest.
Comment: Not disagreeing, but a notable exception: [link](http://codegolf.stackexchange.com/questions/48353/red-vs-blue-pixel-team-battlebots)
Answer: Ask for sandbox reviews
I think everybody does that, but it is especially important with KotH. Designing a KotH is like designing a game (in fact, it IS a game), and you might need help to find some flaws in your ruleset or to balance things the right way.
Also, once the controller is written, put the link in the sandbox and try to have some people playing around with it to point-out bugs you may have missed.
Answer: FAQs
How big should my map be?  As small as possible.  There are three solutions here:

Scaling map. You often see this in the form of "Side length is equal to 5*PlayerCount".  Please do not do this.  If you want a scaling map, you want X*sqrt(PlayerCount).  With the original equation, if there are 100 players, there are 250,000 squares, while only 625 squares with 5 players.  The distance between players gets bigger and bigger with more players.
Fixed size map.  I actually really like these.  You often combine this with a fixed game size, so this often means that not all players are in all games, or that games will have duplicate players.  Both of these usually aren't problems (and may actually increase potential strategy)
No map at all. Maps are overused. As a comparison to board games, how many games have you played where you are a dude walking around doing stuff?  Even games like Risk have a map, but it is drastically different than maps we use in our KotHs.

How do I ensure that games are fast? There are several things you can do:

Provide fast sample bots
Provide a fast "helper API" for common actions
Reduce randomness
Require same-language submissions
Place a time limit (submissions must have an average of Xms response time over Y turns)
Make each turn count
Cache bot responses.  Cache path-finding.

How do I prevent cheating?.  Simply mentioning in the post what isn't allowed is all you need.
Who wins?.  This is a question people should ask more:

If A comes in 1st 50 times, and last 50 times, and B comes in 1st 30 times and 2nd 70 times, who wins?
If A wins 50 times with score of 20, and B wins 30 times with a score of 100, who wins?
If the top 3 players beat each other in a Rock-Paper-Scissors style, who wins?

How do I get more players?:

Make the rules as simple as possible
Add images to your post, especially visualizations of the game in progress
Make the controller easy to download and run (Remove ALL known bugs beforehand)
Require all submissions be in the same language (makes it easier to run/modify other submissions)
Make the post as easy to read as possible.
Add an easy-to-use helper API
Add sample bots

I'm having trouble coming up with ideas. Here are some interesting concepts that you can build off of:

Variable-time turns.  Some turns may take longer, allowing other players to do multiple actions.
Secret-secret knowledge.  Your opponents can see some of what you have, but not all of it.  You don't know what your opponent can see.
Alternate roles.  Some players have different goals than other players.  Those goals can either be opposing, or they can be adjacent (which is often more interesting).
Multiple pieces.  Like in chess, a bot can control more than one "object".  This leads to better and more interesting coordination.
Collaboration.  Have certain actions assist other bots. (Consider if people can submit multiple, collaborative bots)
Real-time bots.  Spawn each bot as its own thread, and make the game continuous instead of turn based.  (Don't make moves computationally difficult:  You don't want people fighting over computer resources)
Build-a-bot:  Allow players to choose characteristics of their bot that persist.  (Think Pokemon:  Choose stats, or choose abilities, etc)
Finite resources.  Players want different resources, and there aren't enough to go around.  Make players choose which resource they really want.
Answer: Opponent prediction
In general, a koth is better if there is some level of opponent prediction, rather than perfect info where the result tends to be based on whether someone wrote the ideal bot.
Even if your koth doesn't have perfect info, it can still have an ideal bot. for example, a move with an expected value of 5 is better than one with an expected value of 4. hence there should be opponent variance and simultaneous turns or fog of war, so that you can take the guessing about how your opponent would behave to enrich the metagame.

Tips for King of the Hill challenges


How to display a directory without looking like spam

Question: I need to list every city in a state (for instance, California), along with a huge list of automotive dealers per city. How do I do this on one page without looking like a link farm/spam page to end users?
Answer: You need to brush up on your SEO lingo a bit I think.
You won't be considered a link farm because you're not making a link farm. A link farm is a network of websites built for the specific purpose of propping up the link popularity of another website or websites. A directory is not a link farm unless built for that purpose which yours is not (I am assuming).
A spam page is just a useless definition in SEO terms as it has no real meaning. But to assume it means you are somehow using your website to manipulate the search engines then you're fine because you're not doing that, right? There are countless directories that are out there doing what you're doing without issue so why would you be any different?
If you mean spam page from a human perspective then don't fill the page which crappy ads and stuff like that. Make it a useful and easy to use listing. That's the exact opposite of what a spammy looking page does.
So go ahead and build that directory and be successful. :)
Comment: Thank you. I actually know exactly what those terms mean, but I should have clarified exactly how I meant it. Yes, I mean from a human perspective. Displaying a huge list of links is difficult to get right, and easy to look like spam content.
Comment: If it's organized and easy to use then it won't look spammy.
Answer: You may try some open source link directories. They are pre made for what you are trying to do and could save you some of the hassle trying to avoid a particular look.
Comment: That's an idea, but the directory part of my specific project is only a minor portion of the site build. It's not a directory to be added to, it's a directory purely for navigation purposes.
Answer: Use JavaScript to make it easier to navigate. Using a gigantic list, even using relative links in HTML, would make it non-user-friendly.
JQuery is a good library to brush up on, a lot of super easy shortcuts to hide / show data.
My recommendation would be to use a header directory first, and on click it would show or hide the information that pertains to it (List of cities. Then you click on a city and it would display all automotive dealers in that city. You could include graphics and such to make it look really nice.
Comment: This is the ultimate plan, but I firmly believe in building a website that is fully functional and usable WITHOUT the use of JS as a crutch. We will definitely use jQuery, but I want to get the site structure and design down as HTML first :)


How does the NES PlayChoice arcade's security EPROM work?

Question: I've read that the PlayChoice 10's security system includes a 64-bit serial EPROM that gets compared against the first 64 bits of code, and that it's possible to swap the ROMs between compatible cartridges (that use the same mapper) to play different games. What's not clear is exactly which program code is compared with the security EPROM - does this work because different games happen to have the same first 64 bits, is it checking against the PlayChoice-only title/instructions ROM, or does this only work with an alternate PlayChoice BIOS?
Comment: The NES PlayChoice has a Z80 that manages the security and game selection logic, wired into the same large PCB as the NES part.
Comment: Great first post, welcome to Retrocomputing!
Comment: The 6502 begins executing code pointed to by $FFFC/$FFFD which obviously means the "first 64 bytes of code" can vary.  Most if not all normal NES PRG ROM mappers work on 8K or 16K blocks, and switch in a default "block 0" on reset (on some mappers the upper 8K or 16K is a fixed block).  So I *think* this is probably what external hardware would consider the "first 64 bytes", which would start at $8000 or $C000 on the NES memory map.
Answer: The security is handled entirely by the Z80, the NES side of the machine has no awareness of anything outside of the normal behavior of an NES.  In fact, all the games (except for Mike Tyson's Punch Out) are 100% identical to the NES cartridge versions, and frequently use the same maskROMs from the NES version.  Because of this, you can exchange the ROMs for another game that uses the same mapper.  The downside to this, is that in the game list and instructions screen, it will show up with the name/instructions of the original title.  Note that the boards have extensive solder jumpers that can be used to allow it support various sizes of EPROMs and maskROMs.
There actually are 2 security chips on a Playchoice cartridge.  There is the small serial ROM, and there is also another standard 27C64 EPROM that is used by the Z80.  That ROM contains the game's name, instruction screen, and also the Z80 code that does the actual comparison to the serial ROM.  If it doesn't match, then the game will not show up on the list.
So the Z80 boots into the Playchoice "BIOS" ROM, and when it selects a cartridge slot, the cartridge's Z80 ROM gets mapped into an area of the Z80's memory.  The Z80 then executes code in that ROM to validate the cartridge.
This is known thanks to the work of Martin Korth (author of the NO$NES emulator), and he has also created a utility which will allow anyone to create a custom ROM with their own game name and instructions, and also does no checking of the serial ROM, so you no longer need that part on the board.  I have designed my own Playchoice game boards and used his utility with it, it does work.
Comment: Martin Korth is an absolute legend, by the way. His documentation is often the only thing you need to know a system inside out. Any platform he has touched, he has improved.
Comment: @Wilson it is a file that you use to get a printed circuit board manufactured
Comment: Welcome to Retrocomputing Stack Exchange. I wondered why the custom ROM would disable all checks - I just assumed that it was circumventing it and not actually replacing it. Thanks for the explanation of how this really works.
Comment: Are you willing to share the gerbers?
Comment: @joeforker what is a gerber?
Comment: Wha is the name of the utlity and where can we find it?


PostGIS geocoding with local street centerline data

Question: I have the PostGIS TIGER geocoder setup and working to geocode addresses in a single city. I am trying to use local street centerline data for geocoding instead of the TIGER data because it is more complete.
The linked PostGIS documentation briefly mentions that the geocoding function could be altered and applied to other data sets.
What approach would I need to take to alter the PostGIS geocoding function to use a different data set?
Answer: I would use the tiger geocoder as a backup and create your own geocoder using OpenAddresses.io data and full-text search in postgres.


Anime about guy with a unique robotic arm

Question: I am looking for an anime about guy with a unique robotic arm. I remember a part where some dude steals a crystal, which later causes him to transform into something. I think and he is getting chased by some sort of force, I'm assuming the police, and he runs into the main character who has a robotic left arm and uses it to fight him then breaks it.  After that, he is hired by the force after talking to his master/employer?
Sorry if this is not clear
Comment: Full metal alchemist? Ed has a metal arm, and the priest in Liore uses a crystal (fake philosopher's stone) to power his magic which results in self transformation.
Comment: @Aflexity Was the show set in a modern day urban environment?  Or more of a wild-westish vibe?
Comment: Could it be Invasion America, as asked in this question?: http://scifi.stackexchange.com/questions/150912/what-is-the-name-of-this-animated-series
Comment: Possibly Akira or Trigun. Given the real lack of clarity in memory I wonder if it isn't the latter- Vash has a robot arm and at one point fights the dude who has his old arm attached, which gives him control over Vash.
Answer: It sounds like it could be Full Metal Alchemist.  There are bad guys using crystals and that transform, the main character has a mechanical arm, the army is an important force in the story and the main character works for them, at some point he gets into a fight with one a guy that's on the run from the army and he breaks the arm.

Scene (in FMA:Brotherhood, though there's a similar one in the 2003 version) where the main characters get into a fight with the guy on the run from the army, and he destroys the main character's mechanical arm: (actual breakage at 3:00 or so)

US Region YouTube Link - above link is region blocked
Comment: Both video links are dead (account got removed, so this isn't, I think, a country-based restriction)
Comment: Can you quote some parts that make it similar/provide clips?
Comment: I'm not sure I understand, didn't I do just that ? I can add a link to a youtube video of the scene where Scar destroys Edward's arm I guess.
Comment: That's better, just means the OP or other people don't have to go youtube hunting themselves :)
Answer: Perhaps its the Cobra anime. It's had a few animated adaptations. The clip below is a remake, while the original TV series is from the 80s.

Prologue: Using his Psychogun, Cobra take care of three bounty hunters in an alley who plan to capture him. On the planet Mars, scantily dressed Professor Utopia Moore examines the remains of a fossil snail and sand whale skeleton. In New York, Cobra visits the Ancient Martian Art Gallery and research center dressed as a minister. Once inside he proceeds to steal a heavily protected diamond. Meanwhile Professor Moore examines her fossil snail data from Mars. Just as Cobra is about to steal the diamond two Pirate Guild space ships materialize in the walls of the building and begin attacking and killing the staff. Their leader, Gypsy Doc, confronts Professor Moore and demands the fossil snail data, but Cobra rescues her and they make their way to the rooftop. Just as they are about to escape in a helicopter, Cobra loses the diamond and the pilot is shot. She accuses him of being a thief but he still manages to get them both to safety. Intrigued why the Pirate Guild want the fossil snail data, Cobra intercepts Professor Moore when her research crew return to Mars.
Answer: Following @Steve-O's clue, maybe you're thinking of The Adventures of the Galaxy Rangers?

It's American-Japanese, drawn anime-style. Their leader has a robotic arm and one of the team could transform into other life forms as needed.
Comment: Video link is dead :-(
Comment: @lfurini https://web.archive.org/web/20180608030136/https://youtube.com/watch?v=hMf2OXJcvhI
Answer: s-cry-ed is an anime about a future police force with various psychic powers.  The main character has a robot-ish arm.
Comment: It would be helpful for you to explain the parallel universe Crystal thing.  That could help the original asker determine whether this is indeed the same.
Comment: Any screenshots would also be very helpful!


Recommendation for a book about recommender systems

Question: Can you recommend a book with good information that can be applied to developing a recommender system?
Comment: If a recommender system posts a response to your query, would that be like Russell's barber who shaves himself?
Comment: I agree with @steffen. *Can you recommend...* almost begs for this to be CW.
Comment: @mbq some of the OP's questions have a cw-flavor (including this one). Maybe one should change them if the OP refuses to accept ;).
Answer: An 800+ page definitive guide from the top experts in the field (pricey though): Recommender Systems Handbook. Each chapter is written by different folks (one could try googling specific chapters - some of them are freely available on the web)
Answer: For a very basic introduction you could check out chapter 2 of Programming Collective Intelligence.
Answer: It's not a book and it's not organized, but it contains many algorithms, links, code and paper references: http://www.netflixprize.com/community/forum.html .
You may download all the data as tarball.
Comment: I went to a talk recently where someone presented on the methods used for netflix and how to do it using R: http://prezi.com/8fbsaa7mushs/using-r-for-data-mining-competitions/
Answer: An introductory book would be this one here. He describes several algorithms for recommender systems in a simple addition to having several references if you'd like to know more about a technique especifismo. Besides this, here is this other kind of a collection of articles.
Answer: I wrote a monograph about the Netflix Prize and recommender systems:
"Predicting movie ratings and recommender systems"
Answer: Here are some of the books and Research Publications on Recommendation Systems
Free & downloadable (Good introduction on Collaborative Filtering Recommendation)
http://md.ekstrandom.net/research/pubs/cf-survey/
Other books are -

Recommender Systems - Introduction
Recommender Systems - Handbook
Answer: The books mentioned here are amazing in-depth that catch you up to most recent research in the field. I wrote a chapter in Data Mining Applications with R that gets you up and running to the point of writing and testing your own recommendation algorithms quickly. This is not as in depth as the other books and is only a starter template. You will still need to read these books and papers in the field to learn more about the topic.
Good luck


How can I get rid of Cocculus Carolinus vine?

Question: I would like to know if anyone has successfully eradicated this vine from their yard/flowerbeds. I have just ordered a gallon of Remedy herbicide and am going to attempt to cut the vine near the ground and paint the herbicide on the stem. I have years of growth to deal with as I didn't know what the vine was several years ago when it would have been easier to control. I saw a news article where helium was used to kill Kudzu vine, does anyone know if this would work for killing Cocculus Carolinas?
Answer: Triclopyr + cut stump = dead infestation.
My lot was covered with Hell Vine (Trumpet Creeper), Virginia Creeper, and Grapevine when I moved in.
Grapevine was easy, Virginia harder because of so many smaller roots, Hell Vine basically roots like a sponge in the ground so I still occasionally get sprouts.

Here's my tips:

Hunt for a big root. If the root you're following disappears underground, you can mark or treat it, or ignore it and go for the daddy roots.
Don't use a foam brush - the solution will eat through the glue. Even a high-quality foam brush (Jen brand) will lose it's glue. Use a cheap regular brush, crush the metal with pliers for better hold.
Don't dilute the solution.  You're only applying one or two mL at a time, no need to dilute for cut stump on invasive vines.
If you want to be super careful (I have in a few instances), then after applying to the root, cover it with a sandwich bag and zip tie it closed
A plastic cup is fine during the application process, but put the solution back in the bottle or it WILL dissolve the cup. (Found that one out the hard way)
This stuff is STINKY - nitrile gloves or you'll be stinky too.
It's a PITA to hunt for and dig up daddy roots, and even more so if you're wearing nitrile gloves and carrying herbicide with you.  I recommend you pick up a $2 bag of marking flags from the hardware store and make it a two part process. Hunt/dig/mark, then cut/apply/secure.
Apply to both sides of the daddy root, as the daddy root either a) goes to other sprouts, or b) will send up a gang of sprouts when it's cut.  (This applies to any root that goes back underground, actually).
You'll know in a couple of hours what foliage was affected and what wasn't. You can repeat the process as early as the next day, tracing healthy foliage back to the root.

Good luck.
Comment: This is an excellent answer!
Comment: Thanks. -- Heck, I probably got the initial "how to" from something you posted 2 or 3 years ago.
Answer: This article suggests that

an individual stem treatment with trichlopyr, a 1% solution mixed in
  diesel or black oil seed. The chemical would be applied to 12 to 18
  inches of the basal vine stem, making sure that the chemical wraps all
  the way around the stem (method named basal stem treatment). A
  registered product that could be used in a lawnscape is readily
  available and is named "Ortho's Brush-Be-Gone" or "Ortho's Poison-ivy
  Control". The instructions on the label of these two products should
  be followed. I am not aware of any chemical that is currently
  available that can be sprayed on the leaves .


Is there a reason why IMEI is stored in EEPROM?

Question: I've heard that IMEI numbers are stored on an EEPROM, essentially letting them be erased and rewritten.
Thieves misuse it to make stolen phones untraceable.
Is there a reason why manufacturers don't use one-time programmable non-volatile memory for this?
Answer: In some countries (I think China is one), regulations require the phone's IMEI to change each time it's repaired.
Comment: Interesting, surely this defeats the point of network barring?
Comment: Huh. Yeah, good point. Although network barring is a giant fractured mess anyway.
Answer: Manufacturing costs are the primary driver of this flexibility.  While phones often have many names on the outside, on the inside, there are a much smaller number of actual hardware manufacturers.    Since one hardware builder has to create kit for several OEMs, it is much easier to build the systems with EEPROMs that can be reflashed again and again, so that product which fails a test while being built for Manufacturer A, can be reworked, reflashed, and end up shipping for Manufacturer B.
In the olden days, when on-board ethernet was a new thing, MAC addresses were originally distributed as you suggest, on non-modifiable chips.  This meant that when a partially completed board made it up to test, and it was determined to be faulty, the company building on-board ethernet devices for manufacturers A and B had to keep a log book of all the thrown-away MAC addresses, so that more chips could be burnt, so those addresses wouldn't be 'wasted'.  Once they moved to putting MAC's in EEPROMs, failures could be reworked, while the MAC addresses were returned to the pool of available numbers instantly.


Summation identity involving logarithm

Question: I'm having trouble understanding why this identity holds:
$$\sum_{k=0}^{(\log n) - 1} \frac{n}{\log (n - k)}  + \theta(1) = \sum_{k=1}^{\log n} \frac{n}{k}+ \theta(1) $$
Any pointers to a proof would be very appreciated.
Comment: Are there some floor functions involved?
Comment: Are you sure you don't mean $$\sum_{k=0}^{\log(n) - 1} \frac{n}{\log(n) - k} = \sum_{k=1}^{\log(n)} \frac{n}{k}$$ In any case, how are you defining a sum with a non-integer limit?
Comment: @the-chaz I think you're right. This is related to proving bounds for functions. I've seen the equation in a couple of different places, but I'm getting the feeling that it's not a strict equality but a short-hand.
Comment: @robjohn No this is the form I've seen the equation in. What I left out of the equation is that there is also a constant factor on each side. updating post to reflect that.
Answer: The equation is not true in the form given.
$$
\begin{align}
1
&=\frac{1}{n}\sum_{k=0}^{\log(n) - 1} \frac{n}{\log(n)}\\
&\le\frac{1}{n}\sum_{k=0}^{\log(n) - 1} \frac{n}{\log(n - k)}\\
&\le\frac{1}{n}\sum_{k=0}^{\log(n) - 1} \frac{n}{\log(n-\log(n))}\\
&=\frac{\log(n)}{\log(n-\log(n))}\\
&\to1
\end{align}
$$
However,
$$
\begin{align}
\frac{1}{n}\sum_{k=1}^{\log(n)} \frac{n}{k}
&=\log(\log(n))+\gamma+O\left(\frac{1}{\log(n)}\right)\\
&\to\infty
\end{align}
$$
On the other hand:
If the equation was as I suggested in my comment above:
$$
\sum_{k=0}^{\log(n) - 1} \frac{n}{\log(n) - k} = \sum_{k=1}^{\log(n)} \frac{n}{k}
$$
and the upper limits should be treated as a bound for the sum in $k$, not as an actual value to be used, essentially applying $\operatorname{floor}$ to the upper limits, as The Chaz suggested, then
$$
\begin{align}
\sum_{k=1}^{\lfloor\log(n)\rfloor} \frac{n}{k}-\sum_{k=0}^{\lfloor\log(n)\rfloor - 1} \frac{n}{\log(n) - k}
&=\sum_{k=1}^{\lfloor\log(n)\rfloor} \frac{n}{k}-\sum_{k=1}^{\lfloor\log(n)\rfloor} \frac{n}{\log(n) - \lfloor\log(n)\rfloor + k}\\
&=\sum_{k=1}^{\lfloor\log(n)\rfloor}\frac{n(\log(n) - \lfloor\log(n)\rfloor)}{k(\log(n) - \lfloor\log(n)\rfloor + k)}\tag{1}
\end{align}
$$
Since $0\le\log(n) - \lfloor\log(n)\rfloor<1$
$$
\begin{array}{}
\sum_{k=1}^{\lfloor\log(n)\rfloor}\frac{1}{k(k+1)}\le\sum_{k=1}^{\lfloor\log(n)\rfloor}\frac{1}{k(\log(n) - \lfloor\log(n)\rfloor + k)}\le\sum_{k=1}^{\lfloor\log(n)\rfloor}\frac{1}{k^2}\tag{2}
\end{array}
$$
Thus, $(1)$ is between
$$
n(\log(n) - \lfloor\log(n)\rfloor)\left(1-\frac{1}{\lfloor\log(n)\rfloor+1}\right)
$$
and
$$
n(\log(n) - \lfloor\log(n)\rfloor)\left(\frac{\pi^2}{6}-\frac{1}{\lfloor\log(n)\rfloor+1}\right)
$$
So this doesn't match your statement, either, since the difference is $O(n)$.
Comment: Of course, treating the given upper limits "... as a bound for the sum in $k$, not as an actual value to be used" is a perfectly reasonable interpretation/assumption, but it definitely should have been stated in the OP! (+1) for a thorough clearing-up of the confusion.
Answer: EDIT: It would also be a good idea to address the questions brought up in comments so far, proper inclusion of floors and parentheses would be very important to this problem and its solution.
I believe that the best way to approach a proof of this equality would be to examine the forms of each element in the sum individually. Looking at what you have posted, I can see that the first and last elements of each sum are equivalent:
$$
(k = 0) n/log(n-0) = n/log(n)
$$
$$
(k = log(n)) n/k = n/log(n)
$$
It seems to me that the same is true for the last & first elements as well. Perhaps this can be proved by showing that these sums are equivalent in general, though in reverse order as given. If that doesn't work, I would try a proof by induction.

Summation identity involving logarithm


How do I set up discount for people under 18 for CiviEvent?

Question: Drupal 7.39
Civi version 4.6.7
Using CiviDiscount 3.1 to add Automatic Discount to an event for folks under 18.
In researching, I saw a PR referenced, that seems to address the issue, but it still doesn't work for me on two different sites.  I applied the patch but it doesn't seem to do anything.
Perhaps I'm misunderstanding the Auto Discount section, but in our use case, folks registering are more often than not, new unknown contacts as they register.  Do the contacts have to be logged on and/or known users for Auto Discount to work properly?
On the registration pages, we are including DOB.
However, regardless of whether we hit apply in the blank code area, the discount is not taken.
If we manually enter the code and hit apply, it works. But seems to disregard the age criteria.  If I am over 18 and have entered the code, I still get the discount.
Our discount configuration looks like this:

So the two issues I'm experiencing are:

The discount does not apply without the code
The discount criteria seems to be ignored and applies the discount to
anyone
Answer:
Do the contacts have to be logged on and/or known users for Auto
  Discount to work properly?

Yes I believe this is the case.
Answer: In the end, I was not able to get this to work.


Who is worthy to wield Mjolnir?

Question: In the comics it is written on Mjolnir that "whosoever is worthy to wield the hammer will have the power of Thor". If so who in the Marvel Cinematic Universe is really worthy of gaining the hammer and should Thor be defeated to lose the worthiness?
Comment: are you asking who do we *know* is worthy, or who do we *think* is worthy? The second option is off-topic here.
Comment: Who do we know is worthy is my question.
Comment: A better question might be to ask why some characters that should be worthy are not. Lady Sif - why can't she lift it? She seems pretty worthy, what's wrong with her? Heimdall? He's pretty worthy, why not him? These are characters that are 100% out and out good guys, completely honorable and heroic in everything they do.
Answer: So far, on-screen, there are only two-ish people, that have been shown to be worthy to wield Mjolnir.

Thor, obviously, is the primary wielder, and has been since he restored his worthiness in Thor
The Vision was shown to be worthy to wield it in Age of Ultron, picking the hammer up with ease. There's debate over if this counts, since he's technically a robot, but he's able to use the hammer as a weapon so it's close enough.
There was a hint in Age of Ultron that Steve Rogers might be worthy; he managed to shift Mjolnir in place -- something no one else could do, and something that worried Thor -- but ultimately didn't actually lift it.

In the comics, there's a whole list of people (see, e.g. this scifi.SE question) who were worthy at one time or another, but so far we've seen no evidence that any of those people will be capable of wielding Mjolnir in the MCU.

Who is worthy to wield Mjolnir?


Can I connect a pen drive to my Samsung Galaxy S3 Mini using USB OTG?

Question: I am using Samsung Galaxy S3 Mini. Can I connect my phone with a pen drive using an on-the-go (OTG) USB cable?
Answer: I would assume, YES.
Currently, my Samsung Galaxy S4 (using the latest stock ROM) supports USB OTG.
Before that, I had a Samsung Galaxy S2. Using the stock ROM, I could not use USB OTG. So, I installed USB OTG Helper, which requires your phone to have root. When I changed to CyanogenMod (CM) ROM 10.1, I did not need USB OTG Helper; it had USB OTG support.
Answer: Maybe.  Chainfire's USB host diagnostics reports shows some instances of the Galaxy S3 Mini (model GT-i8190) as working with USB OTG on the stock ROM, but also about as many reports of it not working.  It looks like just about all instances of the successful OTG tests are on rooted devices.
About the only way you'll find out for sure is to try it for yourself.  Worst case, you're out the couple dollars the cable cost you.
Answer: I have found Samsung Galaxy S III mini use USB-OTG with Total Commander video on YouTube.
There video author shows how to enable USB-OTG in Samsung Galaxy S III mini using USB-OTG cable with power support (micro-USB male, micro-USB female for power or USB male for power, USB female) -- supposedly all you need is reboot the phone while providing power via USB-OTG cable.
The same solution is described in [HOW-TO][TRICK]USB OTG ON S3Mini post on XDA-Developers forum -- this recommends USB OTG cable (which you need anyway to connect pendrive) and USB male to USB male cable to connect power via USB OTG.
Phone will show charging indicator (but actually not charging) while USB OTG is active.

Advantages of this method:

Doesn't need root
No need to install additional apps like USB OTG Helper (Samsung Galaxy S3 mini (GT-i1890) is on the list of USB OTG MSC confirmed devices), or switching to CyanogenMod ROM.

Disadvantages of this method:

Needs reboot, extra hardware and access to charging to turn on
Phone cannot be charged while USB OTG is active ('till reboot)
Battery drain
Restarting / rebooting turn it off

Not tested myself, as I don't have any such cable myself at this time.
Answer: Since this product exists, I assume that you can connect memory devices (such as a thumbdrive/pendrive) to your phone with just a USB connection, the OTG cable that you mention is just an adapter for two different kinds of connectors of what is essentially the same type of connection (USB).
YMMV, but it should technically be possible to connect memory devices to your phone this way. Which ones work and which ones don't probably depends on many factors, such as the ROM running on your phone, the thumbdrive/SD card reader used and so on.
Comment: Note that the S3 and S3 mini are entirely different devices.  It uses an entirely different SoC than any version of the regular S3.


Are the treasures on a map randomly allocated?

Question: Are the goodies on the map variable for each run-through of a level?  That is, if I repeat a level, will all or some of the treasures change from coffers to piles or money or reliquaries?
Answer: Despite my earlier speculation, it appears that most of the coffers, reliquaries, and coins that appear on the map are at least mostly randomly allocated.  Some of the maps contain set features, such as boss locations, and some of this preset behavior may encompass one or two treasures like reliquaries that appear on some branches on some maps.  Other than that, it appears that generally both monsters and treasure are subject to a great deal of randomization.


Why are larger propellers generally more efficient than smaller ones?

Question: In almost every case, long-range drones use larger propellers than other drones that don't need to travel very far or don't need to fly for very long. I have heard that a major reason for this is because a drone with larger props can be much more efficient than a drone with smaller props. If this is the case, what is the reason that larger props are generally more efficient to use?
Comment: I mean, for a certain scale you're not wrong. But when you get away from hand-held things and toward BIG drones, suddenly the motor bell housing alone is 6" in diameter. ;)
Comment: Jacob B, your question does not make sense when it insists on specifically 6 or 7 inch props. It's all relative, and in my domain a 6-inch prop would be ludicrously small and inefficient. However, larger propellers are more efficient than smaller ones in pretty much all domains. What is "long-range" is arbitrary, but the relationship between what's desirable for "long" and "short" is not.
Comment: @KennSebesta I was just saying 6 or 7 inch because they are very frequently used in long range builds but I suppose you're right and so I have changed it.
Answer: Thrust is proportional to the change in momentum of the air passing through the prop - i.e. how much the prop speeds it up.
The power required to do this is proportional to the kinetic energy of the air, which is proportional to speed squared. That 'squared' is the problem.
A smaller prop acts on less air, so it has to speed it up more to generate the same thrust. Half as much air moving twice as fast generates the same thrust, but takes twice as much power.
This explains why helicopters can hover relatively economically, propeller planes only if they're powerful aerobatic models, jets only if they're extremely powerful and carrying a minimum of weight, and no one uses rockets unless they have to.
Comment: "Helicopters can hover relatively economically"... that is a good joke . But in this context, true.
Comment: @LukášŘádek - fair point! Maybe I should have said *model* helicopters can hover relatively economically.
Answer: An explanation for why this is can be found in this Aviation.SE answer: Why aren't large, low-speed propellers widely used?, which I'll paraphrase here.
The thrust a propeller generates is a function of its velocity and geometry. It makes sense that a propeller spinning faster will also generate more thrust. For a smaller propeller to generate the same thrust as a larger one, it needs to spin considerably faster because of its smaller geometry.
The kinetic energy of a rotating object is equal to $\frac{Iω^2}{2}$ where:

I is the moment of inertia (a measure of how hard it is to change the rotational velocity)
ω (omega) is a measure of the rotational velocity

This means that kinetic energy of the propeller is proportional to the square of rotational velocity.
The same argument holds true for the air that the propellers accelerate, this time by the rule for kinetic energy $\frac{mv^2}{2}$ where

m is the mass of air being accelerated
v is the velocity it's being accelerated to

Likewise, the kinetic energy of the air is proportional to the square of linear velocity.
Because of these two facts, (acceleration of the air ends up being far more important than propeller) the energy the motor needs to put into spinning a smaller propeller to produce the same amount of thrust as a larger one is significantly greater, and thus smaller propellers are less efficient than larger ones.
Comment: I think you misunderstood that aviation answer, that's about it being more efficient to accelerate more _air_ but slower. This is exactly what larger propellers do, making them more efficient. It's not about accelerating the propellers themselves, that's only a small start-up energy cost.
Comment: @ToddSewell I didn't think about that before, and I agree. Does the edit to my answer accurately describe your comments?
Comment: It's getting there, but the kinetic energy of the propeller is actually a (tiny tiny) _negative_ effect. I would remove everything about kinetic energy of a rotating object to avoid confusion.
Answer: Comment number 7 at this link is an excellent source (and fairly trustworthy as it was written by Joshua Bardwell).
The main reason specified for the efficiency is that for a given amount of thrust, a larger propeller (on a motor with an appropriate KV) will draw less current than a smaller propeller on a higher KV motor, so there is less sag.
Another thing to think about that isn't mentioned in the comment is the number of blades used. If you think of most long range quads, or camera quads like a Phantom, Marvic or even a Matrice, you will notice that they have two blades per propeller. This can increase efficiency as it will have one fewer wing-tip per propeller, meaning fewer wingtip vortices and less drag. Multiply this by the number of propellers and the effects add up.
Comment: Okay... but battery longevity isn't the same thing as power efficiency, which is what the OP asks about.
Comment: @ifconfig in the context of this question, I took it to mean how come a quad with larger props can give you longer flight times. In this case, not needing to land earlier would give the longer flight times so I felt it is applicable.
Comment: I'm not sure the correlation between efficiency and voltage sag is valid. Could you explain your reasoning?
Comment: @ifconfig sure - if voltage sag increases, the motors will have to draw more current to compensate, up to a point where the voltage is so low that it is no longer able to support the flight of the aircraft. Additionally, if one is conscientious about preserving the life of the battery, it is often recommended not to let it sag too low. Following this logic, if you have to land earlier to avoid battery sag, you won't get as much flight time.
Answer: The easiest way to think about this is to remember that drag increases with the velocity squared. A smaller propeller will have to spin faster to achieve the same thrust as a larger propeller, and spinning faster creates more more drag.


Why do Sabarimala devotees wear Black clothes ?

Question: Black cloth is usual considered inauspicious and not used especially when visiting a temple. But devotee of Ayyappa  wears black clothes when they visit Sabarimala. Is there any reason for this practice. Does this have any related to Shanni ?
Comment: There is a same question on yahoo  on the topic..was it u who asked it?because there too Shani is spelled as **Shanni** like u did in the question..
Comment: According to [official website](http://sabarimala.kerala.gov.in/index.php?option=com_content&view=article&id=92&Itemid=94): "Devotee is expected wear black/blue/saffron clothes."
Answer: Since AyyappA is not a puranic deva, the fables and legends around him are not found in purana and upanishads, rather exclusively in kshetra-puranas or local temple histories.
AyyappA is said to have a conversation with Shani about him (Shani) causing trouble to people, on which Shani replied that it's his dharma to do so. On this, AyyappA asked for Shani to leave his devotees out of his misery for which he laid out certain rules,

It is believed that one would get relief from Shani dosha by taking the Ayyappa Deeksha. This is because Lord AyyappA commanded Shani not to trouble his devotees.
Shani affects a person for seven years, but Lord AyyappA said to Shani that his devotees would take the deeksha for 41 days and experience the same difficulties that Shani would have given in a span of seven years by not caring for their appearances (not grooming facial hair etc), eating only once a day, bathing in cold water (generally in sharada RRitu) and sleeping on a floor and practicing brahmAcharya.
In return, AyyappA assured Shani that his devotees would wear black/blue dress which is the colour associated with Shani.

This is the reason why lord Ayyappa devotees wear black dress.
Further reading

Hindupad
Comment: But according to [official website](http://sabarimala.kerala.gov.in/index.php?option=com_content&view=article&id=92&Itemid=94): "Devotee is expected wear black/blue/saffron clothes."
Comment: @ Vinnet Menon Can you provide the source. I understand that there is not reference to Ayyappa in Puranas.


Cleaning burnt-on grease with ammonia

Question: I recently ran into this (put your pans etc in a closed container {a garbage bag will do}, pour in a bit of household ammonia and let it sit for many hours) and love it.  However, I also have some pans with those black plastic? handles, is it safe to do on them also?  I also have a teflon pan that has some grease stuck on the outside.  Since there's no way to treat only the outside {it's the fumes that do the work, you don't immerse things} is that safe?
Comment: There are many examples around.  The first hit on Google: http://www.stretcher.com/stories/03/03aug18a.cfm
Comment: Can you post a link to the page you're using that describes the process more in-depth?
Comment: I mean add the version you're planning to use as information to your question.
Answer: After asking this in multiple places and finding nobody with an answer I decided to test with the gunkiest cover.  The handle came through fine.  I'm not going to try the teflon pan.
Answer: Do not use on teflon! I tried that and all the Teflon peeled off. I had to throw out the pans.
Comment: I will give that answer the benefit of doubt. The question is specifically about ammonia, so I assume the answer refers to ammonia too. But it could indeed be more clear.
Comment: Do not use what? Ammonia? Barkeeper's Friend?
Answer: If I'm understanding your method correctly, if you're worried about the handles being damaged you could use a smaller bag the covers the pan, but tie it tight around the handle where it joins the pan (and I assume isn't plastic). That way only your metal pan is exposed to the fumes, the plastic handle remains outside of the bag.
The other thing to try is the general advice when you're not sure if some chemical will damage some material. Dab a tiny bit on hidden or less visible part of the handle and see what damage it does.
You could try something like the above with your Teflon pan but it would be trickier. You could try using plastic wrap to seal the top of the pan before sticking it in the bag. You might need to tape it to make sure it doesn't come off.
Comment: @LorenPechtel You don't need it perfectly air-tight any more than you need the garbage bag perfectly air-tight. The tiny amount of seepage will dissipate in the air before it damages anything.
Comment: I doubt tying it tightly would be airtight.
Comment: Oh, I see, one handle outside the bag.  I was picturing protecting the handle with plastic.  That won't work very well on the pot with one handle on each side.
Answer: Instead of ammonia, you should try "Barkeepers Friend" that stuff is great. It takes off the burnt on grease easily. It is very gentle of my pans. I own all clad cookware, stainless steel. It works wonders, and shines it up real nice. In response to Teflon pans, if grease is burnt on like you say, I'd say it's time to get new pans. Once food starts to stick to the pan, even after a rinse in hot water, it's non sticking powers are just about depleted.
Comment: It's just Oxalic acid. You can by it for a few dollar per Kg at your local hardware store
Comment: The grease is on the **outside** of the teflon pan (it was sitting next to someone frying stuff in a too-hot wok.)
Comment: @TFD do the other ingredients in BKF do anything though? Does one give up any functionality by using oxalic acid alone?
Answer: Enamel coated roaster, stainless steel & ceramic
Is safe to clean using ammonia & garbage bag. I put 1/4 cup of ammonia in the roaster & lid & tied up the garbage bag & put it down stairs. Brought it up stairs to clean a couple of days later, dumped it in the sink & rinsed everything in hot water. Rolled up the garbage bag & threw it out.
All the burnt on grease etc on the outside of the roaster & lid, it just peeled off the roaster. I rubbed a scrubbie over it all to get at the hard to reach places: handles & rim edge. All clean...... looks like new.
Can do the same with stove top pans & rings & racks from oven - I do over night for those.
1/4 cup of ammonia or less & put everything in a garbage bag & tie it up & place it out of the way over night. Come morning your clean up will be so easy. Rinse in hot water & wear rubber gloves & use a stainless steel scubbie to get at hard to reach spots for a better clean.
Use in pots that got burnt on food.... overnight ammonia & alittle water: wash with hot water in the morning.
Comment: Welcome to the site. Can you [edit] your answer so that it contains some white space, *and* instead of &, etc? Thanks.

Cleaning burnt-on grease with ammonia


Infiniband for Oracle 11g RAC private interconnect?

Question: We currently have a 2-node Oracle 11g RAC using 1GigE as the private interconnect.   At peak update time, the traffic between nodes reaches 35 MByte/second, so we are still doing good in terms of bandwidth capacity. We are considering adding a third node to the cluster to support our growth in transaction volume. I am wondering whether somebody out there has already seen how adding nodes to the cluster would impact private interconnect traffic and what would trigger the use of Infiniband.  From what i read, Infiniband not only can increase bandwidth but also has much shorter network latency.  Can anybody who use Infiniband for RAC private interconnect share your experience with us? Thanks in advance.
Answer: I've a 4 node oltp rac database and a 3 node dw rac database using IB as interconnects.
We use cisco IB switches and cisco IB cards.  We use IP over IB as the interconnect protocol.  So far we are quite please with the results.  Never had an issue with the interconnect traffic.  We've come close to saturating our gigE  public interface but no where close to the IB bandwidth.   All 7 nodes are connected to 2 infiniband switches setup in active/passive failover configuration.
Comment: Unfortunately, it appears that Cisco has completely abandoned IB in favor of 10GbE. Neither our Cisco reps nor our normal Cisco VAR are able to point to any Cisco Infiniband hardware for us to purchse.
Answer: I've never used Infiniband in production, but as far as I can tell the only time it might make sense to go to Infiniband is if you find yourself erring towards 10GigE (if I remember price points kind of reach an equilibrium at about 10GbE). Latency measured in nanoseconds is pretty cool, but is it important for DB? Not really.
You can probably team two 1Gb connections (with appropriate hardware of course), or do any number of other tweaks (like Jumbo Packets, or adjusting MTU) before the need for something like Infiniband.
That said, Infiniband is very cool if you just want to brag to your mates...
Answer: The big difference between IB and 10GbE is supposed to be latency. IB uses a DMA type model with latency in the microsecond range, while 10GbE requires your communication to travel up and back down the stack on both sides. IB is also supposed to have a higher raw bandwidth than 10GbE, but 10GbE will probably be backwards compatible when 40 & 100GbE come out.
We've actually just been tasked with building a 5 node Oracle cluster with IB interconnects and a IB -> 10GbE switch proof-of-concept that we're working with Dell on. So, my information is largely the research I've been doing in preparation for the POC.
Answer: If you're more concerned about the cost (to your application) of bulk data transfers for instance-to-instance synchronization, then your current rate of 35Mbps is presently low enough that its very unlikely to be affected positively by moving to a different cluster interconnect.
Don't forget that you can very easily trunk your 1Gbps Ethernet connections to 4Gbps or 8Gbps (depending on the number of physical ports you can stick in your individual cluster nodes) without taking on more latency in the network stack.
As Farseeker says, IB is (in the commercial environment) cool to brag to your mates.  In the scientific and research community, IB has almost become a commodity for cluster interconnect.


Can you write Japanese in only Hiragana, or only Katakana, or only Chinese characters?

Question: I don't know Japanese, but I notice they have a mixture of Hiragana, Katakana, and Chinese characters. Instead of a mixture, could you write a whole article in just one of them? Does this ever occur? Are there any examples if so? If not, why not?
Answer: You can, but it's considered unusual at best and incorrect at worst.
Using solely kanji means leaving off all functional morphemes and non-content words, so it's like speak### English ####### ### ## ### function## word#, use### #### ### content word#—#### ##, most## noun# ### verb# ### adjective#. Understandable, with effort, but not at all natural.
Using solely kana conveys pretty much all of the same information as spoken Japanese (with the exception of tone). Since people can understand spoken Japanese, they can also understand pure kana; this is how computer interfaces worked for a long time, since the number of kana is relatively small compared to the number of kanji (so they're easier to implement). However, it's extremely "marked", in linguistic terms—it goes against standard Japanese orthography (writing conventions), and iz ə bit laik raiting Inglish mor fonetiklee. Peepl wil stil əndrstand yoo, bət its not hau reel Inglish-speekrz akchlee rait.
Pure kana are often used in books for children and second-language learners, who might not know all the kanji yet. Pure kanji are not used in any context I know of (at least within Japanese).
Comment: @user6726 Sure, but isn't all of language a social convention to some extent? Using _Du_ with certain people and _Sie_ with others (in German) is certainly a social convention, but also a part of the German language.
Comment: Note that if you use only _kana_ you need to add spaces. Otherwise it is nearly illegible. (Children books are written like this.)
Comment: You means it's marked in social terms, I assume. Or is there something special about Korean that distinguishes.
Comment: @user6726 Which part do you mean? My intent is that it's marked in the sense that native speakers consider it unnatural but still understandable.
Comment: This is a social convention fact, not a linguistic fact.
Answer: In modern times, you would not (with exceptions), as the other answers have pointed out.  Historically: yes definitely.
When Chinese characters were first imported, they were used only to write (old; then contemporary) Chinese. Before today's kana were derived from a certain set of these with the desired pronunciation, this certain set (the Manyogana) had to be defined. But even thereafter, it was possible to write in a Kanbun style, employing only kanji with the word ending markers omitted and particles represented by specific kanji.
Arguably more common and more understandable was the opposite: writing entirely in kana. The most famous example is probably the Tale of Genji. It was written by a woman and at the time only hiragana characters were considered suitable for women. Thus, it was originally written entirely in hiragana.
Answer:
Kanji: You would not write entirely with Kanji (Chinese characters). As stated in the comments "it would feel archaic or outdated, like using Middle English spellings or something". Nowadays Kanjis do not cover all the words / grammatical functions. A simple example is の for possessive, the corresponding Kanjis are archaic.
If you were to write only with Katakana that would be you only using words from foreign origin. Like:

"fried potatoes" フライドポテト
"mineral water" ミネラルウォーター
"spaghetti" スパゲッティー

Hiragana: If you were to write only with Hiragana that would be for pedagogical purpose. When learning Kanji, they have the Hiragana syllabic version of the Kanji written in tiny Hiragana letters.

This is an example of a sentence with indication of pronunciation of Kanjis in Hiragana :
But I have heard that they can choose to write a word in another alphabet so as to convey a special connotation to it.
Beginner in learning Japanese, I'd be happily corrected or given more information about my statements.
Comment: You can write entirely with kanji if you cover the gaps using kanji for their sound only. This is how the Chinese do it, and it was done in Japan in historical times. Modern kana descends from this phonological use of kanji.
Comment: By meaning, for the particle, 之. By sound, 乃 is maybe the most famous, but all of 能笑荷 努怒野 were used in the past to represent the sound "no".
Comment: it would feel archaic or outdated, like using Middle English spellings or something.  sometimes you see 之 in things like titles or proper names, though. large-scale phonographic kanji (so-called *man'yōgana*) isn't readable by modern readers, only by historians and other people with special training.
Comment: @melissa_boiko Interesting! by curiosity what would be an almost acceptable kanji equivalent for の ?
Comment: @melissa_boiko and what would be the feeling, the connotation if you or a fluent japanese reader was to read 之 or 乃 instead of の nowadays ?
Answer:
could you write a whole article in just one of them?

Yes, you could, but it would be considered troublesome for both the reader and the writer.

Does this ever occur?

Almost never. Well, it could be done in a book meant for someone who is learning the language, because students learn (or rather, cram) Kanji over several years of studying Japanese.

If not, why not?

Japanese does not use spaces to separate words. So, using different scripts makes it easier to understand where a new word starts.
Some words would be easier to write using Kanji alone because a Kanji is essentially a pictograph. For example, a phonetically long word could be represented as a single Kanji character.
Historically, Kanji were borrowed from the Chinese language, which is a tonal language whereas Japanese is not. So, the structure of the language itself was a bit different and Kanji alone could not be used to express everything in the language. For example, Japanese has many word endings, changing which cannot be done using Kanji. The word root taberu can be transformed to tabemasu, tabemasen etc, which requires the usage of hiragana.


Migration from English.SE

Question: It has been suggested on the English Meta that questions regarding linguistic topics there should be copied to Linguistics.SE and then closed on EL&U. Now that Linguistics.SE has been launched, what are the plans? How are these tasks normally carried out? Are moderators in charge of this task or is it done on a volunteer base? if so, I can volunteer!
Answer: This wont happen too often while in beta. Once the site graduates, there will very likely be a migration path set up, based on need. However, I don't think that one should be concerning themselves about carrying out some massive migration plan so early. Focus your efforts on building this community, and when we've built this one, then we can look at pulling stuff from other communities.
During public beta, it's rather inadvisable migrate too many question into this site. It is much more beneficial generate questions from within the community, than to rely on castoff question from another community. Many of those questions have been asked and answered, and you will not reap the benefits of participation from inheriting those questions here.
Once things get smoothed out, especially post-graduation, it's very likely there will be a migration path setup, based on how many questions may need to be moved. In the meantime, if you feel there is a very strong need to migrate a question, you can flag it for moderator attention.
Comment: Thanks for the insight!
Comment: There are a number of such questions and most every one has a comment to that effect, plus a link to the area51 site to commit to linguistics.SE. Unfortunately, the search procedure only works on question and answer text, __not comments__. Is there some easy way to find all questions which involve such a link?
Comment: I found out about the EL&U the other day and tried to register there, but they didn't know about my registration here. And, I have to say, the level of grammar knowledge and discussion there is pretty abysmal. I'd like to continue commenting on it -- it's been one of my professional concerns for decades (http://www.umich.edu/~jlawler/aue) -- but I don't know whether it's worth it, if they are turning their back on English syntax and concentrating on "correctness" and Greek names for rhetorical figures.
Comment: @waiwai933 Thanks. I don't want to post on meta.english, really, until I have a better idea what's what there. I'd prefer to answer questions about English language and usage, but most of what I see is punctuation and vague handwaving, and if that's what's apropos, I don't think I'd be. I can't tell until I answer questions and see whether people respond, and I can't answer questions until I get registered properly. That's all.

Ah! I appear to be registered and recognized now. Thank you.

Migration from English.SE