How do I extract / retrieve the full link to a attachment file inside a InfoPath 2007 form?

Question: Suppose that a user have attached a Jack.jpg file as a attachment to a online InfoPath 2007 form, is there a way to retrieve or extract the full URL of this attachment file Jack.jpg?
Answer: If I haven't misunderstood your situation, the attachment files are stored as blob data inside the xml of the form, so there's no permanent URL for the image.
Answer: I think it will be stored as a Base64 encoded string inside the XML file.  I would suggest writing a custom .aspx page which takes a querystring parameter to identify the document that can retrieve the raw XML and convert the Base64 encoded attachment into binary and send it back to the browser.
Comment: Yip, correct answer. All Sharepoint content is stored within Content DBs. You have to do a response.write of the byte[] which represents the image/file


2001 Mercury Sable -- Rough Idle/High RPM and Transmission Leaks

Question: I have a 2001 Mercury Sable (24V DOHC V6) that has been having problems with its vacuum system. I live in Florida where the average temperature lately has been in the 80s.
I've been experiencing a very rough idle for roughly a month now that occasionally would stall the car. The car would start right back up with no issues and keeping my foot on the gas would stop the rough idle (Minimum ~1500 rpm).
I have since replaced the main PCV Valve elbow hose (not the valve itself, that's my next step) because it was collapsed. After doing that, my rough idle was almost gone outside of a jumping idle speed (between 600-1200 rpm) that would occasionally stall the car (easily started back up).
After that, I replaced my Idle Air Control valve which stopped the rough idle (save the occasional putt putt) but now my car would constantly run at a high idle (1600 rpm) and occasionally rebound back to normal idles which would sometimes cause the car to stall.
A few days ago the problems reached an all time high when my car dumped out all of its transmission fluid. I refilled the fluid (No leaks in two days???) and have since then only had the higher than normal rpm. I'm planning on replacing my transmission filter and gasket tonight since I suspect that is where the leak came from and I need it anyways per normal maintenance.
Does anyone have any ideas for me to try and fix next? My current plan is to do my transmission service and then swap out the actual PCV valve. I also have an issue where my vacuum operated AC switch (Controls which vents the air blows from) won't work and so my A/C will only blow from the defroster grid. This has been going on for years however and I don't think it is related.
I tried to be descriptive, please let me know if I've forgotten anything.
Answer: Book your car into a repair shop for a smoke test on your intake and exhaust systems. This will reveal any vacuum leaks. Also, do not under estimate the value of a scan on your engines systems.


How can you tell how many users Bitcoin has?

Question: Impossible to answer accurately, but I suppose one could come up with educated guesses and ballpark figures from the number of nodes on the network, or number of users on popular wallet services.
Comment: because any answer to this question will be out of date as soon as it's answered, it's a classic example of a question only relevant to a "specific moment in time." I suggest you edit it to be something more universal, like "How can you tell how many users Bitcoin has?" and a moderator will reopen it.
Comment: @Jeol - so why close preemtevly when you can just suggest edits or even edit.
Comment: I suppose the total number of receiving addresses is an upper bound for the user number (not a very tight one, though).
Comment: Updated with user count of r/bitcoin and Bitcointalk
Answer: Due to the nature of Bitcoin there is no precise answer to this question. However, this site displays some statistics on the number of nodes in the network over time: http://bitcoinstatus.rowit.co.uk/
Answer: Check out my answer to this question about geo data.
In fact, I would recommend creating one question about "How can you get statistics about Bitcoin users / clients" instead of asking about every different slicing of the data.
Is there data on the geographic distribution of bitcoin users?
http://www.reddit.com/r/bitcoin just crossed 10,000 users a few days ago (Sep 2012), to help you get some estimate.
https://bitcointalk.org/index.php?action=stats - Bitcointalk currently has 64,175 users.
Answer: The challenge is to merge different addresses that all correspond to the same user. Since bitcoin isn't quite as anonymous as it's cracked up to be, this isn't totally impossible to do.
One way to do it is to merge all addresses that contribute inputs to a single transaction. That's based on an assumption, but it's pretty reasonable one.
Another way: connect your computer to all other Bitcoin nodes. Whenever you see a transaction broadcast that you haven't seen before, log it and the IP it's coming from. Since you're connected to all nodes, that is the sender's IP (unless they're anonymizing with Tor or some such).
These approaches are used in a couple of papers:
http://anonymity-in-bitcoin.blogspot.com/2011/07/bitcoin-is-not-anonymous.html
http://eprint.iacr.org/2012/584.pdf
The estimates from those papers aren't totally current, but you could extrapolate. Ron and Shamir (2012) count 3,730,218 addresses and 2,460,814 "entities" (conservative estimate of users). So multiply current addresses by about 1.5 for a ballpark estimate.


Is it good to take a fianchettoed Bishop?

Question: I have faced this fairly often in quite a few openings, but there seems to be a theme with players putting their Bishop on a square like h6, supported by a queen and attacking the fianchettoed Bishop next to the castled King.
What are the ideas behind this? Is it something I should be bringing into my own gameplan and if so is taking the fianchettoed Bishop a good thing to do? It seems to me to be the only point in putting it there.
Comment: A highly relevant [reddit thread on the pros/cons of this](https://www.reddit.com/r/chess/comments/dw7sra/done_with_board_editor_this_happens_a_lot/?st=k2yr5kch&sh=d9a84bae) from last week.
Answer: There are two reasons for doing this and immediately taking the fianchettoed bishop is not one of them:

Provoke Black into playing BxB when you hope to follow up with Ng5, drive the f6 knight away and then mate on h7
Prevent black from playing h5 until you have been able to play h2-4-5 to pry open the
black king's position.

It can even be worth sacrificing the exchange with h5, Nxh5 Rxh5 to smash open the black citadel.
Comment: This seems like it only applies in cases where opposite castling has occurred. While the strategies you give certainly happen, most of the time Bh6 is played for the purpose of carrying out an exchange.
Answer: There are a few benefits behind exchanging off the fianchettoed bishop. For this example, I'll assume the stage is Black's kingside after ...g6 and ...Bg7 are played.

Weakening the surrounding squares. Without the fianchettoed bishop, the squares weakened by pushing the pawn (such as h6 and g7 when Black plays ...g6) are less protected.
Making the enemy king more vulnerable. Without the bishop, Black's castle is slightly compromised due to pushing ...g6 and having no piece on g7 to fill the gap.
Minimizing the opponent's influence along the long diagonal. A bishop on g7 often exerts strong pressure along the h8-a1 diagonal.

But there are also drawbacks behind doing the exchange for you:

It takes time. Often you must spend two whole tempi (e.g., Qd2, Bh6) to exchange bishops. In a time sensitive position, this may be a bad idea.
It's possible your bishop is better than your opponent's, which means exchanging actually favours them. For example, say you have a White bishop on e3 that is unobstructed along the c1-h6 and g1-a7 diagonals. Meanwhile, assume Black's g7-bishop is blocked in by a White pawn on e5. Here your bishop is clearly superior, so the benefits of exchanging off the fianchettoed bishop may not be worth it.
Comment: I gave both you and Brian an upvote. Both ideas are possible, but yours is much more common between stronger players.
Answer: As an additional note related to the idea of weakening squares around the king, it is only worth spending the tempi if the pawn adjacent to the "fianchetto triangle" is pushed. So, for example, if black fianchettoed its dark bishop and pushed the e pawn to e6 or e5, it's worth it to trade the bishop because the dark squares around black king are permanently weakened. On the other hand, if his pawns are e7-f7-g6-h7, that e pawn sitting on its original square, will normally compensate for the bishop's absence in dark-square protection duties.


How does Bane know that Batman is Bruce Wayne?

Question: In The Dark Knight Rises, when Catwoman (Selina) brings Batman to Bane's place, she trapped him in Bane's place, after a short while Bane came and called Batman by his real name, Bruce Wayne. I was stunned at that moment, because how did he know Batman's real name?
Comment: A more pertinent question is how everyone in Gotham City *doesn't* know. Gotham's First Son appears suddenly, back from the dead, at precisely the same time as a masked vigilante with a millionaire's resources appear on their streets. Some years later the same eccentric millionaire becomes a recluse... and Batman disappears from the streets. And *nobody* put two and two together?
Comment: Related: http://scifi.stackexchange.com/questions/20913/how-does-bane-know-bruce-is-the-batman
Comment: I think that it may have been because Bruce was a member of the League of Shadows. So was Bane and Talia. Also, @DrThaddeusVenture to everyone Bruce seemed like an arrogant spoiled businessman. What with the chaos, no one had time to put two and two together. People were either preoccupied with The Joker, or Raz Al Ghoul or the surprise of a vigilante OR they were too busy celebrating the accomplishment of peace.
Answer: Because Bane is working for Talia Al Ghul who is the daughter of Ra's Al Ghul who trained Bruce Wayne and helped him become Batman.
Comment: Explain: Talia was a child when she escaped the pit. Then she journeyed to find her father, who then rescued Bane out of the pit. Bane was excommunicated, and Talia then began hating her father. Only after this did Ra's train Wayne.
Answer: I believe that the existing theory that they were both in the League of Shadows doesn't hold water. They were members at different times and there's no evidence that the two ever crossed paths under Ra's al Ghul's roof. In addition, Bane was excommunicated before Bruce ever joined up.
However, Bane was trained by the same man; he learned the same lessons, many of which Bruce took to heart including the value of a symbol, the theatricality and the value of fear. As a result, many of the deceptions Batman employs (like the distracting charges when they first fight) have no effect on Bane (you see him simply standing there while the explosives go off around him).
I believe that the original intention was that Bane saw through the mask because Batman was simply another of these deceptions. He saw Bruce, he saw Batman, and could see through the distractions to the person underneath.
The disguise would fool a normal person but not someone who has been initiated into the league!
Answer: Bruce was trained at the League of Shadows by Ra's al Ghul.  Bruce Wayne being a member of the League was probably public knowledge, and Ra's most likely put together that Batman=Bruce Wayne since he used most of the same techniques the League used.  This knowledge was confrimed in Batman Begins.
Ra's probably didn't keep the relationship of Batman and Bruce Wayne a secret from the League, hence how Talia knew that Bruce Wayne was Batman.  This allowed her to infiltrate Wayne Enterprises without Wayne suspecting a thing.  Also, since Bane was a part of the League, he too knew of Wayne's "secret" identitiy.
Comment: I would add, however, I think Talia could have figured it out even without Ra's.  When you're as intelligent as an al Ghul, you probably can deduce it systematically.  I mean, John Blake was no genius and was able to put it together...Talia was orders of magnitude more cunning and had many more resources to boot.


What is a good WYSIWYG HTML Editor?

Question: I've used Dreamweaver (albeit CS3 so I am a few versions back), but I am disappointed with the amount of invalid markup it produces.  Are there other WYSIWYG editors out there that produce valid markup?
Comment: REAL webmasters use notepad (or vi if you're on *nix)!  ;)
Comment: Dreamweaver produces valid markup if you have it properly configured. It is the best desktop WYSIWYG tool in my opinion.
Comment: @justin obligatory XKCD link: http://xkcd.com/378/
Comment: @Justin Scott: you compare notepad and vi?? real webmasters use 'ed' on *nix.
Answer: If you want control over your code use the code view in Dreamweaver or just a plain text editor like Notepad++ on Windows, Textmate on Mac or Vim on *nix. The problem with WYSIWYG is that you don't have full control over the code you produce, allthough you are free too clean up afterwards offcourse.
Answer: Coda from the guys at Panic is a really nice Mac product.  You write the markup yourself and therefore retain complete control as you would with TextMate, Notepad2, etc.  But there is also a live preview you can see in a split screen so you can tell immediately what affect you are having on the page.  It's a nice "best of both worlds" solution.
Answer: A related question here: HTML validation: is it worth it?. I bring this up since you mentioned you're upset with the invalid markup. Markup semantics are more important than markup validity in my opinion, and generally this can only be done properly by a human – especially with all the new elements presented by HTML5.
Jeffery Zeldman recently posted an article about this very subject: An InDesign for HTML and CSS. Inspired by talk from certain people at Adobe, he posits that no WYSIWYG editor can create meaningful and semantic markup anymore than a computer program can compose meaningful and emotional music.
If you choose to stick with Dreamweaver and use its code view (which is what I used for quite a while, it's very good) you should consider upgrading to CS5. Adobe, given all the Flash hate, has gone to great lengths to improve the quality of the code that it generates. They have also created the HTML5 Pack.

This extension provides initial support for HTML5 and CSS3 in Adobe Dreamweaver CS5, and helps you easily create HTML5 pages and CSS3 styles. It also includes updates and WebKit improvements for Design View and Live View rendering.
While HTML5 and CSS3 will not be finalized for some time, the extension provides support for a set of currently-implemented features.
This extension enhances Dreamweaver CS5 in the following ways:

Introduces the Multiscreen Preview panel , allowing for Live View display on 3 different screen sizes, with Media Query support. (Window > Multiscreen Preview)
Adds code hinting for the HTML5 Tag Library with new tags, attributes, and properties.
Updates code hinting for new attributes and values in existing HTML tags.
Adds code hinting for the following CSS3 specifications: 2D/3D Transformations; Animations; Background and Border; Basic User Interface; Line Layout; Marquee; Media Queries; MultiColumn; Ruby; Text; and Transitions.
Updates Live View to support <video> and <audio>. (Requires Quicktime installation.)
Improved rendering for CSS3 in Live View.
Adds HTML5 starter layouts to the New Document Dialog box.
Offers better rendering for new tags in Design View.

Dreamweaver has been around much longer than most of its competitors, and is a solid program, and if you choose to stick with using the WYSIWYG editor you won't get much better out of any other apps.
Answer: I've used by jEdit and Eclipse because they worked into the rest of my development workflow well. jEdit's syntax highlighting, and ability to recognize a wide variety of text formats is very nice for quick review the strange things I tend have come my way.
I agree with others who have mentioned avoiding WYSIWYG editors. DW's latest versions do generate acceptable code most of the time, but when I use it I spend 95% of my time in the code view anyway.
Answer: I use Microsoft Visual Web Developer 2010 Express (free, including for commercial use) :)

What is a good WYSIWYG HTML Editor?


Where do ISO numbers come from?

Question: I understand how an ISO number affects the film sensitivity or a digital image, but I'm curious where did the numbers come from?  How come we talk about ISO 100, 200, 400, and so on instead of ISO 1, 2, 4 or some other arbitrary sequence of numbers that indicates the relative differences?
Answer: Let's start with a magical history tour: when the the system we've inherited as linear ISO speed designations (the former ASA speeds) was developed, 25-speed film was pretty cutting-edge, high-speed stuff. Kodak's Panatomic X (the "X" was for "extra high speed" -- and it was ASA 160) was still the stuff of science fiction. There were at least two 25-speed films (and one that was slower than 25 when exposed and developed for continuous tone) on the market at the tail end of the Age of Silver, all from Kodak: Ektar 25 (later sold under the name Kodacolor Royal Gold 25), Kodachrome 25 and Kodak Technical Pan, which was generally shot at 16 or 20 for continuous tone black and white. A scale based on multiples of 100 might seem arbitrary, but what you're seeing is the tail end of a lot of technological advancement. It would not have been unheard of to use a film with a speed of 6 in the early days.
The speed of a film was determined by a standard process. The film was exposed to a scene with a known luminance range, then developed (in a standard developing chemical at a standard dilution for a standard amount of time at a standard temperature) to attain a standard contrast (density) range on the negative or transparency. That, of course, meant exposing the film for different lengths of times and at different apertures so that the developed image would eventually fall into the standard contrast range.
The contrast curve of the film was then examined to determine the amount of light required to make the minimum visible contrast difference between unexposed film (the fog density) and the darkest dark that was actually recorded. It is that amount of light (or, rather, the inverse of that amount -- 1/amount) measured in now-obsolete non-metric units, that determined the film's speed.
The process hasn't changed a lot. The calculations (for film) now involve a lot of conversion constants so that measurements made using current standard units closely match the speeds that would have been calculated using the older methodologies. You can't just obsolete all of the existing cameras and light meters on a whim, you know. And the results are rounded to the nearest standard film speed (based on the familiar 1/3 stop scale -- 100, 125, 160, 200, 250, 320,...).
Digital "film speeds" are calculated to adjust which data are used from the recorded data set, and match the exposure values (aperture and shutter speed) that you would have used had you been using film of that speed. The camera may do all kinds of mathematical trickery to increase or reduce the apparent contrast range when producing a JPEG to give a particular character to their "film", and may (depending on the camera) do a bit of analogue amplifying and bit-shifting in producing "raw" output as well.
I hope this comes close enough for government work -- I'd really prefer to avoid posting a bunch of graphs and equations if I can.
Comment: It's from the units in use to measure the light. The numbers are exactly 1/x in the original units, rounded to the nearest integer, for the very early low-speed films (single digit speeds). Standard speeds were one-third stop extensions from those values as the size of the numbers increased -- a film that measured at 130 would be rounded down to 125.
Comment: Awesome answer. It's great to have people with such a wealth of knowledge around here!   Thanks, @Stan.
Comment: Those are the units used *now*, but note that there is now a 0.8 as the "reciprocal" numerator rather than 1 (as it once was). I remember some oddness to do with foot-lamberts on the standard target, but don't hold me to it.
Comment: Great answer. @Stan - after spending some time on the site, I'm always delighted to come across any of your answers - there's a poetry to them that elevates them above 'just the facts'. Keep up the good work
Comment: That's very interesting, but I'm still unclear on the precise answer to the question. Why were early film speeds 6, and not 60? Was it entirely arbitrary (e.g. in log scales like decibels or the richter scale, 0 is often set to an arbitrary point), or is there a principled meaning behind the number (e.g. a ratio)?
Comment: From reading the Wikipedia articles and references, I think the units are actually lux seconds, which are a standard SI unit.
Answer: I think it's a case of inflation. Apparently original Kodachrome has an ISO (or, ASA, the older standard from which the current one is derived) value of 6. Yeah, 6. So it started out with a very small rational series of integers, and now we just happen to be at an era in technology where the baseline is in the triple digits.
There's another standard, the ISO log scale, which was taken from the German "DIN" scale, and that one counts by third-stops, so ISO 100 is 21°, ISO 200 is 24°, ISO 400 is 27°, and so on. Also somewhat arbitrary, but inflation is less of a problem — ISO 102,400 is just 51°.
On a tangentially-related note, it's really time to drop the false precision, as we already do with shutter speeds and with f-stops. We don't say f/11.3137, and instead of "ISO 25,600" we should just say "ISO 25,000", maybe written "ISO 25k". (And 50k, 100k, etc.)
Comment: But the difference between ISO 25,600 and ISO 25k is less than 3.4% of a stop. That's going to be overwhelmed by other factors. It's truly false precision.
Comment: Actually I wish we did have consistent precision. Both shutter-speed and aperture stops are rounded without consistency and whenever it comes to implementing exposure-related tools, I always have to map convenient numbers to actual numbers before computing anything. Well, I do understand that from a photographer's perspective, this may not be relevant.
Answer: Technically, calling these numbers 'ISO numbers' in the context of digital cameras is wrong.
The ISO (and DIN and ASA) standards for film sensitivity can't be applied to digital sensors as they're bound to the physical medium of photosensitive film.
Correctly, these numbers should be called EI (for Exposure Index). They're also not applied quite consistently between camera manufacturers (or even camera models for a manufacturer) and don't quite match up with the actual ISO sensitivity for photographic film (iow, they're just an indication).
If it weren't for over 100 years of history of photographers haven gotten utterly familiar with the ISO, ASA, and DIN standards, a new system of numbers for EI might well have been adopted as you suggest as logical.
But we're a conservative bunch (why do you think we still want cameras to look like they did in 1950? It's not just because the ergonomics work so well) and asking us all to leave our old familiar systems behind isn't going to make you many friends.

Where do ISO numbers come from?


Percentage of carbon in stainless steel to avoid brittleness

Question: What is the maximum percentage of carbon allowed in stainless steel 202 so that it does not cause brittleness?
Answer: All  standardised grades of alloys have definite limits of composition.
If its common, then a quick search will find it. 0.15% is the specified limit for SS202.
http://www.azom.com/article.aspx?ArticleID=8209
Whether its brittle or not depends on what you mean by brittle and its thermal processing. Its a martensitic stainless steel so note the details in azom and that it will be more brittle when hardened as described.
Answer: The specified maximum carbon content in stainless steel 202 is 0.15 %.
Comment: Could you back up your claims with a reference?
Comment: http://www.azom.com/article.aspx?ArticleID=8209
Answer: Type AISI 202 stainless is very tough regardless of carbon content ( in specification). It is an austenitic stainless with roughly half the nickel replaced by manganese. It becomes stronger with less ductility when it is cold worked , regardless of carbon . As an austenitic , it can not be hardened by heat-treatment. It is relatively uncommon so little data is available: However, the mechanical properties of 202 are similar to AISI 301 , a much more common grade.
Answer: Depends on the environment and mechanical stress (+ speed etc.)
The brittleness of a piece of steel highly depends on it's composition (<10% Cr can make it super brittle, too) it's 'temperature history' (e.g. hardened, welded) and the temperature where it is exposed.
So this is found in table-works. You start with the temperature of your environment: (for details see charpy impact test)

Note that transition temperature. I guess, that's the line, your question refers to. So now you look up the table-works and find an adequate composition for your steel.
An example:
room temperature, welded/hardened → less than 0,25 % C (e.g. S235) are always fine; 0,25…0,5 % may work too
not welded/hardened → the same steel (0,25…0,5 C) can be ductile until -50°C
I couldn't find a reference in a quick search, but up to 0,8 % C shall be fine for most things you have in mind.


What are high frequencies and low frequencies in a signal?

Question: I'm new to signal processing. I'm plotting a signal in the time-domain in matlab. I don't understand which parts of the signal are high frequencies and low frequencies, can someone explain what a high and low frequency is, and how to see high frequencies and low frequencies on a graph?
Comment: Broadly speaking, yes, the FFT will reveal the frequency content, but be aware that there are many niggling details that can trip up the neophyte.  It is quite easy to get answers that are misleading by not applying the FFT properly.
Comment: Read about FFT in MATLAB.  You cannot _always_ "see" the high and low frequencies by plotting the signal in the time domain, though in a few toy examples, the results would be obvious enough.
Comment: so if i plot using fft i would be able to easily see what frequencies occur more often and the ones that occur the most are the ones that have a higher frequency, right?
Comment: high frequency for human speech is 3000Hz and low frequency for human speech is 300Hz.can u give some ideas about what are the difference between general and specific purpose for Ic741??
Answer: The high frequencies contribute to the fast varying parts of the signal(the sharp transitions),
while the low frequencies contribute to the slow variations of the signal in the time domain.
You might want to take a look over here:
http://cns-alumni.bu.edu/~slehar/fourier/fourier.html
Also, if you have the time you might want to take a look at this online course:
http://academicearth.org/courses/the-fourier-transform-and-its-applications
You won't regret it.
Answer: High and low frequencies are dependent on the application. A low frequency for wifi would be 2.4GHz, while a high frequency would be 5GHz. For human speech a low frequency is 300Hz, while a high frequency is 3000Hz.
A graph of a fft (Fast Fourier Transform) allows us to visualize different frequencies. This example is adapted from Matlab's fft help. The following figure shows the first 100 out of $2^{20}$ samples of a time signal with two frequencies. Note how it is difficult to see the 1Hz component in this figure.

To see the frequency content we plot the spectrum as show in the following figure. Here we can clearly see the two frequencies - one at 1Hz and the other at 50Hz.

Here is the code I used to generate these plots.
<code>fs = 2^10;        %sample frequency in Hz
T  = 1/fs;        %sample period in s
L  = 2^20;        %signal length
t  = (0:L-1) * T; %time vector

A1 = 0.2; %amplitude of x1 (first signal)
A2 = 1.0; %amplitude of x2 (second signal)
f1 = 1;   %frequency of x1
f2 = 50;  %frequency of x2

x1 = A1*sin(2*pi*f1 * t); %sinusoid 1
x2 = A2*sin(2*pi*f2 * t); %sinusoid 2
y  = x1 + x2;

%Plot signal
figure;
set(gcf,'Color','w'); %Make the figure background white
plot(fs*t(1:100), y(1:100));
set(gca,'Box','off'); %Axes on left and bottom only
str = sprintf('Signal with %dHz and %dHz components',f1,f2);
title(str);
xlabel('time (milliseconds)');
ylabel('Amplitude');

%Calculate spectrum
Y = fft(y)/L;
ampY = 2*abs(Y(1:L/2+1));
f = fs/2*linspace(0,1,L/2+1);
i = L/fs * (max(f1,f2)) + 1; %show only part of the spectrum

%Plot spectrum.
figure;
set(gcf,'Color','w');  %Make the figure background white
plot(f(1:i), ampY(1:i));
set(gca,'Box','off');  %Axes on left and bottom only
title('Single-Sided Amplitude Spectrum of y(t)');
xlabel('Frequency (Hz)');
ylabel('|Y(f)|');
</code>
Comment: It *is* OK to "look" at the spectrum of a signal not periodic in the transform aperture.  Windowing is information lossy.  There are sometimes other ways of dealing with the various artifacts.
Comment: Good explanation, but I feel it's a little unfair to say that you can observe the 1 Hz component in the transform but not in the time domain. If you looked at a few seconds (or even 1 second) of `y` in the time domain the wander would show up. I'd also recommend a window on the FFT, just so others who come across this example don't get the wrong idea.
Comment: @mtrw: I agree. If I show more of the signal in the time domain, seeing that there is more than one frequency would be easier. As far as windowing, I'm not sure I understand of which wrong idea you are thinking. There are lots :-)
Comment: How about the wrong idea that it's ok to look at a spectrum of a signal that's not periodic in the transform frame if you didn't apply a window first?
Answer: It really depends on what kind of time-domain signal at which you are looking, and how you are looking at it.  Sometimes it's easy to see.  Sometimes it is not.
If you are plotting something like amplitude (voltage, pressure, height, etc.) against time, and you see lots of up and down action in a relatively short distance, those may be due to higher frequency spectral content.   If you see some up and down trends over a much larger span those may represent some lower frequencies.  The two may be mixed (added or summed) together over the same span. If you see repeated repetitions of a waveform, that may represent it's own kind of frequency.  Of course this all depends on picking a time scale factor relative to the contextual meaning of your "high" and "low".  You may need to play with the scale factors to see something of interest.
An FFT may or may not be useful, and might even be wildly misleading.  The FFT is more about spectral content in a given aperture width than either high or low frequencies in a signal.  For instance it's possible for a sharp-edged low frequency periodic signal to show lot of high frequency content in an FFT, even for a very low frequency of repitition of the actual signal phenomena.  People looking for musical pitch too often mistake the two.  And FFTs of slices of a longer signal which is absolutely not periodic in the FFT aperture width will misleadingly show up as periodic frequencies in a naive interpretation of the FFT results.


Are exercise bikes on topic?

Question: There was a recent question about exercise bikes.
Do we consider these on topic or not? They don't really share much with a conventional bicycle.
Answer: There is a tag stationary-bike: only seven questions so far, but some of them have thousands of views.  The question you linked to is missing this tag, and possibly there are more exercise-bike questions that are not tagged correctly.
Most of such questions have been well received. After all, it's the audience that counts most, not the technical characteristics of the device. And the audiences overlap. Sure, real bicycling is very different and a lot more fun, but where I live, doing it outside in winter is a serious adventure...
My suggestion: add a synonym [exercise-bike] for [stationary-bike], to increase the tagging accuracy. Those who are really not interested in anything stationary can ignore the tag.
Answer: I vote: yes.
There's a spectrum of "ride bike without moving" options, from rollers that a regular bike rides in place on, to trainers that a regular bike is bolted into, to dedicated bicycle-style exercise machines that have a lot in common with bicycles, to dedicated bicycle-style exercise machines that don't have much in common with actual bicycles.
If an exercise bike has standard bicycle pedals, a normal bicycle chain, can mount a regular bicycle seat, etc, then this is definitely the place to ask.
I don't think we can reasonably try to draw some line in the middle of the exercise bike spectrum and expect anybody to understand it.
Probably don't want to allow exercise devices that don't have pedals that you move in a circle or otherwise just don't resemble a bike (ellipticals, treadmills, etc etc)
Answer: The exercise bike I used to have was belt driven, and had a magnetic resistance wheel in the back.  So it was similar to normal bike tech.   Take each case as it comes, I think.

Are exercise bikes on topic?


Where did Hitler get the funds to invest in economic development programs such as the autobahn when the German economy was in a depression?

Question: Where did Hitler get the funds to invest in economic revitalization programs such as the autobahn and weapons' production when the German economy was in a depression?
Comment: He didn't, he did the national equivalent of using one credit card to pay off another.
Comment: @Semaphore too bad the SE users frown on one-line answers.
Comment: The same way every state ever pays for their stuff despite having too little money. (How could the US finance their wars during the 2007+X financial crisis?)
Comment: @Mindwin Well, that's why it was a comment :p
Comment: Forced labour. It's amazing what you can achieve if you don't pay your employees properly.
Comment: Or, in this case, at all.
Answer: The funds for the Autobahn project came from the Reinhardt Program, a credit finance scheme originated by Kurt von Schleicher. The contractors who built the highways were paid not in Reichsmark, but with debentures issued by the Reich Finance Ministry which could be redeemed at a discount at certain banks that formed a work creation consortium. These banks, in turn, could redeem the credits with the Reichsbank. The Reichsbank, which collected pools of these instruments, was promised that they would be honored by the Reich Finance Ministry on a fixed schedule guaranteed by taxes.
So, in essence, the Autobahn was financed with a sort of a bond.
The first Reinhardt Program which was used for the initial finance of the Autobahn had only a limited amount credits issued under it. In 1934, further work creation projects were instituted under a second Reinhardt program. In this program, the credits were generated the same way, but instead of delivering them to the contractors, they were just paid directly as Reichsmarks. Also, the program was reduced to just being a subsidy to private investment, not full financing. The Reich Finance Ministry (RFM) was still responsible for reimbursing the Reichsbank for the amounts incurred.
You also asked about armaments. Financing re-armament was not considered "economic revitalization" by the German leaders. Unlike the two Reinhardt programs, which were highly publicized and involved popular participation, the rearmament financing was undertaken relatively quietly, almost secretely. To fund rearmament, they adopted the same basic scheme from the first Reinhardt program: a controlling agency issued bonds, these bonds were delivered to the industrialists as payment, the Reichsbank redeemed the bonds, and the government promised to reimburse the Reichsbank on a fixed schedule from tax proceeds.
The agency used in this case was not a government agency, as in the Reinhardt program, but a newly created shadow entity called Metallurgische Forschungsgesellschaft (Mefo or MEFO) which was capitalized by the several large industrial concerns, such as the Krupp steel works, that stood to benefit by it. Contractors were paid in Mefo bills which could be cashed in with the Reichsbank at any time, but were often held because they paid interest.
Further information on the economy of Germany during the 1933-1938 period can be found in the books "The Wages of Destruction" by Adam Tooze, "Hitler's Economy: Nazi Work Creation Programs, 1933-1936" by Dan Silverman and "War and Economy in the Third Reich" by R.J. Overy.
Comment: @Heisenberg I've heard the guy could talk - convinced a lot of people of some fairly significant things, led to a bunch of people dying rather horrific deaths, and still some people thought he was a great guy - ah the power of words...
Comment: Could you elaborate on why the contractors go along with such plan? The fundamental question that was raised is "How did Hitler create something (the autobahn) out of nothing (no money)?". The current answer states that it's funded by bond, but that only raises the same question: "How did Hitler create something (trust that the bonds have values) out of nothing?"
Comment: @Heisenberg The government provides guarantees (and, but that's just incidental, a motorway program is a sensible investment). It will still be there in 10 years time and it has multiple way to obtain money (raising taxes, assets). That's not nothing, that's exactly what the banks miss to connect money they need to put somewhere and investments in an era of uncertainty.
Comment: The opposite view is predicated on the assumption that creditors can be arbitrarily demanding and just sit on their money but that's not true. When the stock market collapses, private investment are risky, etc. they are desperate for some place to put their money. (Which is not to say the nazis fully understood this or did it in the best possible way but the point is that banks do potentially get something out of it.)
Comment: ...each hop of which was likely rife with corruption. This has a distinct resemblance to the [early history of Volkswagen](https://en.wikipedia.org/wiki/Volkswagen#1937.E2.80.931945:_People.27s_Car_project) under the Nazis.
Comment: Do you know how much credit the banks ever redeemed given that Germany had some..... issues in the 1940s?
Comment: @DavidGrinberg The banks redeemed the bills immediately. In other words the contractors simply had to deliver them to the right bank to get Deutschmarks. The big question is whether the RFM paid back the Deutschbank according to the required schedule. That I do not know.
Answer: Actually, both the building of the Autobahn and the (somewhat more conservative but still loan-based) initiatives for their financing predate the 1933-onward reign of the NSDAP. They merely continued what others had begun.
And the funds were not that impressive either; in 1935 they amounted to only 4% of government spending. Rebuilding the military, by comparison, got 24%.
But Tyler was on the right track; the Hitler administration got a large part of their funds from uncovered bills. That they were, in fact, uncovered, was hidden by a variety of schemes.
The most prominent of these schemes (accounting for over 30% of their military spending) were Mefo bills, a promissory note. The dummy company MEFO, which only had one million RM of own capital, would pass out these bills as payment for contractors. They were formally redeemable by the Reichsbank after five years, and came with a healthy 4% interest so there was reason to hold them. Plus, banks could hide them in their balances, so shareholders would not be aware of how indebted everyone actually was.
(By 1938, the total amount of Mefo-bills amounted to ~12 (short) billion RM...)
The Autobahn, however, was to a (very) large part financed by forcing the unemployment insurance to loan their funds to the government at very low interest. Eventually this amounted to well over 3 (short) billion RM.
Once the war started, German banks were effectively put under control of the government, at which point the whole thing was moot anyway.
Comment: @TylerDurden: That's the thing with a government finanzing X by Y. In the end, they are financing a *sum* of X's by a *sum* of Y's. Ring-fenced counterfinancing is a myth, IMHO, and the Mefo-bills are the largest (and most well-documented) tool of 3rd Reich financing. I did a bit more digging though: Most of the money actually came from the funds of the unemployment insurance, which had to provide low-interest loans of over 3 (short) billion (!) RM. Increasing mineral oil tax did another (much smaller) part. I'll edit my answer.
Comment: @TylerDurden: Besides, the question asked about programs *such as* the Autobahn (which I missed myself until right now), so I think mentioning the Mefo bills is quote on-topic.
Comment: The construction of the Autobahn was not financed with Mefo bills. It was financed, as I said, by credits issued by the Reich Finance Ministry (the RFM), a completely different organization than the one that issued Mefo bills.
Answer: Wow, great answers by @Tyler and @DevSolar so far. One more point to add

Once the war started, German banks were effectively put under control of the government, at which point the whole thing was moot anyway.

Not only the banks.
As of The Vampire Economy - Doing Business Under Fascism, the people who bought the bonds were not totally free to do so anyways. The author says that, essentially, this was not a free market anymore, with

no free acess to base materials for production,
no free acess to international markets,
no free acess to local finance options.

As an example (page 11):

Herr V. [one of the largest landowners in Eastern Prussia] learned
  only through bitter experience that there was no longer any court or
  official to protect him, and he began to fear that his estates might
  be expropriated. He visited his former banker, Herr Z., to whom he
  confessed:

I want to invest my liquid funds in a way which is safe, where they
    can't be touched by the State or the Party. In the old days I always
    refused to speculate, to buy stocks. Now I would not mind. However, I
    would like best to buy a farm in South-West Africa. Perhaps my next
    crop will be a failure and I will be blamed, accused of "sabotage,"
    and replaced in the management of my estates by a Party ad-
    ministrator. I want to be prepared for such a contingency and have a
    place to go should the Party decide to take away my property.

The banker was compelled to inform his landowner friend that there was
  no such way out. The State would not allow him to leave Germany with
  more than ten marks. South-West Africa was closed to him; he would
  have to stay where he was.
Answer: MEFO was already mentioned, but the most important point is missing: Hitler was a project of the German "Elites", as Hitler laid out his plans to go to war very early - first of all in Mein Kampf, then in his speech before the "Industrieclub" in Düsseldorf. Hitler of course also promised to get them rid of the communists and the labour unions, which he did. He also persecuted the Jews, who often had to sell their assets below market value to German companies ("Aryanization"). This eliminated competition and brought opportunities to gain cheap assets. They had no reason to distrust their own scheme.
Without WW II, this scheme would have collapsed eventually - but even this would not have been too big a problem for the big corporation - the tanks they made had already been paid.
War of course averted this, as Germany could simply plunder the countries she had conquered, as well as to force people into slave labour, which benefitted the industry as well.
Comment: This seems to be talking about Hitler's policies in general without really answer the question of where the funds came from.
Comment: As I said: DevSolar already explained where the funds came from. But the question is why it worked. If Greece would try the same, it would not work, as no one would accept greek MEFO bills. The German industry was part of the plan, and just hoped that Germany would go to war before going bankrupt.
Answer: You all danced around the smoke and mirrors of fiat currency and fractional banking. Repayment was promised based on the captured regional natural resources in each country the Nazis invaded and everything of value stolen from anyone in those countries as well as the valuables and assets of the Jews they dispossessed in Germany, including those of the Rothschild Bank.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


How to move question with no activity to another SE site?

Question: I posted a question on this site due to its technical scope, but I think it might be more suitable for the Ask Different site. How do I move the question?
Answer: If you think a question would be more appropriate on another Stack Exchange site, and you've read the other site's help center to ensure it's on-topic, you can flag your post for moderator attention and select the "other" reason, then ask for it to be migrated. Note that posts older than 60 days cannot be migrated, even by moderators.
Edit: It appears that you did flag previously. The moderator who responded to your flag left the following response to the flag:

it's your choice, the question is on topic here, but if you don't get an answer, you can delete and re-ask or we can migrate it

To view responses to your flags, you can go to your user profile, and click the number next to "helpful flags". Yours is here.
Since you appear to still want this migrated, I'll do the migration for you.
Comment: Already did. No response for a couple of days. How long should I expect to wait?
Comment: @pattern86 see edited response
Comment: Thanks for the info about flag responses. This is the first time I've flagged with an expectation of a response, and I did not understand how that worked. It's a shame that responses to flags don't appear in my inbox. I would have expected to be notified of the response that way. Am I missing some setting that allows inbox notifications for responses to flags?
Comment: @pattern86 unfortunately there's no way to do that. There are various feature requests for putting flag messages in users' inboxes.
Comment: Thanks, again, for the help today.
Comment: @pattern86 no problem!
Comment: Devs can migrate questions *even if they are older than 60 days*. This was done as part of the MSO-MSE split (migrating old SO-specific questions from the old MSO, now MSE, to the *new* MSO). Do mods sometimes ask devs to do such?
Comment: @damryfbfnetsi I've yet to see a situation outside of the MSE/MSO split that warranted having a dev migrate an old post.


Workflow issues with submitting SharePoint Email

Question: I am a novice sharepoint user and I have worked on a team that has created a sharepoint list that we are using to process requests.  We have a built-in workflow that is designed to send users an email when the infopath form that is connected to the sharepoint list is submitted.  However, the email that was built into the workflow is not longer being submitted to users. It worked fine when we were testing it, but something has changed.  The security for this form is relatively open so someone could have change the settings, but I am not aware of how to see if there were changes made. Does anyone have any idea why a workflow would not execute properly?  Thanks!
Comment: Do you know how to check the security settings for the form?
Answer: The first thing to do is to check whether the email is actually being sent. Go to your Exchange server and enable queue logging to track mail passing through the system. Next, fill out the form to send to a known account you have access to and click submit. Go back to the Exchange server and check the queue log. If your email arrives in the next minute or two (depending on your farm topology) then congratulations your form are workflow are fine and you have a mail server problem.
If it turns out that your workflow is to blame then your first point of call should be
Infopath Designer to check the submit button which should have some embedded logic to cause the workflow to run. If this is correct then open Sharepoint Designer and check that the workflow itself is set up correctly.
Comment: Ok, I think I see what you are referencing regarding the submit button.  Let me clarify myself.  The data is correctly be sent to a sharepoint list.  However, when the submit button is pressed this also triggers a workflow to send a generic email to the user that submitted the request.  The generic email is the action that is not occurring.  Thanks for all of your helpful feedback thus far.
Comment: What version of SahrePoint are you running?
Comment: I believe it is SP 2010
Comment: JonT, we just realized that some users are receiving the email receipt that is triggered upon submission, while others are not.  So we are beginning to suspect that this could be a security issue?  Do you think I am correct in my assertion?  What are your thoughts?
Comment: Very possibly. At the very least you do now know that your workflow and form work correctly.

If I were you, my next move would be to start building a list of who can and can't receive the emails and check it against the membership of user groups of your sharepoint site collections.
Answer: Find the library where the form is saved at, click on the "DOWN" arrow next to its name to open the drop-down menu and then click Send To -> Download a Copy. Now you will have a copy of your form on your computer. Open it in Infopath Designer to edit it. In the right-hand side you will have access to all the fields. See what email address the "Submit" button has listed.
Comment: Hi RockonRockOut:  I am not quite sure I am following, the submit button is not linked to an email address at all.  The email is triggered by pressing the submit button.  But the email address is located in workflow designed within the workflow.
Comment: Do you know what kind of workflow it is? They all have different settings. You can see that by going to
List Settings/Library Settings and then clicking the "Workflow Settings" link.
Comment: Please see my response to JonT above, thanks for all of your help.


How to fix my Dlink wifi issue?

Question: I am using D-Link modem DSL-2750U model. Recently I faced some issue with wi-fi connectivity. When I am using wi-fi after sometime the led light on modem will go off as well as sometimes my Internet light also goes off. Ultimately I am not able to use the internet. To fix the problem I always used to restart the modem after few minutes and it get starts but the same problem persist. I am not sure what's going on. Please advise if I need to replace the device. This is 8 months old so I still have 4 more months to use the warranty.
Answer: If its still in warranty, I would just get a new one.
Do you have more than one device that connects to it? Are they all having the same problems? If not, then it might be something wrong with your computer, perhaps a firewall or network configuration issue.
Getting simpler, if the modem itself isn't getting internet, that might be a wiring issue. These can be tricky, but you can sometimes call the internet company and they'll be able to check if the signals are right going to your port.

How to fix my Dlink wifi issue?


What would be the lift formula for straight wings?

Question: I have been trying to estimate the lift calculation for a straight wing. The previous project I worked on was a swept wing. But this is a straight wing. I would like to to get the stall speed so I need the Clmax formula. What would the lift formula for this type of wing be?
Comment: Change the cos$\varphi$ terms to 1 and the sin$\varphi$ terms to 0. Then the method for swept wings works for a straight one.
Answer: Regardless of the geometrical shape of the wing, you need to know the wing area to determine the lift force as it is one of the factors that affect lift.
Calculate lift using this formula: $$Lift = \frac{1}{2} (C_L * P * S * V^2)$$.

$C_L$: coefficient of lift
$P$: density of air
$S$: surface area of the wing
$V$: velocity of air
Answer: Yo have the lift given by :
$$ Lift = \frac{1}{2}\rho S V^2CL $$
The linear part of the lift curve can be approximated by formulae coming from the lifting-line theory :
$$CL = \frac{dCL}{dAoA}\left(AoA-AoA_0\right)$$
With the lift slope given by :
$$\frac{dCL}{dAoA} =\frac{2\pi}{\sqrt{1-M^2+\left(\frac{2}{AR}\right)^2}+\frac{2}{AR}} $$
Still you cannot compute the $CL_{max}$ from this and this stands for a straight low aspect ratio wing in the subsonic domain.
If the overall span of your wing is $2b$ and the chord is $c$ you have :

The wing surface : $$S=2bc$$
Its aspect ratio : $$AR = \frac{(2b)^2}{S}=\frac{4c}{b}$$

For the zero-lift angle of attack ($AoA_0$) it's approximately the one of the 2D-wing section if the wing is untwisted and if the wing section has a constant shape.


Differential of the exponential

Question: Let $M$ be a riemannian manifold, and $\exp_p:B_0(\epsilon)\subset T_pM \to M$ be the exponential map. How to evaluate $d(\exp_p)_vv?$
Answer: I assume that you, in $T_pM$, identify $v$ in the origin with $v$ in $T_vT_p M$.
Then it's just the tangent to the geodesic starting in $p$ with initial vector $v$ at time $t=1$. This should follow more or less directly from the definition of $\exp_p$ -- you only need a curve passing through that point for which you can calculate the tangent, and said geodesic is the best canditate.
(The question is more difficult for $d(\exp_p)_v w$ if $w\neq v$, to caluclate that you need to study Jacobi fields with initial value $w$, if I recall correctly.)
Edit (adding a reference): This fact is also known as the Gauss Lemma, a reference would be Lemma 1.9.1 in Klingenbergs 'Riemannian Geometry', 2nd edition, de Gruyter. The remark about Jacobi fields is discussed in chapter 1.12 of that book.
As a further note, this fact is needed to prove the standard so called comparison theorems in Riemannian geometry, so any textbook adressing these will discuss this topic.
Comment: That was I did, but I was not sure... I defined $\alpha(t)=v+tv$ and compute $\frac{d\exp_p(\alpha(t))}{dt}$ in $t=0$
Comment: @Jr.  I added a reference where you can look up a detailed proof.
Comment: I'm using Do Carmo's book Riemannian Geometry, in the demonstration of Gauss lemma he assumes that you know the answer for the above question.By the way, I've alredy read the chapter of jacobi fields, so take a jacobian field with $J(0)=0$ and $J'(0)=w$ then $J(1)=d(\exp_p)_v w$

Differential of the exponential


How can I download an APK file from the Play Store?

Question: I can't download apps from the Play Store on my Android device (maybe due to a network issue), so I'm wondering how could I download the APK file of an app on my PC from http://play.google.com/store?
Comment: Related: [Download purchased APK from play store](http://android.stackexchange.com/q/122280/16575). [My answer there](http://android.stackexchange.com/a/122286/16575) definitely works for "free" apps :)
Comment: Why don't you try Android-x86 project? http://www.android-x86.org/download
Comment: Sorry, I should've checked this before commenting first time. It appears that there is no official Play Store support for Android-x86. http://www.android-x86.org/documents/apphowto
Comment: You could try using an APK host like F-Droid or apk4fun
Answer: There is no easy way to download an APK file. However, redphoenix89 has found a way to download the APK with a Chrome extension. bexton did some cleanups and the result including a guide is available:

http://forum.xda-developers.com/showthread.php?t=1809458

The guide mentions that you need to disable SSL warnings, but I could download APKs even without disabling SSL warnings (Chromium 21.0.1180.81 on Linux) An updated version that works with Chromium 23 is available on https://github.com/Lekensteyn/apk-downloader.
After installation and configuration, there will be a new button in the location bar for the Android Market as can be seen below. It even works if you are not logged in on the page itself since you have entered your credentials in the APK Downloader options screen.

The Chromium extension is completely open-source (in the sense that you can unzip it and check the Javascript files) and I have not found anything suspicious.
Also note the note on the end of the guide:

Legal Note / Disclaimer
Finally, please note that the use of this Chrome extension is violating Google's Play Store TOS! You've been warned.
Comment: It doesn't work on my latest chrome version 24.xxx any idea why?
Comment: @SisirKantiAdhikari 23> broke this extension, for a fixed version, see https://github.com/Lekensteyn/apk-downloader
Comment: @SisirKantiAdhikari [define "does not work"](http://www.catb.org/esr/faqs/smart-questions.html). If you get *ERROR: - Please disable SSL error warnings - Check your account information ( email and device ID )*, then try removing your account and add it again. This works for me.
Comment: Did all that couple of times. Not much details on the error. It says "Error : cannot download this app". BTW: ssl warning is disabled.
Comment: Is it a paid app? For support questions please post to the linked thread.
Comment: @SisirKantiAdhikari  APK Downloader v1.4.0 released 19/12/12     http://apps.evozi.com/apk-downloader/
Comment: I sold my android. So what do I put for Android Device ID?
Comment: @mikethedj4 A Google Play account is required, so you need to get is somewhere (friends phone, other phone or even emulator (with some tricks)). Getting the ID is out of the scope for this extension.
Answer: I spent a decent amount of time trying to figure this out because I don't feel like having the "google experience" and as far as I can tell, it isn't possible. I've worked around it:
The F-Droid repository and Amazon Appstore are both reasonably well maintained -- either will manage any apps you install, which is handy.  That's where I start.
Otherwise, I track down and download the .apk outside of the google-run market. In many cases the Android market will point you to a developer's web page and contact information -- if they don't publish the .apk on their web page, you can always ask for it.
Two answers worth checking out:
Where can I find open source Android apps?
What are the alternative Android app markets?
PS. Don't forget: to install apps from .apk you have to turn on unknown sources (Settings > Applications > Unknown sources).
PPS. Once you have the .apk on your computer you know you need to turn on USB Debugging so you can copy the .apk to your phone, right? Settings > Applications > Development > USB debugging
Comment: USB debugging is not needed to install the apk unless you are using ADB to push it to the device. Otherwise, you can turn on USB mass storage mode to transfer it to the device and then install it via file manager app.
Comment: And in case you use ADB, enabling *Unknown sources" is not needed: simply `adb install ` does the job then.
Answer: As many others have said, you cannot download directly from the market.
Android Phones with Google experience maintain a connection to Google's servers; it is over this channel that Google tells your phone to download & install the APK.
Alternative markets & websites are certainly options - please note it can be hard to determine if the application has not been modified from the market version. You can also use USB networking or wifi. USB networking may require root.
If you have to pay for the application on the market, but don't on the other website, that's a sign that the application is probably not supposed to be there: it is at best an illegal copy and at worst loaded with malware.
(Amazon's "free app of the day" and 'getjar gold apps' promotions are example of  exceptions to this.)
Answer: As far as I know, you cannot download directly from the web Market, but you can find many apps on other app sites.
Answer: You can e.g. use Raccoon for that – a phantastic Java app I'm using:

Raccoon (source: Tutonaut; click image for larger variant)
The app requires credentials of a Google account (you can either use your own, in which case you also can access apps you've bought – or use Raccoon's companion-app DummyDroid to create an alternative profile, including fake-device, to also access apps otherwise "incompatible with your device"). Works wonderful and fast. Not only for downloading apps, but also for checking their Metadata (description, permissions, size, last update): details load much faster than using GPlays overloaded web page ;)

UPDATE: As development goes on, there are new locations:

Raccoon v4 has its Github repo here
the Raccoon Website (with downloads etc.) can be found here
Comment: @Shayan I rarely use it, so I cannot tell. But if you found v3.7 as "latest", you must have looked in the wrong location. I use 4.x for more than a year (or two). Last one I downloaded was the `*.jar` of 4.7 (in April this year). If you talk about Raccoon, that is :) – Oh, I see what you mean, the Github repo stopped updating with v3. [Here's the one for v4](https://github.com/onyxbits/raccoon4), and [here are the downloads](https://raccoon.onyxbits.de/apk-downloader/) (will update my answer).
Comment: Does it download split APK? Or does it download full APK? I'm very curious.
Comment: Also, when I wanted to download the latest version (3.7) there was only source code available, no `.jar` file, and racoon v4.x requires dummydroid which is such a pain to configure and use (android ID etc.)
Answer: One thing you could potentially do is get the android market on the android emulator (which I don't think your supposed to be able to do, but some people have done it in the past), and download the apk onto the emulator.  Then, you can find the data in /data/app/-.apk on the emulator.  Pull it off with adb, and install it on your device with adb.
But like the other answers, I would recommend finding other stores (or developer websites) to buy the app first.
Answer: You can't download apk from market.android.com . But getjar has lots of app and you can download it to your PC.
Comment: Getjar no longer seems to allow you to d/l the apk's to your PC. Or it is only certain select applications.
Answer: You cannot download apk files from http://play.google.com/store.
There are other ways to get apps (alternative markets, developer sites) and you can install them manually provided you can turn on the "Unknown sources" setting.
Comment: Well, you can; see e.g. [gplaycli](https://github.com/matlink/gplaycli) and [Raccoon](http://www.onyxbits.de/raccoon) :)
Comment: @Izzy: Sure, there are tools that'll let you get APK files, but you still can't directly download from the Play Store.
Comment: Not without 3rd party tools, if you mean that – true. But those 3rd party tools do exactly that, via the playstore API. Looks like we meant the same but express ourselves differently ;)
Answer: There is an online service called APK Downloader that lets you download APKs from the Google Play Store. However, this works only for FREE apps; paid apps are not supported because of piracy issues.

Have you ever wanted to get your hands on the latest game, only to
  find that the Google Play thought it wasn't compatible with your
  phone? Maybe you don't have a snapdragon device, but youre're pretty
  sure an old device could handle it still. Have a Kindle Fire and want
  access to more than just the Amazon AppStore?
Until now you've been stuck, but a new online service also come with
  Chrome extension called APK Downloader will allow you to download an
  apk file from the Google Play directly to your desktop rather than to
  your device.
Comment: Note that the Chrome extension listed on that page is essentially a copy of the open-source [APK Downloader](https://lekensteyn.nl/apk-downloader/) that is mentioned in my answer, but with spyware added. As long as you use this webservice, that should be a smaller issue, but note the behavior with the extension.
Comment: I won't claim that the on-line APK downloader by Evozi is safe to use, you have to judge that yourself. But taking an open-source project, inserting code that tracks your activity and then publish it without references to the original work and without notice of this spyware code does inspire confidence.
Comment: @Lekensteyn What do you mean by "spyware added"? Is it not safe to use the on-line  APK Downloader ?
Comment: this doesnt work anymore
Answer: There have been times that I haven't been able to install an app from the Market on the phone but I have been able to get it to download by using the Market site on my computer bt telling it to install the app.  Usually the app starts downloading almost immediately.  That won't work if the router/network you are using is blocking access for some reason but the app should install as soon as you are on a network that will allow downloads.
You might try cleaning your Market data and cache. When you fire up the Market you will have to accept the Terms again.
Comment: The OP does not want to kickstart a download; OP wants the .APK on their PC desktop.
Comment: @Broam The OP is looking for a workaround to network issues of the Market on their device.  They wondered if downloading to the PC was an option; I really don't think they are refusing to consider other possible solutions.  Classic case of asking how to implement the first solution they thought of rather than asking how to solve their real problem.
Answer: Google Play seems to use some non-standard port to access the site. Some modem/router/gateway firewalls block this port by default. This is why Google Play does not work in some LANs.

Racoon is a desktop Google Play client that can download APK files from the Play store. It is a platform-independent Java app.
Total Commander (a file manager app) allows you to copy APK files of apps already installed in a device. Just copy them them to a SD card and move them to any device where the apps need to be installed.
Android Police maintains an archive APK files at http://www.apkmirror.com/. It is clean.
Answer:
Available on F-Droid.
On starting the app will ask to log in. Use fake Yalp Store account:

After logging in, you'll see the updates available. There is a search button available to search apps. You can also browse apps through categories from more options. Clicking on App will provide a button to download.

Clicking on Download will download application in Downloads directory and ask to install the APK.
Comment: Yalp Store has been rebranded to be the Aurora Store.
Answer: You could also install an Android emulator on your desktop and then use APK Extractor to extract the APK.
Answer: I would suggest APK Downloader extension for Chrome as it is far more convenient. You log in with your Google Account, input some data from your phone and it will add a simple "Download APK" button to all apps on Play Store website.
If you are conserned giving your credentials to some 3rd party app, its not possible to download APK's otherwise as any tool needs to be able to identify itself as a phone with google account to get the APK. You can build a tool yourself to be sure, but that probably is not an option right now.
Comment: Might be "more convenient" – but a) doesn't work without Chrome (which I'd never use), and b) is closed-source. I rather trust an open-source tool with my credentials. And well, if c) the tool does harm me, I can go see the dev (same country and not too far region ;) // D) "its not possible to download APK's otherwise": lacks the restriction "from Google play". You can well download it from other places as e.g. F-Droid or Aptoide – [my app lists](https://android.izzysoft.de/applists) often even include the links to safe sources :)
Comment: Of course, it depends on the users needs. But for me it was a few clicks that lets me later download APKs from a trusted source also in a single click :)
Comment: I didn't say it's not an alternative – we've all different preferences :) Still, you might want to update your too sharp restriction concerning the credentials ("if you want to download from Google Play").
Answer: I've found one apk-downloaders.com from which we can download apks which appearance is similar to Apk Downloader (I found sometimes Apk Downloader shows an error).
Example:

Enter package name:

Get Details & click to download apk:

At the bottom of information, you will find button for downloading apk:

Get apk:
After clicking on download button you will see the page saying:

And downloading will be started soon (within a minute):

Another (quick) way is to directly apply package name in following address:
http://apk-downloaders.com/download/dl.php?dl=<package-name>

Example: http://apk-downloaders.com/download/dl.php?dl=jackpal.androidterm
Comment: How safe is that site? Any reference that it can be trusted, and doesn't ship "enhanced versions" of the `.apk` files offering "additional features" one certainly does not want (backpacked trojans and the like)?
Comment: @Izzy Considerable point. This is only working site,  No reference for trusting, Use with caution at your responsibility. (I recommend not to use such site for the apps which have **privacy & security** concern) +1
Comment: A pity. I was hoping for some "good references" as indeed, sometimes an `.apk` available there cannot be found elsewhere. But I always hesitated using it as I couldn't find any reputation pointed out for it.


Does a centered object get attention?

Question: When I showed this photo to my friend he mentioned that the flower in the center of the photo got his attention. Although I placed it in the center of the photo, I believe that it's not the only main object in the photo. I like the leaves in the foreground too, I like the balance between the green color in the foreground and background. But my friend didn't mention anything about it, so I wonder is it wrong to place the flower in the center like that? maybe if I moved it to the right a little bit and include more leaves in the left would create a more balanced photo?
Comment: I notice you've posted this photo in the Adobe RGB color space. This will not display correctly in most people's web browsers (or indeed on most people's monitors). You should convert to sRGB for the web.
Answer: The flower in the centre does attract the eye, but not because it's in the center, in my opinion, but rather because:

it's in focus more than anything else
it's brighter than anything else
it's higher in the frame, above everything else, and contrasting against a dark background

I think the above is fairly factual.  When you ask about improving the composition, well that's going to be more subjective. I think you could probably improve the composition, but I don't think there's particularly anything wrong with the flower being centered
Comment: +1 - I was about to write the same 3 points as to why the eye is drawn towards the flower in the middle.
Answer: In this specific example, the object in the center gets the attention, but not because it's in the center. It gets attention because it is in sharp focus relative to other objects in the scene, and because it contrasts with the background. Those are 2 major ways to draw attention to a subject. If it were in the lower-left corner, it would still get the attention for those reasons (unless you had something else that was also in similar sharp focus and/or with similar contrast to the background).
Answer:
maybe if I moved it to the right a little bit and include more leaves in the left would create a more balanced photo?

Did you have more space on your memory card? Why not experiment and try all kinds of different compositions then see what works best.

I wonder is it wrong to place the flower in the center like that?

No it is not wrong. There are no rules pertaining to where you should place the main object/subject. If enough surrounding elements enhances the composition then sometimes placing the object in the middle is the only solution.
The reason your friend immediately identified the flower is because, as others have mentioned, it's the brightest part of the photograph. This does not mean it's a great or compelling composition. This is just how our eyes work. They are drawn to the brightest part of the image.
In the image above, you have blown out the highlights on the flower, next time try to defuse the light falling on the flower. If you don't have any light modifiers, try using white shirt and place the flower in the shade. For some creative ideas, use white foam board to reflect the light from underneath or at an angle. This will give the flower a 3-dimensional look! Here's my pathetic attempt at using windows paint at work to illustrate what I mean:

Hope that helps.
Answer: Yes, a centered object gets attention.
Actually, according photography books, it gets too much attention which is why center compositions are usually perceived as static. This does not make it wrong, but is something you have to be aware of.
What happens is that a central object is so easy to notice that viewers tend to explore less the rest of the image since things around are given the same spatial weight. With a rule-of-thirds composition, for example, one side of the main subject is bigger and invites more exploration.
Note that this kind of statements are very general and you can always shift view attention by providing other attention grabbing clues like bright colors, eyes, people, etc.
Answer: This question is highly related to this other one: What is a point of interest in a photograph and where is it lacking in this candle picture? Your photo here does not really have a natural point of interest other than the bright splotch of color in the middle, so that's where attention goes.
In addition to the bright color and central position, it's more in focus than the rest of the image, which discourages exploration of the other parts. The word "focus" has two meanings: first, the convergence of rays of light (making a sharp subject), and second, the center of attention. It's not really a coincidence that we use the same term for both. But the pink petals aren't really all in focus either, leaving me unsure of what you're trying to say.
If you would like to emphasize the color over form, you might try an abstract composition with more blur across the entire frame. Or, you might go the other way and try for more depth of field so all of the pink flower is in focus, and more of the branch. It may be hard to get the background smoothly blurred in that case; you may want to try different focal lengths and camera position.
As an exercise, I suggest trying several different crops of this existing image to see how they change the meaning, both to you and to your friend. Personally, I think the most interesting thing going on in this image are the blurred twigs and orange flowers diagonally to the lower-right of the pink flower. I might choose a crop to draw out that detail:

This also de-emphasizes the out-of-focus areas of the pink flower, by pushing it to the edge and making it large enough in the frame that it looks like a multi-part object which one wouldn't necessarily expect to be entirely in focus.
But this is my interpretation. It does not emphasize the interplay of shades of green that you say you find interesting. Try to find what brings out that meaning.

Does a centered object get attention?


Cocoa vs Carbon versions of Eclipse

Question: Can someone tell me what's the difference between Cocoa and Carbon? I want to download Eclipse but I don't know which one to pick, I have option to choose Cocoa or Carbon.
Comment: You could always try both and see if there are any obvious differences.  ...and then let the rest of us know what you find...
Answer: Cocoa supports features like spell checking and 64-bit right out of the box. Carbon is looking increasingly frowned upon by Apple. Cocoa is the way forward.
(Note that Carbon is still widely used for lower-level stuff. Many Cocoa applications dip into Carbon from time to time, and a lot of Cocoa is built on Carbon. But if you want lots of yummy UI goodness for free in each new OS, you want Cocoa.)
Answer: A basic answer would be that they use different "wrappers" around Eclipse in order to interact with the host operating system.
There is a version of SWT (the GUI toolkit used by Eclipse) that works with Carbon, and a version that works with Cocoa - so your choice isn't so much a choice of versions of Eclipse as it is a choice of which version of SWT you prefer.
The advantages of Carbon are that it's faster and more mature so technically it should be more stable. However Carbon has been more or less EOL'd with Apple's plan to not transition it to 64-bit and have developers move to use their Cocoa API instead.
The advantages of Cocoa is better integration and free extra features that are available around the operating system (eg. spell checking, various shortcuts in Open/Save dialogs), better Spaces support, etc.) Additionally you can use the 64-bit version if you'd like but it will require a 64-bit processor (which if you have an Intel Mac you're nearly guaranteed to have - only a few models shipped with 32-bit processors)

Cocoa vs Carbon versions of Eclipse


How much do the mascons on the moon affect surface gravity?

Question: The gravity anomalies on the moon (generally accepted to be caused by mascons) are powerful enough to affect the orbit of satellites.  I'm trying to determine how much effect they would have on a person standing on the surface.  If we experience about 17% of Earth's gravity on the lunar surface, how much would that differ within one of these anomalies?
Comment: If there was a "close" category for inadequate research, I would use it for this question. @JoshDenmark, if I enter the title of your question into a search engine, it's going to find the immediate answer to your question at wikipedia and at other sites. You need to rephrase this question to show what you've already looked at and why those existing answers are not satisfactory to you.
Comment: I have googled, quite a bit.  Maybe my google-fu isn't as great as others, but all I keep coming up with are the explanations of what a mascon is, how they may be formed, and the effects they have on orbitals.  I'm looking for the effect on the ground, to a person standing in the center of one.   Now when I google this question, the top returns are myself asking the question...
Comment: @DavidHammen The downvote tooltip reads "This question does not show any research effort; it is unclear or not useful".
Answer: Upon some google-ing and wiki-ing I found this image of a gravity map of the moon:

That scale up the top is measured in milli-Gal which is thousandths of a cm/s^2. For scale gravity is ~9.81m/s^2 which equals ~981000mGal. The difference between gravity at sea level and the top of mount everest is 2Gal, or 2000mGal, which is 0.2% of average gravity. On the moon, the variation seems to be about 1000mGal, with the average being 162000mGal, which is about 0.6% of average gravity.
In conclusion, on the surface, there is no noticeable difference. Not to a human anyway.


Are the following patents European only? EP 1849393 B1 and WO2005108015 (A1)

Question: These are patents by a cleaning company in Denmark named Vikan. I would like to understand if these are patents that are European only or also US patents. Also, when I look on the European patent website, Espacenet, on INPADOC legas Status for WO2005108015, it shows PRS Code WWW as one of the last PRS dates and says, WIPO INFORMATION: WITHDRAWN IN NATIONAL OFFICE". Does that mean that they withdrew their patent application for this item?
Answer: Let me answer you with.
1) If a patent is of series EPXXX..XX, it is filed only in EP. It doesn't get patent rights in US.
2) WO2005108015 is a WIPO application. It gives an inventor liberty/time to file patents in other countries taking priority from WIPO application.
3) So, after filing WIPO application, the inventor can file another patent in US and other countries.
4) Basically, same invention is filed in different countries.
5) And, these are clubbed under one as a 'family members'.
Specifically, in your case, WO2005108015, has only two members. DK200400741 and WO2005108015. So, as it doesn't have any US patents in family.
Comment: Not quite. The WO is only an application. The record for the DK shows as legal status 2008/01/21 APPLICATION SHELVED FOR OTHER REASONS THAN NON-PAYMENT and so has no validity. However, the header mentions an EP. These are also to Vikan and the inventor is Anders Florvik. The family consists of DK176309, EP1849393 and NO20072182. The DK and NO statuses are not available on Espacenet but the EP appears to have been maintained (fees paid) in DE, GB, SE and FR at least. You are right, of course, that there is no US validity.


