topic for presentation

Question: guys, i need some help here. i need to give a presentation as a part of my college assignment. can anyone suggest me a topic please. i have thought about Acoustics or 3D audio. but then acoustics would become very theoretical and i don't have enough resources to make a presentation on 3d audio. any suggestions would be helpful
Answer: Maybe on the Loudness Wars of music and labels over the past couple decades. There's enough research material on the web, and you can pull up music examples that showcase it pretty blatantly.
Comment: There's a really obvious example involving a Metallica song. If i remember correctly they released it for guitar hero first and the track had a decent dynamic range, then they released the album and it was maximised to shit.. The game version was actually better and lots of people kicked off about it.
Answer: Is it open-topic and you're choosing to make it audio-based, or does it have to be acoustics related (hence your use of the 'acoustics' tag)?
You could always branch off a little and do something on psychoacoustics or emotional responses to certain sounds, such as discussed in this post here. You could collect a bunch of sounds and play them out to your audience and see how they react to each, similar to what they did on this episode of BBC's Bang Goes the Theory . I don't know if you'll be able to hunt down that episode but they've got a link to the sound clips they used. You could then follow up on a discussion as to why we react in such ways etc.
EDIT: Or have a look at this on 'sonic crystal'
Answer: Theres always plenty to talk about when it comes to cross-over. I bet there's enough information out there about the skrillex / korn dubstep thing. Most of it will be subjective, reactionary crap, but I'm sure you can find something.
Answer: How about commercialization and monetizing of music/sound/media products that involve sound in the digital era. You could study and present what kind of options there are (digital marketplaces, personal websites, crowd sourcing services etc.) for making money out of sound and what are their differences. Maybe search some data about the state of different sound-related media industries, their structures (companies, independents) and how different groups generate profit. You could throw a few words about promotion and marketing as well.
I personally find technical presentations rather boring, if they aren't given in the right context and/or by the right person (one usually needs good theoretical background to present the stuff in a way that's not too speculative or superficial). And I think the creative side is much more relevant, unless the class/course you're taking part in has a technical "engineering"-like focus.
Answer: I'd love to have a chance to research and do a talk on how good or bad audio effects the way you perceive visuals. Sight is your strongest sense, but audio effects the way your subconscious interprets the vision.

topic for presentation


Doubt in neyman pearson lemma problem while considering the critical region

Question: The given problem is X follows $Rectangular(\theta,\theta^2)$
To test $H_0:\theta=2$ against $H_1:\theta=3$
They asked to calculate the power and size if given crictical region is $X\geq4.5$
Now they have calculated Size=$P_{H_0}(X\geq4.5)$
But my question is if we follow Neyman Pearson Lemma then $L(x|H_0)=0$
when $4\leq X\leq9$ Since under $H_0$ distribution is $Rectangular(2,4)$ and also
$L(x|H_1)=\frac{1}{6}$ when $4\leq X\leq9$ Since under $H_1$ distribution is $Rectangular(3,9)$. Now Under $H_0$ there is probability 0 in $4\leq X\leq9$ hence $\frac{L(x|H_0)}{L(x|H_1)}=0$ in  $4\leq X\leq9$. hence since neyman pearson lemma says $\frac{L(x|H_0)}{L(x|H_1)} \leq K$ is the critical region for any positive K, then in $4\leq X\leq9$ always $\frac{L(x|H_0)}{L(x|H_1)}=0\leq K$
since K is positive. Hence $4\leq X\leq9$ is always a critical region.So while calculation of size we must consider $(4,4.5)$ also as a crtical region apart from the given critical region $X\geq4.5$. Is my explanation correct???
Answer: The Neyman-Pearson Lemma is about what the optimal rejection region is (which is apparently what you call "critical region", chances are both terms are in use), but you can define non-optimal tests with other rejection regions. If I understand your question right, you got $X\ge 4.5$ given as a rejection region, so this is a test different from the Neyman-Pearson optimal one, and if you are asked to analyse that one, you can leave the Neyman-Pearson Lemma alone.


weird smelling chicken

Question: I have noticed a smell in cooked chicken that sometimes appears and it is nothing like the hydrogen sulphide from spoiled eggs. It's not a pleasant odor but isn't offensive enough to make you spit out the food as soon as it hits your tongue. It's strongest when the cooked chicken is cut and sort of dissipates if you leave it there. Also, the smell usually comes along with chicken that isn't very white. I cannot find a another smell to compare it with unfortunately. Is this just a bad chicken or is it unsafe to eat?
Comment: smelly chicken = trash.
Comment: Your question does not describe the smell (you only use a 'not'). Sorry, but *I cannot find a another smell to compare it* is not enough to give  meaningful answer. Voting to close as "unclear what you're asking".
Comment: trust your nose first?
Answer: Unfortunately, the only responsible advice anyone can offer about "weird smells" is to throw it out. Of course, you have to know what fresh, properly stored chicken smells like, but if unidentified or "off" smells have developed in your poultry, you don't want to play with that stuff -- throw it out.
Cooked chicken is a bit trickier. You don't know what unfamiliar flavors might have developed from your seasoning or what other tastes/smells might have been picked up in the cooking process. That is very difficult to comment on authoritatively. The best way to assure food safety is to be meticulous about cross contamination and proper storage of the raw product.
So just a few quick notes on that subject -- the best assurance of food safety is heeding the freshness dates and meticulously assuring proper handling and refrigeration in storage. Spoiled or "off" chicken smells have more of a sour quality than that classic sulfur odor... but don't rely on that. There is no reliable "smell test" to assure food safety, particularly in poultry.
Answer: I have eaten questionable things without consequence in the past, but that's more a matter of surviving digestive Russian Roulette than being a wise course of action.
Unless it's gold-plated chicken, throw it out.  If it's gold plated, remove the gold-plating, then throw it out.  Why risk your health over extending a piece of questionable meat for one more meal or snack?
Answer: There are many smells & taste to chicken. Depending on what they eat. Most of ours are free range here. Is it a different brand? Each company has there own feed for chicken. So little different smell,taste between brands. But a bad smell or gas smell like you say. I would pitch. Is it a dry ice smell? Some is still used here for freeze.
Answer: When in doubt, throw it out. Our sense of smell is there to protect us.
I have a very sensitive nose and if it seems a bit off I chuck it in the bin. I've had food poisoning and don't ever want to repeat that process.

weird smelling chicken


Can I use a texture as hair density map?

Question: I would like to use a texture as density map because it can be much more precise than a vertex group, is it possible? In Cycles render.
Comment: You want to make it in *Cycles* or *Blender Internal*?
Answer: In Cycles select the mesh, give it a material, then go the Particles header and add a new texture in the Textures panel.

Prepare your black and white density map. Here's mine:

Next go to the Texture header, add a new texture (Image or Movie) and check the Density checkbox in the Influence panel. Note: I also checked the Lenght checkbox to make the render look more clear.

In Blender Internal you can do it the same way. After giving the mesh a material and the particle system you go to the Texture header-->Particle Texture button, load your texture as Image or Movie and select what kind of influence on particles it should have.


Preposition before the word "agreement"

Question:
I have done the work on his agreement.

This sounds good to me, but I am not sure. Online dictionaries didn't helped me much.
Thank you.
Answer: The idiomatic way to say this is as you said:

I have done work on his agreement.

You could also say:

I have done work with his agreement.

This isn't wrong, but it is also not as commonly said.  The meaning changes subtly.  It makes you think of the agreement as some sort of shared project of which others participate.  When in doubt, you should use "on" rather than "with" here.

I have done work for his agreement.

This too isn't wrong, but it is slightly less idiomatic.  Again the meaning changes subtly.  You're saying you dedicated time towards his agreement.  So the emphasis here is that you've dedicated time/effort, whereas with "on", it is more matter-of-fact.  And again, when in doubt, you should use "on" here.
On the other hand, you would not use "in", because it isn't a place or container of some sort.  If you have any questions on any other prepositions, please let me know in the comments and I'll try to elaborate.
Answer: Using "On" proposition is correct in your example because before that "Verb" used and action and something happened.
The prepositions we can use with "agreement" according to the Oxford Collocations Dictionary:

List item

in an/the agreement  e.g a clause in the agreement
under an/the agreement e.g Under the agreement, the farmer is not allowed to use this field.
agreement between e.g an agreement between the company and the unions
agreement on e.g They signed two agreements on improving economic cooperation.
agreement with e.g a trade agreement with China
by e.g The separation is by mutual agreement.
In e.g I think we are all in agreement that prices should be kept low.
In agreement with e.g, I am in agreement with you that she should be given more responsibilities.
With agreement e.g, With the agreement of all members of the club, we decided to organize a trip.
agreement among e.g, There is agreement among teachers that changes need to be made.
agreement between e.g, As yet there is no agreement between the two sides.
agreement on e.g, As yet there is no agreement on policies.

Preposition before the word "agreement"


3rd brake light flashing on Mercedes C-class

Question: when appling the brakes my 3rd brake light flashes like a strobe light,can hook it to my standard brake light and it works But,looking for what voltage a 3rd led brakelight uses on a mercedes c220 cdi 2003 model estate in case it has to be reduced voltage
Comment: Welcome to the site @bill. Please do not put your personal email address in your post, it's just not a good idea.
Answer: The 3rd brake light is supplied basically with 12v, but there is a circuit somewhere that causes it to flash, if it works constantly when you supply it from the brake light feed.
Answer: The rear lights are controlled by the rear SAM module. It is located under the boot/trunk carpet or behind the side trim.
It will supply 12V to the center stop light, but if you disconnect it and feed the light from one of the side brake lights a error warning may appear on the dashboard, either because it will detect no light in the center light or the increased current on the side light you have connected it to.
However I'm not sure if your exact model has bulb fault detection so I would recommend using temporary connections (just twist and tape) and keep pressing the brakes or hold the pedal down for a while and see if a error appears, if it doesn't then you can make the connection permanent. If a error does appear then send the SAM unit off for repair.


Zpub vs xpub not matching between seedsigner and sparrow?

Question: Generated a multisig xpub via Seedsigner. Loaded this to sparrow via camera-reading of seedsigner's QR code. Sparrow & Seedsigner fingerprints match, as do derivation paths, but Seedsigner displays Xpub as: ZpubXYZ while Sparrow displays Xpub as: XpubABC. Why is this? My cursory understanding is just that these are different formats of the same thing, but how can I verify that Sparrow has correctly imported this information if the displayed Xpub's don't match? Just verifying the fingerprint match is sufficient?
Answer: It is simply a different format. Sparrow can toggle between zpub and xpub configuration (as a display) and you can thus verify the xpub in this way as well.


USB Charge and Data Transfer

