Who was the actual trombonist?

Question: In Season 6, Episode 24 of TNG, Second Chances, Riker is playing a trombone, but who is the real trombonist?
Comment: "Computer, gimme a 'bone"
Answer: EDIT:
Jonathan Frakes recently did an interview on March 5, 2020 which corroborates my original answer:

Wheaton: Is Riker the premier jazz trombonist on Nepenthe?
Frakes: Interestingly enough, Riker's still playing the trombone. Not well, but loud. ... When I played on the show-you know this story-if it sounded like a regular guy, it was me, but when it sounded like he really knew what he was doing, it was this wonderful player named-
Speiner: Jack sheldon, wasn't it?
Frakes: No, Bill Watrous.
Speiner: Oh, Bill Watrous.
Frakes: Jack Sheldon played trumpet.
Speiner: Oh, right.
Frakes: It was Bill Watrous, who is no longer with us. But he was spectacular. He made Riker look so cool.

Original answer:
If this clip is the clip that you are thinking of:

Then it is undoubtedly Bill Watrous. At the beginning of this clip, you can hear the tail end of Frakes statement, also corroborated here

Frakes likes to talk about trombone playing, something he has done since he marched with the band at Penn State University. He played it on Star Trek: The Next Generation, but was often dubbed by someone else onscreen. "When Riker played badly, it was me, but when he was playing well, it was Bill Watrous," confesses Frakes. "My kid still thinks I'm good, though. He recognizes Star Trek when it's on, that's Daddy's show."

It is definitely overdubbed. It is obvious that Frakes does actually play the trombone, because the technique he uses to hold the instrument is correct. The velocity that he moves the slide is appropriate too. However, the positions he uses are not correct for the pitches that are actually being played. Further, there are several times where the audio has very wide slide vibrato and yet the visual has the slide kept immobile.
While this does not prove who the trombonist is, we can be reasonably assured that it is not Frakes playing trombone. For comparison, here are several clips of him playing trombone:

The tone quality is vastly different than in the clip in question, and while he's actually a decent player, is is different enough that in the case of the latter, it is Frakes playing, and in the former, someone who is a hardened professional doing the playing. If it were another professional it would be more difficult to tell who it was, but Bill has an exceedingly unique style of playing and timbre that is basically impossible to replicate without years and years of dedicated practicing.
For comparison, here are some clips of Bill Watrous, you can compare the above tone quality with several clips above. It should become abundantly clear this is the artist overdubbing that particular scene:

Given the words of Frakes, there are two options: It can be him playing, or it can be Bill Watrous. Because of the tone quality and manner of playing, it must be Watrous.
As an aside, he appears to be playing a King 2B, 2B+, or "Jiggs" 2B trombone, which can be ascertained by some of the design features of the instrument, which include a King style bent lower bell brace and the smaller 7 3/8" bell diameter.
Comment: [Monty Python Voice] How do you kneeeeeew so much about trombones?
Comment: Years of practice, young Padawan.

Good catch on the 2B, and if Frakes is into jazz, he at least knows exactly what horn he should be playing (unless he's into Bass Trombone).

Nice answer ;-)
Comment: That is true, it doesn't prove that it isn't Frakes. I edited the answer to indicate that doesn't aloen prove it, but provided more evidence that it was Watrous.
Comment: The first video is unavailable.
Comment: Just because the scene doesn't match the playing, does not mean it is not Frakes playing.  He could just as easily have been the one who performed the piece for the overdubbing.  The director could have told him (on camera) to make more exaggerated movements (since most viewers wouldn't know).  Or they could have changed the piece between the filming and the dubbing.
Comment: Darn, I already upvoted your answer years ago, so I can't upvote again for the Ready Room snippet. :)
Answer: Quite possibly Jonathan Frakes himself:

Also, from this interview:

I told [Roddenberry] about the trombone and the jazz, and then all of a sudden the character started to have a few of the qualities that I could relate to personally.

So the fact that Riker plays the trombone is because Frakes plays it.
Comment: I had to downvote this.  While Frakes does play trombone, speculating that he's the one playing in that episode solely on the fact that Frakes plays trombone is a shaky conclusion.  Please see the other answer, as Frakes is not the *only* one who plays trombone in the show.
Comment: +1 to Beofett. I've updated my answer to include a section about Frake's playing.

Who was the actual trombonist?


Is there any security issue if an attacker recovers the key stream generated by a stream cipher?

Question: I've learned that a stream cipher like ChaCha20 generates a key stream that gets XORed with the plaintext to get the ciphertext... If an attacker knows the plaintext, he could just simply XOR that with the ciphertext to get the corresponding keystream.
Is there any security issue with this? I realize that it is because of the XORing operation that this is easily possible. Is there an even better way to encrypt the plaintext using the keystream without using XOR, that would also facilitate message authentication?
Comment: Do you realize that for different plaintext messages, we give ChaCha20 different nonce (a.k.a. initialization vector) so as to prevent known cipher stream being used to break unknown ciphertext datagrams?
Comment: What makes you think ChaCha20 isn't as robust as AES? People had built BLAKE-series hash functions out of the primitives used in ChaCha, and the password hashing algorithm Argon. You can like-wise build hash algorithms from compression functions built using block ciphers like AES.
Comment: Suggestion for your future questions: learn some basic cryptography concepts such as block cipher(s) and their mode of operations, stream cipher, nonce/initialization vector, authentication and authenticated encryption, public-key encryption and key exchange, digital signature, communication protocols such as SSL/TLS, or SSH. This site have tags for most of these listed here.
Comment: @DannyNiu Yes I know of that nonce and also basic crypto and mode of operations. In block ciphers like AES any change in ciphertext would totally wreck the output plaintext after decryption is applied. But for ChaCha20 you need to use Poly1305 message authentication to be exactly sure no "man in the middle" altered your ciphertext during transmission... I'm trying to make ChaCha20 as robust as AES and also make Chacha20 suitable for file encryption/decryption.  Can you please share your thoughts on that ?
Comment: @DannyNiu Thankyou for your answer!
Answer: First, there's no issue with modern stream cipher constructions - either using an AEAD block cipher mode of operation such as GCM, or the combination of ChaCha20-Poly1305 as Google had experimented and subsequently formalized in the form of Internet RFC documents.
Stream ciphers are basically reduced-capability one-time-pads as one may infer: stream cipher cipher streams only has as many possible values as there are keys, where as one-time-pads are truely random. This is fine since physically buildable computers (including those hypothetical quantum computers) are bounded in capabilities - in both time and space dimensions.
Second, the new trend in the field is to build AEADs from permutations using Duplex construction (I admit these aren't the popular knowledges you might learn from school or might encounter in your TV programs or newspapers).
Indeed, ChaCha20 and Poly1305 are separate primitives that were introduced as "backup"s to AES, etc. Even the original paper proposing Poly1305 introduced it as AES-Poly1305.
Roughly describing the concept:
Recall the SHA3 hash functions are based on 1600-bit Keccak permutation running in Sponge mode - the permutation is partitioned into 2 parts, 1 part is used to absorb data and squeeze out the hash digest, the other part is kept secret as the security capacity.
Duplex is similar, except the data is read as they goes in. Adding in some careful design, you get a AEAD from a single primitive - the permutation.
Examples of these types of cipher include Gimli, Xoodyak, etc. You'd find some more at NIST lightweight cryptography project page.
Comment: I don't like predicting future, especially when there's little evidence of what the trend is like. But Permutation-Duplex ciphers are certainly going to **complement** existing algorithms as SHA3 had complemented SHA2 as we've seen. AES is efficient in hardware, and efficient hardwares for AES had been proliferous, so it's unlikely to go away any time soon. ChaCha20 and most permutations are already efficient using SIMD instructions available on modern CPUs (ranging from mobile, to desktop, to server), so they're fine even without dedicated hardware.
Comment: Will Duplex replace AES or ChaCha20 in the future ?
Comment: Thankyou very much, your knowledge is very much appreciated :)


Books on the analysis of hyperbolic partial differential equations

Question: Most of the present books on pde analysis deal with the elliptic partial differential equations. Is there some book related to rigorous analysis with hyperbolic pdes, and especially hyperbolic systems of pdes? I want to some great books on this subject for research. Thank you.
Answer: It's funny that a similar question hasn't already appeared on MO. Other answers already give some good suggestions. Here's a bunch more. Note that the older ones may not be considered very pedagogical or rigorous by today's standards.

Hadamard, J. Lectures on Cauchy's Problem in Linear Partial Differential Equations (Yale University Press, 1923)
Courant, R. and Hilbert, D. Methods of mathematical physics. Vol. II: Partial differential equations (Interscience, 1962; German original 1937)
Petrovsky, I. G. (also as Petrowsky) Lectures on Partial Differential Equations (Interscience, 1954; Russian original 1950--51)
Leray, J. Hyperbolic differential equations (Institute for Advanced Study, Princeton, 1953)
John, F. Partial differential equations (Springer, 1971)
Lax, P. D. Hyperbolic Partial Differential Equations (AMS, 2006; original notes 1963)
Garabedian, P. R. Partial differential equations (Wiley, 1964)
Friedlander, F. G. The Wave Equation on a Curved Space-time (CUP, 1975)
Günther, P. Huygens' Principle and Hyperbolic Equations (Academic Press, 1988)
Hörmander, L. Lectures on Nonlinear Hyperbolic Differential Equations (Springer, 1997; original notes 1987)

A bunch more have appeared in more recent years, some of which have already been mentioned. Here are a few other noteworthy ones.

Christodoulou, D. The Action Principle and Partial Differential Equations (PUP, 2000)
Bär, C., Ginoux, N. and Pfäffle, F. Wave Equations on Lorentzian Manifolds and Quantization (EMS, 2007)
Dafermos, C. M. Hyperbolic Conservation Laws in Continuum Physics (Springer, 2010)
Klainerman, S. Lecture Notes in Analysis (lecture notes, Princeton, 2011)
Rauch, Hyperbolic PDEs and Geometric Optics (AMS, 2012)
Answer: Sorry for adverstising myself. But Sylvie Benzoni-Gavage and myself published in 2007 a rather complete monograph on the subject. In particular, we treat initial-boundary value problems, first linear and then nonlinear. We apply the theory to the stability of multi-dimensional shock waves, in particular in gas dynamics.