The right way to write modulus equation?

Question: I came from computer forum, and I came across many different expression of modulus equation, which of the following is authentic ?
<code>5 ≣ 1 (mod 2)

5 = 1(mod 2)

5 = 1 mod 2

5 mod 2 = 1

5 mod 2 ≣ 1
</code>
Comment: I'd say the first three are ok (only, in the first one the symbol is $\equiv$). I dislike the last two, because they obscure the equivalence relation.
Answer:
$5 \equiv 1 \pmod{2}$

This is typical notation for this equivalence relation on $\mathbb{Z}$.

$5 = 1 \pmod{2}$

This is fairly common notation for the equivalence relation. Almost nothing is gained by using notation to distinguish between = and $\equiv$, so many don't bother.
One may also mean by the $\pmod{2}$ decoration that they are working in the ring of integers modulo 2, in which case 5 and 1 are not denoting integers, but equivalence classes modulo 2, in which case the two sides are literally equal.

$5 = 1 \mod 2$

This is the same thing as the previous one, just typeset differently. Do take care to note the added spacing; this ensures that this notation isn't confused with the following notation.
I would guess this style is fairly uncommon.

$5 \bmod 2 = 1$

This is the operator form of $\bmod$. It isn't being used to express an equivalence relation, but instead the author is using the related arithmetic operation $x \bmod y$ that returns the reduced representative of $x$ modulo $y$.
This is fairly common to use when you need to move back and forth between integer and modular arithmetic. In particular, programming languages usually have such an operator.
It's usually defined in concert with an integer division operator (e.g. $17 \mathbin{\text{div}} 3 = 5$), and satisfies
$$x = y (x \mathbin{\text{div}} y) + (x \bmod y) $$
for every $x$ and every non-zero $y$.