Question: I would like to design a PCB in order to charge a smartphone (1.5 Amps) and in parallel pass through data to a smartphone from an external PCB. This is applied to CDP specifications. I think that the best way it's to provide the appropriate power in the USB port through the Vbus and the smartphone will take the power that it needs. Do I have to use the data buses also or can I charge the phone only through the Vbus in order not to interrupt the pass through mode?
Answer: CDP requires active switching on the data pins. First you initiate high current charging with the right signal on the data pins, then you switch the data pins to the usb transceiver that's handling the data. You cannot initiate it simply by providing the right voltage and current on Vusb.
See Maxim's explanation of the usb charging standards and their single IC solution for switching of CDP standards https://www.maximintegrated.com/en/app-notes/index.mvp/id/5801
Answer: A direct answer to this question is yes, you must use data lines" upon first connect to the port. A "a smartphone" won't "take the power that it needs" unless it sees a "port charging signature" that it can (is designed to) recognize. Since we have no idea which signatures your phone does recognize, no practical answer can be given; some signatures are incompatible with USB signaling protocol. If no recognizable signature is detected by the phone, it will take only 500mA, or 900 mA if both ports are USB 3.0 capable. For more details, see references in the answer by Passerby.
As a side note, the concept of "CDP" is/was a part of so-called USB Battery Charging specifications, now BC1.2. These specifications were a flop, and only few manufacturer's made it to the market. Although the backward compatibility can be still traced across USB 3.0, 3.1, and USB Type-C specifications, you will be hard pressed to find a BC1.2 compliant device or host, maybe some DELL docking stations. Current mainstream is USB Power Delivery, and Type-C basic identification protocol, but most chargers have a simple "Chinese" signature with D+ and D- shorted.
ADDITION: If you want to convert a SDP (standard port on an ordinary PC) to CDP (charging data port), you can look at Maxim offerings (as well as Cypress, Microchip, Texas Instruments, NXP, etc), and add the necessary electronics to the port, and put all this stuff into an adapter. However, proper functionality might not be achievable without interaction of the host software with new charging electronics over some GPIO/I2C channel.
ADDITION2: No, USB 3.0 Rx and Tx pairs are not a part of any signature or BC1.2/QuickCharge/etc. negotiations. The USB 3.0 signals should be left alone.
Answer: You are assuming that a USB Host will pull current beyond the USB specified 500mA limit with out negotiating for it over the data lines.  This is not supposed to occur.
That said, there are various schemes used by major companies which allow for high current charging.  These schemes usually assume the data lines are not being used and place a "weakly driven" voltage on the D+ and D- lines.
However, in your project, you are using the data lines for communications by a 3rd device.  So neither of the above two ways to draw more than 500mA from the USB Host should work.
Comment: The voltage on a normal USB port should be 5 volts.   The USB specification limits the current a USB Device can draw from a USB Host to 500mA.  People design USB Hosts to supply at least this amount of current.  People may not have designed their USB Host to supply any more current.  And People may have not designed protection into the USB Host from USB Devices which (incorrectly) draw more then 500mA (with out asking for it first).  So drawing more then 500mA with out asking for it may damage the USB Host, USB Device or both.
Comment: And also then why there is the CDP, which incorporates both charging and data transfer?
Comment: Interesting. So a simple 5V source is not a proper USB source.
Comment: Even if I incorporate usb 3.0 should I use these data buses?
Comment: @tuskiomi, a simple 5V source is a proper USB source. However, in legacy USB (Type-A) ports, the charge current is controlled by device, not "proper host". The device will be looking for "charger signature", and take max current (1.5A in this case) only if it finds a proper signature on D+/D- lines.

USB Charge and Data Transfer


Electric Heater

Question: I'am installing a 240v heater which has a built in thermostat.I am hanging it from the garage ceiling.To adjust the thermostat you either have to be 8' tall, or use a ladder every time you change the heat setting. So I got a 240v line thermostat to mount on the wall. My question is, can you run 2 thermostats together? The heater has a fan delay, to stay running when the heater shuts off to cool the heating element. Can I turn the heater thermostat all the way up, and control the heater with the wall thermostat?
Comment: You might loose the fan delay since you're going to use a line thermostat. Depends on the wiring.
Comment: I am surprised it does not have a remote control like a cheap room AC unit.
Comment: It could be that the fan delay is not time-based but rather has it's own thermostat or thermocouple on/near the heating element. In which case, you idea should work fine. But, you'd need the schematics of the heater or a visual confirmation of a thermocouple controlling the fan to be sure.
Answer: I don't know the model you have but I do this in my plant all the time, the ones I use the fan is on a thermal snap switch so it doesn't matter if the heater is calling for heat or not. I bypass the OEM stat as the ones I have purchased that stat fails in a year and a half anyway. I have a 1/2 dozen running on line voltage cadet thermostats works great for our small shipping container shops.
Comment: I installed three Cadet line voltage thermostats in a steel heat treating factory. Worked great and saved finding a ladder each time to change settings.
Answer: Because the heater wants to run the fan after the set temp is reached, you should do the following (we will assume celsius temp, since there is no location for the OP).
Set the heater thermostat to 20°. Set wall thermostat to off, heater does not come on. Set wall thermostat to 25°, heater comes on, heats to 20°, heater shuts off, fan continues to cool heater. If temp drops below 20°, heater comes on, etc. When no longer need heater, turn wall thermometer back to off when heater is not on.

Electric Heater


Why does Firefox mess up page loading if I use a cache manifest?

