Non-beginner piano learning

Question: I'm not a beginner in music (6 years guitar playing) and I want to learn piano. The matter is there are a lot of materials for either absolute beginners or professionals showing how to improvise. I'm looking for any kind of help in order to learn writing/reading notes (because I play guitar using tabs only), understand and use intervals and scales and apply all there knowledge to play piano.
Comment: asking for resources if off-topic here, so I edited your post a bit
Answer: I've gone the opposite way. I learned piano for a couple of years then tried my hand at guitar. I thought I wouldn't need any kind of beginner's books either, but a couple of months later saw me missing out on valuable techniques that would've made learning the instrument much easier. (Most of) guitar is... in the least offensive way possible, dumbed down, sheet-music-wise. Tabs are an example: they are useless anywhere else in music, and are really only a substitute for manuscript.
If you're only used to tabs, I'd recommend using a beginner's book. A slow and steady introduction into reading music is the easiest way to make quick progress with it. Scales, arpeggios and chords are completely different. You don't want to cut corners with an illusion that the knowledge is there, because, although it is, it really isn't applicable to both instruments. It goes as far as fingers: a 'first finger' on guitar isn't a 'first finger' on piano.
Had I the choice, I'd go back and learn guitar from scratch, as my playing ability plateaued after realising I was at the mercy of 'proper' guitarists' critical analysis. So I'd recommend you dig out a basic kiddie's book and start with the basics.
...That being said, being able to play one will make learning the other much easier. Learning violin gave me the real knowledge of sheet music I needed for piano, and the knowledge of scales and chords and keys got me ready for guitar. They will come in handy, but only when the core of the instrument (unique for every instrument) is learned.
Comment: There are plenty of beginner's books for adults that you can breeze through as well, until you get to more difficult levels.  I like Alfred's series.
Answer: Like you, I started learning piano long after I had sung and played guitar for many years. I think there is no substitute for a few private lessons with a piano teacher to put you on the right path. Try to find a teacher who is sympathetic and flexible. You need to see if you can find someone who can do more than teach you rote lessons out of a method book (because, based on your guitar experience, you are not an absolute beginner to music.) If you could find a teacher who teaches both piano and guitar, then you could get help in applying your existing understanding of the guitar to the piano. Good luck.
Comment: While there is indeed no substitute for the right teacher, you can also make progress if you start teaching yourself until you find one.

Non-beginner piano learning


User Accounts, TOR, and Systems Admins (fairly simple & straightforward)

Question: Before I begin, I'd like to state I am going to try and be as thorough as possible.  Both so everyone offering help can know the full situation, and to ensure that I get accurate information.
Ok; I recently transferred to a new college, in a new city, and a new state.  The method for accessing the internet is different from my prior University, and - although I'm confident in my current methods - I'd like to know for sure that my activities are as hidden as possible.  Why?  Because, although I live in the dorms, my dorm internet connection isn't currently working and they said it could be a month (!) until they get it fixed.  So, the only internet I can get is through connecting to the Library's hotspot, where the rules are more strict and all that.
The set-up: I've my own laptop, but to access Wi-Fi one must log on with an assigned username & password.  I've downloaded the TOR browser, set it up and it works fine (I get a different IP address and all that); but, will this be sufficient to keep my browsing private from the System Administrator?  What if I opt to browse outside of encrypted mode?
Answer: As long as you are using Tor, your system administrator won't be able to see what you are doing or what sites you are visiting. It does not matter if you are visiting encrypted sites or using plain HTTP.
However, you should keep in mind that Tor exit node owners will be able to see your traffic to unencrypted sites, even if they cannot tell who you are. There is an article on this topic on Wired.


Advantages to installing a parallel port in a C1541-family drive other than speed

Question: Are there any advantages to installing a parallel port in a C1541-family drive and using a parallel cable to a PC to image disks, other than increased speed (i.e. since the standard IEC protocol is serial, one bit at a time)? I got the impression years ago that some nibblers (i.e. very low-level copiers, for things like copy-protected software) only work with parallel, but I can't reason out why.
Comment: I think you may be mis-remembering something, or confusing two different things (or maybe it's just me who's confused).

I know you can connect a 1541 drive to a PC using a specially-wired parallel cable but it still does data transfer serially.  Theoretically you could install a parallel port on the drive itself and move the special wiring inside the 1541 case but it would still be using the IEC protocol.  The only reason the parallel port is used is because it allows the PC-side software to control the signals on multiple IEC pins simultaneously (i.e. clock and data pins).
Answer: Nibblers that are utilizing opencbm on a PC need a faster-than-stock connection to read the GCR encoding in real time.  There are a couple of solutions, the most common of which requires a ZoomFloppy.  To nibble from a 1541 requires a parallel port.  1571 drives are much faster due to better hardware, allowing ZoonFloppy to nibble over serial.
Comment: As I recall, the issue is that the GCR encoding encompasses more data than the nominal track width and is how protection using half-tracks is accomplished.  ALL of the data must be cached and sent down the wire simultaneously.
Comment: @echristopherson: It may be possible to read all the data from a track using such an approach, with the caveat that stitching together all the different pieces may be non-trivial.  Writing data would be another story.  Any time one starts and stops writing data will generate a slightly-unpredictable "glitch" on disk.  Normally, those would occur at places where they won't affect anything, but copy-protection code may write one track [likely with some glitches], then read back exactly where those glitches were, and then write information about where they were onto another track.
Comment: That's probably what I was thinking of. But why can't it just read GCR data and transmit it at any rate? Does it have to do with the amount of time the read head can stay at any given point?
Comment: There is more GCR data to encode and send over the connection than standard IEC (even with fast load code) can send.
Comment: Right, but I'm failing to understand why the drive can't get all the data at one point, send it over the wire, then move on to the next point -- at the expense of it being "real time". I assume there is either a restriction on read heads moving slowly enough to do that, or the amount of RAM in the drive is insufficient.
Answer: For PC connectivity you win absolutely nothing.
Various devices that allow connecting a 1541 (and others) to PC will still talk IEC to the drive, regardless whether they use USB, serial or parallel to PC.
There are two devices that are praised for their data transfer abilities - ZoomFloppy and KryoFlux - the former uses IEC as well but has optional connectors for the drive (and you could use it with a 1541), the latter talks directly to the drive.
There exists a parallel interface for 1541 that connects to CIA chip in a C64 - that allows for much faster transfer because it bypasses the IEC bus completely.
But there are no devices on the market that would use such connection to a PC.
Comment: Just to be exact (to avoid unnecessary confusing), the C64 has two CIA (MOS 6526) chips  handling parallel and complex i/o. The VIA is usually known as 6522 (as found in a 1541).
Comment: This answer is simply wrong about using the ZoomFloppy without a parallel port.
Answer: A parallel cable helps to copy special formatted disks with an original drive connected to a C64 or even a PC. The problem is the limited RAM (2 KB) on a 1541 that prevents to store a full track keeping all details of the format. With a parallel cabling it's possible to transfer on the fly of a full track. An example for such a picky format is GEOS with its original disk-set. The gaps between the well-ordered sectors are carrying special information to prove the disks are genuine (sorry, I have just a german reference GEOS-Kopierschutz).


Meaning of top, ascent, baseline, descent, bottom, and leading in Android's FontMetrics

Question: This seems like a basic question, but I couldn't find a similar one on SO. While reading the documentation, I was having trouble grasping the concepts. I want to understand what the difference is between top and ascent and also bottom and descent. And where exactly is the baseline? Do you have a diagram to help me visualize it?
Answer: Let's first review what the documentation says:

Top - The maximum distance above the baseline for the tallest glyph in the font at a given text size.
Ascent - The recommended distance above the baseline for singled spaced text.
Descent - The recommended distance below the baseline for singled spaced text.
Bottom - The maximum distance below the baseline for the lowest glyph in the font at a given text size.
Leading - The recommended additional space to add between lines of text.

Note that the Baseline is what the first four are measured from. It is line which forms the base that the text sits on, even though some characters (like g, y, j, etc.) might have parts that go below the line. It is comparable to the lines you write on in a lined notebook.
Here is a picture to help visualize these things:

Remember that when drawing on a canvas in Java and Android, going down is an increase in y and going up is a decrease in y. That means that FontMetrics' top and ascent are negative numbers since they are measured from the baseline (while descent and bottom are positive numbers). Thus, to get the distance from top to bottom you would need to do (bottom - top).
The leading is the distance between the bottom of one line and the top of the next line. In the picture above, it is the space between the orange of Line 1 and the purple of Line 2. As @MajorTom noted below, in typography the term is more properly defined as "the distance between the baselines of successive lines of type."* However, Android seems to use the term in the more historical sense. The word (pronounced "ledding") comes from the lead strip that the old typesetters used to put between lines of type. It was basically just a way to adjust the line spacing. In Android I've never actually seen the leading be anything other than 0 and I haven't seen it used for anything in the source code. (Correct me if you know where it is used to calculate anything.) You can change the line spacing in a TextView with setLineSpacing in code or android:lineSpacingExtra and android:lineSpacingMultiplier in xml. These methods, however, do not make use of or modify the leading.
Check out these links for more information:

Precise Android Text Drawing
Font Metrics in Java (and Android)
Layout documentation
Java: FontMetrics ascent incorrect?
FontMetrics not correct when run on android device. Simulator fine
Java Font Metrics (Java doesn't seem to use top and bottom)

Explore more
In order to explore Font Metrics more, I made a simple project.

Rather than listing all the code here. I added the project to GitHub. You can either clone the project, or copy the following files into a new project.

FontMetricsView.java (a custom view)
MainActivity.java
activity_main.xml

Do letters ever go above top or below bottom?
Not usually, but they could. Top and bottom, as I understand them, are set by the font (hence "FontMetrics"), so a font maker could make a glyph go higher than whatever they say the top is (or lower than the bottom). Also, with combining diacritical marks in Unicode it can very easily happen. Here is a rather extreme example (taken from here): M̵̳̙͔̟̱͕̓̀̄̉̅ͧ̋͊͌͑́͌ͪ̒̿̀̚a͔̟̝͔ͥ̈́̏ͮͯ̇͆̊̒ͦͦ͘͢͜y̵̴̢͕̝̩̱͈͕̼̣͕̟̌͗̾ͤ̎͌̄ͣͨ͊ͬb̡̯̰̪̜͙̟̝̠͚̜̥̙̤̃ͨ̋̒̒̊ͧͤ͐̓͋̌̾̇̔̈́̀́͡͠e̵ͯͪ̿̿̂̄ͫ̃҉͎̣̹̱̜͉̦̞̪̘̠̝̝͍̼̜̖̥̭͟ ̣̞͙͚̝̰̞̹̗̲̣͙͍͍̀̓͊̂̋ͣ̏̑̍̊͌ͩ͐̎̀ͣͣ̚͟ͅh̛̻̣͖̖͚͚͓̲̼̪͋̏̍̆ͤ͛͐ͨ̌̋ͤ̎̂ͨ̂̓̑̚̕͟ȁ̝͓̮͚̘̦̰͚͎͔͉͚̮̠̔̅̿͐̑̕͜͡ͅṱ̱̼̖̓̂ͭ̏̅͂ͥ͌ͯ͌͠sͪ̓ͪ̄̌̓ͧ͋͐ͬ̅̑҉̨̪̬͎͍̥̬?̡̮̳͙͓͔̹̘̹͓̘̻̦̣͎̫̐ͤ̐͛́͝ ̧̦̼̘͕̪̠̙͖̦̯̦̘͉͈͕͔̘̻̲͑ͨ̊̈́̐ͫ͐̌ͯ̀͘͝Ḩ̷̸̸̹͉̩̜̹̞ͯ̃̃ͧͬͨ̌̀̾̐̈̇ͧ͛̃͐̀ͦ͞A̴̦̗̬̠͙̭͉̟̺͇̭̰͔͕̯̅̃͋ͪ̈́̉̓̌ͯ̈́͆̋̀ͤ̇̂̿̈́̂͡͡Ṱ̲͎͉̣̳̺̱̜̦̬͕̣͉͇͊̌ͥ͐͒̈́̓́ͥ́́̋͂̅ͬ̆͗ͥ̕͢͡S̗̣̳̍ͧ͗̒͗̂̈ͬ͊̚̚͢ͅ!̶̨̡͇͚̙͚̭̱̣̲̳̤̞̫̗̣̦̮̖̞͒͆̿̄͑̃̎͡
Plugging that string into Android we get this:

The diacritical marks go above the top and below the bottom. It is interesting to note that the total width and height are correctly measured by the text bounds, though.
Anyway, for all practical purposes in your programming, you can just assume that the max and min for glyph letters are top and bottom. And usually they will stay within ascent and descent. If for whatever reason you need to know for sure if the letters go beyond top or bottom you can use TextPaint.getTextBounds.
Comment: Nice! Do you know in what units are the ascent, descent etc measured in? Are they in pixels? They are float values but not sure how they correspond to the screen. Got them checked in photoshop to see if it is pixels and there is a slight difference of a few units; pixels being smaller.
Comment: @VikramGupta. The units are pixels. I'm not sure what caused the difference with your photoshop image check.
Comment: Thanks for the useful explanation and the app. But, can u further explain, what is exactly `Top`? Will there be any letter tall enough to touch the `Top` line? For instance, "M", "l" seems to be the tallest letter. None of them touching `Top`.
Comment: @CheokYanCheng, see the update at the end of my answer.
Comment: @Suragch Thanks for the info. I use your app to understand more. I expect "Ascent" line will just touch the top of the font nicely as in your screenshot. However, from the latest http://i.imgur.com/aRxgjvu.png , it is not touching the tallest character "M". Do you have any idea why?
Comment: @CheokYanCheng, That is what I expected at first, too. But remember that "M" is not necessarily the tallest glyph in a font. Or even if it is the tallest letter in a particular font, the font makers may be leaving room for other characters which could be taller. Don't forget emoji. I just tested the  emoji and it touched both the ascent and decent lines. So usually Latin letters never actually touch the ascent line, which makes the picture in my answer a little deceptive.
Answer: Leading is NOT space between lines in typography. Apparently this is something Android code does not take into account. We've been struggling with this ourselves. The proper definition of leading (from Wikipedia):

In typography, leading /ˈlɛdɪŋ/ refers to the distance between the
  baselines of successive lines of type. The term originated in the days
  of hand-typesetting, when thin strips of lead were inserted into the
  forms to increase the vertical distance between lines of type.

From what I can tell, Android does not have a way to specify this.
Comment: If typographical leading is the distance between baselines, it seems like it should be easy to calculate.
Comment: +1 for helping me understand leading better. As far changing the leading goes, you can use TextView's `setLineSpacing` in code or `android:lineSpacingExtra` and `android:lineSpacingMultiplier` in xml.
Comment: Thanks - yes we were told to use `android:lineSpacingExtra` which would put a measurement between the actual space *between* the lines. It's not leading, but it seems like the only way to manage the spacing. It's a problem because there's no such measurement in typography, and there's no such way to specify that measure in Sketch or Zepelin (the tools we use). Plus it doesn't match the leading.
Comment: That's what I thought. Is there a way to do it programmatically? I was hoping with the methods Android provides that there might be a way to do it. The devs we work with don't seem to know.
Comment: It has been a while since I have worked with this, but if I were going to take it up again I would start [here](http://stackoverflow.com/questions/3654321/measuring-text-height-to-be-drawn-on-canvas-android) and [here](http://stackoverflow.com/questions/5043427/how-to-get-ascender-descender-and-x-height-for-a-given-font) and experiment with different text and fonts. Even if it isn't straight forward, I can't believe that there isn't a way to calculate what you need.
Comment: See [this question](http://stackoverflow.com/questions/14276853/how-to-measure-textview-height-based-on-device-width-and-font-size) as well.
Comment: That is indeed the definition from typography, but in CSS at least line-gaps (due to leading) are divided into the top *and* bottom parts of a line, and thus line height is measured from between line boxes. This is a better way that classical typography, which was not possible to do in the days of yore.


How to Sample 3D Points Outside and Inside the Mesh Surface

Question: I have a mesh of an object enclosed in unit volume cube and I would like to sample points inside and outside the mesh surface. What are the different ways of doing it? Is there any sample code available?
Comment: What do you mean by sample points inside and outside the mesh? Just random points and determine if they are inside/outside? And by "mesh" are you referring to a closed manifold that has a well defined "interior"?
Comment: Sorry for the late response. Yes, sample points uniformly or randomly outside and inside the mesh surface. By mesh I mean, surface(for eg. hand mesh, which is not watertight or not closed).
Answer: What you want is something that can perform the inside-outside test for meshes. The simplest solution would be to use Trimesh's implementation which can be ran with Embree to accelerate ray queries.
I recommend you check out recent literature on neural implicit representations if you want more alternatives. Your problem arises when one wants to learn 3D shapes using small neural networks; it is then necessary to sample points and their groundtruth attributes with respect to the mesh (signed distances or occupancies of points). Here's one example for SDFs written in CUDA. NVIDIA's Kaolin also has a CUDA kernel for this IIRC.
For more troublesome meshes, you can also use the generalized winding number, which has an implementation in libigl but I think their code is CPU-only.
Comment: Sorry for the late reply! Thank you @Hubble for your input. SDFs example helped me. But in my case meshes are not watertight or not closed. So, would you have any suggestions to convert them into watertight or closed meshes?
Answer: I have a few suggestions:

Partition the volume by using tetrahedra within the mesh, and outside of it (in the cube). Set the probability to sample each tetrahedron to its volume divided by the inside/outside volume of the mesh. Sample a tetrahedron based on the above probability, then sample a point (uniformly) within the chosen tetrahedron.

Discretize your mesh to a grid, and then use a filling algorithm for the inside/outside. Keep arrays of the inside/outside cells and sample those randomly. Compared to (1) this introduces discretization error.

Pick a point uniformly in the cube, then shoot a ray in any direction and if it intersect the mesh an even number of times then it is outside, otherwise it is inside.

If the mesh is convex (or can be decomposed in convex pieces) then you can check plane half-space membership which allows an early out.
Answer: For a mesh that is not closed then, by definition, there is no interior or exterior, only points on the surface and points that are not on the surface.
So your first step is to make the hand a "Closed Concave Polyhedron" by closing any openings it has. This can be done relatively simply by defining a plane where the hand is open. (such as at the wrist)
With that done your first test is to determine if a point is on the hand side of the plane or the non hand side of the plane. ( A more generic solution would be to require the polyhedron to be closed and solve the closure part as a separate problem). It sounds like this has already been done for you with the bounding box that the hand lies inside. If that is the case then your first step is to determine if the point is inside the bound box or outside the bounding box. If it is outside the bounding box you are done. If it is inside then you must now check to see if it is inside the hand.
Note: If you don't close the polyhedron in some way, then there is no algorithm that can reliably determine interior/exterior. This is one of the things that lightxbulb was eluding to with the first suggestion. For example, I have taken biology classes that consider your entire digestive track to be "outside" your body.
A very common and fast method to determine if a point is inside a concave polyhedron is called ray casting. (suggestion 3 from lightxbulb) Using this technique you pick a random point usually outside the enclosed area, I would recommend picking a point outside the unit cube since you know for certain that your are starting outside the mesh.
The point your are testing and the random point you picked can be used to form a line. Do not use a line that is infinitely long, instead your line has a start (the point outside the mesh) and an end (the point you are testing)
Now you just brute force test every triangle in the mesh to see if they intersect with the line. Along the way you are counting the number of intersections that occur. If your point is inside the mesh then the line will pass through an odd number of triangles if your point is outside the mesh then your line will pass through an even number of points.
I recommend drawing simple hand shape on a piece of paper, picking the two points, draw the line then count the intersections with the hand. This should make it much more clear why this works.
If you do not close the polyhedron then you can get unlucky and there will be a line that can get inside the mesh without passing through it and this algorithm will fail. So one of the "triangles" you must test against is the plane that closes the mesh and it must be counted as a pass through a triangle or you could end up with false positive/negative.


How to make an AES implementation using lookup tables immune to cache timing attacks?

Question: I recently made a very naive implementation of AES using lookup tables, but it's totally unsafe because of timing attacks. I am not interested in using the processor specific instructions for AES, which is used practically, since I wanted to make a cool project with AES ! Is there any way to prevent my AES implementation from being insecure  ?
Comment: This was mitigation in OpenSSL or when I heard this attack I simply said this before knowing this mitigation. Cache attack uses the knowledge that you access some cache lines for the round and uses this to determine the key bit(s). Therefore if you access all your cache lines related to your lookup tables, you will be safe.
Comment: The easiest solution is reading all the cache lines where the keys are stored.
Comment: @kelalaka Can you please be more clear?
Comment: not pertinent to how, but hardware information is here: https://crypto.stackexchange.com/questions/53528/why-dont-table-lookups-run-in-constant-time/53627#53627
Answer: When it's possible, a solution is to ensure that table lookups at data-dependent addresses are constant-time and without action on the cache, by

Disabling cache (use and loading/invalidation) during such table lookups. That's heavily system dependent, though. Some CPU architecture have special instructions, addressing modes, or mode bits allowing this, or allow to control which addresses can be cached.
And ensuring that there is no other condition causing timing variations in table lookup; I'm in particular thinking of an extra cycle due to internal carry in the addition of base address and index on some CPUs. On many 8-bit CPUs, that means starting the 256-byte table at an address multiple of 256.

It is not quite as safe to:

Flush cache before table lookup, because in some attack scenarios an adversary could examine the cache state.
Fill cache with the full table before use, because in some attack scenarios an adversary or a coincidence could partially flush the cache.

Other techniques aim at making it impossible to measure timing dependencies. For example, we may start a timer before encryption, set to a larger value than the worst-case encryption duration, then wait precisely until expiry of the timer after encryption. With a cycle-accurate timer, and if an adversary can not induce interrupts that make the duration of the encryption vary beyond the maximum forecast, and a host of other conditions, it is conceivable that timing variations in encryption are fully hidden. Beware that this could worsen leaks by other side channels (power, electromagnetic emissions).
None of this is general and portable. Other solutions have no such drawback: they just use no table lookups at data-dependent indexes, replacing them by constant-time expressions or table tookups at data-independent adresses. That can be made portable and reasonably fast when using bitslicing; see answers to this related question.
If speed is not an issue, a slow but simple and quite portable technique goes:
uint8_t lookup(const uint8_t table[256], uint8_t index) {
    unsigned j, r;
    j = r = 255;
    do
        r ^= ((-(index ^ j)) >> 8) | table[j];
    while(j--);
    return (uint8_t)r;
}

This works because -(index ^ j) has bits 8 to 15 each 0 or 1 depending on if  index==j or not, and the indexes in table[j] are not data-dependent.It might be necessary to inhibit a spurious compiler warning or/by inserting 0 before -.
It is also possible to use that (c >> j) & 1 does a lookup at index j in a $k$-entries 1-bit table defined by $k$-bit constant c, in a constant-time manner on CPUs with an at-least-$k$-bit barrel shifter and a compiler that uses it. That combines with the above: we can select among 32 constants each 64-bit according to 5 bits of the index (perhaps unrolling the loop), then use a 64-bit barrel-shifter to extract the 8-bit result according to the remaining 3 bits of the index.
Comment: The theoretical keyword here is probably "oblivious ram"?
Comment: @SEJPM: I confess that I have always stared blankly at [oblivious RAM](https://en.wikipedia.org/wiki/Oblivious_RAM) papers, not understanding the connection to the physical devices (RAM, CPUs) that I use.


Printing on HP officejet 6700

Question: I have HP officejet 6700 printer.  I have been able to print some documents; but now, I could not print again.  When I try to print, it looks like the printer stored the document to be printed into memory. After a while, even when the printer is on & off, when I wanted to print another document, the previous document will print and stop. I am not sure how long it will take to respond to the next print instruction. Right now, printing is at a stand_still.  Can I get help please ?? I have documents on my system that I must print out.
Thanks.
Answer: I will try to help you. I recently bought the same printer, and got it to work. First, put the DVD in the computer. Then, go here:
Next, right click and go to the Windows Emulator screen. Then, after this, select Go Online instead of running it from the DVD.
If you don't have an account already, register.
Then after you have done this, log in:
Then click add printer.
I got an error message at the very end but the printer works fine, I hope this helps.

Printing on HP officejet 6700


Biceps workout without supplement pain more than 4 days: Do i need whey?

Question: I saw an expert in Youtube said that muscle recovery took 3 days (roughly 72 hours) but it not same with my case.
I'm not bodybuilding and not using any kind of supplement.
I'm doing more for strength and health but don't mind if my muscle size get bigger.
My other muscle (chest, triceps, etc) pain not last so long like my biceps.
Usually once in 5 weeks I'm doing biceps workout using dumbell.
The other weeks I'm not lifting. My life involving a lot of manual works like cutting trees manually and I'm avoid doing heavy workout during the other weeks.
I'm doing multiple sets. Start from second set onwards, I lift until I cannot lift. Then I continue next sets over and over until the last I can only barely lift once or twice reps.
The second & third day is really painful and I cannot put my hand straight.
Forth & fifth day I still can feel pain on biceps.
I need to know if I consume whey, how it can help? Do I need to consume whey the next day while it recover even I'm not doing heavy workout?
Comment: I'm a bit confused. Are you saying you only work your biceps once every 5 weeks? Or that once every 5 weeks you do an exhaustion set? Could you add your normal weekly routine into your question?
Comment: Yes, only (usually) once in 5 weeks. But the other weeks I'm involving in a lot of manual works like cutting trees manually and I'm avoid doing heavy workout during the other weeks.
Answer: You are having DOMS (Delayed Onset Muscle Soreness). The only real way to mitigate it is to train more often.
Taking whey (and other protein supplements) is useful when you can't eat enough to have as much protein you want1, in regard to your goal. If your goal is to grow bigger or to have more strength, you should train more and think of a diet to try to eat roughly 2g of protein per kilogram and supplement you if you can't.
Define your goal, then establish a workout routine (frequency and intensity) and a nutrition program, and use whey (and other supplements) if needed to follow your diet.
1 There is other usecases to protein supplements (casein before sleep to prevent catabolism...) but not relevant here.

On a side note, training once in five weeks is not enough to see a real progress. Try to establish a weekly routine that enables you to train each muscle at least once per week. If you don't have enough time, you can do one "full body" workout per week.
Comment: I'll add to this that while it's common to experience DOMS after a first workout, especially a highly strenuous one, it normally doesn't occur on subsequent workouts due to the [repeated-bout effect](https://en.wikipedia.org/wiki/Delayed_onset_muscle_soreness#Repeated-bout_effect). The reason why you're sore every time is that your workouts are spaced so far apart that the protection of the RBE has worn off by the time he's ready for another workout.
Answer: Some studies have shown that protein supplements can provide some modest relief from Delayed Onset Muscle Soreness (DOMS) while other studies show no such effect.
It may be something worth your investigation to see how well you respond to it.
Answer: You should eat more protein to recover faster and reduce the soreness timeframe, but you will never get over the painful soreness until you workout more often.


Where should I store GPS data on Ethereum?

Question: Where should I store GPS (or other frequently changing, content searchable data on Ethereum)? Blockchain is not the best place for this kind of data, because it is expensive, but swarm is not searchable (as I know). So, if I would like to write an Uber like service on Ethereum, where I have to find the nearest points near real time, what would the best storage option?
Answer: Hmm.. you should seriously research Ethereum alot more before proposing this. because it is expensive does not begin to describe how expensive and slow this will be if you wrote all your GPS data to Ethereum.
Here's a simple string of 1 GPS location data
$GPGGA,053855.33,3756.9296,N,12737.8335,E,3,08,0.0,0.0,M,0.0,M,0.0,0000*74
Let's make a simple contract to store this: https://ethfiddle.com/rM9HRNhsF8

So storing that single string costs roughly  $0.021 USD. And you wanted to do this frequently for thousands of users....?

Hate to be the guy to tell you no, but what you really need is an application-specific sidechain running on Ethereum and not running your DApp on Ethereum itself.
Comment: Will that change as ETH switches to casper?
Answer: You'd want to use logs most likely.  The costs for storing log information is much much cheaper.
Comment: I feel that using the Blockchain to store such huge amounts of data doesn't really make sense. The cost would be prohibitively expensive! Plus the blockchain isn't really meant to be used like a database.

Hence it might be better to use IPFS/Swarm to store the data, and add the IPFS hash to the smart contract as a record-keeper.

Here's a great guide https://github.com/kggp1995/IPFS-Ethereum-Storage to help you understand how to leverage IPFS to amplify the power of the blockchain for storage.
Comment: Ty. Log is a better place like the blockchain, but is it a good place for highly changing data? For example 1000s of users, whose change GPS coordinates in every minutes. If every changes are stored, the log would be really big after some weeks or months.
Answer: With the little info I have, I'd say the best place to store such data would be off-chain.
Why do you need to store every reading for each user on the blockchain?
Do you need to store all the historic data? You could possibly just store the latest reading for each user and log each reading through events for easier access.
You could possibly refrain from storing each and every reading on-chain. How about just storing, say one reading per hour on-chain and using a "regular db" for storing every reading.
In an Uber scenario, you could store the pick up and drop off coordinates on-chain and then the rest of the readings off-chain.


How can I recreate the flavour of instant ramen without the salt?

Question: I am looking to make my own instant ramen soup - nothing complicated, but there must be a way to duplicate the instant variety without all the salt. I've played with combinations of dried onions + no - salt chicken bouillon, but without much success. The key is something that can be kept in an office drawer for some time - I can already make homemade soup from the scratch.
Comment: Salt is the flavor..
Comment: Do you mean making your own ramen, or just the soup base?  Ramen are slightly complicated to produce at home.
Comment: On the series, River Cottage Every Day, Hugh Fearnley-Whittingstall made some instant "pot noodle" soups along with one of his chefs.  I believe some of the add-in ingredients were perishable, but they were all just-add-water recipes when it came time to eating them.
Comment: Tangentially related: [Does dumping the water from boiling ramen noodles reduce the fat content much?](http://cooking.stackexchange.com/q/18570)
Answer: The Japanese use a stock called Dashi for the base of many soups, sauces and dishes including the famous miso soup. Dashi is made like tea by seeping several different varieties of dried ingredients such as dried bonito flakes, dried baby sardines, dried kelp and dried shitaki mushrooms in varies combinations.
What you can do is boil water and use a teabag to seep the ingredients for a while then just remove the teabag. It requires quite a bit of bonito flakes to get any flavor. Rather than using Ramen noodles you might opt to use cellophane rice noodles or mung bean noodles instead. Finish with a dash of soy sauce, sambal or saracha. All these ingriedents can be ordered online, found at an Asian market or Whole Foods. You might also find several other types of mushrooms (watch out for sand), fish and vegetables that have been dried which will rehydrate nicely in the soup.
Comment: Most of the above could be managed in an office (canned fish/seafood and misc. dried ingredients can be stored in a desk drawer along with low-sodium soy sauce and bricks of "instant" noodles).  You'd be hard pressed to find a "no salt" ramen recipe (that goes so far as to even exclude low-sodium soy sauce & salt from tinned or dried fish), but you could easily cut the sodium level in half with the suggestions above & careful selection of ingredients. Definitely more work than "boil, add seasoning packet" though...
Comment: Even if you made your own dashi this can still have quite a high salt level and wouldn't meet the instant requirement unless you keep two types of dried fish in your office desk draw! And I've seen low sodium soy sauce but not no salt soy sauce. I'm not sure this is a useful answer.
Answer: What about some miso soup base instead?
Comment: Miso paste is more than 5% salt already!


How are fuel tanks tested and certified?

Question: What ground tests are carried out for testing and certifying wing fuel tanks for use in passenger aircraft? Is there any chamber to simulate flight conditions? If so, how is the chamber constructed?
Comment: Fuel wing box, do you mean a fuel tank?
Comment: Yes. Fuel tank.
Comment: By "ground test" do you mean tests that are conducted in the aircraft on the ground, or do you mean tests that can be conducted in the lab, etc.
Answer: The exact regulations governing an aircraft's fuel tanks depends on many factors such as type and number of engines, construction material, mounting method, number of passengers, aircraft gross weight, etc.
But a good overall set of requirements is given in 14 CFR 23.965 - Fuel tank tests. It includes such items as pressure testing, vibration, sloshing, inertia loads, venting, duration and number of cycles of each test, etc.
14 CFR 23.967 thru 23.101 - Fuel tank tests provides additional criteria but also includes requirements for components such as access panels, fuel sensors, filters and strainers, lines, pumps, drains, valves, jettisoning, etc.
Other than a visual inspection for leaks and corrosion, the primary field test for an installed tank is to plug all the orifices and pressurize the tank to 2-3lbs for about 10 minutes. Large rubber stoppers that look similar to corks (with a bolt running through them that expands the rubber) are often used to plug the larger opening such as fuel filler openings.
Answer: As an example of what ground testing may be conducted, reference this Test Report from the FAA.
In this test, the fuel tanks were inerted with the On Board Inert Gas Generation System (OBIGGS).  Various weather conditions and operating configurations were evaluated to determine Inerting times and effect on oxygen levels in the tank.
Tests that measure the actual fuel quantity of the system are also part of the ground test campaign.


Ways to speed up solving an LP with Google's ortools

Question: I'm having an issue solving an LP of the form:
$$\min z = c^Tx$$
$$\text{s.t.}$$
$$Ax \geq b$$
$$x\geq p$$
$1 \leq a_{ij} \ll b_i$, $p \leq 0$, and $c \geq 0$
The specific problems I'm running into with the ortools GLOP solver are:

The LP takes an insanely long time to solve on a distributed system where each worker has $\geq 30$ cores and roughly $240$ GB of memory. To me seems a little too long. I've solved instances of TSP in less time on smaller machines that did more computations (with CPLEX / Gurobi via AMPL). Furthermore, lasso regression is reducible to simplex and can run on similarly sized data in a fraction of a fraction of the time. Latency is extremely important and I'd love to get this cooking in less than $45$–$60$ minutes.
I've checked and double checked the formulation generated, and the output (after $\sim 6$ hours) is that the problem is infeasible by returning a solution of $x = 0$. Obviously, this can't be the case since if we take $x = b$, we have a basic feasible solution, which implies the existence of an optimal solution.

About the data:
$A$ has $\sim 3 \cdot 10^6$ rows and $\sim 1 \cdot 10^6$ columns. However, $A$ is also very sparse with no more than $2$ $nonzero$ entries per row.
Unfortunately, I'm new to the Google's ortools and am having difficulty finding documentation on the specific objects and methods in the $python$ API.
My guesses as to where issues can be arising and possible solutions are:

If the solver is using two phase simplex or "Big M" to find an initial BFS. I want to know if I can speed up the process by providing an initial BFS to the GLOP solver (e.g. $x = b$) to speed things up?
If there's not an issue in $(1)$, then the problem must be too hard (doubtful). But, a better formulation may help. Sparsity of $A$ suggests I may be able to look at this as a Network problem. Anyone have any experience with this?
Can I go a step further by using something like Dantzig Wolfe decomposition to separate the "easy" constraints ($x \geq p$) from the hard ones? Related, but I'm wondering if I can also lift the easy constraints into the objective. Any experience with this?
(Related to 3) Not sure if column generation works here, but can it? Does anyone have any experience with it for problems of this nature? My intuition is that I can look at x as a set of patterns since x's are tightly coupled and belong to independent variable sets.

$$$$
Most importantly, if you've worked with Google's ortools before, can you point me to traditional API docs (not examples) for $python$? And, if you can, can you share what your experience has been as well as common gotchas and helpful performance improvement tips?
Last, I'd love to use an open source solver like ortools rather than pay for something more expensive for this application. If you know of another open source solution that exists, please share in the comments. Anything that has a decent Java, Scala, or python API would be awesome. Extra points for distributed solutions. Extra Extra points for something that leverages Apache Spark's distributed environment.
Thanks a lot!
Comment: Have you tried other solvers such as CPLEX or Gurobi?  If by 3 M M constraints you mean $3 \times 10^{6}$ constraints, then your problem is in fact very large, and you'll probably need to use one of the better software packages to have any chance of solving this problem.
Comment: 1) can you describe what the problem is ? Quite a few reduce to LP in theory but have fast special-purpose algorithms, e.g. [Constraint programming](https://en.wikipedia.org/wiki/Constraint_programming) (python: [kiwisolver](https://github.com/nucleic/kiwi)). 2) Would you know of a smaller similar problem on the web ? Thanks
Comment: Haven't tried CPLEX or Gurobi yet. Trying to avoid buying. But, yes -  $3 X 10^6$ constraints. My intuition is that the very sparse nature of $A$ should help. Each constraint looks like: $x_i + ax_j \geq b$.
Comment: You may want to edit your question to use $3\cdot 10^6$ instead of $3MM$ mean. I stumbled about this as well.
Comment: Edited to be more explicit in size of the problem. Thanks!
Answer: Have you tried any of the Coin-OR tools, like cbc or clp? They are pretty comparable to CPLEX for LP (not MIPs though), at least until a certain scale of the problem (your size should be solvable quickly using these). They claim to have support for Dantzig-Wolfe, although I haven't tried that.


Data Validation in Google Sheets Using Multiple Criteria

Question: I have a column with text in the format:
[text:more text/numbers]

I want to ensure whatever is entered into the cell conforms to this syntax, or at least as much of it as possible.
text is always 5 characters long and capitalized. The part after the colon is of variable length.
Currently, I am using simple data validation to check that the trailing ] is in the cell. The criteria are Text contains ], rejecting input for everything without the ].
Using an IF statement, could I check the cell for those symbols/string lengths and reject everything that doesn't conform? Ideally, I would use the formula within the data validation feature, rather than as a script, for example:
Criteria: Custom formula is =(FORMULA HERE)
Any ideas would be appreciated on this.
Answer: Use regular expressions and REGEXMATCH
I think that =REGEXMATCH(A1,"^\[.*]$") should work.
Answer:
taking it on next level it would be:
=REGEXMATCH(A2, "^\[.{5}:.*/\d+]$")

...where requirements for TRUE outcome are:

starting with [
5 characters before :
any length characters between : and /
numbers after /
ending with ]


What differences are there between Prime Directive d20 and Prime Directive d20 Modern?

Question: There are 2 versions of Prime Directive d20, one based on the D&D 3.5 PHB and the other based on D20 Modern. Are there any noteworthy differences between the two versions, or did they just make a second version of it for people who had d20 Modern but not D&D?
Answer: I asked on the Star Fleet Universe Discussion Boards, and received the following answers:
Answer 1:

The two rules sets are somewhat different and while a good GM can make
  either one work with the other (after a fashion) d20v3.5 and d20M are
  effectively different game systems.

Answer 2:

The two rule books (like all the Prime Driective rulebooks) share 60
  or so percent of material. This being background, fluff, fiction, etc.
The rest of each book is system specific and there are enough
  differences between D20 and D20 Modern to require two separate books.
While both systems work for PD, I much prefer the D20M version.  In
  D20M, your character classes are Strong, tough, Fast, Smart, etc.
  rather than Warrior, Mage, Priest, and Rogue.
The skills and feats avialable are more in line with a futuristic
  setting as well.

You can follow up if you have more questions at the Star Fleet Universe Discussion Boards.
Comment: Time to make a ranger with favored enemy of "Wesley Crusher"!
Answer: As the other answer states, d20Modern and D20 are different systems entirely, albeit with some similarities.
If memory serves, d20Modern is built on the concept of the same six stats, but your 1st 3 levels are basically just a basic class specialized for one of the skills. You then have advanced classes that give special feats and abilities as you progress in them. The d20Future book added a lot of sci-fi tech and the idea of technology levels.
I won't cover all of the ins and outs of d20, as I'm assuming it's ubiquitous enough to not need a lot explanation. But it's definitely different from d20Modern.


Meaning of 冷たいのは違う

Question: Context: She was waiting in the snow for someone and after she met him and after they had gone inside and she had touched his face with her hands he said "バカ、こんなに冷たくなるまで俺のこと待っていたなんて. She then whispers "冷たいのは違う"(as indicated by the ぽそ sound effect) before she responds. The reader knows that she is a 雪女(whilst he doesn't) so it would make sense for her to be 冷たい, but my problem is with grasping what she meant by that. I think this might be her saying that, that(referring to her standing out in the snow all this time) is not why she is 冷たい although I am not quite sure.
Answer: I think that you are reading between the lines "correctly".  Unless the larger context proves otherwise, what you stated would be the most natural and logical way of understanding the phrase 「冷{つめ}たいのは違{ちが}う」.
It would mean something like "Me being cold has nothing to do with it." with "it" referring to the fact that she had waited (outside?) so long on a cold day.
Since this line is not one she, as a snow fairy, wanted to say assertively and clearly, she said it 「ぼそっと」= "murmured it".
Answer: I think that maybe because she's a 雪女 she doesn't think that's actually cold, so the translation for that sentence could be "it's not that cold!"
Answer: 「冷たいのは違う」simply means that you're wrong to say that I become cold, or something close to that. I guess she wants to emphasis on the things that she've been waiting for him for long, but couldn't say obviously. That's why the expression,「ぽそ」comes later.
She could,ve simply said that '冷たくない', which also means that I don't feel cold. But, it seems a little direct and straightforward to say, so in this case 「冷たいのは違う」might sound better.

Meaning of 冷たいのは違う


How to disable Close & Minimize Buttons

Question: We have a few shared Macs at work running 10.6.8 and I'd like to disable only the Close & Minimize buttons for one application, not system-wide. I've already re-assigned the keyboard shortcuts for this application inside of the Prefs pane so that the common combos won't work, but I'd like to prevent clicking the buttons also.
Answer: If you're lucky, the application uses .nib files for the main window. If that's the case, you should be able to use XCode to edit the .nib file and change the window properties so it doesn't show a close button.
To do this, right-click the application in Finder and select "Show Package Contents". Then navigate to Contents > Resources > some_language.lproj and look at each of the .nib files.
Then double-click the one that looks likely, if you have XCode installed you should then be in the editor view. Disable the window controls and save.

You can remove language .lproj folders other than the language you want to use, so you don't have to repeat the process for all languages the app supports.

How to disable Close & Minimize Buttons


Filtering non-generic DbSet with dynamically built Expression

Question: Plot:
I have a class implemented as a facade around Entity Framework DB context. It developed to maintain backward compatibility, it mimics class with same public interface, but uses DTOs instead of EF entities.
Problem:
I have next method inside class described above. See code below:
public IQueryable<T> FindBy<T>(Expression<Func<T, Boolean>> predicate) where T : BaseDto {

//GetDestinationType takes source type of some declared mapping and returns destination type
var entityType = Mapping.Mapper.GetDestinationType(typeof (T));

var lambda = Expression.Lambda(predicate.Body, Expression.Parameter(entityType));

// dbContext declared as class field and initialized in constructor
var query = dbContext.Set(entityType).Where(lambda); // <-- Cannot use non-generic expression/lambda

return query.ProjectTo<T>(mapper.ConfigurationProvider); }

I need to take Expression using DTOs as In parameter and return IQueryable where T : BaseDto as a result
I need to convert input predicate to the same predicate using EF entities as In parameter
I need to filter non-generic EF DbSet with help of dynamically created Expression (predicate)

Main question
Is it possible to filter non-generic EF DBSet with help of dynamically created Expression (predicate)
Please give me some glue or further directions if I need to use some other approach.
Answer: Problem has been solved. Solution was quite obvious. Instead of
var query = dbContext.Set(entityType).Where(lambda);

I can write
var query = dbContext
                .Set(entityType)
                .ProjectTo<T>(mapper.ConfigurationProvider)
                .Where(predicate);

where predicate is the input parameter of FindBy() method.
This code will be successfully compiled and, what is more important, EF will build optimal query to the Database which will include Where() clause in the query body, so it won't take full set of records from DB side.


Difference between 常常 and 往往

Question: I'm fairly certain I understand how to use 常常,but I don't know if 往往 is used any differently (they both have the same translations). Are there any differences in usage I should be aware of?
Comment: I think 常常 is about frequency (in the past) and 往往 about tendency (in the future). But they are often exchangeable.
Answer: Basically they have the same meanings. Now let's focus on the difference, but first wrap your head in duct tapes in case it explodes.
往往 is usually used with conditions supplied. Without any condition it is usually wrong:

我常常加班。 -- Good.
我往往加班。 -- Wrong.
北京常常下雪。-- Good.
北京往往下雪。 -- Wrong.
北京往往在冬天下雪。-- Good. Notice the constraint.
努力的人常常会成功。-- Good.
努力的人往往会成功。-- Good, maybe better.

However, 往往 can only live in the result, not in the condition:

如果你常常努力,你就会成功。-- 往往 is wrong.
如果你努力,那你往往会成功。-- Good. 常常 is also OK.

往往 focuses on the experience of previous observations, 常常 focuses on existing phenomena. This may not matter much depending on the context:

猫往往会把猎物带给主人。 -- It's an observation, a summary, and maybe also a prediction.
猫常常会把猎物带给主人。 -- It's just an observation, but really, no big difference.

When 往往 is used, there is often a slight enhancement of emotion or stress:

我常常加班到深夜。-- A general statement.
我往往加班到深夜。-- Notice the sense of disapproval.
我常常一加班就头疼。-- A general statement, but...
我往往一加班就头疼。-- The negative sense of 头疼 eludes the difference of 常常 and 往往.
小明常常在班里考第一名。-- A general statement.
小明往往在班里考第一名。-- Good. Though not negative, it sounds more emotional.
小明往往在班里考倒数第一名。-- Good. Negative and emotional.
北京常常在冬天下雪。-- A general statement.
北京在冬天常常下雪。-- Notice although 常常 appeared at different places, it's more of a decorator of the whole sentence.
北京往往在冬天下雪。-- Notice the slight stress. Winter, not spring.
北京在冬天往往下雪。-- Snows, not rains.

常常 can be used in the subjunctive mood. 往往 can't:

你要常常来找我玩哦。-- 往往 is wrong.
我建议你常常复习一下。-- 往往 is wrong.

常常 can be used in the imperative mood. 往往 can't:

常常来找我玩哦!-- 往往 is wrong.
常常复习一下!-- 往往 is wrong.
如果有时间,就常常复习一下!-- 往往 wrong, even with conditions supplied.

Also the negative form:

我不常常吹牛。-- 不常常 is good.
我常常不吹牛。-- 常常不 sounds weird because 吹牛 is an explicit action.
我常常不在家。-- 常常不 sounds OK because 在家 is a status.
懒散的人往往不会成功。-- 往往不 is good. It's the only form of negation.
懒散的人不往往会成功。-- 不往往 is absolutely wrong.
Comment: @Ludi 我往往加班 sounds incomplete as a sentence, because 往往 is often used with some conditions (in this case 到深夜). Without the condition it sounds strange. This is the major issue of 我往往加班 as a sentence.
Comment: This is really confusing. Right when I thought I understood the first group of examples, there came examples with 往往 without any conditionality! 我往往加班到深夜。So 往往 denotes conditionality OR disapproval OR prediction? Then, why can't 我往往加班 express disapproval?
Answer: There's a footnote for the 往往 entry in 规范 that says:

注意 跟"常常"不同。㊀"往往"可以指将来发生的事; "常常"一般不用于将来。㊁"往往"的词义跟"往"的各义项都不同; "常常"跟"常"⑥词义接近。

往往 can be used for future events - 常常 in most instances cannot.
往往 has nothing to do with any meanings of 往 alone. 常常 has the same meaning as one of the definitions of 常 alone.

There's also a footnote for the 常常 entry describing the difference between 常常 and 通常 that I think is good to mention here, too: (only the relavent part is below)

"常常"多表示在较短的时间内动作行为发生的次数多

常常 mostly describes actions or behavior that occurred repeatedly during a relatively short period of time.
Comment: "往往 can be used for future events - 常常 in most instances cannot." Some say completly opposite thing- 常常 is for future, but  往往 is not. http://www.digmandarin.com/often-in-chinese.html
Comment: @coobit 现代汉语规范词典 is probably more authoritative than any other resource - which is the 规范 mentioned in my post.
Comment: "Introduction to Chinese Syntax" by Xu Dan contradicts 现代汉语规范词典,
Answer: Both answer from user3306356 and Wang Dingwei are correct, I just want to add a simple explanation on top of their answer:
常常; things mostly happens (in present); is supported by evidences from the past.  北京十月常常下雪 - Beijing was always snowing on Oct, therefore we use 常常
往往; things will most likely happens; is supported by forecasting / vision in the future. 努力的人往往会成功 - People who works hard will most likely success.
Answer: I think 往往 implies that the statement is made from one's judgment, while 常常 is a more general word.

Difference between 常常 and 往往


Celibacy and contradiction with modern medical science

Question: Buddhism stress on Celibacy at the same time insists on revoking everything that could not be proved by scientific method or rational thought. I am a graduate student of physics and I found that modern medical science or the proponents of medicine recommends controlled masturbation as a healthy way to relieve sexual desire or tension. I find it contradictory that what the medical practitioners found by scientific methods is completely against the view of masturbation in Buddhism and still Buddhism as far as I know advocates the scientific method be more fruitful than the intuitive way of reasoning. Is it contradictory?
Comment: A side note: a medical recommendation may or may not be based on studies, and these may or may not have been well conducted. A study may or may not have follow ups, and these may contradict or further support previous correlations. Correlations do not imply causality. Finally, even with actual data supporting that sexual desire or tension is relieved with controlled masturbation (btw, I see no reason to challenge this), such data, by no means, should imply that this is the "best" or "most appropriate" way of relieving sexual desire or tension, particularly, in the context of buddhism practice.
Comment: "at the same time insists on revoking everything that could not be proved by scientific method" - false assertion
Comment: At the same time Buddhism, unlike science for the masses, relies on developing the power of your will to abnormal levels. Thus, findings that apply to most people may benefit your strategic thinking, but should not be viewed as a clear aprioric limitation, much less as an excuse (this topic is heavily loaded with such connotations, after all).
Comment: Even *if* it were true that "medicine recommends" it, is that a *strong* recommendation? My (Canadian) doctors have given me many recommendations (and/or asked me many questions) over the years: about diet, exercise, alcohol, smoking, sleep, drugs (illegal and/or prescription), blood-tests, heart, breathing, bones, muscles, guts, urine, skin, teeth, infections, vaccines, social life, job, family, mental health, stress, etc. ... but not masturbation. So if masturbation is "healthy" (or not unhealthy), maybe the same is also true of *not* masturbating, i.e. it too is "healthy" or not unhealthy.
Comment: @SankhaKulathantille Could you specify why the statement is false? `Kalama Sutta` would render a support to the above statement
Comment: @ThejusMahajan People have tried to explain the Kalama Sutta in other topics, e.g. [this one](http://buddhism.stackexchange.com/q/1297/254).
Comment: To clarify your question, would you add a reference (e.g. a hyperlink and quote) to a specific claim or recommendation which medical science makes about masturbation, so we can understand what you're talking about? And a reference (again, a citation and a quote) to specific "Buddhist view" on the subject, so we can understand why you say there's a contradiction between medical science and Buddhism?
Comment: As more and more scientific research and studies are done on meditation, they start to recognize that practicing meditation is a much more superior way of relieving stress, subdueing unwholesome emotions, and many many other benefits. (ref: https://www.psychologytoday.com/blog/feeling-it/201309/20-scientific-reasons-start-meditating-today)
Answer: I  will quote/extract a few sentences from Wikipedia's article on that subject, below (you can read the whole article and its references for further details):

An article from Beliefnet and Brian Schell, a writer for DailyBuddhism.com, both suggest that masturbation is essentially harmless for a layperson, at least outside the realm of karma[3][4] The accomplished Theravadin monk Bhante Shravasti Dhammika cites the Vinaya Pitaka in his online Guide to Buddhism A to Z, stating the following

Some people during the Buddha's time believed that masturbation could have a therapeutic effect on the mind and the body (Vin. III, 109), although the Buddha disagreed with this. According to the Vinaya, it is an offence of some seriousness for monks or nuns to masturbate (Vin. III, 111) although the Buddha gave no guidance on this matter to lay people. However, Buddhism could agree with contemporary medical opinion that masturbation is a normal expression of the sexual drive and is physically and psychologically harmless, as long as it does not become a preoccupation or a substitute for ordinary sexual relations. Guilt and self-disgust about masturbating is certainly more harmful than masturbation itself.

The emphasis on chastity in Buddhism is much more so for bhikkus and bhikkunis (monks and nuns, respectively), who are expected to follow the Vinaya (traditional code of ethics for Buddhist monks and nuns). Not only are monastics celibate, but they also must strive to conquer their desires much more so than a layperson.
Thus, in Buddhism, masturbation and its permissiveness is most often viewed as situational, depending on one's level of precepts and monastic standing.

The "Buddhist stress on celibacy" which you refer to is (arguably) 'stressed' for monks and nuns; and it is not stressed in exactly the same way for laypeople.
Some of the other Vinaya rules too (e.g. not eating after noon), which are only applicable to monks and nuns, might or might not not be perfectly in line with every recommendation of "modern medical science", but apparently they are good enough for their purpose, which I think is to 'allow the holy life to be lived'.
Also, science and Buddhism don't contradict each other on this subject, they say different things about it:

Science suggests that masturbation might have some effect on the incidence of some types of physical illness.

Perhaps Buddhism doesn't say much on that subject (see "Buddha gave no guidance on this matter to lay people" above), but if anything IMO it suggests that masturbation might have some other effects (e.g. on discipline, views about desire, profitable use of time, etc.).
Answer: Because you added hyperlinks to specific references as I requested let me try to analyze them.
I wish you'd quoted specific sentences from those references, but let's try to summarize the whole documents.

Enlightenment through Celibacy or Celibacy through Enlightenment? doesn't mention masturbation at all, except in the Vinaya which are the rules for nuns:

In the bhikkhuni Vinaya there seem to be several rules to safeguard against sexual practices such as masturbation, homosexuality etc. The restrictions in the Vinaya againstsharing the same bed, couch, sharing the same blanket, from rubbing each others bodies, applying oils etc on another could be multi purpose including to safeguard against possible sexual activity.

The later sentence which says, "The above clearly shows that abstinence from sexual activity is not the essence of the practice towards Enlightenment even in the case of a monk or a nun" means I think that it's not the activity that's wrong, it's the self-indulging in a desire for a (conditioned) sense-object.
Are you asking about the Vinaya rules for monks, or asking about the "five precepts" rules for laypeople?
Its conclusion includes,

Having examined the lives of disciples above it is difficult to conclude that celibacy is a pre-condition for Enlightenment. ... . With progress on the Path, realizing the true nature of sensual pleasures and the mind and body one progresses through to a celibate life naturally. Some reach such a state of mind earlier than others . In any event at the latest, with the attainment of third fruit of the Path, Anagami-phala one switches over to complete celibacy. Ajahn Brahmavamso writes; ⋯ since sensual desire has been totally transcended, there is no spark left to ignite the passion for sex. All Arahants are 'potently impotent'.

Note that Anagami-phala isn't being free of sexuality in particular: it's being free of "sensual desire" or Kāma-rāga in general.
Most of this document describes rules about bhikkhus. These Vinaya rules don't apply to laypeople (whereas in contrast these are some suggestions for laypeople).

You quoted Wikipedia's Buddhism and science article in your opening sentence which claims that "Buddhism ... insists on revoking everything that could not be proved by scientific method or rational thought".
Wikipedia's article says several things, none of which justify your assertion that "Buddhism insists on revoking everything etc."
This is discussed in many other topics on this site, which you can find by searching for words like "faith", "belief", and "kalama".

You reference
Masturbation: Questions and Answers for your claim that "masturbation is a healthy way to relieve sexual desire or tension".
I read its "Health Benefits" section as saying:

It lets you practice or become more skillful at sex
It lets you practice sex without a partner

I don't suppose that Buddhism contradicts those statements, and maybe there's therefore no "contradiction with modern medical science."
What Buddhism might disagree with is whether "practising sex" and "becoming more skillful as sex" are desirable: whether that's Buddha's message about the four noble truths.

In summary, if there's a conflict between Buddhism and masturbation, I think that's because Buddhism:

Teaches that learning freedom from sensual craving is "better" than pursuing sensual craving
Teaches that there are other ways (other than sexual activity) to "alleviate stress"
Does NOT believe that (unlike eating, for example) sex is necessary, that sex does not lead to the creation of new feelings, and is therefore a component of the Middle Way


IIS replaces redirect status header from PHP with 302 Redirect

Question: I hope I am posting this in the correct place...
I'm having an issue with a 301 redirect in php.  Looking at the headers, if I do a simple 301 redirect, it actually appears as a 302 redirect which is not what I am after.
This is the php code:
header("Status: 301 Moved Permanently");
header('Location: newurl');

It is running on the latest version of php, IIS7 and uses the FastCGI module (which is apparently where this bug could exist).
A quick Google finds other people with the same problem, but no actual solution.
http://www.mombu.com/php/bugs-forum/t-301-redirect-returning-302-instead-3090775.html
http://forums.iis.net/p/1158431/1907156.aspx
Many thanks! Paul
Answer: Try this for your first line:
header("HTTP/1.0 301 Moved Permanently");

I'm going to make a bet that IIS isn't recognizing the Status: token.


Two temperatures for making caramel candy

Question: When making caramel candy the recipe often calls for boiling a water/sugar/butter mix to one temperature, then adding cream and boiling to another temperature.  Often the second temperature is higher than the first.  I assume the second temperature is set to get the proper amount of water driven off and the proper caramelization of the sugar.  What is the purpose of the first boiling?  How would the result be different if we just mixed the water/sugar/butter/cream and boiled to the second temperature?  If the first one is higher I can see we get more caramelized sugar that way, but if the second is higher I don't see the purpose.
Answer: When caramelizing sugar in a recipe that uses water your first job is to get the sugar to completely dissolve. That is the first temperature you are using. They are probably making you pause at this temperature long enough to make sure you do this tep correctly. If they didn't have the step most folks would blow past it, add more ingredients and run the risk of not dissolving the sugar correctly.
Make sure no sugar crystals remains at the first stage, even on the side of the pot. If any crystals remain or fall in later your recipe will fail because the sugar will recrystallize leaving a grainy taste.
Answer: Caramel and other candies like toffee start off with a small amount of water and are brought up to around the boiling point of water and held there briefly (typically a couple minutes) until the water is boiled off (which then allows the temperature to rise to the desired sugar stage). The reason for this is that when sugar is heated in the presence of water it undergoes a slow reaction called hydrolysis where the sucrose breaks down into fructose and glucose (this combination of fructose and glucose is referred to as invert sugar). Invert sugar impedes the crystallization of sucrose and helps produce the desired texture of the candy. Alternatively, invert sugar can be introduced to the recipe to reduce the time spent at the first boiling stage or skip it entirely. High fructose corn syrup is a common source of invert sugar used for this purpose in many commercial candy operations.


What is the best way to facilitate bitcoin transfers between users of mobile and web applications?

Question: Curious how an application would exchange bitcoin between users. Can an application send funds directly from sender to receiver or sender to app-owner to receiver?
Comment: This is boarder line off topic. Relevant part is that, for a transfer one party needs to send, and to do so they need an amount and address. So you are looking at sending those data, to someone, the ins and outs of that are other topics.
Answer: If the service controls the private keys (i.e. they are holding Bitcoin for their users), then they can maintain an internal database with each users balance and just update that database. The Bitcoin is only sent when users wish to transact with people who are not using that service.
If the private keys are held by the user, then the most efficient thing to do would be to have the users transact directly with each other. This reduces transaction fees.
Comment: At the cost of exposing a users ip, and open ports to a potentially malicious individual. But sending an btc public key to said person is safe, what could they do spam you with free money?
Comment: They could spam you with small outputs which could fill up your wallet and, depending on the software, cause problems. But generally that really isn't a problem except with poorly written software.
Comment: Is there a service or api that facilitates bitcoin exchange between users wallets? Or how would a developer allow direct user interaction (leaving the private keys to the user)?


Why does Midorima's nails influence his shots?

Question: In one of the episodes of Kuroko no Basket, Midorima said that his shots depend on his nails. Why do his shots depend on his nails?
Comment: Isn't it explained in the next few minutes as it usually is?
Comment: @Hakase i don't think it was explained.
Comment: @blakeharrisonakerz I've heard of that series but I don't keep up with it at all. Have you checked out the manga? Details like that are usually there.
Answer: In addition to being a perfectionist Midorima uses the tip of his fingers to direct all his strength to the ball. It is not easy to shoot the basketball at that range.
The generations of Miracles have incredible talent, but their bodies can't keep up with them. Just like Aomine and Kise who have additional strain on their ankles with those quick movements. Similarly, shooting the ball in such a high arc puts strain on his fingertips, and we all know how irritating it is to wait for a nail injury to heal.
Something similar happens in another sports shounen, Diamond no Ace, where a fastball pitcher hurts his nail while pitching because he was putting all his strength on his fingertips.
TL;DR Midorima puts all his strength into the fingertips whick strain his nails. Thus he constantly maintains them to be always on top of his game.
Answer: Midorima is displayed as an accurate shooter who knows all the factors that influence his shooting action. He's also a neatness freak. The two factors must cause him to trim his nails.
Answer: Midorima, as we all know, is a very superstitious character. He maintains his left hand especially because the Oha-Asa said so. He tries to do all the Oha-Asa says like his motto "Man Proposes, God Disposes" so he has the highest possible chance of success.


How can I make a wooden floor flat, without using self leveling product?

Question: I am preparing to install laminate flooring in the hallway of our 30 yr. old house. The hall is just over 3 feet wide and 23 feet long. The support piers/beam run lengthwise in the center of the hall and of course the foundation has settled causing the floor to have a "crown" in the center. The hall floor drops off from the center out to the walls on both sides the full length of the hall. The "drop off" is fairly consistent, approx. 3/8" to 1/2" low at the walls at all points.The floor had carpet with 3/4" particle board underlayment which I have now removed. The plywood subfloor is in good shape and I need to avoid tearing it out to shim the joists.
  I started using self leveler on a 3ft. section and quickly realized that several bags would be needed. I also fear that the water from the mix will soak into the particle board underlayment in the floors joining the hall(3 of which have already been finished with laminate),so I am looking at alternate methods to get the subfloor ready to install new 3/4" plywood underlayment that will be flat enough for the laminate.
  I like the idea of wedge shaped shims at each joist(16'in centers),but will the plywood sag between shims?
Answer: Self leveling underlayment is the way to go and maybe there is a way to accomplish that, I have used caulk to create a "dam" to keep it from going places I did not want it to go or touch.
But to answer your question, use bundles of what is known as "undercoursing shingles" they are in essence wood shims that are 16" long, 3/8" at the thick end and about a 1/16" at the thin end and vary in widths in the bundle. If you floor has a consistent drop of 3/8" on each side of a high spot, lay the shingles close together, and so the thin ends are close to the high spot, and the thick ends are at the walls. Hold them in place with staples on the thin ends, if you can get a narrow gauge stapler and compressor would be handy for this. Laminate flooring will not span over any distance, that is why to set them close together. If the thin ends of the shims are 4" apart, the thick ends will be very near or at the walls. The thin ends, with the highest part of the floor between them, should more or less create a straight line between the ends of the shims and the high spot. A little sanding to flatten out here and there would most likely be needed too. I have used this technique under hardwood flooring, a different animal than what you are working with, but with care, you may be able to pull it off.
Comment: Depending on the actual slope, the shims need not be placed against the wall.  There is no load nor wear at the outside so they can safely be placed 2-3 inches from the wall.
Comment: Yes that needs to be determined where they will actually set on the floor, they may need to set closer than the 4" I described, 2-3 inches from the wall could work, as long as a finishing piece does not need the support before the shoe mold goes down. The orientation I have shown for the shims would work best with the laminate running the long way down the hall. A long narrow rip would not set well over that 2-3" space. A full 6" wide piece, no prob.
Answer: If you can identify the location of the original joists and place your shims over top of them the new sub floor will be properly supported and won't sag any more than the one that you are replacing. From your description it sounds like you are going to make some rather large shims. You mentioned that you don't want to take up the existing sub floor but I think that I would especially if you are considering putting down a new sub floor anyway. You could then then shim the joists (very time consuming) or sister new joists to the old to support the new floor. This will also allow you to keep the floor at the current height.
Also as an alternative to sistering on new supports you could shave off the bow in the middle of the floor with a plane and set the new sub floor. This method does effectively weaken the joists but the amount that you are removing seems pretty minimal to me.


What happened to the bodies in American Psycho?

Question: Towards the end of the movie, we see Patrick Bateman in an apartment full of dead bodies. He ends up confessing what he's done to his lawyer. Later he goes back to the apartment, only to find the bodies are all gone. What happened to the bodies?
Comment: I've always assumed that (a) the movie is a satire about wealth and yuppiedom and (b) you'll never know how much is real.  I think the last scene is revealing, that perhaps Bateman is not in a healthy state of mind.  Great movie by the way - I particularly like the business card scene and the Huey Louis and the News monolog.
Comment: [imdb faq for the movie](http://www.imdb.com/title/tt0144084/faq#.2.1.3) has a nice explanation. It seems to me that Mary Harron's opinion on this issue doesn't match the accepted answer.
Comment: OMG the more i read the more confused i get. I felt all the murders wer real untill the last scene came up when Bate confronts his lawyer asks about his confession and the lawyer replies him saying it isnt true and that he had met Paul over dinner. Still confusing but the comments kinda helped. Errr i hate it when a plot is left for open interpretation. The same is done in the movie Momento. The plot is left for us to judge.
Comment: @Shifaa *"The same is done in the movie Momento. The plot is left for us to judge."* - Is it? Seems a pretty clear story in the end.
Comment: He was supposed to be rich spoiled kid. A logical explanation for various things was that his dad was protecting him. e.g. The Realtor and the Laywer were probably 'cleaners'.
Comment: @iandotkelly Someone who kills people isn't in a healthy state of mind if you ask me, and it isn't the first indication that Patrick has serious issues :D
Comment: @Luaan .... ahahahaha - yes, there is that.
Comment: @LelaDax hmm, interesting theory.  not much to support it in the movie, but i like the possibility.
Answer: Bateman is a psychotic schizophrenic and none of the events depicted actually happened.
Looking at the evidence presented by the movie, we see Batemen commit acts that anyone as high profile as him could not have done without raising at least some questions.
During the film we are presented his crazy subconscious mind that allows him to easily obtain a threesome with two prostitutes while physically beating them, going into what seems to be murderous rampages over business cards as well as seeing an ATM that tells him to insert a kitten instead of a card.
All of these events can be explained as happening inside Bateman's mind rather than in real life. In reality, one could argue the only true act that happened during the film was breaking off his engagement with Evelyn due to his realization of his psychotic visions becoming more and more intense as the film goes on.
In the end, Bateman seemingly kills dozens of police officers, something that would not easily be forgiven, forgotten, nor without being the talk of the town and also among his socialite 'friends'. Even his 'confession' is aluded to by his lawyer as a laugh as they believe Bateman is too reserved to commit such acts.
This further portrays him as actually battling inside his head most of the time, instead of a physical representation of his acts. It can be argued that while his psychotic visions are occurring, he is actually just sitting, silently, slightly catatonic while these play out inside his thoughts.
Comment: ...but the director and author have said otherwise: http://www.imdb.com/title/tt0144084/faq#.2.1.3
Comment: And this explains why he was seen as the perfect fit as Batman/Bruce Wayne...? Interesting...
Comment: I think there is one more very important element that adds to the confusion mental problems aside. It is the fact that people confuse him with another guy all the time. How can you rely on the detective's account that he was seen elsewhere if everyone confuses him with someone else? How do they even know Paul Allen is alive? Just because someone said he saw him in London? Maybe Paul Allen was confused with someone else too. Bateman can't confess because he does not even have a solid identity, nor do his colleagues for that matter.
Comment: @Jens All really good points - I should also probably update my answer as I've found other evidence from the author himself that the bodies were in fact real.
Comment: @TimPietzcker That's a really informative link. But I took from it that making the film more ambiguous was the director's intent but that he failed to do so. So I think it's fair to say that based on the movie as it was made TylerShads is right. To add to his answer there's even a scene where the associate he supposedly kills is revealed to be alive by another character. Thus removing any ambiguity about whether or not he actually killed those people. Or at least that one person.
Comment: My theory is that his lawyer did indeed believe the message Patrick left on his answering machine and organised a "cleanup crew" to clean up his mess.   Its no coincidence that you see paint supplies in Paul Allens former home.   Yes there are parts which puts the reality into question,  like the ATM machine message and that he was able to blow up a police car with a handgun,  but other than that there were no other cases like that.   But, of course this is a movie, so the whole reality is fake in reality.  Still, its cool to speculate.
Comment: @TimPietzcker: That Bateman is unwell is established. So even if the murders did happen, the bodies themselves could still have been a manifestation of his mind's guilt, among other reasons for him to hallucinate those bodies. The issue with him being delusional and following the movie from his perspective is that his mental illness makes him an **unreliable narrator**. Anything seen could have been imagined, or vice versa.
Answer: This link explains it well. Brett Easton Ellis says that some of the murders were in his head, but he did kill. In other novels that Bateman has appeared in people have mysterioulsy vanished.

Did the murders really happen, or did Bateman just imagine it all?
This is the most frequently asked question in relation to the film,
  and the answer remains ambiguous. As with the questions of why Allen's
  apartment is empty, how did Carnes see Allen in London, and why people
  ignore Bateman's outbursts, there are two basic theories:

the murders are very real and Bateman is simply being ignored when he tries to confess
everything happened in his imagination

Much of the discussion regarding the possibility of everything being
  in his mind focuses on the sequence which begins when the ATM asks him
  to feed it a stray cat. From this point up to the moment he rings
  Carnes and leaves his confession on the answering machine, there is a
  question regarding the reality of the film; is what we are seeing
  really happening, or is it purely the product of a disturbed mind? An
  important aspect of this question is Bateman's destruction of the
  police car, which explodes after he fires a single shot, causing even
  himself to look incredulously at his gun; many argue that this
  incident proves that what is happening is not real, and therefore,
  nothing that has gone before can be verified as being real either. Of
  this sequence, Mary Harron comments "You should not trust anything
  that you see. Trying to feed the cat into the ATM is sort of a
  giveaway. The ATM speaking to Bateman certainly indicates that things
  have taken a more hallucinatory turn." As such, if this scene is an
  hallucination, the question must be are all of his murders
  hallucinatory? Interestingly enough, in the corresponding scene in the
  novel, the narrative switches from 1st person present to 3rd person
  present mid-sentence (341) at the beginning of the sequence, and then
  back to 1st person present (again mid-sentence) at the end (352). This
  is a highly unusual narrative technique, suggestive of a sizable shift
  in consciousness and focalization, and an altogether different
  narrative perspective. This lends credence to the theory that the
  entire sequence is a hallucination, which in turn lends credence to
  the suggestion that much of what we see in the film is also an
  hallucination.
However, if this is the case, and if this sequence does represent pure
  fantasy, Harron ultimately came to feel that she had gone too far with
  the hallucinatory approach. In an interview with Charlie Rose, she
  stated that she felt she had failed with the end of the film because
  she led audiences to believe the murders were only in his imagination,
  which was not what she wanted. Instead, she wanted ambiguity;

One thing I think is a failure on my part is people keep coming out of
    the film thinking that its all a dream, and I never intended that. All
    I wanted was to be ambiguous in the way that the book was. I think
    it's a failure of mine in the final scene because I just got the
    emphasis wrong. I should have left it more open ended. It makes it
    look like it was all in his head, and as far as I'm concerned, it's
    not (the complete interview can be found here).

Guinevere Turner agrees with Harron on this point;

It's ambiguous in the novel whether or not it's real, or how much of
    it is real, and we decided, right off the bat, first conversation
    about the book, that we hate movies, books, stories that ended and 'it
    was all a dream' or 'it was all in his head'. Like Boxing Helena,
    there's just a lot of stuff like that. [...] And so we really set out,
    and we failed, and we've acknowledged this to each other, we really
    set out to make it really clear that he was really killing these
    people, that this was really happening. What's funny is that I've had
    endless conversations with people who know that I wrote this script
    saying "So, me and my friends were arguing, cause I know it was all a
    dream", or "I know it really happened". And I always tell them, in our
    minds it really happened. What starts to happen as the movie
    progresses is that what you're seeing is what's going on in his head.
    So when he shoots a car and it explodes, even he for a second is like
    "Huh?" because even he is starting to believe that his perception of
    reality cannot be right. As he goes more crazy, what you actually see
    becomes more distorted and harder to figure out, but it's meant to be
    that he is really killing all these people, it's just that he's
    probably not as nicely dressed, it probably didn't go as smoothly as
    he is perceiving it to go, the hookers probably weren't as hot etc etc
    etc It's just Bateman's fantasy world. And I've turned to Mary many
    times and said "We've failed, we didn't write the script that we
    intended to write".

In line with what both Harron and Turner feel about the question of
  whether or not the murders are real, Bret Easton Ellis has pointed out
  that if none of the murders actually happened, the entire point of the
  novel would be rendered moot. As with the practical theories regarding
  the Carnes conversation, the outbursts and the empty apartment,
  interpreting the murders as real is part of the film's social satire.
  Ellis has stated that the novel was intended to satirize the shallow,
  impersonal mindset of yuppie America in the late 1980s, and part of
  this critique is that even when a cold blooded serial killer
  confesses, no one cares, no one listens and no one believes. The fact
  that Bateman is never caught and that no one believes his confession
  just reinforces the shallowness, self-absorption, and lack of morality
  that they all have. None of them care that he has just confessed to
  being a serial killer because it just doesn't matter; they have more
  important things to worry about. In Bateman's superficial high-class
  society, the fact that even his open confession to multiple murders is
  ignored serves to reinforce the idea of a vacuous, self-obsessed,
  materialistic world where empathy has been replaced by apathy. By
  extension then, this could be read as a condemnation of corporations
  in general; they too tend get away with murder (in a figurative sense)
  and most people just choose to ignore it, just as do Bateman's
  associates. In this sense then, Bateman serves as a metaphor, as do
  the very real murders. If the murders were purely in his head, the
  strong social commentary would be undermined and the film would become
  a psychological study of a deranged mind rather than a social satire.
  And whilst that is a perfectly valid interpretation, as Harron
  indicates above, it is not entirely what the filmmakers were
  attempting to achieve.
Answer: It's been a while since I saw the movie, but my impression was that the events in the move are not meant to be imaginary.  I remember Bateman kills someone and then pretends the apartment is his own.  That is where he leaves the bodies of his victims.
Bateman at some point spray-paints "Die Yuppie Scum!" on the wall.  One of the conceits of the film is that yuppies really are scum.  They are worthless and interchangeable, so people can't tell one from the other, and nobody cares or even realizes when one is murdered.
Toward the end of the movie Bateman comes back to the apartment and the bodies are gone.  A realtor is there, getting ready to show the apartment.  (Apparently Bateman hasn't kept up the rent payments.)  It is the realtor who has disposed of the bodies.  She hasn't even bothered to call the police because the victims were only worthless yuppies.  She knows Bateman murdered them, but doesn't care.  She treats him with disdain, though, because he left a mess for her to clean up, and because he is a yuppie too.
Comment: I think the implication is less about the landlord being "in on the murders" and more about her callous disregard of them, lest her apartment lose value and/or prestige.  It's another small, but particularly disturbing, indictment of materialism in a movie that's full of them.
Comment: oh, interesting concept, that the realtor was IN on the murders and cleaned up the mess....  hmm....
Answer: I had never seen this movie until 2013, catching bits & pieces on HBO, then finally DVR'd the thing and watched it several times. One of the funniest movies ever and Christian Bale is brilliant. The main point: ALL the murders happen in his head.
Here's my interpretation (and, isn't that what it's all about?):

Several characters have actually seen Paul Allen in London;
The scene(s) when Patrick picks up the hooker in the limo; we never see his limo driver;
When he kills the hooker with a chainsaw in the stairwell at Paul Allen's apartment, she's banging on people's doors & Patrick is running thru the building with a live chainsaw
no one would have heard this?
No one would have discovered her body? The cop would not have investigated a dead hooker cut to pieces in a bloody stairwell at Paul Allen's apartment?
Wouldn't the cop have spoken to Patrick's limo driver at some point? (hint: there is no limo driver)
He shoots & kills a woman at an ATM, several police officers chase him, he shoots & kills them all, their car explodes in a giant fireball; he continues to shoot & kill a door/security man at an apt bldg & a cleaning guy. That's like 6 people in 5 minutes, and no one is ever on his trail. He calls his lawyer and confesses and no one believes him.

At this point, the movie has gotten very surreal, and you start thinking 'ok, this is all happeneing in his head'.
THEN we get to the missing bodies at Paul's apartment. The realtor did not 'clean it all up' as some speculate. None of it ever happened.
His lawyer says 'it is simply not possible'. Because there were no murders.
His final monologue he says "this confession has meant nothing".
Comment: The director has commented that the murders (at least some of them) were not imagined. The mysterious scene near the end with the real estate agent is subtle but highly suggestive that the murders were real. Notice how the agent's demeanor becomes extremely cold when she realizes Bateman doesn't have an appointment and is looking in the closet where the bodies were. She doesn't see him as a potential buyer. She wants him gone. Nothing is ever said about what happened to the bodies, but it suggests that the agent knew what happened and probably suspects that Bateman was the one who killed them.
Answer: I actually have never seen this film, but I've heard a lot about the book as well as the film adaptation and it is my understanding that there is a proposed question as to whether or not any of the events in the story really took place at all. I believe that Bateman is a proposed schizophrenic and being that the story follows according to his perspective, there is the possible mental projection of the crimes. This uncertainty of reality is probably the reason for the missing bodies.
See here
Answer: In my opinion, everything happened in his mind all and the acts of murder were fantasized and drawn out on paper.
When he killed the blonde hooker with the chainsaw (it was actually a metaphor of breaking up with his girl friend who is also blonde) the murder took place in his mind and was drawn out on the table at the restaurant during the break up.
I believe all of this was revealed at the end of the movie when his secretary went though his desk and found all the drawings in his daily planner. Every time he murders someone, it gets drawn out on paper. It never really happens, but he thinks it does.
So there aren't any bodies because there were no murders.
Answer: The author of the book and the director of the film are both clear that the murders are real not imaginary. As for the disappearing bodies...that's never made clear..and I think that adds to the mystery and makes you come to your own conclusions....but like I said, interviews with the director and author make it clear that the murders were real.
Comment: Can you link to any such interview.
Comment: See http://www.imdb.com/title/tt0144084/faq#.2.1.3
Comment: He was supposed to be rich spoiled kid. A logical explanation for various things was that his dad was protecting him. e.g. The Realtor and the Laywer were probably 'cleaners'.
Answer: Wikipedia states that the author deliberately left the reality of the murders open to interpretation. Didn't really double check the source for this but that is what is stated for the book. Which begs the question "Why is he constantly referred to as a serial killer by editors and book reviewers if its possible he didn't kill anyone."
Two other points.
He is schizophrenic which means he is quite susceptible to graphic and realistic delusions and as a previous person mentioned it could all be metaphor or allegory.
Lastly, at the end of the movie Christian Bale is desperately trying to convince his lawyer that Bateman is capable of and indeed did commit all the atrocities. However, the lawyer thinks that Christian Bales character is someone else and refers to Bateman in the third person as if they are talking about Bateman as if he is not there. This occurs several times in the movie and in the book, to intentionally make the viewer and the reader question the integrity of the narrator and his sanity.
Does Bateman have multiple personalities? Does he commit murders as someone else and get confused as to which are fantasies and which are real?
Is the cop who interviews him real? Willem Defoe's character has him on the ropes but lets him go. Why? The murdered Paul Allen was seen in London but it was mistaken identity according to Defoe's character. But the lawyer at the end says he had dinner with Paul Allen twice. Could it be that Bateman's character cant handle the reality of his crimes so he creates other fantasies to assuage his conscience that he didnt commit them.