S. Benzoni-Gavage & D. S. Multi-dimensional hyperbolic partial differential equations. First order systems and applications.
  Oxford Mathematical Monographs, Oxford University Press (2007, xxiv + 512 pages, ISBN-10: 0-19-921123-X, ISBN 13: 978-0-19-921123-4).
Comment: Thanks! I'm now reading your two volumes of system of conservation laws, I found it clear and interesting. Thank you for your reply. I will read your recommended book.
Answer: One that comes to mind is A. Majda, Compressible Fluid Flow and Systems of Conservation Laws in Several Space Variables, Springer 1984.
Comment: Yes. Majda's book is helpful. But it does not give a whole introduction to the standard methods to the mathematical analysis of hyperbolic equations. I hope to get a whole view of the modern theory.
Answer: It is surprisingly difficult to find expositions on first order hyperbolic systems of PDE's. There are two standard types: symmetric hyperbolic and strictly hyperbolic. Both are studied using $L^2$ energy estimates.
Symmetric hyperbolic systems were first studied by K. O. Friederichs:
http://onlinelibrary.wiley.com/doi/10.1002/cpa.3160070206/abstract
I recall that this paper is quite readable.
Strictly hyperbolic systems were first studied by Lax, but the modern approach is to use pseudodifferential operators to obtain the energy estimates. By now I can't remember where I learned this from. Books I recall looking at were Michael Taylor's book, Pseudodifferential Operators and Jean-Francois Treves' Introduction to Pseudodifferential and Fourier Integral Operators: Pseudodifferential Operators
Comment: Thank you, Deane. I'm not familiar with Pesudodifferential operators. I think I will have a look at it.
Answer: I suggest: S. Alinhac, Hyperbolic partial differential equations, Springer Universitext, 2009. The classic PDE book by F. John also gives a solid introduction to hyperbolic equations and systems, however his style of writing differs somewhat from todays.
Comment: Thank you. I have read F. John's book. It's a standard text for undergraduates. I want to study the deeper theory of hyperbolic equations. I think Alinhac's book may be helpful.


Has any new physics problem been solved as a result of discussion on Physics StackExchange?