Question: I have developed an html5 game which I also want to play offline, so I decided to add a manifest file.
The game is in a subdirectory, e.g. /games/game/ and the manifest is in that directory: /games/game/application.manifest. But the game depends on serval site-common files stored in /js and /css OUTSIDE the game directory!!! The whole game is cached; all paths are in the manifest file, even those of site-common files. When I want to access the site with firefox, everything looks pretty. When I reload the page, serval files (including one IMPORTANT js file and some images) are not included / displayed in the page, the game - of course - doesn't work. The missing files are all outside of /games/game, e.g. in /img or /js. BUT THEY're cached!!! If I go to offline mode and type the URL of one, firefox displays me the contents! WTF, what am I missing?
Here the game:
nocore.info/games/minesweeper/
Manifest:
nocore.info/games/minesweeper/application.manifest
Not loaded javascript file (minified):
nocore.info/js/common.js
Not loaded images:
nocore.info/img/share/*.png
Thanks.
Answer: You may find an answer in this thread: http://www.coldfusionjedi.com/index.cfm/2011/3/10/Frustrating-issues-with-Firefox-and-offline-manifests


Is it possible to delete chrome history using wildcards?

Question: I know I can highlight individual items in chrome's history and remove them, using chrome:history, but I'd like to delete all entries from a given domain, and all entries matching a given set of search criteria.  How would I do that?  Is there an extension that gives this?
Comment: A [better answer](http://superuser.com/a/484721/61808) had been added and the selected answer should be updated.
Answer: Get the Better History extension, it does all that.
Comment: That extension rules.
Answer:
Do your search like normal
Click on "Edit Items"
To delete all of the entries for that screen, check the first item you want to delete and scroll to the bottom. Now hold down the Shift key on your keyboard and click the last item shown. All items are now checked and you can remove individual items as you see fit.
Now click "Remove selected"
Click "Older" at the bottom of the page
Repeat steps 3-4
Click on "Done removing items"

Source: Google Groups
Answer: No, unfortunately there is currently no way to efficiently remove multiple entries from the history, however I have submitted an issue to request a way to remove multiple entries via wildcard and/or date range. Time will tell if they ever bother to implement it.


How to query all users with Apttus CPQ license?

Question: I have been tasked with creating reports of users with the licenses they have. I have been successful in finding Force.com users, Marketing users, Knowledge Users, Content Users, Service Cloud users, Call Center users, and Avantgo users however, I have not been successful in finding a field that references the Apttus CPQ license. I've been using Workbench to find this information. How can I find all users with the Apttus CPQ license? I've tried reviewing fields in the UserProfile, User, and UserLicense objects and still have not had any luck. Could someone point me in the right direction?
Comment: Did you check the UserPackageLicense object? That is how most of them work. Apttus may have its own management though.
Comment: @CyberJus Thank you so much for your response! At first I could find these objects but it was because I didn't have full System Admin Access. Once that was changed and I changed the API setting in Workbench to 31, I was able to use both the UserPackageLicense and PackageLicense object with Excel VLookup to get the information I needed. Thank you so much! Can you put this as an answer so I can give you credit for it?
Answer: The UserPackageLicense object contains records for the junction between users and package access.


iTunes encryption Password

Question: Is there a way to access iTunes encryption password on Windows 10? I can't remember the password and without the password ,I can't restore my backup on a new iPhone. The old iPhone is broken ..
Comment: There are tools to find the password by brute force. I've tried one of them once, but if the password isn't very simple, it can take days or weeks, so I stopped it after a few hours and just setup the iPhone from scratch.
Answer: The entire idea of encrypting something is you can't access it without the password. Passwords are never stored anywhere in plain text.
Modern password structures mean that only a hash of the correct input is stored.
If you input the correct password, the hashes match; without the password ever actually been stored anywhere at all, only the 'maths' necessary to test for when it is entered correctly.
So, in short, if you don't have the password, you don't have access to the data.
Not even Apple can unlock it for you.
Answer: There's not a stored password on Windows iTunes, unfortunately. Here's a post I maintain with all of my tips for trying to remember the backup password in case it's helpful: https://deciphertools.com/support/knowledge-base/i-forgot-my-iphone-backup-password/

iTunes encryption Password


Shortcut for computing RSS at different split point when building regression trees?

Question: I'm coding regression trees from scratch in R. For a given ordered predictor variable, $X$, obviously I have to compute the RSS at each unique ordered value of $X_i$. When moving over to the next possible split point, I am trying to avoid doing the entire RSS computation from scratch (i.e., scrolling through all the $y_i$'s to recompute the RSS) in order to improve computational efficiency. I've read that there are algebraic shortcuts for this, but have not been able to figure it out. Can someone provide insight as to how this would be done?
Answer: I think doing this directly from the RSS may be hard.  One shortcut (that I think I've seen before) is to save two components of RSS:
$$
\begin{align*}
RSS &= \sum (y_i - \bar{y})^2 = \sum (y_i^2 - 2\bar{y} y_i + \bar{y}^2 ) \\
 &= \sum y_i^2 + \left(- \frac2n \left(\sum y_i\right)^2 + n \left(\frac1n \sum y_i\right)^2 \right) \\
 &= \sum y_i^2 - \frac1n \left(\sum y_i\right)^2.
\end{align*}
$$
(You might recognize that trick from the common rewriting of variance.)  So save the sum of squares together with the sum of values.  When you move one point from the right side to the left, it's easy to update those two values (and $n$) for each branch, and from that to compute their RSS.


What is considered a default query for the request filter?

Question: As stated in one of the answers in this question and in the codex entry for the request filter, said filter gets called only in a default query, such as the main query used for a loop.  My question is, what else is or isn't considered a default query?  Would creating a new WP_Query object be considered such?
Answer: request is only applied once, by parse_request(), a method of the WP class. There is only one reference to this, it is by another method of WP, main(). main() is referenced one time, by wp(). wp() is referenced in a few different contexts by a number of different functions and files: wp_trackback.php, get_feed(), wp-blog-header.php, wp_edit_posts_query(), and wp_edit_attachments_query(). So, looking through that, nothing that `WP_Query calls is listed.
Short answer: I'd say no, it does not call request.
All that said, my work is based on working backwards with phpxref (hence the links), so I may have missed something, or it may have missed something. A better way to ask your question might be to ask on what you're trying to do, not on your implementation of it.
Just a note: main() does call query_posts(), which (I think) does the default query and such, but an instance of WP_Query alone shouldn't be enough to trigger this from what I've seen.
Answer: The "default" query is the one WordPress does itself, based on the URL and such, automatically.
Any query you create manually, via a new WP_Query or by calling query_posts(), will not use the 'request' filter.
There is only one "default" query, and you cannot trigger it via any code in the template.
Comment: Just needed some clarification.  Thanks for the answer, Otto man.


How to disable family sharing games?

Question: Is there a way to disable family shared games? I made a new account today but it still stays play instead of buy. I want to buy CS:GO personally.
Answer: There currently is no way to remove licenses granted through Family Sharing.
Well, the loaner can revoke your licenses (access), but you can't remove them from the receiving end of them...
However, since you're looking to buy the game, you could always go to the store page and purchase it from there.
As for making the buy button appear, you have one of three choices:

Get the loaner to play one of his games, or:
Get the loaner to revoke your access or deauthorize your machine.

Either way, the buy button will always lead you to the store page since payment confirmation happens there.

How to disable family sharing games?


Yield and interest rate?

Question: Are they the same thing?
Is yield the annualized return rate?
Why when yield rise, yearly return increases but price falls?
Answer: They are related, but not the same thing.
The yield associated with an asset is the ratio of the (usually annual) return produced by that asset to its price: $$\text{Yield (%)}=\frac{\text{Annual Return (\$)}}{\text{Price of Asset (\$)}}.$$
Simple case: when yield = interest rate
An interest rate is an example of a yield. For example, suppose a bank account pays an interest rate of x% p.a. That means that \$100 deposited in the account today would become \$(100+x) in a year's time. The annual return is therefore \$x. We can plug these numbers into our formula to calculate the yield: $$\text{Yield}=\frac{\$x}{\$100}=x\%.$$ In this example the yield is just the interest rate, so the two coincide.
More complicated case: yields and asset prices
Things get a little more complicated when the interest rate is fixed but the price of the asset can change over time.
For example, the government issues bonds when it needs to borrow money. Each bond has an initial price and a set annual return (known as the coupon payment) that does not change over the entire life of the bond. Suppose that we have a bond that initially costs \$100 and has a coupon payment of \$5 (meaning that you get \$5 for each year that you hold the bond). We can check the bond's coupon yield: $$\text{Coupon Yield}=\frac{\$5}{\$100}=5\%.$$
This is, again, just like an interest rate.
Now, though, suppose that banks start offering an interest rate of 10% on an ordinary savings account. Suddenly, your bond's 5% doesn't look so great! But the \$5 coupon payment can't change—it is permanently fixed when the bond is created. People are therefore going to want to try to sell their bonds to get their money back so that they can put it into a bank instead. As per normal supply & demand logic, lots of people selling bonds is going to make the price of bonds fall. So now you can buy a bond for, say, \$80. That means the yield has changed!
$$\text{Current Yield}=\frac{\$5}{\$80}=6.25\%.$$
Alas, people are still going to be reluctant to buy the bond because it still has a lower yield than the bank account—so the price is going to have to fall even further. Eventually, the price of the bond falls to \$50, at which point $$\text{Current Yield}=\frac{\$5}{\$50}=10\%.$$ Now the bond and bank account have the same yield (meaning that someone with money to invest would get the same return from either). People are now indifferent between holding the bond or a bank deposit and equilibrium is restored.
In practice, things are a little more complicated because people compare the returns on bonds to all kinds of assets—stocks, real estate, etc. But the principle is the same: the price of the bond adjusts to ensure that the yield on the bond is in keeping with the risk-adjusted return available elsewhere.
A final note: yields where there are no interest payments
The last important reason why we distinguish yields from interest rates is that some assets don't have any interest rate to speak of, but it nevertheless makes sense to talk of a yield. One example is stocks—there is no interest payment on such assets, but the board may decide to return some of the firm's profits to investors in the form of a dividend. A dividend is an amount that is paid to investors for each share that they hold. We can use the dividend to calculate a yield just as though it were an interest rate:$$\text{Dividend Yield}=\frac{\text{Dividend (\$)}}{\text{Stock Price (\$)}}.$$
Comment: I think the numerator in your first equation should be $Annual Income$ not $Annual Return$. Because *returns* look backward and *yields* look forward. Also, returns take into account price appreciation (or depreciation) of the asset. And yields do not.

Yield and interest rate?


Applications of Representation Theory in Combinatorics

Question: What are the examples of interesting combinatorial identities (e.g. bijection between two sets of combinatorial objects) that can be proved using representation theory, or has some representation theoretic interpretation. Please also mention whether a purely combinatorial proof is known in each case.
Comment: A general comment on this question is that many of the answer are not about combinatorial identities per se.
Comment: Rogers-Ramanujan identities
Answer: It is unclear exactly what is meant by a "combinatorial identity." For
instance, let $X_n$ denote the set of alternating permutations in the
symmetric group $\mathfrak{S}_n$ that are also cycles of length
$n$. Then
  $$ \#X_n = \frac 1n\sum_{d|n}\mu(d)(-1)^{(d-1)/2}E_{n/d}, $$
where $E_{n/d}$ is an Euler number. Assuming that this counts as a
combinatorial identity, then there are many further results of this
nature at http://math.mit.edu/~rstan/papers/altenum.pdf. The only
known proofs of most of them (including the one above, even when $n$
is prime) use the representation theory of the symmetric group.
Another identity which has no combinatorial proof is
  $$ \frac{1}{n!}\sum_{u,v\in\mathfrak{S}_n}
  q^{\kappa(uvu^{-1}v^{-1})} = \sum_{\lambda\vdash
  n}\prod_{t\in\lambda} (q+c(t)), $$
where $\kappa(w)$ is the number of cycles of $w$, and $c(t)$ is the
content of the square $t$ of (the diagram of) $\lambda$. This is
Exercise 7.68(e) of my book Enumerative Combinatorics, vol. 2. Many
other similar results appear near this exercise.
Answer: Let
$$(\ast) \qquad
g(\alpha,\beta,\gamma) := \sum_{\sigma,\omega,\pi} \text{sign}(\sigma\omega\pi) \, C(\alpha-\sigma,\beta-\omega,\gamma-\pi),
$$
where $\alpha,\beta,\gamma \vdash n$ are partitions with $\le \ell$ rows viewed as vectors in $\Bbb R^\ell$, $C(x,y,z)$ is the number of $\ell\times \ell \times \ell$ contingency arrays with 2-dim sums given by vectors $x,y,z$,
and the sum is over triples $\sigma,\omega,\pi$ of permutations of $\{0,1,\ldots,\ell-1\}$.
Now $g(\alpha,\beta,\gamma)$ is the Kronecker coefficient, and we have the inequality
$$
g(\alpha,\beta,\gamma) \ge 0.
$$
Finding a combinatorial proof of this inequality is a major problem in this case.
P.S. For $(\ast)$, see e.g. eq. (8) in our paper On the complexity of computing Kronecker coefficients.
Comment: Yes.  It follows from definition of the Kronecker coefficients.
Comment: Is positivity proof in the paper?
Answer: Alon and Kozma re-proved Kirchoff's matrix-tree theorem using representation theory of $S_n$:

Let $G$ be any weighted graph, and denote by $w_e$ the weight of the edge $e$. For a spanning tree $T$, denote $w(T) = \prod_{e \in T} w_e$, where the product is over all edges $e$ of $T$. Finally denote by $0 = \lambda_0 \le \lambda_1 \le \cdots \le \lambda_{n-1}$ the eigenvalues of the continuous time Laplacian $\Delta_G$. Then $$\sum_{T} w(T) = \frac{1}{n} \prod_{i=1}^{n-1} \lambda_i.$$

It was actually a corollary of a result on some mixing properties of the interchange process (a natural occurring random walk on $S_n$).
See the Appendix of their paper.
Of course, the old theorem has many classical proofs, but representation theory gives a new angle.
Answer: The FFT on permutations is intimately connected with the representation of the Symmetric group:
See "Group theoretical methods in Machine Learning" by Risi Kondor.
Answer: Many plane partition enumeration formulae have proofs using representation theory.
For example, let $PP((p)^q,m)$ denote the $p \times q$ plane partitions of height at most $m$.
For $p > q$, let $PP(\nabla_{p,q},m)$ denote the plane partitions of shifted shape $\nabla_{p,q} = (p+q-1, p+q-3, \dots, p-q+1)$ of height at most $m$.
Tje $(p)^q$ plane partition describe weights of irreducible representations in $sl(p+q,\mathbb{C})$ while the $\nabla_{p,q}$ plane partitions describe weights of irreducible $sp(2k,\mathbb{C})$ representations when $p +q = 2k$.
In this paper, Proctor showed that
$$
|PP(\nabla_{p,q},k)| = |PP((p)^q,k)| = \prod^p_{i=1} \prod^q_{j=1}\prod^m_{k=1} \frac{(i+j+k-1)}{(i+j+k-2)},
$$
where the second equality is a well known result of MacMahon's.
His proof used a branching rule to show the irreducible representations in question are equinumerous, and at present no bijective proof has been published.
Comment: There is upcoming work by Nathan Williams and his co-authors on this topic, involving jeu-de-taquin bijections.
Answer: Given $k$ conjugacy classes $C_1,C_2,\dots,C_k$ in a finite group $G$ with unity $e$, we may ask what is the probability $p(C_1,\dots,C_k)$ that $g_1\dots g_k=e$ if $g_i\in C_i$ is chosen uniformly at random. In the (say, complex) group algebra $\mathbb{C}[G]$ it is just the coefficient of $e$ in the product $\prod_{i=1}^k \varphi_i$, where we denote
$$\varphi_i=|C_i|^{-1}\sum\limits_{g\in С_i} g.$$ It is natural to expand central functions $\varphi_i$ as linear combinations of irreducible characters (we identify an irreducible character $\chi$ on the group $G$ and the element $\sum \chi(g) g$ of $\mathbb{C}[G]$, which we again denote $\chi$.) These elements $\chi$ satisfy simple algebraic relations in the group algebra: $\chi_1\chi_2=0$ for $\chi_1\ne \chi_2$, $\chi^2=\frac{|G|}{\dim \chi} \chi$. This is bit more delicate property of characters than what is usually called `orthogonality relations'. We have $$\varphi_i=|G|^{-1}\sum_{\chi} \bar{\chi}(c_i)\cdot \chi,$$
where summation is taken over all irreducible characters and $c_i\in C_i$ are arbitrary fixed elements. This is just the orthogonality relation itself. Well, now substitute this expression of $\varphi_i$ and expand brackets in $\prod_{i=1}^k \varphi_i$. Summands which contain at least two different characters disappear. Thus we have
$$
p(C_1,\dots,C_k)=[e]
\prod_{i=1}^k \varphi_i=|G|^{-k}\sum_{\chi} [e]\frac{|G|^{k-1}\prod_{i=1}^k
 \bar{\chi}(c_i)}{(\dim \chi)^{k-1}}\chi=|G|^{-1}\sum_{\chi}\frac{\prod_{i=1}^k \bar{\chi}(c_i)}{(\dim \chi)^{k-2}}.
$$
This formula is particularly useful for the symmetric group $G=S_n$, where we may use combinatorial formulae of Murnaghan - Nakayama for the values of characters. For example, if $C_1$ is the class of a long cycle, there exist only $n$ characters for which $\chi(c_1)\ne 0$. The following is Boccara's nice formula for the case $C_1=C_2=$(long cycles), $C_3$=class with cyclic type $(\lambda_1,\dots,\lambda_m)$:
$$
p(C_1,C_2,C_3)=\frac1{(n-1)!}\int_0^1 \prod_{i=1}^m (x^{\lambda_i}-(x-1)^{\lambda_i})dx.
$$
So, for $C_3=C_2=C_1$ (and odd $n$) we get that a probability that product of two long cycles is again a long cycle equals $2/(n+1)$.
See more on product of cycles in the slides by Richard Stanley.
This allows to get a number of combinatorial results on product of classes is the symmetric group $S_n$.
Answer: Maschke tells you that $\mathbb C[G] \cong \bigoplus_V V^*\otimes V$, where $V$ runs over the irreps of a finite group $G$. Apply this to $G= S_n$ and take dimensions, and you get $n! = \sum_{\lambda \vdash n} \#SYT(\lambda)^2$, which can be proven combinatorially with the Robinson-Schensted correspondence.
Generalizing this, consider the $GL(k)\times GL(n)$-representation $Sym(Hom(\mathbb C^k,\mathbb C^n)) \cong \bigoplus_{\lambda_1 \geq \ldots \geq \lambda_{\min(k,n)}} (V^{GL(k)}_\lambda)^* \otimes V^{GL(n)}_\lambda$.  The LHS has a basis of monomials, corresponding to $k\times n$ matrices of naturals. The RHS has a basis of pairs of same-shape SSYT. This $\cong$ can be proven combinatorially, the RSK correspondence. There is another such story with $Alt$ in place of $Sym$.
Answer: Define a partition move to be the removal and then addition of a box of the Young diagram of a partition.
Thus there are unique partition moves from $(2,1)$ to $(3)$ and from $(2,1)$ to $(1,1,1)$, and two moves (corresponding to the two removable boxes) from $(2,1)$ to $(2,1)$. Let $M_t(n)$ be the number of sequences of $t$ partition moves from $(n)$ to $(n)$. For example, $M_3(2) = 4$.
In a joint paper with John Britnell we used the  descent algebra of the symmetric group to show that $M_t(n)$
is the number of set partitions of $\{1,\ldots,t\}$ into at most $n$ subsets.
We do not have a bijective proof of this identity. There is a natural candidate for a bijection, using the RSK-correspondence; rather unexpectedly, this bijection works for all $t \le 7$ and $n\le 12$, but fails for $t = 8$ and $n=5$. (See Proposition 7.2 in the paper.)
Answer: Here's an example that involves a group other than the symmetric group.
Let ${\mathbb F}_{q^n}$ denote the finite field with $q^n$ elements.  Since ${\mathbb F}_{q^n}$ is a vector space of dimension $n$ over ${\mathbb F}_q$, we may regard a generator of the multiplicative group ${\mathbb F}^*_{q^n}$ as an element of $GL_n({\mathbb F}_q)$; define a Singer cycle to be such a generator.  Also define a reflection to be a nontrivial element of $GL_n({\mathbb F}_q)$ whose fixed points form a hyperplane.

Theorem (Lewis–Reiner–Stanton). The number of factorizations of a Singer cycle into a product of $n$ reflections is $(q^n-1)^{n-1}$.

The only known proof uses the character theory of $GL_n({\mathbb F}_q)$ in an essential way.
Note that the above theorem is analogous to the classical result that the number of factorizations of an $n$-cycle in ${\mathfrak S}_n$ into a product of $n-1$ transpositions is $n^{n-2}$.
Answer: One of the most well known applications of representation theory in combinatorics is the explicit construction of Expander graphs by Margulis (using Kazhdan's property (T)). See any book about expanders (such as Lubotzky's) for example.
The combinatorial statement in this case can be thought as having bounded Cheeger constant, or equivalently bounding the Rayleigh quotient.
EDIT - in order to address the last sentence, a non-constructive proof (by the probabilistic method) was known before Margulis' construction (probably due to Kolmogorov, but usually formally attributed to Pinsker). Since Margulis, a whole industry of explicit constructions has been developed, most notably with applications of arithmetic combinatorics in the last few years (what's known as the Bourgain-Gamburd method), although one might argue whether arithmetic combinatorics is part of combinatorics or harmonic analysis.
Answer: It seems to me that all answers to this question will involve the symmetric group. Here is one example from the representation theory of $S_n$ over a field of characteristic $2$:
$$
\prod_{i=1}^\infty(1-x^i)^{-1}=\prod_{i=1}^\infty(1-x^{2i})^{-2}\sum_{n=0}^\infty x^{n(n+1)/2}.
$$
The left hand side is the generating function for partitions - the coefficient of $x^n$ is the number of partitions of $n$. The right hand side reflects the way the partitions of $n$ split into $2$-blocks of partitions, according to their $2$-cores. The $2$-cores have the form $[n,n-1,\dots,2,1]$ giving the sum on the extreme right. The other infinite product refers to pairs of partitions, and arises from the enumeration of partitions in a block using a $2$-abacus. Now this equality rearranges and simplifies to
$$
\prod_{i=1}^\infty\frac{(1-x^{2i})}{(1-x^{2i-1})}=\sum_{n=1}^\infty x^{n(n+1)/2}.
$$
The left hand side ranges over all partitions with all even parts distinct; a partition with $e$ distinct even parts contributes $(-1)^e$ to the sum.
So for $n$ not a triangular number, the number of partitions with an odd number of distinct even parts must equal the number of partitions with an even number of distinct even parts. This is not obvious to me, but it recalls Euler's famous pentagonal number theorem.
More generally, let $t>0$ and let $c_n$ be the number of $t$-cores of $n$. Then $C_t(x)=\sum_{n=0}^\infty c_nx^n$ is the generating function for $t$-cores. Apart from $t=2$, there does not seem to be any simple description of $C_t(x)$, although it is known that $c_n>0$ for all $n$ and $t>3$ a prime. Then the $t$-abacus idea gives
$$
\prod_{i=1}^\infty(1-x^i)^{-1}=\prod_{i=1}^\infty(1-x^{ti})^{-t}C_t(x).
$$
Answer: Many identities involving multiplicative structure constants originate in representation theory.
There are plenty of positivity statements about such structure constants but no combinatorial proof is known, or appeared much later.
See the related question here about unsolved problems in representation theory.
One example is the Schubert structure constants (the constants appearing when a product of Schubert polynomials is again expanded in Schubert polynomials). For representation-theoretical reasons, these are non-negative integers, but it is completely mysterious why.
There is also certain symmetries in the Macdonald polynomials and diagonal harmonics, which are evident from the definition, but completely unclear from the current combinatorial models.
Comment: @AllenKnutson: In fact, I believe recent work of Watanabe does give precisely a representation-theoretical reason for Schubert structure constants on full flag manifolds to be nonnegative. See http://arxiv.org/abs/1410.7981.
Comment: What _representation-theoretical_ reason do you have for Schubert structure constants on _full flag_ manifolds to be nonnegative? I know them if you change the first part to "geometric" or second to "Grassmannian".
Comment: @AllenKnutson: Right, feel free to modify the statement so it makes sense.
Answer: You may be interested in Yuval Filmus's survey paper Spectral Methods for Intersection Problems (Friedgut's Research Program in Extremal Combinatorics) (and/or his thesis which seems to have exactly the same title), which purports to explain how a number of combinatorial results along the lines of the Erdős-Ko-Rado theorem can be proved using representation theory.  (I'm not sure one should call such results "identities", however: they're more along the lines of maximal combinatorics.)
Answer: The Robinson-Schensted correspondence has already been mentioned in another answer, as providing a bijection between permutations of $\{1,\dots,n\}$ and pairs of standard Young tableaux of the same shape (corresponding to partitions of $n$).
But this correspondence goes even further, since it provides three equivalence relations on the permutations (same left tableau, same right tableau, same shape), and in fact these equivalence relations are the same as those defining the left-, right- and twosided Kazhdan-Lusztig cells, when $S_n$ is seen as the Weyl group in type $A_{n-1}$.
Further, the twosided order on the twosided cells coincides with the dominance order of the tableau (i.e. partitions) determined by the twosided cells.
So this is an example of a combinatorial thing having a representation theoretic interpretation.


Ruby on Rails: rails3_fullcalendar updating event

Question: I'm trying to start an app based on this application
 https://github.com/bokmann/rails3_fullcalendar
I run rake db:migrate from the root of the folder I extracted from the downloaded zip, then I start the server.
When I navigate to localhost:3000 I see the calendar, and everything works fine.
I can enter an event which then appears in the database, and appears correctly on the calendar.
The problems start when I try to move an event, The event moves, and the date is changed, but as soon as I leave the page, the event disappears from the calendar even though it is still in the database.
Has anyone had this trouble using this example application? The example is over 2 years old so could it be to do with the version of rails or ruby I am using, (Rails 3.0.7, ruby 1.9.2p320 (2012-04-20 revision 35421) [i686-linux])
Might be best just to download and run yourself to see what I mean. Thanks in advance
Answer: You should open an issue on github project's page.


Climbing a ladder in zero g

Question: Let's say I have a normal, space-suited human who, for various reasons, must climb a very long, indestructible ladder in space. Air, heat, food, water and waste are already accounted for. What I want to know is what their rate of progress up the ladder will be ? How many kilometers a day can they travel ? How much rest do they need? Also, how long before ambient radiation begins to affect them? How likely are they to be hit by micro-meteors or other space debris ?
Comment: "Climb"? Why not just coast along beside it?
Comment: The specific location in space will determine the presence of radiation/debris. Is this ladder in deep space, or orbiting a star, or what?
Answer: "The" Assumption
Since your human is in a spacesuit, I will assume the ladder is in a (near) vacuum.
Zero gravity v. microgravity
The use of "zero gravity" versus microgravity—which is the common feeling of "weightlessness" felt by astronauts in orbit—is an important distinction. I will assume you mean microgravity. The gravity they experience is almost as high as on the surface of the Earth, and they are falling! The trick is, they're moving sideways (in orbit) fast enough that they basically fall "around" the Earth. That's kind of an oversimplification, but with the links I've provided, you can get into as much detail as you like.
Now, back to your guy/gal in the space suit.
Acceleration
Since the human doesn't have any gravity to pull them down, or air drag to reduce their velocity, they could, in theory, accelerate to very fast speeds. Each time they push "down" on a ladder rung, the equal-and-opposite force (see Newton's 2nd law) imparts a force on them in the "upward" direction, which is felt as acceleration.
The acceleration in this case is momentary; it lasts only for as long as they are pushing on the ladder in the opposite direction. Think of it like a spaceship firing its maneuvering thruster. That momentary acceleration imparts a permanent increase in velocity (or at least until some other force acts to accelerate them in a different direction).
So in a sense, they're not "climbing" the ladder so much as accelerating themselves along. In real EVAs (spacewalks), astronauts always tether themselves to the frame of what they're working on, so they don't "accelerate" themselves to deep space. So, realistically, safety concerns would probably be the bottleneck. However, there's a way to get those tethers out of the way:
Maybe you build a cylindrical cage around the ladder to obviate the need for tethering. You still have a problem with protrusions on the suit getting caught or sheared off on the way "up" if the velocity is too high, but I'll recommend some high(er) tech solutions for that. (So far, all you need is a decent welder.)
Micro meteors
This risk is very minimal, at least near Earth. If you're talking about another planetary system, I would need to know more to say with certainty. But especially given the cylindrical cage idea, above, most small meteor/debris impacts would impact/deflect/ablate on the cage itself, rather than injuring the astronaut or her suit.
Km/day
This is where I take all of my soft descriptive text and turn it into hard numbers.
A useful equation for acceleration is:
$$a = \frac{\Delta v}{\Delta t}$$
Reasonable values? Let's say your astronaut can grip that rung for 0.5 seconds and push "down". The force he can exert on that would certainly be less than his mass (including suit), but let's say he can manage (50kg, or let's round up to 500N). With some unit conversions and basic algebra, we get:
$$\Delta v = a \cdot \Delta t = 5 m/s^2 \cdot 0.5 s = 2.5 m/s$$
So every time he pushes off a rung, our astronaut's speed increases by $2.5 m/s$. Now there's a limit to how many times he can do that, because at a certain speed, he's more likely to break a finger than actually increase his speed, plus the interval ($\Delta t$) will decrease. Think of this like trying to "speed up" a thrown baseball already in the air.
Thus, it's a little hard to estimate, but let's say, from a standstill in the ladder's reference frame, the astronaut could manage ten good, equal pulls on the ladder. Her speed would increase to a final velocity of $2.5 m/s \cdot 10 = 25 m/s = 90 km/h$, which is a reasonable freeway speed in many cities (and about as fast as I would reasonably like to travel in a narrow tube, in a spacesuit!).

Air, heat, food, water and waste are already accounted for. ... How many kilometers a day can they travel ? How much rest do they need?

Distance: $90 \frac{km}{h} \cdot 24 \frac{h}{day} = 2,160 \frac{km}{day}$
Rest
No more than usual. Those "ten pulls" would be nothing for a trained astronaut. In fact, most terrestrial office workers could pull that off.
Deceleration
At the end of the ladder, the same process must happen in reverse: the astronaut must find a way to decelerate (which simply means acceleration in the opposite direction), so they don't go head-first into a bulkhead at 90 km/h. There are many methods they could use, such as manual (lightly grab the rungs to slow down), or mechanical (the "station" has built-in decelerator flaps near the end that work like a series of nets to gently slow down the astronaut).
High tech options
To keep the astronaut aligned in the center of the tube, you could use strong (electro)magnets in a ring to repulse the astronaut, pushing her into the center of the cylinder. Her suit would also need a magnet (strong earth magnet would do well enough).
Going a step further, you could even use those magnets to accelerate (and decelerate) your astronaut automatically, similar to a coilgun, which would allow for very high speeds (safer, due to the magnetic containment idea, above). If safety is sufficiently addressed, the same daily journey could easily traverse a 3-5 times the distance of a manual launch, however any failure in the magnetics could easily prove fatal.
Rest
No more than usual! With either solution, the manual effort required is minimal (just a few minutes of work), and only related to stopping and starting the journey.
Radiation
I'm not exactly sure where your ladder will be located (it makes a big difference), but for reference, have a look at the Health Threat from Cosmic Rays on Wikipedia; it has some charts that compare the levels with mean sea level dose, with durations listed. You might have to do a little arithmetic to make it relevant to your story, but you can always ask another question if you run into any uncertainty there.
Conclusion
I believe I've hit all of your sub-questions as accurately as I possibly can. My goal here (as with many of my answers) is not only to give you the specific answers you're looking for, but provide a little bit of the background information so you can understand the basics a little better, and be able to adapt them as needed to fit your story/work.
Comment: This is great! Very thorough and quick answer. May I ask about an alternate scenario? What if the ladder was tethered to the Earth and continued until geosynchronus orbit ? (assume that there's a platform at the top with a counterweight on the other side for balance.) What is the climbing speed then? Would it change if there were some type of device (insert handwavium tech here) that reduced the climber's relative weight to zero?
Comment: @mytallest1970 You may be interested in [Couldn't I escape Earth's gravity traveling only 1 mph?](http://space.stackexchange.com/q/4688/415) on [space.se].
Comment: We know that the ladder is *indestructible*, but we don't know what it is attached to. Again Newton's second law of motion say that for every action there is an equal and opposite reaction. When you push down on the ladder to "climb" it, there must be something arresting the ladder's downward momentum, or you end up wondering, as it was once so eloquently put, at what time Oxford stops at the train. (I think that was in reference to Einstein's theory of relativity, but it works here, too.)
Comment: @mytallest1970 That scenario is completely different, since you are now climbing an ordinary ladder on the Earth's surface, with familiar gravity. When you include life support (as specified in the question), suits are commonly in the 100kg range. GSO/GEO orbit is a 42164km - 6371km = 35793km climb. I think you'd be hard-pressed to find *anyone* who could make that climb with 100kg of dead weight. For the first 200km or so, gravity is at least 90% of that on the surface. There are other problems, too. Post a new question with specifics if you want to see math/sources. Look up "Space Elevator".
Answer: Type_outcast has really explained the crux of the matter. Here I would comment on a few flaws in the environment presented in the question.
In open space (as in, with no artificial gravity) there is no (negligible) gravity so the very idea of building a "ladder" is questionable. You can achieve the same results with simply having one metal pole of 3-4 inch diameter. The rungs would actually make it harder for the astronaut to traverse through because it would make it hard for him/her to tether to the ladder while moving along it. If you have one really long, smooth metallic pipe, the astronaut can easily build a loose curl with his/her rope and attach firmly to the pole without any hindrance to motion. You only need to hold the pipe once and push it down to get yourself moving upwards forever. Do it a few more times and you would be moving at a car's speed on a highway. I would not go into details as that has been sufficiently explained by Type_outcast.
Rest? None is required, really. Since your astronaut is going on a free trip, all his/her time is rest already.
I cannot say anything about the probability of getting hit by a meteor, since it really depends on your settings. If your dude/girl is going anywhere between mars and Jupiter, good luck is all that could save him/her. However if he is going between Earth and Venus, there would be other concerns (heat) to attend to, instead of meteors. One important thing to notice about meteors is that the damage done does not only depend on the speed of the falling meteor, but also on the speed of the astronaut. It is the relative speed of the two (alongwith their masses) which determines the damage done.
Answer: The type_outcast estimate breaks at the very first assumption that the astronaut may grip the ladder for half a second. On the contrary, faster you go, less time you have to accelerate. The ultimate speed is limited precisely by how fast you can move your limbs.
Some data indicate that a world class boxer delivers a punch at 11 to 14 mps while an average person may reach 7 mps. In a space suite I guess 5 mps (i.e about 10 miles per hour) is the best one can hope for.

Climbing a ladder in zero g


How can I know if my boiler is supported by Nest 3rd Gen thermostat?

Question: Here are the pics
How do I know if my hot water boiler is compatible with Nests domestic hot water control
Comment: Have you contacted Nest? That would probably be the best way to know for sure.
Comment: Also. Not many people like to click through to photos, so consider using the image option in the editor to add the photos directly to the question.  Including the make and model of the boiler would also be useful.
Answer: Unless you already have a separate electronic controller/programmer for your water heater you can't control it with your Nest thermostat.  Since you haven't mentioned it or provided pictures of a controller or wiring, I assume you don't have one.  Having a controller for your water heater is common in some regions but not in others.  Based on search results from Nest's UK website, I guess it's more common in Europe.  In the southern US, I've never seen a controllable water heater.
A basic water heater is controlled by a knob or adjustment screw and doesn't contain any electronics to interface with.
Answer: I take it that in the box there are 2 x "Heat Links" (HL for short.)
One will replace the HW (Hot Water) thermostat and the other is for the room thermostat CH (Heating)
If your boiler is "Open Therm" compatible it will most likely work with Nest, if not "Open Therm" don't worry (yet)as it may still work.


Are Big Sur setup files lost after installing?

Question: I've upgraded a Mac to Big Sur but I need to reinstall from scratch, I can't find the setup I've downloaded, is it hidden somewhere or does it need to be redownloaded? I'm on 4g with limited GB so it would be better to use local files if possible
Answer: I can't say for certain with Big Sur, having never run it from scratch or indeed as an upgrade, but traditionally the app is stored in Applications, as "Install macOS [name]" & is deleted on successful run.
It doesn't delete it if you install to a different drive than the one the computer is currently booted from.
Otherwise, the trick has always been to duplicate it elsewhere before you run it. I keep a collection on an external drive… though I can't say I've ever been considered 'normal' in that respect :P
Comment: Ok, it's not in the Application folder so it's gone. The setup should at least ask if files are to be removed after install :(
Comment: I guess that's something everybody learns after the first time. I can see their point that you no longer need it if it was successful, otherwise the unwary user would have several of them in there, one for each year they've had the Mac, just eating space.


Excessive torrenting and hard drive health

Question: I tend to download about 100GB stuff every month and most of it over torrent and I have been doing this for almost 2 years.
I download things to my windows drive and then move them to other locations.
I was wondering how would this affect my hard drive's health because I have read that HDDs have limited read write cycles.
Furthermore, I have observed that torrent clients write data quite randomly onto disk(by randomly I mean scattered/fragmented).
Will this affect my hard drive's health?
Comment: Where did you read that HDDs have limited read/write cycles?!
Comment: Don't remember....it was a long time back...seems to be wrong after a few google searches..
Answer: Actually, HDDs have mean times between failure - they tend to usually die due to mechanical failure or electrical failure, and this will happen anyway, due to run time, not data transfer.
I suggest taking a look at this old closed question of interest on hard drive lifespans here - which seems to reference this paper by google - they have a graph of annualised failure rate for 5 years on page 5. It indicates, outside the first year (when the obviously defective disks die) and the 5th year (by which you may want to consider replacing the drive), utilisation has very little effect.
SSDs have limited read/write cycles, and probably arn't a good choice for torrent storage
Fragmentation can be an issue, but newer versions of windows defrag automatically, and its a performance issue rather than a lifespan issue. I believe many torrent clients have an option to preallocate the space to avoid that as well.
I personally ended up having a seperate drive for OS, transient storage and long term storage, with the transient storage drive including the long term storage drive's backups. On a longer term, i may look at building a san for this.
A safe idea is to assume any drive can fail at any time, and work accordingly, but I don't really think that downloading torrents has a greater effect than the fact that your hard drive is running or the temperatures its running under,
Comment: The two Hitachi HDS728080PLA380 80 GiB HDDs with software Raid1 / Raid0 that I used for daily work (OS + storage) and 24h 7/7d torrenting since 2005, are still doing fine as my father's Ubuntu desktop's main drives. For three years, that add to the 1869 days I had them with max temp 52°C (126 °F). Had `rtorrent` configured for whole file pre-allocation and delayed write. Hard drives are here to serve. Torrenting and desktop I/O are little compared to server / database's.
Comment: Indeed. Most hard drive failures are on the electronics board and are not related to "numbers of IOs" but rather to total power-on time.
Answer:
Applications do not determine where they write on the disk. THat is
up to Windows which uses the Master File Table ($MFT) a super hidden
file on the disk that keep track of allocated blocks. So when an
application such as explorer or winrar or an installer requests disk
space, Windows takes care of which spaces are free from the
beginning of the volume and fills them in that order. $MFT for NTFS
replaced the previously used similar function with $FAT32 File
ALLOCATION sp. Table.
Constant thrashing of files write/install/delete/move leaves your
drive extremely fragmented since each file is unlikely the same size
as the ones deleted.  Find a good defragger that allows maybe allows
you to specify zones for big files. Otherwise just use Auslogics
free defragger or SysInternals free defrag tool as a scheduled task. It is not critical to do that often as Windows is multitasking and doing random seeks anyway with registries, cache and %temp% files , but monthly may be ok if you want to see your files more contiguous.  Just add a task to Schedule task point to the defragger and set a schedule.
Otherwise disk drives ought to last 5 yrs non-stop trouble-free. YOur mileage may very depending on if it is dropped in an external box when running or a laptop or is running hot in a  tower with other drives stacked too close and no air-flow between them.
Comment: quite nice answer....especially the first point....and thanks for the other tips...but i am inclined towards giving credit to Journeyman because his answer directly addresses the query that whether data writing will affect HDD health...
Comment: No Problem. I spent 11 yrs in the HDD engineering business as Test Eng. Mfg for OEM disks in the 80/90's and Unisys Peripheral manufacturing. But since failure modes for every vendor may vary depending on weakest link, I didn't want to bore you with all the root causes of failure, but writing is a weak link for SSD not HDD. Maybe you read that and were thinking HDD. Anyways flash write algorithms randomize blocks so usage is distributed evenly and that extends MTBF of SSD from 10K write cycles 10~1000x depends on % free space. The weakest link for  HDD's are shock, heat and moisture
Comment: The thing about MTBF now is that even SMART technology is useless since ECC has become so powerful and in use since the age of high density. I used to reverse engineer everyone's drive to qualify them for OEM corp purchases and in those days as now "user experience and average MTBF" did not match due to variance in handling and environmnent. Now there is no almost warning for failures whereas before soft error rates were an early warning. ECC has raised the bar so they rarely exist. Hitachi had the best MTBF in high end$$ drives in Japan when Unisys was the #1 computer company in Japan.
Comment: back in the 80's write error rates were on the order of 10^12 and depended on vendor's thermal compensation for overshoot due to magnetic fatigue with heat after servo calibration on power on. Overshoot on random seeks occasionally caused it to be written off track if the sector just happened to be next when a write after seek completed. I discovered this on Toshiba drives and Japan's Eng Mgr came for a month to Winnipeg to fix the design at our Burroughs Facility. ( no longer in existence ) But that was with a dedicated servo surface and stacked heads& disks. Now its embedded servo per sector


Is there a way to do currying in C?

Question: Say I have a pointer to a function _stack_push(stack* stk, void* el). I want to be able to call curry(_stack_push, my_stack) and get back a function that just takes void* el. I couldn't think of a way to do it, since C doesn't allow runtime function definition, but I know there are far cleverer people than me here :). Any ideas?
Answer: I found a paper by Laurent Dami that discusses currying in C/C++/Objective-C:
More Functional Reusability in C/C++/Objective-c with Curried Functions
Of interest to how it is implemented in C:

Our current implementation uses existing C constructs to add the currying mechanism. This  was much easier to do than modifying the compiler, and is sufficient to prove the interest of currying. This approach has two drawbacks, however. First, curried functions cannot be type-checked, and therefore require careful use in order to avoid errors. Second, the curry function  cannot know the size of its arguments, and counts them as if they were all of the size of an integer.

The paper does not contain an implementation of curry(), but you can imagine how it is implemented using function pointers and variadic functions.
Comment: +1 great find, and I like "Although we did not run extensive tests, we can estimate a curried function call to be approximately 60 times slower than a normal function call."
Comment: (I like it because sometimes you need something very badly, and a solution that runs only 60 times slower is infinitely better than no solution at all.)
Comment: Sadly that paper is not downloadable in 2021.
Comment: Thanks, I found the link on the Wikipedia page "Currying": http://en.wikipedia.org/wiki/Curried_function
Comment: Variadic functions were actually the first thing that popped into my mind when I read the question and before scrolling down. Nice to see that my hunch was a decent one.
Comment: @BasileStarynkevitch: I found an alternative link here: https://docplayer.net/11997106-More-functional-reusability-in-c-c-objective-c-with-curried-functions.html
Answer: GCC provides an extension for the definition of nested functions. Although this is not ISO standard C, this may be of some interest, since it enables to answer the question quite conveniently. In short, nested function can access the parent function local variables and pointers to them can be returned by the parent function as well.
Here is a short, self-explanatory example:
#include <stdio.h>

typedef int (*two_var_func) (int, int);
typedef int (*one_var_func) (int);

int add_int (int a, int b) {
    return a+b;
}

one_var_func partial (two_var_func f, int a) {
    int g (int b) {
        return f (a, b);
    }
    return g;
}

int main (void) {
    int a = 1;
    int b = 2;
    printf ("%d\n", add_int (a, b));
    printf ("%d\n", partial (add_int, a) (b));
}

There is however a limitation to this construction. If you keep a pointer to the resulting function, as in
one_var_func u = partial (add_int, a);

the function call u(0) may result in an unexpected behaviour, as the variable a which u reads was destroyed just after partial terminated.
See this section of GCC's documentation.
Comment: From the manual (under the link that you have provided): "If you try to call the nested function through its address after the containing function has exited, **all hell will break loose**."
Comment: If you're already restricting yourself to GCC, you could use statement expressions to postpone hell till the calling function exits (i.e: will work for everything but asynchronous callbacks): https://gist.github.com/a3f/2729c1248d0f2ee39b4a
Answer: Here's my first guess off the top of my head (may not be the best solution).
The curry function could allocate some memory off the heap, and put the parameter values into that heap-allocated memory. The trick is then for the returned function to know that it's supposed to read its parameters from that heap-allocated memory. If there's only one instance of the returned function, then a pointer to those parameters can be stored in a singleton/global. Otherwise if there's more than one instance of the returned function, then I think that curry needs to create each instance of the returned function in the heap-allocated memory (by writing opcodes like "get that pointer to the parameters", "push the parameters", and "invoke that other function" into the heap-allocated memory). In that case you need to beware whether allocated memory is executable, and maybe (I don't know) even be afraid of anti-virus programs.
Answer: The good news: There is a way to write a program that will do this in standard ANSI C, without using any compiler-specific features. (In particular, it does not require gcc's nested function support.)
The bad news: It requires creating little bits of executable code to serve as trampoline functions at runtime. This means that the implementation will be dependent on:

The processor instruction set
The ABI (in particular, the function calling convention)
The operating system's ability to mark data as executable

The best news:
If you just need to do this in real, production code… you should use the closure API of libffi. It's permissively-licensed and contains careful, flexible implementations for many platforms and ABIs.

If you're still here, you want to nerd out and understand how to implement this "from scratch."
The program below demonstrates how to curry a 2-parameter function into
a 1-parameter function in C, given…

x86-64 processor architecture
System V ABI
Linux operating system

It is based on the "Trampoline Illustration" from
Infectious Executable Stacks, but with the trampoline structure stored on the heap (via malloc) rather on than the stack. This is much safer because it means we don't have to disable the compiler's stack execution protection (no gcc -Wl,-z,execstack).
It uses the Linux mprotect system call to make the heap object executable.
The essence of the program is that it takes a pointer to a two-parameter function (uint32_t (*fp2)(uint32_t a, uint32_t b)) and converts it to a pointer to a one-parameter function (uint32_t (*fp1)(uint32_t a)) which invokes fp1 with a pre-set value for the parameter b. It does this by creating little 3-instruction trampoline functions:
movl $imm32, %esi  /* $imm32 filled in with the value of 'b' */
movq %imm64, %rax  /* $imm64 filled in with the value of 'fp2' */
jmpq *%rax