$5 \bmod 2 \equiv 1$

This is terrible; don't use it.
Answer: The most common is $5 \equiv 1 \pmod{2}$. In other circumstances, you want to use $\mathrm{mod}$ as a function, and then you can write $5 \operatorname{mod} 2$ (which is equal to $1$).


The 50 Move Rule

Question: Can the fifty move counter be increased after white's move?
I thought that it could only be increased if both white and then black had not moved a pawn nor captured a piece that qualified for a whole move. The reason I ask is that the other day while playing against a chess engine, after white moved, the engine sent the 50 move violation message, where as my count was 49 until black's move.
Answer: Fide Laws of Chess

5.2 e. The game may be drawn if each player has made at least the last 50 moves without the movement of any pawn and without any capture (see Article 9.3).
9.3 The game is drawn, upon a correct claim by a player having the move, if: [...]
b. the last 50 moves by each player have been completed without the movement of any pawn and without any capture.

So it doesn't matter who is black and who is white. If the last pawn move or capture was made by white, the rule comes into effect after white's move.
Comment: Thanks JiK !  I'll need to re-program my fifty count routine to reflect this :)

The 50 Move Rule


Does the sound card of a digital mixer affect the quality of the vinyl song?

Question: my setup for my vinyl is like this:
I have one vinyl player who is connected to a (real crappy) dj mixer (Cortex dmix-600). This mixer has a sound card, i guess, because it can play directly from an iPod or USb-disk. But does this sound card does have an effect on the quality of the vinyl songs? Or is this impossible because this mixer will not digitalize incoming audio-signals like from a vinyl player?
Comment: A sound card effects everything that needs to pass through it.  If results and quality are tantamount, get an external shielded card.  Any internal card is going to pick up some of the frequencies from your peripherals and include them in your output.  An external shielded card eliminates them.
Answer:
But does this sound card does have an effect on the quality of the vinyl songs?