Question: Every now and then, there are very interesting science questions being posted on the Physics StackExchange. Some of these questions concern very up-to-date research. Does anyone know if any publication has resulted from a post on Physics StackExchange?
Comment: Does using an answer posted here in a dissertation count? Because I totally did that with one of my answers.
Comment: Related: http://meta.physics.stackexchange.com/q/6299/2451
Comment: @HDE226868: [This one](http://physics.stackexchange.com/questions/108353/why-does-this-equation-refer-to-magnetic-tension/108358#108358); it wasn't verbatim copied, but the general idea was used. Though I want to point out that the concept of that answer wasn't an original thought, I had found it in the book I cited in that answer.
Comment: @KyleKanos Which one?
Answer: I think this question is just an assertion that none of the posted questions are genuinely new. Here's one that is: What is the smallest possible electronic transistor? I do have in mind a 'radically different technique' for building it which has been posted (elsewhere) but the linked question is about the design/possibility of such a thing.
Answer: This site actively discourages the kind of back-and-forth argumentation that is essential to the problem-sovling process (at least the way I solve problems). I solved some pretty good physics problem back when I used to go to physicsforums.com until the jackasses who oversee the site got me banned for life.
This thread illustrates the kind of horrifying argumentation that the guardians of this site are determined to avoid. But the reality is that I need the human element to get me stimulated. Without the hysterical insulting behavior of my correspondents at physicsforums.com, I probably woulnd't have been driven to come up with the explanation of how the light from a distant star can drive the transition on an ordinary photographic plate (quantum siphoning).
EDIT: This question has been up for a week and no one has posted a single example of a problem that's been solved thanks to a discussion on this site. I've posted an explanation of WHY no one is solving problems hear, and I've got eight downvotes so far.
Doesn't this tell you people anything? I'm cheating to get some discussion going here by posting this as an edit rather than a comment. But that's why nothing gets solved here...because there's no format for discussion. And don't tell me about the chat room...I'm not fourteen years old.
Comment: Er, so you've come up with some (as of yet, unpublished) theory based on discussions at Physics Forums, but how is that going to help Otto who wants to know about actual, published research here from Physics *Stack Exchange*.
Comment: Note also that such "back and forth argumentation" is actually *quite welcome* on [Stack Exchange Chat](http://chat.stackexchange.com/), just not on the question pages (because this is a *Question and Answer* network, not a discussion site).
Comment: Unlike most of the people who post here, I am not motivated by a desire to help Otto or those like him. I post here because it is an opportunity to promote my own ideas.
Comment: PhysicsForums was not run correctly, I was banned for life too. The points I made there were correct, PhysicsForums has indeed gone down the drain as I predicted it would all those years ago. Funny to see how they are now begging you to join if you visit that site. I can hardly resist to re-join just to poke them in the eyes :).
Comment: You'd be surprised at what 14-year-olds can do.
Comment: Marty, you are not alone. Probably I'm the most downvoted user around WITHOUT any argumentation,see my profile. You belong to a different kind of mind. You dare to have doubts and, at the same time, you are assertive -your site, your FxQI photon pea-shooter is a must, and the siphon viewpoint is fresh. Contrary to copy-pasters the physics can only advance thru opposition and theor physics is in the present a corps, a dead-end of medieval black-and dark-magic that people love. In the beginning this site was better. Marty, continue your work please. Keep going.
Comment: I'd say that downvoters- in meta this means people that don't agree with the answer- should at least give some argumentation on why they disagree, even if that's only based on an "this is not the site's policy" opinion- which is of-course respected.
Comment: I believe that this answers a different question, as you pointed out Marty. If you like, you could make your own question and answer that one. I believe the two reasons it is being downvoted is because it answers a different question, and the other (minor) reason is that the answer has fairly coarse language..
Comment: ^This guy (The poster of the answer)
Comment: I must have missed the "fourteen and under" sign on the chat...


How do I write Applescript that will give me an hourly popup alert

Question: I am wondering how to have a popup alert on my computer (Mac OS X) every hour.  I figured writing this in Applescript would be pretty simple but I have no Applescript experience.  Thanks
Comment: @FrustratedWithFormsDesigner Dead link!
Comment: Applescript tutorial for getting started: http://homepage.mac.com/swain/Macinchem/Applescript/AppScript_tut/AppScrip_tut_1/appscript_tut_1.htm
Answer: The basic handler for doing things on a regular basis in AppleScript is the idle handler.
on idle
 display dialog "Go back to work" buttons "Work Harder" default button "Work Harder"
 return 3600
end idle

This script will pop up a dialog box when you start the application and then every 3,600 seconds after pressing the button. Whatever number the idle handler returns will be the number of seconds before the next idle event is triggered.
If you want it to be on the half-hour and not every sixty minutes, you'd want the idle script to return a different number of seconds, perhaps 60, and then check to see if you're at the right part of the hour.
on idle
 if the minutes of the (current date) is 30 then
  display dialog "Go back to work" buttons "Work Harder" default button "Work Harder"
 end if
 return 60
end idle

This will only display the dialog at half past. (Like Unix, AppleScript's concept of the current date includes the current time.)
In each case, you want to save in AppleScript Editor as "Application" and "Stay Open" in order to have it respond to idle events instead of just quitting after running. And you can add the application to your list of "Login Items" in the "Accounts" system preference to make it run automatically when you log in.
Comment: If I'd been more awake they'd have been more like Animal Farm.
Comment: Wouldn't it be easier to just subtract the minutes of the current date from sixty, multiply that by 60 and return that in the second version? That way, you don't need to check every minute.
Comment: @11684, yes, that would be fine. I wanted to give an example that involved checking every minute, however, in case someone has needs that aren't as simple as just a regular pop-up. Note that the run-up to the second example has a typo—it should have said "on the half-hour" rather than "on the hour"; that's why it checks the minute against 30 rather than zero. (Typo now fixed.)
Answer: After testing Jerry solution, I found a problem. If your AppleScript App is not "topped" at the time of the event, you may get an AppleScript error and the only think that will call you is the blinking of the icone in the doc.
So I've made a small change:
Open the AppleScript editor and type this:
on idle
  tell application "call_me"
    activate
  end tell
  display dialog "Back to work" buttons "Work!" default button "Work!"
  return 3600
end idle

Save the script while selecting "Aplication" in the bottom menu of the file selector and then checking "Don't quit" (in French "Ne pas quitter aprés l'exécution") so the App will stay active even after the event.
You must give the name "call_me" to your app or, if you change the name, change also this name in the code (tell application "xxxx" activate)
Each 3600 seconds, the App will be topped and then will display the alert box.
Just one point: the first time you'll save the App, Applescript will show you a selector, and ask you "Where is call_me.app?" Just cancel this selector and save.
Oh!! I've to go back to work!!


Maximum points to plot in pgfplots

Question: I have lots of data to be plotted(around 100000 points) in a single plot. But pgfplot is giving me error. What is the maximum limit(of points) for it to plot. But gnuplot is giving me the plot whereas pgfplot doesn't.
Comment: have you tried increasing the memory available to tex? also an example would help.
Answer: 100000 points is usually beyond the capabilities of pgfplots (unless with extreme memory settings, perhaps disabling markers).
An alternative approach which satisfies memory limits (and your patience while running latex) and still uses pgfplots for the axis descriptions is to employ its \addplot graphics method: there, you can generate the visualization (scatter plot?) with gnuplot, but you configure gnuplot to EXCLUDE any axis. Then, you include the generated graphics (as .eps or .png) into pgfplots, configuring only the data limits. PGFPlots will then include the graphics and will overlay its axis descriptions automatically (based on your supplied data limits). The pgfplots manual contains an example (even one which takes its image data from gnuplot output).
Answer: I think in this case I'd decimate the data before sending it to pgfplot. Consider that if your graph is, say, at most 10cm wide, having that many data points means they could be as close together as one micrometer, which you'll certainly never be bake to discern in the output.
Answer: If you want, pgfplots can decimate the data by itself, using the each nth point={x}, to be used as follows:
\addplot table [each nth point={100},...] {your/table/here};

In the example, pgfplots will plot 1 out every 100 points in the data set.
You can play with the number until pgfplots does not return error and your plot looks good.
I recommend to also externalize such compilation-intensive plots.
Answer: With the default memory limits in TeXLive 2009 (3000000), I determined the limit to be 12175 points using only points (no lines). The number can vary depending on other plots in the same page and other factors, like point decorations. See the comments in  How can one predict pgfplots memory overload?

Maximum points to plot in pgfplots


What atom would be protonated first in a strongly acidic solution?

Question:
The answer is A. I thought it would be D since the ester group has the highest pka and the more basic functional group would be more prone to protonation. Also, I don't really get how to rank C in terms of atoms that would be protonated first as I don't know the pka of the ether group.
Comment: Also if you, say, added conc. H2SO4 to this, there would be protonation equilibria for all these groups, so I suppose properly formulated question would be here which Keq would be highest.
Comment: Atom C is in nowheresville.  By donating one of its "lone pairs" to the ring this oxygen atom gets a positive formal charge.  Not good for then accepting a proton.
Comment: What is "protonated first" even supposed to mean. Does author imagine they would get a dication? Something like this would break down much earlier.
Comment: An interesting question would be: What happens were this compound refluxed in dilute sulfuric acid for 24 hours?
Answer: In short, none. As Mithoron said, the oxygen atoms can all act as Lewis bases and will all be protonated to an extent. If you rephrase the question to "Which of the atoms has the highest Kb?", well that's another story. Atom D has the lowest Kb, because the carbon in a carbonyl has a slight positive charge. Atom C would be difficult to protonate, the oxygen is already donating a pair to the furan ring to make it aromatic. So the debate is between a carbonyl and a primary alcohol. After consulting some pKa tables I found that protonated ketones have a pKa of around -7.3 while protonated primary alcohols of around -2.4 thus the alcohol is a stronger base (higher pKa means weaker acid thus stronger conjugate base). Finally we can conclude that the primary alcohol -OH group will be the first to accept a proton.
P.S. Fun fact, the quickest to be protonated was none of the ones marked with letter, it would have been the ester's carbonyl group!
Comment: As far as D is concerned, I think that mesomeric effect may more important then inductive,  Not bad for a first answer, though ;)
Comment: I looked at the pka chart my instructor provided me. On that pka chart, it said the pka of R-OH (A in the molecule) is 16. B (the ketone group) is 20. D (the ester group) is 25. Nothing was given for the ether. A higher pka means its more basic, and thus a higher kb. If it is the highest kb, shouldn't it be D (ester) then, as the pka is higher than the rest.
Comment: As I said, those I listed were the pKa values of PROTONATED species. The protonated species with the highest pKa forms the quickest.
Answer: In the given molecule

D's lone pair on oxygen is in conjugation with C=O group. Consequently it acquires a positive charge, its Kb is less for protonation to take place (as shown in scheme 1, as pointed by Mithoron).
At C lone pair on this ring (furan) are delocalised and is AROMATIC (as shown in Scheme 2). Comparatively is kb value is less for protonation to take place.
At B carbon of carbonyl carbon is sp2 hybridised and is more withdrawing then sp3 hybridised carbon (hybridisation is useful here). Hence due to greater inductive polarisation by carbonyl carbon lone pair on oxygen are donated less.
At A, lone pair on oxygen is not in conjugation as in C and D. Further carbon bonded to alcohol at A is sp3 hybridised and is less withdrawing inductively then carbon at B which is sp2 hybridised.

Summing, OH group at A has highest Kb value. Its tendency to donate lone pair is comparatively more then B, C or D.


How to represent shortcut nodes in Java?

Question: How would I implement a shortcut finder into an A* path-finding algorithm? Assume that every tile is represented by an (x,y) coordinate, and I know where every "good" tile and every "non-walkable" tile is on the grid. How could I best find the solution to this problem on a large scale where the starting and ending spots are always different with many different shortcuts and obstacles in the way of each starting point and ending point. What is the most optimal way of finding the shortest path between grid points miles away (assuming each tile represents 1 foot)?
Comment: I don't know of any optimizations beyond breadth-first search, but if your grid is small enough, that shuldn't be an issue. I would make a `TraversableNode` interface, which can provide a `adjacentNodes` method which returns a list of adjacent nodes. Then, you could make two clases, `RegularTile`, whose adjacent nodes are its immediate neighbors, and `TeleportTile`, whose adjacent nodes are its immediate neighbors, PLUS all the adjacent neighbors of its "partner".
Answer: A* cannot generally be used with shortcut/jump nodes. This is because A* uses a heuristic, roughly: "walking into the direction of the target is the optimal route, barring any obstacles". Or more formally: the triangle inequality must hold. The triangle inequality guarantees that taking a detour will result in a longer path. The A* algorithm relies on a heuristic that never underestimates the minimum distance.
However, jump nodes violate this assumption. It is possible to construct a scenario where the shortest path is to run away from your target in order to find a jump node. So the A* heuristic can be misleading. In your example the jump nodes would happen to work fine because they are in line with the direction suggested by the heuristic, but this is not generally the case.
If you want to use A* with jump nodes, you need to adapt the path-finding algorithm to not only search a path towards the target, but also to all jump nodes that are closer than the target (as informed by your heuristic).  This is complicated (because you have to update the list of possible jump nodes after a jump) but efficient. Alternatively, you can use a different path finding algorithm, e.g. Dijkstra (which is A* without a heuristic, so a breadth-first search).
Representing the jump nodes is not difficult if you write your A* algorithm in terms of nodes rather than in terms of grid coordinates. Given a node, you will have a neighbours(node) operation that gives its neighbours. These neighbours are typically neighbouring grid points. However, the function can take into account jump nodes, and return the jump target's neighbours instead.
Answer: A* is applicable wider than squared grids.
Rather than defining the neighbours of a tile to be only those that differ by one in the X or Y direction, you include any shortcuts and exclude any obstacles.
Start from the pseudocode on Wikipedia
function neighbours(node)
    result := []
    for displacement in [(1,0), (-1,0), (0,1), (0,-1)]
        neighbour := node + displacement
        if passable(neighbour)
            result.Add(neighbour)
    for shortcut in shortcuts[node]
        result.Add(shortcut)
    return result

Then you need to make sure that your distance heuristic never overestimates.
function prepare_heuristic(shortcuts, goal)
    result := Infinity
    for node in shortcuts.values
        result := min(result, displacement(node, goal))
    return result

function distance_heuristic(node, goal)
    return min(shortcut_distance, displacement(node, goal))

This is still an improvement over pure Dijkstra, especially when shortcuts are rare
Comment: You can do this, but the heuristic that distinguishes A* from Dijkstra's algorithm (breath-first search) wouldn't work.
Comment: @Alexander a naive heuristic is inadmissable, but you can still make some improvement over Dijkstra
Comment: From what I can tell, your `prepare_heuristic` function is itself doing a breadth-first search, completely defeating its purpose as being a lightweight approximation that can better inform a breadth-first search.
Comment: `displacement` is the naive `abs(left.X - right.X) - abs(left.Y - right.Y)` calculation
Comment: Ah whoops, I skimmed and thought that was a recursive call


How would you measure the electrostatic field of a celestial body from its surface?

Question: If we need to measure the Electrostatic field of a celestial body due to its interaction with space plasmas, What kind of instruments can be used to achieve this?
Answer: One way to measure electric fields directly is called a "field mill".
It uses moving vanes to impose an AC modulation on the field and a differential sensing setup that allows most sources of error to be zeroed out, something like how a chopper-stabilized opamp works.


What is the point to point suborbital payload of the SpaceX super heavy starship combination for Earth

Question: I see multiple mentions of point-to-point transport use of the Super Heavy and Starship combination, but cannot find ANY estimate of how much cargo, how many people, or some combination thereof, is actually possible.
Putting 100 to 150 tons into orbit is great, but landing it is a further complication and one has to wonder if it is possible, or makes sense?  Disregard the economics, ticket prices, etc.  Assume that all destinations have mechazilla launch/capture towers and other needed facilities.
My question is, of that 100 to 150 tons to orbit, how big a payload can be LANDED?  The Starship is designed to be reusable, so it has fuel enough to land after the payload is ejected.  The re-entry will burn off most of the velocity, but it seems safe to assume that the terminal velocity will be high subsonic or low supersonic.  Any extra propellant needed to do final landing burn w/ an extra 100 tons of mass would reduce both the in orbit mass the final, delivered cargo mass.
If that landed cargo mass is 1 ton, or 10 tons, it seems impractical for all but the very most valuable cargo.  If the landed cargo mass is as much as 25 tons, or 50, or even 75, then it starts to seem practical for this purpose.
Comment: If you're looking for a fact-based answer, [this answer](https://space.stackexchange.com/questions/65232/is-it-ever-normal-to-vent-lox-from-spacecraft-with-active-engines-isnt-it-a-fi/65233#65233) may help.
Comment: Wild speculation, but if Starship were fitted with landing legs, it could land on any heliport-sized pad that can support its 100t weight (plus payload). After refueling, it could perform a deadhead return. I can imagine the military would be happy to pay to get a hefty load anywhere on the planet in a hour.
Comment: @Woody *anywhere with ~1,000 tons of LOX/methane, of course. Probably less than that, but I'm not sure if actually landing the upper stage somewhere and expecting it to return is practical
Comment: @fyrepenguin ... Its easier to make LOX/methane on Earth than on Mars. So I think it will be easier to bring a Starship home to Texas from Tel Aviv than Jezero Crater. I don't like  to question Elon's idealism, but I think he has his eye on a certain domestic customer with deep pockets.
Comment: @Woody I don't disagree on that fact, just think that the idea that refueling a Starship anywhere where you'd **need** a Starship for rapid-response logistics is going to be a long shot.  I wouldn't mind [taking it to chat](https://chat.stackexchange.com/rooms/9682/the-pod-bay), but I don't want to get into this further here
Comment: @fyrepenguin For a military asset insertion application, it would be desirable to have the ship take off from US soil, land in enemy territory, take off a second time, and then either ditch in a nearby ocean or crash land in a nearby friendly country's desert, but not attempt to return to the US. This would be done only to prevent the tech from falling into enemy hands.
Answer: This Space Review article gives a landed payload of 30 tonnes, seemingly from an interview with Gary Henry of SpaceX. US Space Force staff are also quoted in the article but do not appear to have provided any specific numbers.
Article features a 'Skepticism' section that quotes interviews with others on a number of complications with point to point cargo but does not appear to dispute the 30 tonne number or the physical possibility of Starship in the role.


Is it a good practice to downvote a duplicate question?

Question: If a question is asked in a proper format, but when you know it has been asked many times, is it a good practice to downvote it!?
Comment: When the poster shows no evidence of effort, and this should include searching for and reviewing similar questions, if they are not difficult to find, then that is a reason to down-vote.
Answer: Well, you could argue that it shows no research effort, but if it's otherwise well asked then down-voting could seem a little churlish.
Just vote/flag to close as a duplicate.
One thing to bear in mind is that duplicates can be a good thing. If the question is written in such a way that it's a new way of stating the problem then that's good. It'll turn up on future searches and downvoting will make it more likely that the question is deleted before it can perform this function.


What are some good kayak fishing areas in Friendship, Maine?

Question: I am going to Friendship, Maine, USA, 04547, for the first week of August 2014. I am thinking about kayak fishing. Are they any good spots? What kind of fish species should I expect to find there?
Comment: The town is seaside, so I assume you are looking to go salt-water fishing.
Comment: Hi and welcome at Outdoors.SE. The question is very specific but I think it is perfectly fine.
Comment: Yes it's Salt-water fishing
Comment: @Wills I was thinking the opposite in regards to the "any good spots" portion of the question. This seems to be inviting open ended lists.
Answer: The list of fish in that area is relatively easy to find, but the trick is identifying useful areas - the fishing trip websites don't give too much away.
One useful place a friend told me about is between about 5 and 10 miles south of Friendship, northwest of Allen Island. This time of year you can expect cod, pollock and halibut. Going further south you get into trawling area, so that's maybe a bit far out for kayaking.
There is supposed to be good fishing all around the Penobscot Bay area, so have a look at http://penbay.org/wrich/fgotgom01.html for some of the fishing areas.


Discrete Chebyshev inequality as double projection

Question: Let $a_1< a_2<\ldots< a_n$ and $b_1, b_2, \ldots, b_n$ be real numbers. Then
\begin{align*}
 &b_1< b_2< \ldots< b_n\Rightarrow \frac{a_1b_1 + a_2b_2 +\ldots + a_nb_n}{n}> \frac{a_1 + a_2 + \ldots + a_n}{n}\cdot\frac{b_1 + b_2 + \ldots + b_n}{n},\\
 &b_1> b_2> \ldots> b_n\Rightarrow \frac{a_1b_1 + a_2b_2 +\ldots + a_nb_n}{n} < \frac{a_1 + a_2 + \ldots + a_n}{n}\cdot\frac{b_1 + b_2 + \ldots + b_n}{n}.
\end{align*}
Another way to view Chebyshev's Inequality:
$$
 \frac{\vec a\cdot\vec b}{n}\geq \frac{\vec a\cdot\vec u}{n}\cdot\frac{\vec b\cdot\vec u}{n},
$$
where $\vec u = (1,1,\ldots,1)$. If $\theta$ is the angle between $\vec a$ and $\vec b$ and $\alpha$ and $\beta$ are the angles between $\vec a$ and $\vec u$ and $\vec b$ and $\vec u$, respectively, we have
$$
 |\vec a|\cdot|\vec b|\cos\theta\geq |\vec a|\cdot|\vec b|\cos\alpha\cos\beta\Leftrightarrow\cos\theta\geq\cos\alpha\cos\beta.
$$
The LHS represents projection of a unit vector onto some line $l$, while RHS represents projection of a unit vector onto some third line $m$ and then projection of that image onto $l$. I'm looking for a neat intuitive explanation of this inequality, but I'll settle for explanations that involve higher math. Also, there should be a generalization:
Let $X,Y,Z$ be spaces and let $s$ be a set in $X$. Then projection of $s$ onto $Z$, $\pi_Z(s)$, has volume at least as large as $\pi_Z(\pi_Y(s))$. Thanks.
Answer: I have an answer to the special case:
First, assume that $\alpha + \beta = \theta$. I.e., that the intermediate projection line $m$ lies in the same plane as the unit vector and $l$. Then
$$
\cos\theta = \cos(\alpha+\beta) = \cos\alpha\cos\beta - \sin\alpha\sin\beta \geq\cos\alpha\cos\beta,
$$
since $\alpha,\beta\in[0,\pi]$ and $\sin x$ is non-negative in that interval. Now as we continuously move $m$ out of the plane, $\alpha + \beta$ increases to at most $2\pi - \theta$ and $\cos x \leq\cos\theta$ for $x\in[\theta,2\pi-\theta]$.
However, it would be nice to have a more intuitive solution as well as a generalization.


What is a differential attack on a hash function? How would one attack a SHA algorithm and what would achieve?

Question: Currently, I have been assigned to attack a reduced version of SHA-1. What are we trying to achieve? How do we attack it?
Comment: Little search [Higher-Order Differential Attack on Reduced
SHA-256](https://eprint.iacr.org/2011/037.pdf) and definitions are there...
Comment: @kelalaka I did read this paper. Unfortunately it was too difficult for me to understand. Thought  someone could explain it briefly. Thanks for your help!
Answer: The answer is not easy, however, a good starting point is Florent Chabaud and Antoine Joux's paper on SHA-0 and SHA-1

Differential Collisions in SHA-0, Crypto 1998.

Simple Introduction
In, MD4, SHA-0,SHA-1, and SHA-2 there is a compression function. $$C:\{0,1\}^\ell \to :\{0,1\}^n$$ where $n$ is the output size and $\ell$ is the block lenght to process.
The compression function $C$ can be viewed as a block cipher where the key is the message, this is meaningful since the only part is the input. And, SHACAL is called the block cipher of the SHA-1 and similarly SHACAL-2 for SHA-2.
Now, we have a block cipher, and we have the input ( the initial values $H_i$s and the output value ( the hash - the digest). We need to find the key. If we can find the key we have pre-image attacks and collisions. This might lead one to consider that we are attacking as in the differential attacks, not exactly, but in a similar way.
The authors first started with weakened SHA-1 (SHI1) where the input expansion is not considered and the ADD is converted to X-or so that there is no non-linear part. With single bit perturbation and corrections on the inputs, they showed to find collisions with a mask.

Later, the only converted ADD to X-or (SHI2) to extend the attack. They find a differential mask $\mathcal{M}$ that can be applied to plaintext (input) to find collisions.
<code>   lookRandomCollision(h, block):
      m = ramdom_message(1-block).
      h = Hash(m)
      m' = mask(m)
      h' = Hash(m')
      If h=h':
         return (m)
      else:
         return -1

    while (1):
        success lookRandomCollision(SHA-1, 512)
        if seccess != -1:
            print("The collision pair is - ", m, mask(m))
</code>
The success of the attack is the success probability of the mask $\mathcal{M}$ to introduce collisions. If the success probability of the mask is $1/t$ then around $c\cdot t$ random pairs one will find the collision.
After these, they look at real SHA-0 and SHA-1 to find such a mask. They find one for SHA-0 with $2^{61}$-complexity time. The mask they found for SHA-1 doesn't have good complexity than the generic collision i.e it has complexity $> 2^{80}$.
The article is well written from understanding the attack from low-level compression function (no non-linear part) to higher-level function that includes non-linearity.
And, with high probability, NSA was aware of this so they modified SHA-0's input expansion on SHA-1 with an introduction of rotation.
Why is it dangerous
Consider the case as the SHA-1 is broken, we have a Prefix block(s) $P$ and Suffix block(s) $S$ and we are looking for a collision
$$Hash(P\mathbin\| m \mathbin\|S) = Hash(P\mathbin\| m' \mathbin\|S)$$
If we can find a good differential mask $\mathcal{M}$ with good probability then we can execute the attack on the block $m$. If the part of the file is part of the redundancy as in PDF files, then one can create two different PDFs that have the same hash values. A real danger, of course, requires more than this. The change in the $m'$ has an advantage for the signer. This can be doable, too.


Where are Ćuk converters

Question: According to "the art of electronics" (p 651) and other internet sources, the ćuk switch converter has the most desirable properties: continuous input and output current waveforms, boosting and bucking, and "zero-output ripple" current.
There are plenty of switch converters sold in any store like eBay (e.g.:this one), but I found nowhere a ćuk converter at such a low price (and even hardly at high price). Is there a problem with them that makes them unpopular? Why aren't they sold ?
Comment: They can be messy from a control standpoint, as there's a fourth-order polynomial in the denominator of the transfer function. The topology is also more complex than a simple step-up or step-down converter. This all equates to more engineering effort and higher cost.
Comment: I'd say inverting the voltage would make them unusable for a lot of things, but really useful for a smaller subset of things.
Comment: JRE. Thx. I think the so called floating ćuk converter allows a non inverting voltage.
Comment: https://en.wikipedia.org/wiki/%C4%86uk_converter
Comment: Thx Adam Lawrence. I think this could be an answer.
Answer: There are a few reasons.

Polarity
Ćuk converters must always have opposite input and output polarity.  This makes them somewhat inflexible and would prevent them from being used in any application that simply wanted to reduce/buck or raise/boost the input to output voltage.  The only way a Ćuk converter could do what the buck converter you linked does is by completely isolating the input from the output.  This significantly increases the complexity, cost, and size of the already more complex Ćuk converter, while having a slightly negative impact on performance.  Once all of that is factored in, the theoretical advantage of such a topology is not nearly as compelling.
Control
Ćuk converters are very difficult to control and keep stable over load ranges, and most importantly, cannot be controlled using a PWM controller. Ćuk converters are 4th order systems and compensating them difficult, controlling them even more so.  The buck converter you linked uses a fairly jellybean part, one of the UC2/384*current mode PWM controller chips.  These parts are cheap, established, and can be used to build a buck, boost, flyback, forward, and other topologies, as can any other PWM controller chip.  A PWM controller cannot control 4th order topologies like the Ćuk or SEPIC.  As PWM control is simple and works, simply by that quality, Ćuk converters will always be much less widespread than other, simpler topologies.
Regulation
The above two points certainly contribute, but this is definitely the primary reason Ćuk converters have never seen any sort of large-scale commercial adoption: transient response and regulation.  I love looking at switching topologies both from a practical and theoretical standpoint, and I get that r Ćuk converters seemingly appear to be the perfection or logical conclusion of the other topologies.  Any performance improvements applicable to the simpler topologies can just as eLargely due to a Ćuk topology.  It really just seems like the thing we should be using, doesn't it?
And we should be using it, and would be, if it were only as simple as being a great switching topology.  The most important thing being overlooked here is when it comes to actual products, converters, devices, that people need and buy, they aren't buying a switching topology.  They aren't even buying a switching converter specifically, it just happens that switching converters are a good fit for their needs.  They're buying a voltage regulator.  Or regulated power supply if you prefer.  They want a certain voltage and just that voltage.  Sure, there are adjustable converters out there, or even arguably most are adjustable, but you're still wanting a fixed output voltage.  You can just change what it is.  But once you've set it to, say, 7V, you want it to stay at 7V and not randomly deviate 2V from that unless you told it to.
Voltage regulation and transient response go hand in hand, and are really the same thing.  As a load changes, to maintain a fixed output voltage, the converter must respond appropriately, but no converter can do this instantaneously.  There will always be a small amount of voltage sag depending on how quickly and how much the load changes.  The faster the transient response, the better the regulation.  This applies to the input as well.  The input may vary, and to stay in regulation, the converter again must respond appropriately.
And while the Ćuk is a frankly downright beautiful switching topology, it's not a very good voltage regulator.  It is slow, and will always be slower than simpler topologies due to its higher order nature. No matter how good the transient response of a Ćuk is, it will be significantly poorer than simpler, lower order topologies.  You can understand this like the settling time of a filter.  The higher the order, the longer the settling time.  Compound this with the other difficulties in controlling them, and what you find is that for decent amount of power, a Ćuk converter has such poor line and load regulation, as well as transient response, that you have to use it as preregulator only, and use linear post-regulation on the output to get a voltage stable enough to compete on the market.  And at that point, you're burning up all the advantage as heat in a linear regulator.  While depressing, it's the reality of things.  Well, it's depressing to me, I'm a bit of a Ćuk fan.
Sure, there are times one doesn't need voltage regulation, or can tolerate loose regulation, and the Ćuk topology is inferior to others in that space.  Nonregulated converters are ratiometric converters (they behave akin to a linear transformer, they multiply the input by a ratio to get the output.  a 2:1 converter simply yields half the input voltage at the output, without regulating it).  In the ratiometric space, SAC (sine amplitude converters) absolutely dominate. They are virtually EMI free, have efficiencies greater than 98%, and have staggering power density (current commercially available units achieve 2870W/in3.  Yes, you read right, almost 3kW per cubic inch.  ~140W/in3 is considered quite good for regular DC/DC converters.  Multiphase high end ones can achieve maybe 400-500W/in3).  A Ćuk is still a hard-switched topology, and softswitched ones will always be superior, to hardswitched ones, so the Ćuk is out of its element here unfortunately.
Patents
Another minor reason that contributed to the absolute dearth of Ćuk topologies in use today (but remember, the earlier reasons would have, and will continue to prevent it from ever seeing widespread use - this reason simply made it even more so) is that the topology was patented, and future improvements on it have also been patented. Dr. Slobodan Ćuk's original patents expired in the early 90s I believe, but subsequent ones by other parties have not.
Comment: It looks like Dr. Slobodan Ćuk has been busy. Since you are a Ćuk fan, you should like the three-part article that starts with "[Single 48V to 1V, 200A Converter Powers Microprocessors (Part 1)](https://www.powerelectronics.com/technologies/power-management/article/21864268/single-48v-to-1v-200a-converter-powers-microprocessors-part-1)" which seems to say that he has drastically improved both size and responsiveness. Let me know what you think.
Comment: This is a fantastic answer! Thanks for writing it!
Comment: I meant "I agree with Adam Haun."

Where are Ćuk converters


Should we vote on answers? Why?

Question: Honestly, I thought this was a stupid question until I interacted with another user on a particular question. The question is, should users vote on answers? If so, why? This other user claims to have a policy for himself to never vote, arguing that leaving a quality comment is sufficient. Is this the case?
Comment: Not voting sounds like a weird idea.
Comment: @Pekka: Yes, but you might be surprised by [who else](http://stackoverflow.com/users/88656/eric-lippert) seems to share that philosophy. ;)
Comment: It's strange that this question is even asked at all, but it was useful because I never knew if there were people who didn't vote. So, so weird.
Comment: @gno, that's too bad.  I wonder why he doesn't vote.
Comment: @Ivo I would *so* go on a revenge downvote spree for withholding that upvote from me! But I can't, because I don't vote. Damn!
Comment: @Pekka Normally I would up vote you for that, but hey, why vote? Clicking a arrow is way too much work.
Comment: @Pekka Actually that's good! So there's no longer the need for the serial downvote cron! So if nobody votes, SO saves CPU time and therefore money!
Answer: Voting is probably the third most important aspect of the site. (Right behind asking and answering)
Voting is important because it shows that other people have 'vetted' the answer.  Anyone can post an answer on the site, so how do we know if it is any good?  By the votes it gets.
Voting changes the order that answers appear below a question.  It helps the best answer bubble up to the top of a list of mediocre answers.  This way, when someone finds the question through Google, they can immediately see which answer was the best.  This helps separate Stack Overflow from the general forum.
Comment: @Chris, agreed, but the voting order can give you an idea of what you should try first.  Voting isn't always 100% accurate, but it is a really good place to start.
Comment: "so how do we know if it is any good?" - Whether and how you use an answer is your responsibility. You ought to be able to, somehow, test/evaluate the quality of an answer yourself.
Answer: The vote up privilege page explains it pretty well, and there's a blog entry about voting in general that applies to answers. Besides rewarding people who post good answers (which encourages them to post more good answers), probably the most important reason is to sort the answers by quality. Answers are defaultly sorted by votes:

By upvoting the best answers, you're ensuring people see the most helpful information immediately; similarly by downvoting wrong answers you indicate that they're wrong and push them below more helpful posts
Comment: But there's bold in the image! I... I'm so confused...
Comment: @jjnguy You don't want to play this game with me; I'll add more bulleted lists than you can handle
Comment: I see your image, and raise you **bold**.
Comment: @Michael,  hmm.  I'd be forced to pull out my **bold** within a bulleted list.  (Don't make me go there) `:)`
Comment: I just cast my last vote of the day for this answer, damn you for taking away all my votes! Maybe if I didn't vote for answers I wouldn't have this problem...
Comment: @The Seriously? There's still almost 9 hours to go :)
Comment: @Michael: 7 hours, but yes, seriously. I vote **a lot**.
Comment: As long as no one reaches for the ***ultimate*** weapon, we'll be OK.
Answer: If no one votes how are other users going to know what are the good answers and perhaps more importantly what are the bad answers?
As @jjnguy points out it shows that at least one other set of eyes has seen and reviewed the answer. It's a form of peer review as well as being a rating system. The default view is for answers to be sorted by votes so the most highly voted answer (and therefore hopefully the most correct one) is right there under the question for others to find easily.
People won't read all of the comments so won't see a "this is a good answer" comment.
Comment: Also if you just increment the number of votes, that's less wordy (more user-friendly) than posting a comment which says "Me too: I agree."
Answer: I find myself agreeing with this somewhat:

Actually I strongly disagree about the (2), many (if not most) people who can vote doesn't know the right answer which is a major issue.

I don't think it's most voters who don't know the right answer, but this is the reason why I personally don't use all my votes every day.  I just don't know enough to cast an informed vote on that many things.
However, if I know enough to leave a comment, then I've probably done enough testing and checking to cast a vote.
Comment: I don't use all my votes either - but I still vote where I can.
Comment: @ChrisF: Yeah, I do still vote every day, even though my SO usage is quite different than it used to be.  I look at far more posts for moderation than for normal Q&A, so I'm probably not a very good data point anyway.
Answer: I've decided to answer, despite being absolutely unwilling to go into a political (which voting is) argument.
For starters, I am the original user who doesn't vote.
Why? I see no reason to.
Most importantly: votes are anonymous. So there is exactly zero motivation on my part to cheer up based on whether the crowd likes or not. I don't care about whether the answer is popular or not; I care about whether it's correct or not. If it's not correct, someone will remark on what is wrong with it.
A signed message praising the answer could be a bonus, but it ends there. Constructive criticism is just as welcome.
Now back to the anonymity part: I dare say, nowadays, most developers and people coming to this site are mediocre (at best) developers. I have no experience with the sister sites. Not all, but most. I don't wish to insult anyone personally. It's just what happened to the software business in the last two decades. The sheer amount of downright not-smart questions is evidence.
There is some truth in selecting a good answer if you have fallen upon the question via some search and it's not your own. A highly scored answer could be good, yet I see every day a double-digit number of answers that are not exactly correct or that have shortcomings. So, my advice would be that if you see a question was well asked, take your time and read everything. If one cannot figure out what the correct answer should be, and why, based on the entire discussion, one would be better off changing professions.
Not voting comes with extra political reasoning about how the "likes"/positive votes/&c. are calculated. They are not weighted in any shape or form. Numbers/masses make nothing right or wrong to boot. There is a high chance people being massively right on a common question but rare to none of some specifics, if the best case there will be an external article topic that might have been read and stating some 'facts' people follow. It does not make it inherently correct.
Voting has become the norm on many websites, and society as a whole, but I fail to embrace it. If I believe something is useful, I prefer to be more human and chime in with some words.
There is more to say on this subject, but this post is long enough and probably reading-unfriendly, regardless of my intent to make it parsable.
Extra bonus for not voting: it reduces energy consumption and saves green trees/oil/uranium, whatever :D
Thanks and cheers!
(Ah, and yes, community wiki is an awesome option, it reduces the flux of positive reputation on the site)
Comment: I don't agree with you, but I like parts of your policy (especially leaving comments instead of votes). And kudos for explaining your position at length
Comment: I suppose I dare not ask how you feel about voting in political elections.
Comment: @Cody, that's a personal question and quite unrelated to the discussion. Voting in election usually boils down to picking the lesser evil. I live in a country where I have no citizenship, so I skip government elections but I vote for EU parliament, though. Yet, there are some gripes with the representative democracy but they are far beyond the scope of the discussion. I hope your question is honored.
Comment: @Popular Demand, edit much appreciated. You must love reading/editing/writing. All good, except the part w/ sister sites visiting. "Not all but most" phrase doesn't regard the sister websites but the developers.

Should we vote on answers? Why?


Adding hot receptacle from current light switch power?

Question: My current situation is power comes into light switch and then to receptacle controlled by light switch. I need to add a hot receptacle. I assume I can pig tail the incoming power wires inside the light switch box and have one set lead to the light switch and the other to lead to the new hot receptacle. Is this correct thinking?
Comment: Can you post photos of the insides of the boxes involved?  Do you still need a switched receptacle at that location?
Comment: Yes, we need to leave the current switch and receptacle. We want to add a new hot receptacle below the switch, so obviously it would be easiest to run power from there versus fishing and cutting drywall.
Answer: Given that the line cable (hot and neutral) enters the switch box, you can run a new cable from the light switch box to a new receptacle and connect it so the switch will still switch the existing receptacle.
You cannot run a new cable from the existing switched receptacle to get an always on receptacle.
If you wanted to do away with the switched receptacle, you could remove the switch from the circuit and connect the wires with a wire nut. The existing receptacle would then be always on.
You could install a ceiling box and light fixture and run a cable from the switch box to the light fixture. That way the switch would control the ceiling light.
Answer: Yes, you are right.
Split off of the incoming power with a pigtail going to the existing switch and a new wire feeding down to the new receptacle.


well-ordering principle

Question: I'm confused by the well-ordering principle . The proof is clear but I don't have any idea why is it true . It says that every non-empty set can be well-ordered but $C^{1}$ is a non-empty set but there's no linear order defined on it . Furthermore , I don't know how to define well-ordering relation on an open subset of $R^{1}$ e.g $(0,1)$
Comment: Does $C^1$ refer to the complex numbers? Because it is also the notation for all the continuously-differentiable functions (from $\Bbb R$ to itself). But the reference to a linear order seem to imply that you mean $\Bbb C$ which is the complex numbers rather than the functions.
Answer: The well-ordering principle is non-constructive, in the sense that it doesn't tell you how to well-order a certain set, but rather that some well-order exists.
This well-order is often completely incoherent with the natural structure of the set you will consider, for example in the case of $(0,1)$. The well-order will disagree with the $<$ order in most cases.
But that's fine. Note that we can define a dense order on $\Bbb N$ by taking a bijection with $\Bbb Q$ and "pulling back" the order of the rationals. Does this order agree with the usual order on the natural numbers? Hardly. But that's fine.
Note that you can find a bijection between $\Bbb C$ and $\Bbb R$, and this bijection does define a linear ordering of $\Bbb C$. Again, this linear ordering is completely incoherent with the structure of $\Bbb C$, but such order does in fact exist -- even if it doesn't respect other structure of the set.
For the case of $(0,1)$, or any other set of cardinality $2^{\aleph_0}$ we can even prove that without using the well-ordering principle (or the axiom of choice, or some other equivalent of course) we might not be able to well-order $(0,1)$. These proofs are rather technical and difficult, but the key point is that we can produce models of set theory where the axiom of choice fails and $(0,1)$ cannot be well-ordered.
Comment: That cleared my confusion , thanks .
Comment: It's surprising that there are models of set theory in which the axiom of choice fails . I think is axiom of choice is so natural that I can't imagine a situation in which it fails .
Comment: billy, yes the axiom of choice is very natural. In fact it is so natural that many of the advocates against it in the early 20th century were actually using weakened forms of it without noticing. But sure enough, it can fail. It is just one of the things that show how little our intuition holds for infinite sets (because it cannot fail for finite families of non-empty sets).
Comment: Can you give an example in which it fails ? My guess would be an uncountable collection of sets e.g If we consider $R^{1}$ and all of it's possible subsets "The power set of $R^{1}$ but I'm not sure.
Comment: billy, as my comment to your question - do you mean $\Bbb R$ (the real numbers) when you write $R^1$? If so, then there are models of set theory in which the axiom of choice fails and $\Bbb R$ cannot be well-ordered, so there is no choice function on non-empty sets of real numbers. In any case, no it is impossible to "give a model" because the construction of these models is quite technical and requires some heavy set theoretical machinery to work. There are tons of fine and delicate points to notice when discussing models of set theory.

well-ordering principle


How to copy the /bin files along with dependencies using commands?

Question: The /bin folder of Ubuntu 14.04 has files with dependencies. I want to copy the symbolic links along with the files, into a separate directory. Is there an inbuilt command for this?
Comment: What do you mean by "dependencies"? It _could_ mean "the libraries that each command is using".
Comment: Yes, I meant libraries.
Answer: Use cp -P (capital P) to move any symbolic link and copy the symbolic link instead.
This can be combined with other options such as -R to copy a directory hierarchy — cp -RL traverses all symbolic links to directories, cp -RP copies all symbolic links as such. cp -R might do one or the other depending on the unix variants; GNU cp (as found on CentOS) defaults to -P.
Even with -P, you can copy the target of a symbolic link to a directory on the command line by adding a / at the end: cp -RP foo/ bar copies the directory tree that foo points to.
GNU cp has a convenient -a option that combines -R, -P, -p and a little more. It makes an exact copy of the source (as far as possible), preserving the directory hierarchy, symbolic links, permissions, modification times and other metadata.
shareeditflag
Comment: Using these commands, cp -RP and cp -a, breaks the links and the files cannot be accessed after that.


capture screen areas

Question: Is there a way to capture screen areas in the new packaged apps? Because of this Chrome bug http://code.google.com/p/chromium/issues/detail?id=68568&q=is%3Astarred&colspec=ID%20Pri%20Mstone%20ReleaseBlock%20OS%20Area%20Feature%20Status%20Owner%20Summary users cannot download their SVG files as PNGs (vector-paint.com). I know there is the chrome.tabs.captureVisibleTab function but that is not accessible to packaged apps.
Answer: There is no way to do it now in the API, although I have reported this in a bug
In the meantime, you might want to try the workarounds described in this Eric Bidelman's HTML5Rocks post. I'm not sure if these options play well with CSP restrictions, though.

capture screen areas


IE stops While recording in Loadrunner

Question: I am new to loadrunner,i have installed loadrunner 11 in my machine,But when i start recording in Vuser my IE 8 stops responding .But i can open the wen page manualy.
Can anybody Help
Comment: What OS are you using? Which protocol(s) are you using?
Answer: I am not sure if your problem is still up to date.
You can try to start VUGen with the run as command (right click) and enter the credentials your webpage requires.
This might solve your problem.
Answer: 90% of issues of this type can be solved by looking at your system and credentials and matching those up to the requirements for the tool in question.   Also, if you have an aggressive antivirus installed this could be impacting the recording mechanism in an antagonistic fashion, so you may need to disable the antivirus solution for recording purposes.
As you note that you are new, have your core foundation skills been confirmed, have you been through training and are your working with a mentor?   If the answer to all three is "no" then you will probably want to run for the trees because at some point your management is going to toss you under a bus to salvage a client relationhip.   This is not an "if," but a "when" whenever this combination of factors comes into play.

IE stops While recording in Loadrunner


What type of memory allows for most parallel read/write operations per clock cycle in an FPGA?

Question: If you imagine basic motion detection where you have two frames stored in memory: a previous 640x480 frame and the current 640x480 frame, what type of memory (SRAM, DRAM, SDRAM, DDR SDRAM, etc) would allow for the most parallel read/write operations per clock cycle? For example, the perfect solution would allow the simultaneous read of two frames, (307,200 x 2 pixels) in one clock cycle. What is the best memory for this, the SRAM built into the FPGA, or an external chip like DDR SDRAM? (In the bigger picture I'd be looking for the a FPGA dev board that has the smallest cost and size with the largest parallel read/write ability.)
Comment: Really? If you assume 24bit colour, that would require 14.74Mbit per clock cycle - so even if you used DDR that would require 7 million pins! Why do you need such speeds?
Comment: With a high end FPGA and a 64bit wide DDR3 memory running at 800MHz clock frequency you'd be able to transfer data at roughly 100Gbps. So that would take roughly 150uS to copy two frames.
Comment: You are going about this the wrong way. If your frames are from a normal speed camera, you have ~30 frames per second and e.g. 600,000,000 clock cycles per second. Therefore you do not process a frame in one clock cycle and then sit idle for the remaining millions of clock cycles until the next frame. You do it a pixel or region at a time.
Comment: A Virtex-7 X1140T has 1880 BlockRAMs each with a 72 bit interface -> 135.360 bits per cycle. Back to normal devices ... Normally, one would estimate how many MiByte/s are needed by a certain algorithmn  ...
Comment: Virtex-7 or DDR3 800MHz fpga are not "smallest cost and size". @user2514676, I think you don't approach the problem the right way. Most video application (never done motion detection, but I'm pretty sure it's not "special") read each frame pixel once per pass, keeping it in register/blockRAM as long as required for the algorithm, which is usually a limited amount of line. As such, your requirement is being able to write 1 pixel and read 2 pixels every cycle, which for 640x480@60fps will be achievable for any memory technology from the past 15 years.
Answer: Dual port block RAM and LUT RAM is pretty much impossible to beat as it is on the FPGA die and accessing it does not require using any I/O pins.  If you don't have enough capacity in block RAM, then you can throw external memory at the problem.  QDR SRAM is dual ported and so has double the bandwidth of SDRAM, this can be useful for some applications, though it is very expensive.  DDR3 SDRAM is probably the cheapest option, but even this is relatively slow compared to what you can do with LUT RAM and block RAM.
I think you're going about your design the wrong way.  Besides, if you need to do any real processing on that many inputs, the logic alone would consume an absolutely gigantic amount of area, and may not fit on the largest FPGAs available today.  What FPGAs excel at are very high speed pipelined processing operations.  What you should do is figure out how many pixels per second you need to process (640x480xfps) and then figure out how to implement your image processing algorithm to get that level of performance.  Generally the idea is to read in a small number of pixels per clock cycle and then process them in an orderly fashion.


Words from ArcPy Scripts Appear in Map Document?

Question: I created a slope map of the U.S. using ArcPy scripts (ArcGIS 10.2). I just completed the map. However, some of the words from my ArcPy scripts show up in the map document, both in data and layout views. I need to remove this print from the map.
Answer: Presumably these are text elements so you should be able to go into Layout or Data View of ArcMap and use the Select tool from the Draw toolbar to click on them, and then hit the Delete key to remove them.
If this works, but next time you run your ArcPy script they come back, then you will need to try and debug your script.
Comment: Using the Draw toolbar worked. However, I couldn't just select the text and delete it. I had to place a text box over segments of the words and delete the text box to erase the words.
Comment: By "place a text box" I think you are describing dragging a selection rectangle.  That would make sense because it may not be easy to always see precisely the extent of the text box the text is in.
Comment: Have you tried clicking the refresh icon near the bottom of the layout view. When you place a text box over them and delete it they disappear seems like maybe they aren't really text elements but maybe 'artifacts'. For instance I have had this occur with labels that pop up at certain zoom levels but sometimes get 'stuck' when I zoom out and a refresh will get rid of them.
Answer: It would be interesting to see which words are appearing in your layout. Are they all related somehow? Are they all lines in your script that are commented out?
Do these lines of text appear in data view also? Or just the layout view?
I would check these things out and see if there was a specific pattern of which are appearing. Then you could maybe try running it again without certain lines and see what happens.


windows clients in local network are losing connection to samba shares on Ubuntu

Question: I am facing a problem which I am not able to resolve until now with any help I got on net from forums etc.
I have a network which has 7 Ubuntu machines and 3 Windows machines
Ubuntu version is 16.04 LTS and 2 Windows are on 8.1 and one on Windows 7
one of the Ubuntu desktop I am trying to convert as a file server for all.
the folder which I wanted to share i shared it via right click - properties - local network share
in smb.conf I shared my home directories as browsable, guest ok, and create and directory mask 0775.
All computers are on same workgroup.
All Ubuntu machines are working perfectly fine.
Windows machines are also able to see the computer on network and shares on computer.
Windows pc can connect to the samba share but loses the connection after a while which then is unable to connect.
I have to log off from the Windows pc and log in again but same problem persists
It shows the message that you may not have access to this network resource
or no such file or directory exist
or invalid name or directory.
Answer: The crux of the issue was the conflict of two similar services based on same components.
the components here being samba and two conflicting services being samba share and nautilus share.
those who have tried to share the directories etc through built-in GUI of the properties window of a directory will at first instance prompt to install a service saying service is not installed.
looked into details it downloads samba common etc.
it works perfectly well in linux only network.
however it will face trouble if network have windows clients as well.
MS Windows will specifically look for samba share configured through '/etc/samba/smb.conf'.
If that is configured MS windows will have no problem but linux machines will not be able to connect detecting two overlapping services on same platform for same purpose. conflict to choose a process: nautilus share or samba share.
the simple and logical solution is to unshare everything done/shared through nautilus share (using built in sharing in GUI window for properties of the shared directory.
given the smb.conf is written well there should not be any problem.
this is the finding of and simple solution to my mind boggling struggle.
hope this will serve to any help.


How would I convert a Windows .exe to a macOS executable/app?

Question: I am trying to convert a Windows .exe file to a macOS .app or anything that would run on macOS. Problem is the only things I have found require a Mac and I don't have one. I am looking to convert it on my Windows computer then send it to a Mac computer. I would prefer an option that didn't require a virtual machine.
Answer: Windows .exe's are very specific to Windows. They call functions that are specific to Windows and often have no direct macOS equivalent.
To run a Windows .exe in macOS without a VM, you would need Wine. Wine tries to provide an environment where Windows apps can run under Linux or macOS, including tons of libraries implementing Windows APIs which do not exist on Linux or macOS.
There's a software package for macOS called Wineskin that lets you take an arbitrary Windows .exe and wrap it in a Wine environment that you can copy to other Macs, and I don't think the other Macs have to have Wine installed; I think the Wineskin wrapper contains all the necessary Wine files. But Wineskin only runs on macOS and I don't know of anything like it for Windows or Linux that could wrap a Windows .exe in Wine targeting macOS.
By the way, macOS executables either have no filename extension, or they are specially-formatted directory trees with the ".app" extension (a.k.a. "app bundles", "app packages"). macOS .dmg files are disk images, kind of like a .iso on Windows or Linux. I don't think you want to turn your Windows executable into a macOS disk image.
Comment: Okay, there should be nothing in my exe that is specific to Windows. I am not knowledgeable about Macs and dmg was the first thing that poped up when I searched for the equivalent of an exe on a Mac. I think I am going to use Wine with a virtual machine.
Comment: @xXGokyXx  Wine is your best bet. But honestly where you say "… there should be nothing in my exe that is specific to Windows." that's pretty facepalm worthy. If it is compiled for one OS it can run on another.
Comment: @xXGokyXx If you compiled this .exe yourself, and so you have the source code and know it only contains POSIX code (portable C code that only calls system calls that are guaranteed to be supported by any POSIX-compliant Unix-like OS), then see if you can tell your IDE/compiler/toolchain that you want to cross-compile for macOS x86_64. If nothing I just wrote makes sense to you, then you almost certainly have a very Windows-specific .exe, not a POSIX-compliant portable C software project.
Comment: @Spiff What you wrote did make sense. The problem is I can only compile the source code on a Windows OS when I need it for a Mac OS. The compiler however only will allow me to compile it for a Mac OS if it is run on a Mac OS (which I can't do). I assumed that if the source code could be compiled for a Mac then there should be no issue with just converting the exe compiled version, then again I don't know how that stuff works. I was just looking for something to try. I think I am going to try to just run the compiler on a MacOS in a Virtual Machine (if I could figure out how to set that up).


2nd order active low pass filter

Question: Apparently the voltage of the inverting input to the op-amp in the 2nd order active LPF should be equal to \$v_2\$. Would anyone be able to explain why this would be the case?
Answer: With negative feedback (see the two right-hand resistors feeding some fraction of the output potential back to the inverting input), the op-amp's behaviour is rather interesting; it adjusts its output in such a way as to minimise the difference between its two inputs. If the signal being fed back to the inverting input is too low, the output rises, and the feedback signal also rises. If feedback is too high, the output will fall, taking the feedback signal with it. The change in output is always in a direction that tends to reduce the difference between the two inputs.
The result is that the system always settles into a state of equilibrium, in which the two inputs have almost exactly the same potential.
From a more rigourous algebraic perspective, you need to understand the relationship between the op-amp's input and output potentials:
$$ V_{OUT} = A(V_{NONINV} - V_{INV}) $$
Here \$A\$ is some huge gain, like \$A=10^5\$ or \$A=10^6\$.
By inspection you can see that if \$ V_{NONINV} > V_{INV} \$ then the op-amp's output will have to rise to some large positive value, (constrained, of course, to its positive supply voltage), and if \$ V_{NONINV} < V_{INV} \$, then the output has to plummet towards some large negative potential. With negative feedback, as the output rises or falls, at some point it must pass through a condition in which the two are equal. If it  overshoots that point, the difference changes sign, and the output swing changes direction. It eventually settles at whatever \$V_{OUT}\$ is necessary to obtain the condition \$V_{INV} \approx V_{NONINV}\$.
You can liken this behaviour to any system employing negative feedback. For example, while steering a car, you always turn the steering wheel in a direction that reduces the difference between where you are actually heading, and where you want to be heading. The result is that you don't drive into the ditch. With negative feedback, you are constantly adjusting the output (actual direction) so that it's always exactly equal to your desired direction, and you stay on the road.
Another example is room temperature. If you find the room too warm, you turn down the thermostat to reduce the temperature. When it's too cold, you turn it up. Again you are simply employing negative feedback to keep the room's actual temperature equal to your desired temperature. You are always acting to equalise these two values: actual temperature, and desired temperature.
The difference is called the "error" and negative feedback causes a system to settle at as close to zero error as possible. If you imagine the inverting input of an op-amp to be a measure of the actual condition, and the non-inverting input to be a signal representing the desired condition, then you have negative feedback, and the op-amp's output will change in such a way that causes the difference between them to tend towards zero.
Answer: An ideal op-amp can be regarded as having infinite open-loop gain. This means one thing; if the op-amp output is somewhere mid-region between the power rails then, the voltage difference between the inverting and non-inverting inputs must be zero.

Apparently the voltage of the inverting input to the op-amp in the 2nd order active LPF should be equal to \$v_2\$

This concept applies to all op-amps using negative feedback (not just Sallen Key filters).
Answer: This would be due to OpAmp action which strives, simply speaking, to make the inputs equal to each other. In your case it's not so much that \$V_{in-}\$ is equal to \$V_2\$, but \$V_{in+} = V_2\$ is "forced" equal to \$V_{in-}\$ by the OpAmp's internal circuitry (by changing the output until this condition is fulfilled).
This is, of course, a pretty narrowed down answer. There's a lot of reasons beneath this, but for the scope of this questions I think this is "good enough".
EDIT: Simon's answer goes into more detail, so please refer to his answer for clarification.
Comment: Slight correction: It is not the "OpAmps internal cicuitry" which causes the input differential voltage to be NEARLY to zero (in practice we ASSUME that it is zero). In fact, it is only the result of negative feedback (and NOT "a lot of reasons") which is responsible for this effect (as in all closed-loop systems with negative feedback).
Comment: Sorry, isn't it the OpAmp that employs negative feedback by way of it's internal circuitry to make the input differential voltage (sort of) zero?
You're right that it's mainly/only the negative feedback, I was only trying to convey that it's not as simple as the OpAmp performing some kind of internal subtraction and voltage control by saying "a lot of reasons". Well, now that I think about it that's pretty much exactly what it does, just not mathematically but with currents and voltages. I realize my explanation was somewhat basic but thats what I was trying to do.
Comment: My previous comment might unintentionally come off a bit challenging, I just wanted to clarify that I'm genuinely asking to further my understanding.

2nd order active low pass filter


Xcode 6, Yosemite and iOS device with iOS6

Question: I'm testing the app that is built using latest iOS8 SDK, but deployment target is set to iOS6 (it still has to run on iPod Touch 4th gen). I know that there is no iOS6 simulator available on Yosemite, but I'm trying to deploy it via old USB 30-pin cable on the physical device.
Seems like I'm always getting "valid provisioning profile for this executable is not found" error message, even though that profile is correct (which I'm 99% sure).
Should such configuration work and I just need to make sure profile is ok, or is it unsupported combination?
Answer: Well, looks like it was a problem in the profile. I was able to successfully deployed app to the old iPod Touch in this configuration.


Why do some power adapters output an AC voltage?

Question: Out of most of the electronics I use, I have two, both of them speakers, that use a power adapter that simply steps down the voltage without rectifying it. Why did the designers choose to put the rectification circuitry in the speaker instead of the power adapter?
Comment: I have not seen it on speakers (all the powered speakers I saw were DC powered), but I did see it in a 56K US Robotics external modem of the late 1990s vintage, which was powered by a 18VAC (output) wall wart, and a pretty beefy one too, capable of 0.5A on the secondary. Looking at USR's web site, they still use AC output adapters, but the current models are of 9VAC 1A.
Comment: Older dial-up modem needed bipolar supplies for analogue circuitry as well as RS-232 drivers and the AC supply was cheapest solution with just 2 wires.  Some modems used 3 wire power connectors but part of it may have been to prevent third party transformers from causing out of tolerance supply.
Answer: One reason is that you usually need positive and negative voltage for audio amplifier. (Like +5, 0, -5 V).
Another reason: Some devices run directly on AC, e.g. Christmas light bulbs can do.
Yet another reason: Some devices need two different voltages, like 5 V and 12 V.
Yet another reason: An external step down transformer provides just safety. Voltages no higher than 50 V are usually accepted as safe (although not very safe with high current). So the transformer makes it safe, the rest is in the device.
Comment: Like this: http://www.play-hookey.com/ac_theory/power_supply/images/rectifier_dual_half_wave.gif Two wires from the transformer go into the rectifier, three wires go out +, 0, -.
Comment: I'm curious because everything else I have has rectification circuitry built into a power adapter that outputs DC. Why do (cheap) speakers in particular have AC adapters that output AC?
Comment: I expect there is an amplifier inside your speakers. So see the first sentence of my answer. You would need a special adapter with 3-wire power cable, but that wouldn't be cheap. Using a standard adapter is cheaper. Also, it probably provides better sound quality compared to solution with whole adapter built-in to the speaker.
Comment: @AlKepp I don't get how you are supposed to have a differential power with only two wires, either AC or DC.
Comment: @jippie: That's exactly what I mean.
Answer: There could be any number of reasons it was done the way it was, and only the designers have those answers. Some possible scenarios:
A suitable transformer may not fit inside the device's enclosure.
In testing, the magnetic fields from the transformer may have caused unacceptable audible artifacts.
The transformer wall warts were cheaper than a chasis or PCB mount transformer.
Comment: For a low power device, what are the advantages of placing the rectification in the device rather than in the power adapter?
Comment: I just realized I entirely missed the question. It's still a design consideration. Without seeing the PCB or schematic, this is all speculation, but my vote goes to needing a split supply. There are ways to get the negative rail from the positive using a SMPS, but the current draw would be higher and increase the costs of the wallwart. These are all design considerations that need to be evaluated in terms of cost for mass production.
Answer: It can be two things, and since it's audio, probably both. The first, most electronic device companies specialize in one thing, the main product they sell. They tend not to get into the highly annoying area of power supplies. Their engineers figure out what voltage/current/quality power supply they need, and then they buy generics bulk from a Power Supply manufacturer (often paying extra for custom labeling or tighter quality control). It's just way cheaper that way.
The second thing would be, especially in audio devices, additional quality control. Might cost 10 cents for a ac to dc power supply compared to 5 cents to put in a rectifying stage inside the speakers while providing better rectifying control  (eliminating cheap wall wart rippling or ground loop issues, shorter signal/power/trace lengths to deter emi etc), they will do it. The power supply manufacturer(s) might not have a cost-effective standard part with a quality dc output.


When carburettor heat knob is partially open, is the primary air filter closed fully or partially?

Question: I know that when the carburetor heat knob is fully opened, the primary air filter is closed. But what happens to the primary filter when carburettor heat is partially open? Is the primary filter closed fully or partially?
Comment: Use of partial carb heat is not recommended because it is possible to raise the intake air temperature to  the point that it is conducive to actually producing carb ice. Only use partial carb heat if you have a carb air temp guage.
Comment: Which particular aircraft are you asking about? Not all carb heats work the same way.
Comment: thank you for your responses and thanks "Bianfable" 4 your assistance
Answer: The normal airbox path is through the air filter. Carb heat, as an alternate path, usually draws air from within the cowling and is unfiltered. The knob in the cockpit operates a baffle plate that opens one air inlet or the other within the carburetor air box.
You can stop it at an intermediate position, say half way, and the engine will be pulling half filtered cold air and half unfiltered heated air. At altitude, drawing unfiltered air is not too bad for the engine because there is little dust (silica particles) that can do (long term) damage. At low altitude however, you want to avoid extended operation on unfiltered air.
But in any case there is a bigger problem.
Using partial carb heat can be dangerous because you don't know the actual temperature of the blended air reaching the carb body. There needs to be enough heat to keep air at the throttle plate and venturi well above freezing, allowing for the huge temperature  drop you get (a bit) from venturi effect itself and (mostly) from evaporative cooling of the fuel.
If the airplane came with a carburetor air temperature gauge, you could limit the amount of heat to make sure the air temperature at the sensor in the carburetor throat stays several degrees above freezing and avoid too much unfiltered air. But without a temperature gauge, there's no way to know how much heat is enough, so you just apply all or nothing, even if fully on is more heat than is technically necessary at any given time.
So, due to the fact that carb heat path introduces unfilter air (undesirable) that is heated (also undesirable because it reduces performance and makes the air/fuel mixture richer), and may or may not be keeping the air going through the carb warm enough to prevent icing, use of partial heat is a bad idea all around, and can be quite dangerous unless you have a Carburetor Air Temperature gauge. So stick with fully on, and fully off. The worst time for carb icing is during descents with the throttle closed or nearly closed, so be liberal with carb heat during descents.
Fuel injected engines don't have carburetor icing issues and don't have to use an air heater, but they do need to provide a secondary air path for the engine just for safety, mostly for the case where the air filter ices over in icing conditions or heavy snow. These engines have an Alternate Air control, which operates a baffle plate in the inlet airbox similar to carb heat, but the air is unheated and is only for when the main inlet is blocked for some reason. Alternate air is, like carb heat, unfiltered air drawn from within the cowling, just not heated.
Comment: thank you for your response
Answer: Well in general, the carburetor heat knob is just opening and closing a door that controls whether the air comes in through a duct that leads to the air filter, or comes from another source that is unfiltered, but warmed by the exhaust manifold.  If the carburetor heat knob is in an intermediate position, the door is part way open and you'll get air from both sources.  Some of the intake air will be passing through the air filter, and some won't be.
Comment: ¡thank you for your response


Can I use my xbox live account if I buy a new hard drive? Will my data also be there?

Question: I'm thinking of buying a new Xbox 360 hard drive because I'm running out of space. Will I be able to log in to my xbox live account? And if so will all the saved data on the hard drive I have now with my xbox live account go with the new xbox hard drive I want to buy? Please help
Answer: Your xbox account signs in with Microsoft, directly. Replacing the hard drive will not effect this.
Naturally, any files on the hard drive you are removing will not be directly accessible, once the drive has been removed. You can consider two options to solve this problem:

Using a USB flash drive formatted to accept Xbox 360 save data, you can transfer important saves to your backup USB, and transfer them on to the new hard drive.
If you have Gold membership, you can use the cloud to simply store your saves online. These saves will be accessible from any drive or console, providing you have internet access, and Gold membership. This can also be used to transfer saves to the Xbox One, for use with backwards compatibility.
Answer: Adding to timelord64 is that on the Xbox one all saves will transfer with the account.
As far as achievements they will always travel with the gamer tag.
Buy a used data transfer cord from game stop then return it the same, next day and get your money back (which now they will give on a gift card I believe)


How to check what compression type an RPM package uses?

Question: I recently realized that the RPM packages shifted from gzip-compression to xz-compression a few years ago. I need to check is the compression type of an RPM package that I have. I also need to check what compression type is considered by my system when it is trying to unpack an RPM file.
Comment: Since you're using oracle-linux you should have the script `/usr/lib/rpm/rpm2cpio.sh`  - this script works out what type of compression is used and will decompress it.  You can probably use that as the basis for checking the compression your rpm package uses.
Comment: How can I figure out the compression type with this?
Answer: Query the RPM with a custom format that includes the Payloadcompressor tag ("Payload compressor name") like this:
rpm -q --queryformat '%{PAYLOADCOMPRESSOR}\n' -p qt-4.8.7-67.fc36.x86_64.rpm

By the way other interesting tags are Payloadflags ("Payload compressor level") and Payloadformat ("Payload format (cpio)").
Answer: If you use rpm2cpio; you don't need to know the compression format. You can use rpm2cpio to unpack rpms like this:
rpm2cpio your.rpm | cpio -idmv

Answer: To address: Which compression formats are supported?
It's easy enough to see what's not supported, e.g. trying to install an RPM from Fedora 34 on RHEL 6:
$ rpm --install https://dl.fedoraproject.org/.../Packages/t/tzdata-2021a-1.fc34.noarch.rpm
error: Failed dependencies:
        rpmlib(PayloadIsZstd) <= 5.4.18-1 is needed by tzdata-2021a-1.fc34.noarch

Although this dependency is not explicitly exposed by rpm-libs in a way which can be queried by --whatprovides, we can infer the compression formats supported by rpm-libs.
### why do all compression formats have "z" in the name? It's the fashion.
$ rpm -q --requires rpm-libs | grep '^lib.*z'
libbz2.so.1()(64bit)
liblzma.so.5()(64bit)
liblzma.so.5(XZ_5.0)(64bit)
liblzma.so.5(XZ_5.1.2alpha)(64bit)
libz.so.1()(64bit)

Another way to track this would be the features changes for Fedora etc.:

Fedora 12, switch to XZ
Fedora 31, switch to zstd


How do I run a command when a player right clicks?

Question: I want to assign an item to perform a specific command that will place down a redstone block at some coordinates when I right click it. How would I do this?
Answer: You will want to use a carrot on a stick, because you can use a scoreboard to keep track of its uses (which is a right click).
Set up a scoreboard like this: scoreboard objectives add carrotClicks minecraft.used:minecraft.carrot_on_a_stick
In a repeating always active command block put execute as @a[scores={carrotClicks=1..}] run setblock <some pos> redstone_block and in a chained command block put scoreboard players set @a carrotClicks 0.
Thus, when a player right clicks with the carrot on a stick they will increase their score in the carrotClicks objective, which will cause the command block to exeucute the setblock command as that player and then reset their score back to zero. Additionally, if you wanted to execute not as the player but as the command block you can use if entity rather than as @a.