With the values of b and fp2 stitched into it appropriately, a pointer to the block of memory containing these 3 instructions can be used as the one-parameter function pointer fp1 precisely as described above. That's because it obeys the x86-64 System V calling convention, in which one-parameter functions receive their first parameter in the %edi/%rdi register, and two-parameter functions receive the second parameter in the %esi/%rsi register. In this case, the one-parameter trampoline function receives its uint32_t parameter in %edi, then fills in the value of the second uint32_t parameter in %esi, then jumps directly to the "real" two-parameter function which expects its two parameter in exactly those registers.
Here's the complete working code, which I've also put up on GitHub at dlenski/c-curry:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include <unistd.h>
#include <sys/mman.h>
#include <stdint.h>

#define PAGE_START(P) ((uintptr_t)(P) & ~(pagesize-1))
#define PAGE_END(P)   (((uintptr_t)(P) + pagesize - 1) & ~(pagesize-1))

/* x86-64 ABI passes parameters in rdi, rsi, rdx, rcx, r8, r9
 * (https://wiki.osdev.org/System_V_ABI), and return value
 * goes in %rax.
 *
 * Binary format of useful opcodes:
 *
 *       0xbf, [le32] = movl $imm32, %edi (1st param)
 *       0xbe, [le32] = movl $imm32, %esi (2nd param)
 *       0xba, [le32] = movl $imm32, %edx (3rd param)
 *       0xb9, [le32] = movl $imm32, %ecx (4rd param)
 *       0xb8, [le32] = movl $imm32, %eax
 * 0x48, 0x__, [le64] = movq $imm64, %r__
 *       0xff, 0xe0   = jmpq *%rax
 */