Yes, the digital to analog converters (the sound card of your mixer) of any device have weight in the quality of the output. Better converters will reproduce the signal more accurately.
However, the difference in quality between cheap and expensive converters is very small. That difference is hard to perceive even for well trained ears. In blind tests, sometimes cheap converters are preferred over very expensive ones!
So there is an impact, but it is minimum. I wouldn't worry too much about it.

Or is this impossible because this mixer will not digitalize incoming audio-signals like from a vinyl player?

With that said, the sound card and the converter only come into play during digital to analog and analog to digital conversion. Assuming that the connection between your turntable and mixer is phono, and the mixer doesn't route the analog audio to the converter, then the sound card won't have any impact whatsoever.
Is your mixer making use of its converter in your setup? I don't know. To know for sure how the routing in your mixer works you'll have to google around and/or check the manual, maybe call customer support. But again, unless you have well trained ears and your hearing environment is optimal (acoustically treated and isolated, good quality monitors which are well positioned, etc) I wouldn't worry about it since you won't be able to perceive the difference at all.


Can I cancel an offline transaction with this approach? (opposite of nLocktime)

Question: I would like to cancel a transaction I sent offline, and am looking for ways to prevent it from being accepted by the network.
Will the Bitcoin client prohibit the entire Tx if there is even on input that is already spent?
If the answer to that question is "yes", then what if I created "control addresses as follows:

Generate 10,000 addresses and send each 0.0001 BTC
After N confirmations pass, create an offline transaction
Consume one of the balances in step 1 above in the offline Tx

I suspect either one of the two scenarios will occur:

User broadcasts offline Tx, and completes the Tx
I spend the balance of the "control address", and when the user tries to spend the offline tx, they are denied because one of the inputs it refers to has already been spent.
???

Question

Is this a correct approach to canceling offline transactions?
What optimizations can be made?  I dislike having the overhead of having to sign each control input with a new private key each time.
Answer: The approach is correct. You don't have to use different private keys, you can use the same private key and same address for each of the control outputs.


Best way to capture website user clicking/navigating behavior

Question: I'm wondering if there is any analytics tool more sophisticated than google analytics which offers features such as user clicking and navigating behaviors. By which I mean, with such tools, I can see how users actually clicked and navigated across my site.
Comment: Hi, did you give Click heat a try? See my answer since it's free it's worth giving it a shot over the paid applications.
Answer: I'm not sure if you have a programmer, but assuming you do this advice should work.
For a low traffic site, just log everything to your database.
As you grow, logging directly to a database won't scale nicely. I've had good luck using a message queue (eg. RabbitMQ) to log clicks and a cron job to process them in a batch. Inserting a batch of several log messages into your database as 1 transaction is much more efficient than making every page load insert a row into your db.
Answer: I don't know any free services for that. What you want are called heatmaps.
One paid is http://www.crazyegg.com/
But as suggested by @Gattster you cans develop one on your own. Just send each 0.1 seconds the x,y coordinates.
Answer: Well Click Heat is free and shows you exactly where visitors are clicking on your website, it can tell you how to better optimize your site. For example if a graphic is not a link yet you see a lot of people clicking it assuming it is you can turn it into a link
http://www.labsmedia.com/clickheat/index.html
This is pretty basic but again it's free and shows more click information than Google which only shows clicks on links.
For paid click tracking crazyegg.com is good or clicktale