typedef uint32_t (*one_param_func_ptr)(uint32_t);
one_param_func_ptr curry_two_param_func(
    void *two_param_func,
    uint32_t second_param)
{
    /* This is a template for calling a "curried" version of
     * uint32_t (*two_param_func)(uint32_t a, uint32_t b),
     * using the Linux x86-64 ABI. The curried version can be
     * treated as uint32_t (*one_param_func)(uint32_t a).
     */
    uintptr_t fp = (uintptr_t)two_param_func;
    uint8_t template[] = {
        0xbe, 0, 0, 0, 0,                                   /* movl $imm32, %esi */
        0x48, 0xb8, fp >>  0, fp >>  8, fp >> 16, fp >> 24, /* movq fp, %rax */
                    fp >> 32, fp >> 40, fp >> 48, fp >> 56,
        0xff, 0xe0                                          /* jmpq *%rax */
    };

    /* Now we create a copy of this template on the HEAP, and
     * fill in the second param. */
    uint8_t *buf = malloc(sizeof(template));
    if (!buf)
        return NULL;

    memcpy(buf, template, sizeof(template));
    buf[1] = second_param >> 0;
    buf[2] = second_param >> 8;
    buf[3] = second_param >> 16;
    buf[4] = second_param >> 24;

    /* We do NOT want to make the stack executable,
     * but we NEED the heap-allocated buf to be executable.
     * Compiling with 'gcc -Wl,-z,execstack' would do BOTH.
     *
     * This appears to be the right way to only make a heap object executable:
     *   https://stackoverflow.com/a/23277109/20789
     */
    uintptr_t pagesize = sysconf(_SC_PAGE_SIZE);
    mprotect((void *)PAGE_START(buf),
             PAGE_END(buf + sizeof(template)) - PAGE_START(buf),
             PROT_READ|PROT_WRITE|PROT_EXEC);

    return (one_param_func_ptr)buf;
}

/********************************************/

int print_both_params(int a, int b)
{
    printf("Called with a=%d, b=%d\n", a, b);
    return a+b;
}

int main(int argc, char **argv)
{
    one_param_func_ptr print_both_params_b4 =
        curry_two_param_func(print_both_params, 4);
    one_param_func_ptr print_both_params_b256 =
        curry_two_param_func(print_both_params, 256);

    print_both_params_b4(3);    // "Called with a=3, b=4"
    print_both_params_b256(6);  // "Called with a=6, b=256"

    return 0;
}

Comment: very nice, out of curiosity, what was your motivation when you built this function?
Comment: I was trying to figure out if there was a way to pass arbitrary user data into a callback function where the API provided no support for this (a substantial design flaw). I got into quite a rabbit hole, and ended up writing this. Turns out that [`libffi` has an API for this](https://www.chiark.greenend.org.uk/doc/libffi-dev/html/Closure-Example.html#Closure-Example), which works across [many platforms and APIs](https://github.com/libffi/libffi#supported-platforms). Still, this was fun to figure out and explore…
Answer:
since C doesn't allow runtime function definition

This is in principle true in standard C. Read n1570 for details.
However, in practice it can be false. Consider

on POSIX systems (e.g. Linux) generating some C code at runtime in some temporary file /tmp/generated1234.c file which defines some void genfoo1234(void) function, compiling that file (e.g. using a recent GCC compiler as gcc -O -fPIC -Wall -shared /tmp/generated1234.c -o /tmp/generated1234.so) then using dlopen(3) on /tmp/generated1234.so then dlsym(3) on genfoo1234 on the handle returned by dlopen to get a function pointer). By personal experience, such an approach is today (in 2021, on Linux laptops) fast enough even for interactive usage (if each temporary generated C file has a few hundred lines of C code).