Tips for golfing in Io

Question: What general tips do you have for golfing in Io? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Io (e.g. "remove comments" is not an answer). Please post one tip per answer.
Comment: Could you add a link to Io?
Answer: Higher-level function shorthand
This seems like a pretty interesting golfing point. E.g.
list(1,2,3)map(i,i+1)print

However, Io is pretty permissive on not specifying the counter; the map body can be used as a point-free function, as Io tries to fill in the operand of this expression. This can be golfed into
list(1,2,3)map(+1)print

Due to the helpful work of the language creator, you can even do this to reduces!
list(1,2,3)reduce(a,b,a*b)

Can easily be reduced into:
list(1,2,3)reduce(*)

(Unfortunately, I still haven't managed to understand how exactly this works, so I never managed to make the expression more complex.)
Answer: You can stick methods onto the back of most literals
"text" print    # 12 bytes
"text"print     # 11 bytes

12 print        # 8 bytes
12print         # 7 bytes

(0<1,0,1) print # 15 bytes
(0<1,0,1)print  # 14 bytes

Not everything
0x12print # prints nothing

Answer: You can leave out the else part of the if function
This isn't in the documentation... I initially thought that you have to include the else part, like the elvis operator in other languages; turns out that I can leave out the else part. (Please add this to the tutorial/documentation!)

if("bug"size>2,"True",nil)

So, if you don't want the else part to return anything, you could just do

if("bug"size>2,"True")

Answer: Use ~, :, and \ for variable names
You can stick methods onto the back of ~. E.g. instead of this:
method(i,i pop)

You can do this:
method(~,~pop)

You can even put this between them. Instead of this:
and a sqrt

You can do this
and~sqrt

: also does this trick (I discovered it from the := bug), as well as \. (This can empirically save a lot of bytes in your source code, if you use variables a lot)
Some other valid symbolic names that you can't stick

_
.

Can you stick these to other symbols as well?
Unfortunately, things get a little complicated here. Here's a table of how powerful these variable names are:
Unfortunately, you can't stick any of them before := or on the rhs of /, so pick whatever name you like. :P
Comment: Now I'm seriously wondering, what have I been doing in Io all these years...
Answer: Literal newlines
Just like JavaScript's ``, you can insert literal newlines. i.e. you can do:
"
"

Answer: Parenthesis dropping in method applications
Say, I want to split a string by whitespace. I am pretty used to this method when I first got used to Io:
a_string split()

After I heard about how Io parses the arithmetic operations, I realized that this is perfectly valid:
a_string split

Sometimes, you can do that to some one-operand functions as well. If you want to join by spaces, you can do:
a string join" "

I guess this doesn't work sometimes, though I can't find any examples here.
Answer: Prefer push over append
There are 2 methods that append values towards the caller object: add, push, and append. I didn't count add because add doesn't work. Try it online!
push and append basically do the same thing:
list(1,2,3)push(4) println
list(1,2,3)append(4) println

Try it online!
Therefore, whenever you want to write append, remember that you can substitute it for push to do the exact same thing.

Tips for golfing in Io


What's a good source on Fairies online?

Question: I would like to research Fairies and their wonderful virtues, as described in Celtic mythology. Can someone suggest rich and readily available sources on the subject?
Comment: http://www.sacred-texts.com/neu/celt/ Always sacred texts
Comment: Changed it to an answer :)
Answer: You can find a lot of sources on Internet Sacred Text Archive ...
You have to scroll down to approximately 7/8 and you can find all the fairy texts you need. Or ctrl-f fairies.
Comment: I've come across this side before, but never looked too closely.  Seems like an excellent resource for many literary works, such as books involving faeries, now in the public domain!
Answer: Katherine Mary Brigg's The Vanishing People: Fairy Lore and Legends, is a good source, as well as Evan-Wentz's The Fairy Faith in Celtic Countries and Robert Kirk's The Secret Commonwealth. They're all out of copyright, so at least some of them are in the Sacred Texts.
I'd also recommend Diane Purkiss' At the Bottom of the Garden as a more modern look at fairies, as well as Barbara Rieti's Strange Terrain, but they're hard to find. Both focus on the darker side of fairy lore such as straying and changelings, and why people would tell such frightening stories.