on x86, x86-64, ARM processors using some machine code generating library like GNU lightning, libgccjit (or in C++, asmjit)

In practice, you would generate code for a closure (grouping a function pointer with closed values) and use it as a callback.
A related point is garbage collection, so read the garbage collection handbook.
Consider also embedding some existing interpreter in your application, like Lua, GNU guile, Python, etc....
Study, at least for inspiration, the source code of these interpreters.
Quenniec's book Lisp in small pieces  and the Dragon book are worthwhile reading. Both explain practical issues and implementation details
See also the __builtin_call_with_static_chain in recent GCC compilers (in 2021).
Comment: This is a great answer, full of cool information and ideas. Thank you!
Answer: Here is an approach to doing currying in C. While this sample application is using the C++ iostream output for convenience it is all C style coding.
The key to this approach is to have a struct which contains an array of unsigned char and this array is used to build up an argument list for a function. The function to be called is specified as one of the arguments that are pushed into the array. The resulting array is then given to a proxy function which actually executes the closure of function and arguments.
In this example I provide a couple of type specific helper functions to push arguments into the closure as well as a generic pushMem() function to push a struct or other memory region.
This approach does require allocation of a memory area that is then used for the closure data. It would be best to use the stack for this memory area so that memory management does not become a problem. There is also the issue as to how large to make the closure storage memory area so that there is sufficient room for the necessary arguments but not so large that excess space in memory or on the stack is taken up by unused space.
I have experimented with the use of a slightly differently defined closure struct which contains an additional field for the currently used size of the array used to store the closure data. This different closure struct is then used with a modified helper functions which removes the need for the user of the helper functions to maintain their own unsigned char * pointer when adding arguments to the closure struct.
Notes and caveats
The following example program was compiled and tested with Visual Studio 2013. The output from this sample is provided below. I am not sure about the use of GCC or CLANG with this example nor am I sure as to issues that may be seen with a 64 bit compiler as I am under the impression that my testing was with a 32 bit application. Also this would approach would only seem to work with functions that use the standard C declaration in which the calling function handles popping the arguments from the stack after the callee returns (__cdecl and not __stdcall in Windows API).
Since we are building the argument list at run time and then calling a proxy function, this approach does not allow the compiler to perform a check on arguments. This could lead to mysterious failures due to mismatched parameter types which the compiler is unable to flag.
Example application
// currytest.cpp : Defines the entry point for the console application.
//
// while this is C++ usng the standard C++ I/O it is written in
// a C style so as to demonstrate use of currying with C.
//
// this example shows implementing a closure with C function pointers
// along with arguments of various kinds. the closure is then used
// to provide a saved state which is used with other functions.

#include "stdafx.h"
#include <iostream>

// notation is used in the following defines
//   - tname is used to represent type name for a type
//   - cname is used to represent the closure type name that was defined
//   - fname is used to represent the function name

#define CLOSURE_MEM(tname,size) \
    typedef struct { \
        union { \
            void *p; \
            unsigned char args[size + sizeof(void *)]; \
        }; \
    } tname;

#define CLOSURE_ARGS(x,cname) *(cname *)(((x).args) + sizeof(void *))
#define CLOSURE_FTYPE(tname,m) ((tname((*)(...)))(m).p)

// define a call function that calls specified function, fname,
// that returns a value of type tname using the specified closure
// type of cname.
#define CLOSURE_FUNC(fname, tname, cname) \
    tname fname (cname m) \
    { \
        return ((tname((*)(...)))m.p)(CLOSURE_ARGS(m,cname)); \
    }

// helper functions that are used to build the closure.
unsigned char * pushPtr(unsigned char *pDest, void *ptr) {
    *(void * *)pDest = ptr;
    return pDest + sizeof(void *);
}

unsigned char * pushInt(unsigned char *pDest, int i) {
    *(int *)pDest = i;
    return pDest + sizeof(int);
}

unsigned char * pushFloat(unsigned char *pDest, float f) {
    *(float *)pDest = f;
    return pDest + sizeof(float);
}

unsigned char * pushMem(unsigned char *pDest, void *p, size_t nBytes) {
    memcpy(pDest, p, nBytes);
    return pDest + nBytes;
}

// test functions that show they are called and have arguments.
int func1(int i, int j) {
    std::cout << " func1 " << i << " " << j;
    return i + 2;
}

int func2(int i) {
    std::cout << " func2 " << i;
    return i + 3;
}

float func3(float f) {
    std::cout << " func3 " << f;
    return f + 2.0;
}

float func4(float f) {
    std::cout << " func4 " << f;
    return f + 3.0;
}

typedef struct {
    int i;
    char *xc;
} XStruct;

int func21(XStruct m) {
    std::cout << " fun21 " << m.i << " " << m.xc << ";";
    return m.i + 10;
}

int func22(XStruct *m) {
    std::cout << " fun22 " << m->i << " " << m->xc << ";";
    return m->i + 10;
}

void func33(int i, int j) {
    std::cout << " func33 " << i << " " << j;
}

// define my closure memory type along with the function(s) using it.

CLOSURE_MEM(XClosure2, 256)           // closure memory
CLOSURE_FUNC(doit, int, XClosure2)    // closure execution for return int
CLOSURE_FUNC(doitf, float, XClosure2) // closure execution for return float
CLOSURE_FUNC(doitv, void, XClosure2)  // closure execution for void

// a function that accepts a closure, adds additional arguments and
// then calls the function that is saved as part of the closure.
int doitargs(XClosure2 *m, unsigned char *x, int a1, int a2) {
    x = pushInt(x, a1);
    x = pushInt(x, a2);
    return CLOSURE_FTYPE(int, *m)(CLOSURE_ARGS(*m, XClosure2));
}

int _tmain(int argc, _TCHAR* argv[])
{
    int k = func2(func1(3, 23));
    std::cout << " main (" << __LINE__ << ") " << k << std::endl;

    XClosure2 myClosure;
    unsigned char *x;

    x = myClosure.args;
    x = pushPtr(x, func1);
    x = pushInt(x, 4);
    x = pushInt(x, 20);
    k = func2(doit(myClosure));
    std::cout << " main (" << __LINE__ << ") " << k << std::endl;

    x = myClosure.args;
    x = pushPtr(x, func1);
    x = pushInt(x, 4);
    pushInt(x, 24);               // call with second arg 24
    k = func2(doit(myClosure));   // first call with closure
    std::cout << " main (" << __LINE__ << ") " << k << std::endl;
    pushInt(x, 14);              // call with second arg now 14 not 24
    k = func2(doit(myClosure));  // second call with closure, different value
    std::cout << " main (" << __LINE__ << ") " << k << std::endl;

    k = func2(doitargs(&myClosure, x, 16, 0));  // second call with closure, different value
    std::cout << " main (" << __LINE__ << ") " << k << std::endl;

    // further explorations of other argument types

    XStruct xs;

    xs.i = 8;
    xs.xc = "take 1";
    x = myClosure.args;
    x = pushPtr(x, func21);
    x = pushMem(x, &xs, sizeof(xs));
    k = func2(doit(myClosure));
    std::cout << " main (" << __LINE__ << ") " << k << std::endl;

    xs.i = 11;
    xs.xc = "take 2";
    x = myClosure.args;
    x = pushPtr(x, func22);
    x = pushPtr(x, &xs);
    k = func2(doit(myClosure));
    std::cout << " main (" << __LINE__ << ") " << k << std::endl;

    x = myClosure.args;
    x = pushPtr(x, func3);
    x = pushFloat(x, 4.0);

    float dof = func4(doitf(myClosure));
    std::cout << " main (" << __LINE__ << ") " << dof << std::endl;

    x = myClosure.args;
    x = pushPtr(x, func33);
    x = pushInt(x, 6);
    x = pushInt(x, 26);
    doitv(myClosure);
    std::cout << " main (" << __LINE__ << ") " << std::endl;

    return 0;
}

Test output
Output from this sample program. The number in parenthesis is the line number in the main where the function call is made.
 func1 3 23 func2 5 main (118) 8
 func1 4 20 func2 6 main (128) 9
 func1 4 24 func2 6 main (135) 9
 func1 4 14 func2 6 main (138) 9
 func1 4 16 func2 6 main (141) 9
 fun21 8 take 1; func2 18 main (153) 21
 fun22 11 take 2; func2 21 main (161) 24
 func3 4 func4 6 main (168) 9
 func33 6 26 main (175)

Is there a way to do currying in C?


How do I restore unresponsive ipad?

Question: The problem is that I can't turn it off. I don't think the power button is okay, it only locks and unlocks the screen but does not shut the device off. My ipad however, I think, is also broken, i can't use it, nothing is responsive, the screen is empty, only the wallpaper is on there. The assistive touch is pretty much the only thing that is responding, with the volumes plus the notification center. But that's it. Even the lock screen button from the assistive touch doesn't respond when I hold it to shut the device off. What am I gonna do?
Comment: have you tried plugging it into your computer? in itunes there is an option to restore it. but i'd like to know if it shows up at all first
Comment: yes i have, but i couldnt restore it bcos my ipad wont shut down at all
Comment: please help me @dennismuys
Answer: since assistive touch is still working you can shut down the iPad through that.

Locate your "Assistive Icon" and tap on it
An option of 'Device' will appear along with other options.
Tap on 'Device'
You will see 'Lock Screen' icon. Press and Hold this option for a while.
After a few seconds, the power off screen will be displayed.
Slide it to switch off your iPad.

When it is off you will need to plug it into a charger to turn it on again or plug it into itunes to restore it
Comment: I have tried it as well. But it just won't work. I don't know what seems to be the problem but it there's just no power off screen
Comment: Are you sure you held it down long enough? here is a video that demonstrates it on an iPhone: https://www.youtube.com/watch?v=xmc4kr0dlbo&spfreload=10

and btw: what version of iOS are you using?
Answer: Hold the home button and power button together until it turns off. We get this issue once in a while and this does the trick every time.

How do I restore unresponsive ipad?


How can I keep my amp from tempering the tone of my processor? (rock and hard metal music)

Question: My guitar multi fx processor -zoom g3xn
My amp model -blackstar I'd core 40
My amp settings always tempers the tone of my processor patches..what would be my amp settings to be able to get the real tone of the processor?
Answer: Guitar amps aren't really meant to let the sound of a pedal through un-modulated. You'll find that many standard stomp boxes will sound just awful that way.
All guitar amps strip a great deal of the top out of the unprocessed signal. Stomp-boxes don't need to do this tone-shaping [& I've heard tell the amp works better if the tone isn't pre-shaped] so a stomp box on its own is often far too bright & fizzy sounding.
You'd need something more akin to a microphone preamp to hear what the Zoom sounds like on its own, or just simple a line input, depending on send levels.
See Why does plugging headphones directly into guitar effect sound "bad"?
Comment: Another option for the short term is to disable speaker/cabinet simulation on the processor so at least the amp is not double filtering it.
Comment: I'm not sure I see what that has to do with my comment. I was aware it's a combo. Right now one thing that probably sounds bad is the processor probably has speaker simulation active and the amp of course has a real speaker. In my experience that's always been a terrible combination. Replacing the amp is the best option, but if it's not feasible at this time, at least disabling the speaker simulation in the processor and letting the amp add the power amp and speaker characteristics to the sound is better than having two "speakers" in series in the signal chain.
Comment: Sweetwater has specs: https://www.sweetwater.com/store/detail/IDCORE40V3--blackstar-idcore-40-v3-2-by-6.5-inch-inch-2-by-20-watt-stereo-combo-amp-with-effects Looks like using the line in on the Blackstar instead of the guitar input would also help.
Comment: Would a keyboard amp be more suitable than a guitar amp here? Keyboard amps are generally intended to reproduce the input sound accurately, without colouring it — or at least, less than guitar amps, for which colouring the sound is a desirable property.
Comment: @ToddWilcox - D'oh! t'other bit. Thought you meant the amp, sorry.
Answer: If you don't want your amp to affect the tone of your guitar you need to stop using a guitar amp, and instead use a proper PA system, which is designed to add as little colour to the signal as possible.
When playing live, I use either a Line6 or Kemper processor, with amp simulation, and feed it directly to the house PA, along with a feed for my monitor. This way I control the entire tone (barring mixing desk EQ tweaks).
For venues with no DI, I need to disable the amp sim and then run the sound through a Marshall cab in the classic way, mic it up and then send that to the desk - but for that setup I rely on the tone shaping the amp does, and that of the mic placement.
Comment: Of bring an active PA speaker / monitor / keyboard-amp.
Answer: Many guitarist find it desirable for the amp to color the tone. So maybe you will not be able to get the amp totally neutral. The trick is to simply bypass the whole preamp and effects section and only use the power amp, which usually can be done my going into the line input.
The effects processor will most likely output a low impedance signal anyway, so you can simply plug the signal into the line input of the amp, if it has any.


How can I politely express that "I have understood"?

Question: When my professor instructs me during his/her office hour, I may simply show my understanding by "Got it" or "I see". But I wonder how to say that politely and professionally in written English, especially in an email.
Comment: There are also the [ell.se] and the [workplace.se] for the interested. Please take a look at them as well.
Comment: "Sure, that makes sense."
Answer: What's wrong with "I understand." or simply "Understood."?
These are perfectly professional but also not stuffy.
Answer: Typically when writing a polite and formal message or email; a longer sentence will sound more courteous and gracious than a two word reply.
There are innumerable ways of writing a polite acknowledgement, or a thank-you note. Change the adjectives with ones that you feel more comfortable with.
You can use the verb, grasp, instead of understand to say you comprehended something fully, and you won't easily forget or be confused by it again.

Thank you so much for your clear and unambiguous explanations on [topic]. They
  have helped me tremendously.
I really appreciated your explanations in the last session I
  attended, they helped me to grasp/understand [topic] and now I feel much more confident. Thank you.
Answer: Often the best way to indicate that you have understood is to summarize in one sentence what your understanding will lead you to do next.

e.g., "I understand.  I will get back to you with the revisions you requested by Monday."

or

"I see.  I will make sure to include or discuss your idea that .... in my next paper."
Comment: Thank you! Another question though, how formal is the phrase "I see"? Could I use it in an semi-official email?
Comment: "I see" is medium formality.  But you have to be careful because sometimes it can be sarcastic (="oh, you really think that?!" or "that's not the answer I was expecting").  It depends on what you say next.  It is probably better used in speech.
Comment: "I see" is also a shortening of the more formal phrasing "I see what you are saying."
Answer: As in written form, there is no specific way to display politeness, the choice of words is all that can convey mood. Though, there are always ways to be more professional.
In an email, you could say "Thanks for the help, I have understood the subject."
This sounds polite (with "thanks" being used) and professional.
Answer:
Understood, thanks.

or

I understand, thanks.

Is clear, and polite.


Separate content of a cell by spaces

Question: I have a spreadsheet on Google Docs, in which are multiple columns. Each row contains all the data tags in one cell. So it is not separated under columns. How could I separate it into more cells? There is a separator between fields, 4 spaces.
Answer: Assuming your data is in Column A, put the following in cell B1:
=arrayformula(split(A1:A, "    "))

Separate content of a cell by spaces


Is there a canon in the Star Trek universe?

Question: Most of the time star trek delved into time travel, it was to correct history and keep the future/present the same. But the new Star Trek movies starring Chris Pine had history altered, and this means everything we used to know about the original series may very well be completely different. It is accepted that there are multiple alternate universes, but does this mean there can't ever be TRUE CANON in star trek?
Edit: I'm not wondering how the new star trek fits in with the original, certain it shouldn't.
I'm asking if there is a canon, or if there is any point of one in star trek
Comment: When you [misread the question](https://sto.gamepedia.com/Cannon)... :P
Comment: 'canon' is an out-of-universe concept. In-universe, Trek has dealt w/ the concept of a multi-verse and the idea of a 'prime' or 'ideal' several times.
Answer: There are indeed multiple alternative universes, but they exist simultaneously in the same multiverse and don't contradict one another (at least any worse than events contradict each other from within any single timeline).
There is one true Star Trek canon, and it contains (at least) 2 copies of Captain Kirk's 5-year mission aboard the Enterprise. Both timelines are 100% canon, and are a part of the same canon. Indeed, there are a lot of alternative timelines in Star Trek that are considered canon.
This is relevant because the timelines can interact with each other so it makes sense for canon to encompass the multiverse.
Answer: If  we accept that the multiverse exists, whether it be in our reality or in the Trek verse, we must accept that there are infinite permutations for each universe. Having said that, permutations that have appeared in various VALID incarnations of Star Trek are considered canon and other hypothetical timelines are just that and not canon. Other unscrupulous j.j.abrams-esque mock treks are simply unfortunate features of a particular timeline(s) of our own multiverse and are not especially linked to actual Star Trek canon. There might be other realities with other Star Trek canons but they are not relevant to us.


Static electricity experiment

Question: My teacher always asks me to do the experiments on static electricity in winter. I don't know why? What will happen if I conduct the experiment in monsoon?
Comment: Look up the effects of *humidity* on static electricity.
Answer: One of the problems with doing experiments on static electricity is that the static charge can leak away while you're trying to do your measurements, and one of the main ways the charge leaks away is due to humidity of the air. I don't know what the humidity is in Kolkata, but I would guess that it's much higher during the monsoon that it is during the winter. That there will be less charge leakage in the winter and therefore the experiments are easier to do.
If you're interested in pursuing this further, there's a very thorough paper on measurements of air conductivity here (this is a 1.5MB PDF). There are two ways humid air causes leagage of charge. Firstly the water vapour can be ionised and charge flows simply by migration of these ions through the air. Secondly high humidity creates a very thin film of water on surfaces, and charge can flow through this film of water. The paper finds that the two mechanics for charge leakage are roughly comparable.

Static electricity experiment