What's a good source on Fairies online?


Will the decibel value of a sound meter change when you walk from one corner of the room to another?

Question:
Will the decibel value of a sound meter change when you walk from one corner of the room to another? And can I use this sound meter to determine where I can best place my acoustic sound absorbing panels (eg. placing more panels at corners where decibels are highest)?
Answer: In a very approximate way, yes, kind of.
I'm assuming you have little more than a phone with a meter app, so this is a simplistic, DIY, experimental method.
You need to be transmitting white noise & you need a meter that can show you a frequency spectrum. That way you can track humps & dips in the spectrum as you traverse the space.
Your acoustic panels will need to be tuned to the frequencies that resonate. Bass traps need more than just a panel on a wall, and if your space generates standing waves anywhere away from the corners you might need some trial & error to discover which pair of surfaces is responsible.
A cheap meter or phone app will not be able to properly measure very low frequencies, so some of the low end compensation will be little more than guesswork.
If you get odd bass lifts against walls or in corners, then so long as no-one is ever going to be monitoring from there, you will probably have to just live with it.
Answer: This is one of my favourite tests. I use a software bass synth and play tones going lower and lower using monitors going low (not the computer speakers). There are probably sound files you can find doing similar. I "lock" the sound when I hear a big difference and walk around in the room.
On the "room resonant frequencys" the sound volume can be quite different in different places in the room. Not unusual is a difference of 30-40dB in different places only a foot (3 dm) away.
Doing a test like this in a non-treated room will show the importance of acoustic treatment.
The next step is to create a good plan on how to attack the problem you have found. Budget and experience are two important factors. Often in my experience a good solution is to not try to fix the very lowest frequencies below about 75Hz. Maybe using speakers not going as low in freqencys, say a 5 inch bass instead of 8 inch. The reason is that treating the really low frequencys is both difficult (meaning you need how to do it) and expensive.
Use a decent measurement microphone (should be an omni microphone in order to catch low freqencies) and a program allowing you to make an audio waterfall chart. It will show both the difference in volume as well as in the decay time. Start by attacking the low freqencys below, say, 300 Hz. There is where the large and difficult to select bass traps are needed. Next you can attack reverb times higher up in frequencies.