Difference between using a wave editor and a DAW like Pro Tools?

Question: I use pro tools to edit all my SFX recordings and was wondering why some people use Pro Tools and a separate wave editor. I was looking at http://www.audiofile-engineering.com/waveeditor/ and can't seem to find anything special that it does that pro tools can not.
Answer: I use izotope RX as a wave editor, and it works wonderfully (though I wish I could crossfade in there).
Really, the reason to use a wave editor is to bypass a couple of things you always have to do in a DAW situation:
1)create a new session
2)export or otherwise output sounds
By using a wave editor you just dive into the sound and start hacking.  apple+s when you're done and move on.  this means if you just need to cut up chunks of a take, remove slates, do some EQ, or pull out a couple of annoying blips in the sound you can do so without any import or export steps.
Also, destructive batch editing if that's your thing.
Comment: @Rene Are you talking about 10 sounds at a time or 3,000 lines of dialogue for a video game? If the latter, I could see where time could be saved, but for 10 sound FX I'd much rather use the Pro Tools method because of the EQ, phase, pitch and corrective tools and things that are available to you that wouldn't otherwise be there. Your thoughts?
Comment: re: video game dialogue I'd use a more robust wave editor than izotope but yeah.  I HAVE done fairly large games exclusively in protools (dragonball Z:Budokai 3 comes to mind), but it didn't feel as efficient as it could be.  Re:a small batch of sfx all of the tools are still generally there.  The EQ in IzRx is awesome, and I don't do pitch shifting until the point where I'm designing something.  FWIW I don't put a sound in my library until after its run through RX, and while I do run some though protools I don't run them all there.
Comment: @Rene Ah, I didn't know RX had a good sounding EQ. Yet another good reason for me to save up and buy it... ;)
Comment: yeah, the eq in combination with the spectrograph is pretty amazing.  It has both an analog mode and a linear phase eq.  Also a great hum removal eq with super tweaky harmonics, Q shapes and slopes in it.  Add in a basic gain function, the ability to destructively trim the heads and tails, resampling, dither, spectral repair, noise reduction, de clipping, de clicking, etc - you start to lose reasons for bothering with PT on a small set of mono or stereo files.
Answer: I use BIAS Peak Pro (sometimes happily, sometimes not) for the same reasons that Rene outlined: Immediacy. It's simply a question of the right tool for the right context. If I'm editing a single sound for my own library, it's into the stereo wave editor I go. If I'm designing something complex enough to require multiple tracks, I dive into a DAW.
Don't make the assumption that a wave editor will have more functionality than a DAW; it's quite the opposite. These lines are sometimes blurred, too. For example, Pro Tools, iZotope RX, Soundminer v4 Pro, and Adobe Audition have significant functional overlaps, but each is really good at extremely different things (DAW, audio surgery, library/DB, and wave editing, respectively). An analogy would be how any digital painter will of course have Painter, but they'll also have Photoshop, and probably Alias Sketchbook. Different tools for different contexts, even though there's some overlap.
Answer: I use AE Waveeditor along with Ardour or Ableton Live depending on the project. Neither of those DAWs have any real wave editing capability, but I can vouch for Waveeditor's smooth workflow, and I'm sure that this is the reason that people use a dedicated wave editor when the task at hand is so specific. Waveeditor is interesting since it more closely resembles photoshop than other wave editors, and I find this allows more flexibility to be creative. In particular the layering workflow (of effects, and of multiple files) is well suited to the task of readying wave files to be dropped into your favourite DAW's sequencer. Although this can be achieved by other methods, including within pro tools. Wave editor's only real con is that it uses a fair amount of the cpu, and updates seem to be slow going, the next of which is said to dramatically reduce cpu usage, but seems to have been in beta forever. If you're at home using pro tools, then there's probably no reason to get a dedicated wave editor.
oliver
Answer: It is just speed and taste.  Wave editors are brilliant for working on single files without having to import and bounce to disk.  It can also be a bit like choosing between different mics or analog gear, the colouration is slightly different depending on the algorithms and I find that I often have to be more drastic with the EQ in Pro Tools compared to wave editors.
Answer: I use Soundtrack Pro for just about all destructive editing. It provides some features that I don't get elsewhere, can run scripts and batches and gives me access to all of my AU effects, plus the awesome Logic-only stuff like Space Designer, Delay Designer etc. Plus it's built specifically for the waveform editing, so it's efficient and "just works".
Answer: I'm a fan of Steinberg Wavelab. I've been using it on and off for years and for editing SFX it's great.


email address not appearing in user profile

Question: I am using drupal 7 default user_register module, when a user registers with all the required fields, it successfully registers but when I click that user in people> tab his/her profile is displayed in which email is not appearing as you can see in the screen shot. Whereas when I clicked on edit link on the right side of that user email address exists.
Comment: > user_register module.
This module is called _user_ not _user_register_.
Answer:
copy the default profile template into your theme directory (the default template I copied is /modules/user/user-profile.tpl.php)
just after the initial  insert this code:
$profile_user = user_load(array('uid' => arg(1)));

 if($profile_user) {

   print '
Contact Information
';
   print '

Email
';
   print '
mail . '">' . $profile_user->mail . '

';
 }

That's it, all your profiles should have email addresses.
Answer: By default Drupal does not show the Registration email in the User profile.
But you can override the default template of the User page with your own template and display the email field.
Alternatively you can use Panels to change the layout and show the Email Field.
One more solution is to add a field email in the User Profile so that users will have a registration email and profile email. Users have more flexibility - they can use the same email or two different addresses. Because in some cases there might be some security issues when the Registration Email is exposed.
Else if you have thought about the consequences of forcing users to reveal their registration email then using Panels is the best and easiest way to show it.
Hope this helps.


When did Gauss introduce "Gauss' planetary equations"?

Question: "Gauss' planetary equations" are a set of equations that describe the rate of change of the six elements of a planetary orbit in the presence of a disturbing force. I just intend to ask in which of his works did Gauss first write his planetary equations. Did he write them down in the Theoria motus (1809) or perhaps in some of his shorter papers?
Answer: Gauss was not quite so explicit, but it does seem that his "planetary equations" first appear in Theoria Motus.
In Planetary Orbital Equations in Externally-Perturbed Systems: Position and Velocity-Dependent Forces by Veras and Evans we read:

"The work of Burns (1976), subsequently popularised by Murray & Dermott (1999, pp. 54-57), provides a mechanism to obtain analytic equations for $da/dt$ , $de/dt$ , $di/dt$ , and $d\Omega/dt$ arising from a small perturbative force with a given prescription for radial, tangential and normal components. This line of attack can be traced back ultimately to Gauss (see e.g., section 9.13 of Brouwer & Clemence 1961)."

This apparently refers to four of the Gauss planetary equations. The cited book Methods of Celestial Mechanics by Brouwer and Clemence does not have a section IX.13. It does, however, have section XI.13, titled Gauss's Form, which reads:

"Equations in this form were first derived by Gauss and applied to the calculation of first-order perturbations by Jupiter on Pallas. Gauss made use of these equations also for deriving secular perturbations in the elements. Finally, the equations have been used extensively for computing by numerical integration perturbations in the elements of comets and minor planets."

Gauss and Ceres informs us that Gauss published his methods in "Theoria motus corporum coelestium in sectionibus conicus solem ambientium" of 1809 (apparently, Gauss had to translate the book from German into Latin at publisher's request... for greater accessibility). But it has a reproduction of Gauss's sketch of orbits of Ceres, Pallas and Vesta referenced to

Astronomische Untersuchungen und Rechnungen vornehmlich über die Ceres Ferdinandea [Astronomical investigations and calculations mainly on Ceres Ferdinandea], 1802, SUB Göttingen: Cod. Ms. Gauß Handbuch 4, Bl.1

The accompanying text reads:"Gauss was able to calculate the orbit of the planetoid. On December 7, 1801, the planetoid Ceres reappeared exactly at the location predicted by Gauss". Apparently, Pallas and Vesta were less cooperative. The linked biography page adds that "at the time" of Theoria Motus "he was able to calculate the exact path of the first three dwarf planets Ceres, Pallas and Juno as well as the to discover the first resonance relation in the asteroid belt."
There is Davis's English translation of Theoria Motus, Theory of the Motion of the Heavenly Bodies Moving about the Sun in Conic Sections. Perturbations of Pallas by Jupiter are mentioned at the very end, on p.277. On the resonance  see Calculation of Gauss leading to 18:7 resonance between orbits of Jupiter and Pallas.
Comment: Thank you very much Conifold for your long answer. I learned a lot from your answer, but i'm still not sure the equations first appeared in the Theoria Motus  (i don't believe until i see the equations written down). Your answer convinced me that Gauss is indeed the originator of the equations (so thet are not mistakenly named after him), but not about when did they first appear. So can you give a page in the Theoria motus where the equations are written down?
Comment: @user2554 I can not see all pages from Davis's translation in Google view, but I did not see them on the pages that are shown. Brouwer and Clemence have them on pp.305-306 with quoted credit to Gauss but the phrasing "this line of attack can be traced back ultimately to Gauss" might mean that he did not write them explicitly but used similar approach. The last sections of Theoria Motus seem like the best guess for what modern authors take to be the source of "Gauss's equations".
Answer: I agree with the conclusion that the planetary equations are not in Theoria motus (1809). I believe Gauss first wrote them down in §14 of the essay Exposition d'une nouvelle méthode de calculer les perturbations planétaires avec l'application au calcul numérique des perturbations du mouvement de Pallas, drafted (c.1812) for a Paris prize competition but only published posthumously (1906).


Adding a C wire to a new Honeywell WIfi Thermostat

Question: I am trying to install a new Honeywell touchscreen WIFI thermostat and need to add a C wire to my terminal inside the furnace (using the help found at How can I add a "C" wire to my thermostat?). BUT.. I have a white wire that runs from the A/C unit outside that is connected to the C terminal on the furnace. If I run an 18/5 wire from the terminal to the thermostat, will this cause a problem or a short? I'm completely lost as to why there is a C wire running from the terminal outside to the A/C relay. I do not want to move the green wire as Honeywell suggests and lose the power to operate my blower manually.
Comment: Possible duplicate of [How can I add a "C" wire to my thermostat?](http://diy.stackexchange.com/questions/10482/how-can-i-add-a-c-wire-to-my-thermostat)
Comment: Possible duplicate: http://diy.stackexchange.com/questions/40224/installing-of-honeywell-wi-fi-programmable-thermostat/40225#40225
Answer: There should be no problem connecting the C wire from your thermostat to the C terminal in the furnace. Take a look at this diagram, which is a rough approximation of your system.

Notice the cable going to the condensing unit has a red wire connected to the Y terminal in the furnace, and a white wire attached to the C terminal.  When the thermostat calls for COOL, it does so by energizing the Y terminal (connecting R to Y). This provides power to the coil of the contactor, which allows it to close the contacts and turn the condensing unit on. The other side of the contactor coil is connected to the C terminal, as to provide a complete circuit.

You'll notice in the first image that two relays in the furnace, the thermostat, and the contactor coil all connect to the same leg of the transformer. This is because the thermostat basically works like a switch, connecting the R wire to the C wire through control circuitry. Anything that needs 24VAC power, will be connected to both legs of the transformer.
Answer: Terminals R and C are a 24V AC power supply, from a transformer on the control board in the furnace.
The control board also has relays: one is for the fan, one is for heat. One side of the coils of these relays are connected to the G and W terminals respectively, and the other side is connected to C (one side of that 24V AC power).
Your thermostat is essentially a switch that connects the other side of the 24V AC power -- R -- to the other side of the relay coil (G and/or W, depending on fan-only or heat).
The air conditioner relay works the same way, but it's not on board the control board obviously. So the white wire on C goes to one side of the relay, and the red wire on Y goes to the other side. When the thermostat calls for A/C (by connecting R and Y) it completes the circuit and supplies 24V AC to the A/C relay coil (which then switches on the 240VAC main power to the compressor).

TL;DR: You are safe to use the C terminal despite the fact that the air conditioning relay is also connected to it, just like the other on-board relays are also connected to C.
Answer:
Colors of the wires is misleading, in reality there are but 2 sides or legs of 24 volt power,  The "Hot leg"  Red,  and the "Neutral leg"  Common.
Common is called this because every 24 volt circuit terminates upon it to complete its circuit.
Answer: If you don't want to run a fifth wire (which, in our case would have been a real pain since the basement has a finished ceiling), and you don't mind losing the "Fan Run" feature, then jumper the yellow/red and the green/green wires together at the central air/heat circuit card, and move the green wire going to the thermostat from that circuit card to the C terminal on that circuit card, and then connect the green wire at the thermostat to the C terminal, and then you will have power for the thermostat. Instant common.
Answer: The other pictures and schematics are excellent.  The "C" wire is connected to Chassis ground, also known as 24V Common. See picture, above. In my system, a blue wire runs from the 24V Common to the thermostat but was unused at the old thermostat.  I connected it to the "C" terminal of the new thermostat.  If you have to run a new wire, and the PC board has no "C" terminal (very old PC board), you can connect one end of the new wire to any metal part of the blower assembly (chassis) and run the new wire to the "C" terminal in the new thermostat. In addition, the chassis of the blower assembly and PC board SHOULD be connected to earth ground via the AC power cable.  If so, and you CANNOT run a new wire, you can find the nearest earth ground to the thermostat and connect the "C" terminal of the thermostat to earth ground.  You won't lose your fan control wire. All the other wires in the thermostat remain the same from old to new.


What prime powers differ by one

Question: I thought this would be a hard problem but I found a link that seems to ask the answer to this question as a homework problem? Can somone help me out here, are there an infinite number of prime powers that differ by 1? or are there a finite number of them? If so which are they?
Comment: You mean like $\,|2^5-31^1|=1\,,\,|2^4-17^1|=1\,,...$ , or ...what happens with prime powers of *odd* primes?
Comment: If we count a prime itself as a prime power, then the answer is not known, since it is not known whether there are infinitely many Fermat primes. If we are looking at powers $\ge 2$, everything is known.
Answer: Catalan's Conjecture, a theorem since $2002$, shows that the only examples where the exponents are $\ge 2$ are $3^2-2^3$.
If we allow exponent equal to $1$, the answer is not known. Perhaps there are infinitely many Fermat primes, that is, primes of the form $2^n+1$ (it turns out that for $2^n+1$ to be prime, we need $n$ to have shape $2^k$).
For many years, only five such primes have been known. There may not be others, or there may be finitely many others, or infinitely many. At the current time, we do not know.
Comment: It is probably possible to settle $2^r-p^s=\pm1$, $p$ prime, $s\ge2$, by elementary means, in particular, without invoking the proof of Catalan.
Answer: Finally, I know why this problem is elementary.
$p^r-q^s=1$ where $p$, $q$ are primes, and $r$, $s$ are integers greater than $1$.
If $p$ and $q$ are both odd primes, then $p^r$ and $q^s$ are both odd, then $p^r-q^s$ can only be even. So, either $p$ or $q$ is a even prime, that is $2$.
It seems the problem becomes elementary when $p=2$ or $q=2$. In the following, we will prove the claim when $p=2$ or $q=2$. It is not important whether the other is prime or not.
Case 1. $p=2$, that is $q^s=2^r-1$.
$2^r-1$ is a $4k-1$ type number, so $q^s$ has to be $4k-1$ type.
For an odd number $q$, there are two choices: $4k+1$ type or $4k-1$ type.
For $4k+1$ type numbers, any power is $4k+1$ type.
For $4k-1$ type numbers, odd power is $4k-1$ type, even power is $4k+1$ type.
So, $q$ has to be $4k-1$ type, and $s$ has to be odd.
$2^r=q^s+1=(q+1)(q^{s-1}-q^{s-2}+\cdots-q+1)$
Notice that $q^{s-1}-q^{s-2}+\cdots-q+1$ has odd number of terms and each term is odd, so it is an odd number, which contradicts that $2^r$ only has factor $2$.
Case 2. $q=2$, that is $p^r=2^s+1$.
$2^s+1$ is a $4k+1$ type number, so:
If $p$ is $4k-1$ type, $r$ has to be even.
If $p$ is $4k+1$ type, $r$ can be even or odd.
Case 2.1. $p$ is $4k-1$ type, and $r=2m$ is even.
$2^s=p^{2m}-1=(p^m+1)(p^m-1)$
$p^m-1$ is $4k-2$ type. If it only has factor $2$, it has to be $p^m-1=2$, and then we obtain the only solution in this case: $3^2-2^3=1$.
Case 2.2. $p$ is $4k+1$ type, and $r=2m$ is even.
$2^s=p^{2m}-1=(p^m+1)(p^m-1)$
$p^m+1$ is $4k+2$ type. If it only has factor $2$, it has to be $p^m+1=2$, which has no solution.
Case 2.3. $p$ is $4k+1$ type, and $r$ is odd.
$2^s=p^r-1=(p-1)(p^{r-1}+p^{r-2}+\cdots+p+1)$
Notice that $p^{r-1}+p^{r-2}+\cdots+p+1$ has odd number of terms and each term is odd, so it is an odd number, which contradicts that $2^s$ only has factor $2$.
Answer: In number theory, Mihailescu theorem is the solution to a famous and old conjecture formulated by French mathematician Eugene Charles Catalan in $1844$ (see "Note extraite d'une lettre adressè à l'èditeur). Although it was proved in April $2002$, it appeared for first time in Crelle's Jounal in $2004$. His formulation is really easy: there is a unique couple of powers of natural numbers such that they differ by $1$. Formally:
If $x,y,p,q$ are integers greater than $1$ and $x^p-y^q=1$ then $x=q=3$ and $y=p=2$.
If someone is really interested in a complete proof, then it can be found in Catalan's Conjecture, Springer, 2007. Otherwise, I can assure that some highlight cases can be completely solved with elementary tools (I actually made a .pdf file collecting these proof, if needed I will attach it here):

Case $2\mid q$;
Case $2\mid p$;
Case $x=q$ (completely solved by myself, actually I cannot find references about it);
Case $y\mid x-1$ (some its corollaries are still used as olympid problems).

With regard to the original question, we missed only the case that a prime $p$ is in the form $q^m \pm 1$ for some prime $q$ and positive integer $m$. Avoiding trivial cases, if $q$ is odd then $2\mid q^m\pm 1$, i.e. $p$ must be in the form $2^m \pm 1$. If a prime $p$ is in the form $2^m-1$ then it's defined "Mersenne prime", if a prime is in the form $2^{2^k}+1$ then it's defined "Fermat prime".
The fact is that, up to now, it's still unknows if one or both those set of primes are not finite.

What prime powers differ by one


Any cloud providers hosting and securing Craft as a service

Question: Are there any PaaS providers out there delivering Craft as a platform continuously updated and secured?
Answer: I'm not aware of any PaaS service that also keeps Craft up-to-date for you automatically.
There are some like Fortrabbit, that are PaaS and are very familiar with Craft installs, but you'd still be on the hook for updating Craft.
There are some more traditional, managed, non-PaaS hosts like ArcusTech that are also very familiar with Craft installs, and they keep the OS configured and secured for you are responsible for installing and updating Craft as well.
There is some more discussions about hosting options for Craft here:
Recommended hosting company for a Craft site?


Appropriate way to deal with file-names and file-name components ("paths") in emacs lisp?

Question: What is a good, clean  to deal with paths in emacs lisp?
Common lisp has pathnames, Python has os.path. But I always seem to end up reinventing the wheel and resorting to manual regexes for simple path operations like getting a path basename, dirname, or joining paths together in a sane way.
Answer: What you are, I think, calling "paths" Emacs and Emacs Lisp call "absolute" file or directory names. In Emacs language, a "path" is a list of absolute directory names, as used, for example, in the environment variable PATH and Emacs variables exec-path etc. (And yes, Common Lisp refers to these as "paths".)
Wrt the question of getting parts of a file name, combining them, etc., see the Elisp manual, node File Names and its subnodes, such as File Name Components.
Beyond that, your question is very general (and risks being closed as too broad). Please consider posing a specific question -- something that you want to do with file names or file-name components. Your question is OK as asking for general info about Emacs file-name functions, but a specific how-to question would also be useful.
Comment: I've used these before but I've found them lacking and not robust, eg I think the recommended way of joining components is just concatenating them together, and assuming directories always end in a slash, etc, which is too low level for my taste.
I think my question is specific enough, for example, what is the emacs lisp analogue of Python's os.path library or CL's pathname which offer comprehensive tools for dealing with paths.
Comment: Yes, that's useful for non-interactive use -- good suggestion. I've done something similar now -- [`help-fns+.el`](http://www.emacswiki.org/emacs/download/help-fns%2b.el)
Comment: This is obviously not the best way but I can't find your email anywhere, I've been using your help-fns+.el and there's a bug when a keymap is not bound to a symbol. Where can I report this (to you)?
Comment: I understand that there is no variable documentation without a variable, all I'm saying is that you can easily omit it in the case that a keymap object is passed instead of a variable. my workaround it's as simple as `(setq some-random-sym kmap) (describe-keymap 'some-random-sym)`, really using an advice and gensym. My case is that I'm creating anonymous, autogenerated keymaps (via (let ((kmap (make-sparse-keymap)) ...) from commands in a file and I'm binding one of its keys to a description of itself. Just thought I'd make a suggestion but no problem if you're not inclined towards it
Answer: The f.el package is a collection of prefixed functions wrapping existing functions as referenced in File Names and comes with a few of its own.  I've found it useful to study its code for figuring out which built-in functions to use, but you can use it like a regular library as well.
Comment: thanks, this looks like it is exactly what I was looking for
Answer: elisp has the list load-path. When you want to add a new path to the scope, just do
(add-to-list 'load-path "my/new/path")

Then, supose you have a file.el in that directory. In the end of the file, put the line (provide 'file), and then you can require it with:
(require 'file)

You can also require files in subfolders of your load-path, if they are provided as such, with
(require 'subfolder/file)

Comment: thanks, but this doesn't answer my question. i'm trying to deal with paths in general, not just for the purpose of loading emacs lisp code.


Checking number of reallocated sectors of HDD through Disk Utility, Mac OS X

Question: My MacBook was purchased in 2008. Yesterday I checked the number of reallocated sectors of the hard drive using Disk Utility. It showed there were no reallocated sectors. That seems strange since I haven't replaced my hard drive since 2008. Can I rely on Disk Utility for this information or I need to download additional software?
Comment: Why does it seem strange that your hard drive is functioning normally?
Answer: Reallocated sectors frequently (but not always) appear when a hard drive stars to fail. Just a few back-of-the-envelope calculations here:
If you bought your computer in the beginning of 2008 and used it 24 hours a day, you'd have used about 32,000 hours of hard drive time. I don't know what model of hard drive your computer has, but the mean time between failures for not-pariticularly-impressive hard drives from that era is about 300,000 hours. So in the heaviest-use scenario, you've used your hard drive for about 10% of its expected life.
I don't think there's anything strange about a lack of failed sectors at this point.
Answer: Typically, I don't see any relocated sectors for years, then dozens appear at the same time when the disk is about to fail.
I tend to demote disks to being used as backup devices or file transfer disks in an external enclosure after 3 years of active use because that's around the time I find they usually start to fail.


Choose the right step-by-step guide, based on your current operating system

Question: I am confused... So I am trying to install ubuntu on a netbook that has been plagued by viruses.  The confusion I have is... I currently have an Imac that I am using to download ubuntu.  I then want to mount ubuntu onto a flash drive from my Imac and then install it on the netbook.  However, I am not sure if I follow the instruction guide for the OS of the netbook (windows xp) or the Imac I am using to download and convert it to the flash drive.  Thanks!!
Answer: Even though my first mac was an SE, I don't use them much now, so I'll just stick with a windows to ubuntu approach. Assuming your netbook boots, just download the ubuntu iso, go to PenDriveLinuxInstallerPage and use that. As to which ubuntu (32/64 bit) to install, that is a little more complicated. Most "netbooks" run the Intel Atom cpu, so this might help: Intel Atom Cpu List you can also check to see which version of windows (32/64 bit) you are running as a guide.
If figuring out which image to download proves too much, just try one, and when you boot select 'Try Ubuntu' if it works you'll be ok.


How to understand "don't code today what you can't debug tomorrow"?

Question: It's a title of a blog. In my option, I absolutely can debug my code tomorrow which I wrote today. So how to understand that?
Comment: Tomorrow? Probably. Next month? Maybe. Next year? "..." ;-)
Comment: Not addressed in the answers, but touched on in the comment by @DamkerngT.: **tomorrow** in this case means "the future" not "the day after today".
Answer: It's a rephrasing of the old programmer's adage: "don't be clever"! Or Brian Kernighan's famous quote:

Everyone knows that debugging is twice as hard as writing a program in the first place. So if you are as clever as you can be when you write it, how will you ever debug it?

Basically it's saying that you shouldn't write clever and/or tricky code because debugging such code later will be very hard.
Comment: @doug65536: They still do... ;-)
Comment: Yeah, I'm pretty sure this is the intent behind that blog title. The quote is from the days when computers were still not really fast enough, so programmers had a strong tendency to make their programs overly complex and unmaintainable in the name of efficiency.
Comment: Or if you are being clever (and sometimes you have to be to get the job done), document just how your bit of cleverness works, so you'll understand it later when you have to debug it.  And for @doug65536: in the world of non-trivial programs, faster computers mean you just get to solve bigger problems in the same time.
Comment: ++bwk (not sure who it's pointing at now) @doug65536 Yes, we have a greater variety of excuses now.
Comment: @jamesqf: Being clever and being dirty/hacky are two different things. Being hacky is doing something ugly to get the job done. Being clever is over-engineering something because you think it's cool/cute/neat.
Comment: @slebetman: I guess we have different definitions of 'clever'.  Mine is e.g. using a non-obvious O(n^2) algorithm instead of the obvious O(n^3) one, or scanning input with a few dozen lines of lex, rather than 2K lines of C++ string comparisons.
Comment: @jamesqf Your definition of clever just sounds like resourcefulness to me.
Answer: It sounds like the quote means or intends for the developer to write clean and simple code that may be easily understandable even after some period of time .
The code should be easy enough to understand even if viewed after a certain period of time
Answer: It's sounds like a play on the phrase "Don't put off until tomorrow what you can do today". It's attributed various people including Benjamin Franklin and Thomas Jefferson.
Essentially it means "don't procrastinate".
If I had to guess, this version is intended to encourage readers to write clean code, particularly if you don't have the time to debug it.
I think that "can't" in this case doesn't mean "if you don't have the ability", it means "if you don't have the time".
So, my interpretation of this title is:

Write clean code today because you may not have time to fix it tomorrow.
Comment: The original phrase is important to understand the intent of the title, so glad someone included it.  It's almost certainly unfamiliar to the OP.
Comment: Estimates vary, but I've seen figures creeping toward 90% of a programmer's time spent debugging. (It would be interesting to know how Stack Overflow has skewed this metric...) Anything you can do to reduce that fraction is very likely to be a net win. On the other hand, writing code that you can't debug later is a huge time sink in terms of time spent fixing the inevitable problems.
Answer: Even for simple programs, I remember having hard times understanding some details a few months later. Because I don't not use explicit enough variables, because I did not comment lines that seemed simple back then.
Most often, because I  started coding directly, without taking a little time with pencil and paper before to map ideas, to record limitations, to foresee dependencies, to check whether I did a similar program before (which I did forget). Every program, no matter how small and big,  is a project,  and deserves some project plan, asking at minimum (quoting from the preceding link):

Why? - What is the problem or value proposition addressed by the
  project? Why is it being sponsored?
What? - What is the work that will
  be performed on the project? What are the major products/deliverables?
Who? - Who will be involved and what will be their responsibilities
  within the project? How will they be organized?
When? - What is the
  project timeline and when will particularly meaningful points,
  referred to as milestones, be complete?

Today and tomorrow should not be taken literally. You would be a different coder in a few month.
Answer: Since we're in English Language Learners StackExchange and not in Programmers StackExchange, Tomorrow means in the future in its figurative sense (weeks, months, years later), not literal (in 24 hours).

If you ever studied your first programming language at school (or at home) several years ago, try to find where you stored your old school projects, and read them. When you wrote them you knew exactly what you were doing right? (don't code today...)
Turns out you will probably struggle to understand your own code, and unless you were an experienced developer when you learned your first language (ahem), you had probably not left many hints for your future self to help him/her understand what you were thinking back then (...what you can't debug tomorrow).
In this sense, when you write code you have to keep in mind someone else is going to read it. And that someone else could be a "future you". The "future you" could go from several days, to several weeks, to months or years later.
Ultimately the saying "don't code today what you can't debug tomorrow" or rephrased "aim to write readable and maintainable code in the long-term" is a general rule for developers. You write code for your colleagues to read, and eventually your future replacement once you'll get promoted or move to work for another employer. Seen from a different angle, if you don't write maintainable code, no-one can replace you and you won't get promoted.
Answer: It's a phrase that needs to be understand in terms of maintenance, try to put yourself in to those person shoe who have to deal with the code/project of other person.
What I understand is if you can't understand your after some time then it will be very difficult for someone who is working/solving bug of yours.
So use commenting to your code is very necessary to make it clear, what logic you were having in your mind just note it down, so after some in future if you are working on that same code or someone other then it can be easily have workaround with your project.
Answer: The quote, you say, is:

don't code today what you can't debug tomorrow

It's not what you seem to have read it as, which would be more like:

no matter what you code today, you won't be able to debug it tomorrow

…which, as you point out, is nonsense.
The real quote is encouraging you not to write code that is difficult to understand. If you would struggle to understand it if you came back to it in a year, that's bad; if you would struggle to understand it if you came back to it in a month's time, that's a big problem. If you wouldn't be able to understand it enough to debug it tomorrow, then something is terribly wrong and you should not have written it that way. (In that sense, there's some hyperbole in there.)
Answer: It simply means write a simple code including comments which can be easily debugged in the absence of the developer who is the owner of the code or may be by the developer itself after a period of time.
Answer: When coding, remember some other poor soul may have to debug it, who hasn't been privy to your thought processes. And (as Laurent Duval points out) you probably won't remember either. So write clear comments which inform the reader (especially if the mechanics of what you are doing are at all obscure - e.g. subtle but rarely-used features of the programming language).
A bug in the code is forgivable - it can, with some effort, be found and corrected. But a bug in the comments, or in the design documentation, will mislead people for ever.
But find the right level. I once had to work on some code which resembled going into a forest where every tree had a label "This is a tree" - when what I wanted to know was "This is 'Kings Wood', producing oak for Naval shipbuilding".
Comment: While this is good programming advice, I'm not sure it helps explain the rhetorical features in play here very well.


parametric eq with FIR filters

Question: Are there any good published approach for designing parametric EQs as FIR filters.  The standard techniques discussed in DSP textbooks are frequency-domain-sampling or using Parks-McClellan, which this involves passband, stopband, transition band, etc.  This is nice for rejecting a certain portion of the frequency spectrum, or mimicking and existing analog/digital filter.  However what if I want to design a filter directly as an FIR filter, for example a peaking/notching/shelving/low-pass/high-pass filter which takes frequency, gain, and bandwidth parameters?  Is there a standard technique for designing parametric EQs directly as FIR filters?
Comment: Are you asking how to convert frequency, gain, bandwidth parameters into pass/stop/transition band parameters?  Or about alternatives to Remez/et.al. for FIR kernel generation?
Comment: *Why* do you want to do this as FIR instead of the usual IIR way?
Comment: I want to do this as an FIR instead of IIR so that I can do an FFT implementation of these filters.  The scenario is that I have many user-controllable delays/gains/EQs with a complex signal flow.  I know that I can perform the entire operation by doing FFT convolution, but this is less desirable if I don't know ahead of time how long the impulse response should be or what the SNR would be for a frequency-domain sampled version of the same filters.
Answer: These filter types are well covered here http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
However these are all single biquad IIR implementations. To turn this into an FIR, you could simply calculate the impulse response of these filters and window to a finite size with the desired amount of accuracy. Another option is to design the filter as IIR, sample the frequency response and then do any of the many FIR fitting techniques.
In general you will find that FIR filters are not well suited for this and the number of taps required will heavily depend on the relationship between the corner frequency and the sample rate and also on the Q of the filter.
Comment: @Speedy: Isn't the frequency response sampling method linear phase?  Linear phase response is not desirable for audio EQ, anyway, which is why this is always done with IIR.
Comment: @endolith I think you're right, under the assumption that a symmetrical impulse response is rebuilt from the IIR response (which would also square the magnitude response). I agree with you about linear phase for equalisation too, although I still believe it has applications in system inversion in the audio path.
Comment: @Speedy: What do you mean by system inversion?  I've also heard it's good for reducing lobing in speaker crossovers?  But generally not a good idea for filtering like EQ
Comment: @endolith: In systems where group delay is of limited concern you can automatically generate FIRs to flatten magnitude responses (i.e. force speakers into a nicer behaviour).  It's particularly good for measurement systems where you're not fussed about the length of your filter.
Comment: I'm not sure this approach makes sense. The potential benefit of using an FIR filter would be the capacity for a linear phase response. By implementing an IIR as an FIR (as you suggest) the result is a compromised phase response in addition to the high tap count of an FIR. I would prefer an approach that starts with a frequency domain specification and transforms it directly into an impulse response. I'm not aware of a neat, standardised way to parameterise this though.
Answer: Well to answer my own question, I have found one reference to designing FIR filters on the wonderful page from Julius Smith: https://ccrma.stanford.edu/~jos/filters/Two_Zero.html.  (It was naive of me to not check there first).  It's not exactly what I was going for, but much closer to a parametric design then using IR or freq-domain sampling of IIR filters.
Answer: I would just partition the frequency domain into something like 4 areas and create 4 low order filters so there's some nice smooth overlap between them. That would require you to create 1 lowpass, 1 highpass, and two bandpasss filters where you scale the gain of each filter independently. Run the data through each filter and sum the results. Here's some MATLAB code to illustrate what I'm talking about run on some random data.
x = randn(1,65536);
b1 = fir2(12, [0 0.25 0.5 1], [1 1 0 0]);
b2 = fir2(12, [0 0.24 0.51 1], [0 1 1 0]);
b3 = fir2(12, [0 0.49 0.75 1], [0 1 1 0]);
b4 = fir2(12, [0 0.5 0.75 1], [0 0 1 1]);
g1 = 1.0;
g2 = 0.5;
g3 = 0.2;
g4 = 0.2;
y = g1*filter(b1, 1, x) + g2*filter(b2, 1, x) + ...
    g3*filter(b3, 1, x) + g4*filter(b4, 1, x);
plot(20*log10(abs(fft(y))))

Answer: Matlab's documentation for filter design should have the references you are looking for.
For example fir2 might do it.

parametric eq with FIR filters


ATF Warmup (On a cold day)

Question: it's cold outside now and I was just wondering about my automatic transmission. If you brake fully and apply throttle but the car isn't moving heat energy is added to the atf right? Would it be beneficial to do this on a cold morning to warmup the atf quicker?
Comment: Also would there be any benefit to warming up atf?
Comment: You can be sure that the manufacturer tested it outside the limits you are applying - unless you are planning an antartic trip...
Comment: At idle, the heat put into the fluid by the engine is far greater, so leaving it running a minute or two is a better way to get anything warmed up. Your method does work good for getting away at the trafficlights though, you only need to let go of the brake and woosh...
Answer: Do not do it!
I have no idea if you are talking about a dump truck or a Yaris. Nonetheless, don't do it. Not only is it dangerous (if your foot slips off the brake), in more modern cars it could cause damage to your engine and/or transmission. The temperature gain would not be worth it.
There really isn't a reason to warm it up, unless you are in extreme sub-zero temps. Letting the engine idle for a couple minutes should do the trick (that is even a hot debate).
If you are experiencing trouble shifting when the trans is cold, it could be an indication of upcoming issues, so get it checked out.
source
Answer: That is not a good idea, nor will it actually help. When you first start a car in cold weather the engine starts to spin the transmission through the torque converter, which pumps the fluid around the tranny and it starts to heat up. It's still spinning and heating up the ATF in park and neutral, putting it into gear does not make it spin or heat up any faster. Revving the engine makes it spin faster and therefore heat up faster.
Holding the car still while you rev in gear makes the engine spin more, but the transmission cannot spin more because you are holding the wheels still, so it puts pressure on the clutch and torque converter which have to absorb the energy. You will prematurely wear or possibly damage these components if you do this a lot, and it won't heat up your ATF any faster to boot! You could also, if your brakes slip, cause an accident.
If your transmission slips when cold it's usually a symptom of something being worn, or your ATF being old. You could also be low in fluid as well. Some auto transmissions are more prone to slipping in cold even if they are in top condition and there's nothing you can do about it.
So, if you have trouble check the fluid level according to your manual, if you still have issues take it to a transmission shop for maintenance or an inspection. Or, if it's fine to drive after a couple minutes idling then just live with it.
Answer: No, no benefit.
You really just need to let the engine oil pressure come up (10 seconds, max) and then you can drive. Driving is the best way to warm a car up. While your coolant and oil temps are still cold, don't do any drag races but otherwise just drive.
Answer: You are absolutely correct in park or neutral your converter has no resistance therefore you will rely on the engine to heat up the coolant. Putting it in drive even at idle will heat the vehicle faster in a Mazda 3 or a huge Cat front end loader because the transmission cooler is stacked to the radiator. The heater will provide heat 10 times as fast!!

ATF Warmup (On a cold day)


Mathematical results that became known long after their authors passed away

Question: Liouville published Galois' work a decade after the death of this singular mathematician. Are there other cases of results being rescued by the mathematical community long after their authors were gone? Please include results whose importance went unnoticed at their time. Rediscoveries may be interesting too.
Comment: [Archimedes's Method of Mechanical Theorems](https://en.wikipedia.org/wiki/The_Method_of_Mechanical_Theorems) was only uncovered in 1906.
Comment: Archumedes's Method was probably known in his life time. Same applies to most ancient works, at some time they were forgotten, and then rediscovered (Diophantus, Apollonius etc.)
Comment: The *Madhava Series* comes to mind but that opens the question about non-Western mathematics (i.e. Old Babylonian,  Arab or Indian).
Comment: Possibly some of Poincare's work in dynamical systems was so far ahead of its time that it wasn't really appreciated until the theory of chaotic dynamical systems decades after his death.
Comment: Related: https://mathoverflow.net/questions/176425/rediscovery-of-lost-mathematics/
Answer: Ramanujan's Lost Notebook is one such collection of mathematical results. It consists of loose and unordered sheets of paper in which the Indian mathematician Srinivasa Ramanujan recorded the mathematical discoveries of the last year (1919–1920) of his life.
Its whereabouts were unknown to all but a few mathematicians until it was rediscovered by George Andrews in 1976, at the Wren Library at Trinity College, Cambridge.
According to Wikipedia:

Berndt says of the notebook's discovery: "The discovery of this 'Lost Notebook' caused roughly as much stir in the mathematical world as the discovery of Beethoven's tenth symphony would cause in the musical world."

...

The majority of the formulas are about q-series and mock theta functions, about a third are about modular equations and singular moduli, and the remaining formulas are mainly about integrals, Dirichlet series, congruences, and asymptotics. The mock theta functions in the notebook have been found to be useful for calculating the entropy of black holes.
Answer: Bolzano.
Here is a copy of an answer of mine from MathOverflow:
Bernhard Bolzano .... ( interesting reading )  Much of his work was unpublished until much later (for reasons see the link), thus remaining largely unknown.  For example, a theorem of Weierstrass is now known as the "Bolzano-Weierstrass theorem", acknowledging that Bolzano had proved it previously.  Bolzano anticipated Cantor and Dedekind in work on doing calculus without infinitesimals.  His example of a continuous nowhere-differentiable function is in a manuscript from 1830, but only published in 1930.
(See also the other answers to that MathOverflow question.)
Answer: Is the Fast Fourier Transform a mathematical result? The point might be debated but its history has been well researched (e.g.  Heideman et al., (1984). Gauss and the history of the fast FFT . IEEE ASSP Magazine). In 1987 One of the modern (re)discoverers also wrote on the topic.
The method and the general idea of an FFT was popularized by a publication of Cooley and Tukey in 1965, but it was later established that they had independently re-invented an algorithm known to Carl Friedrich Gauss around 1805, and subsequently rediscovered several times in limited forms. Backtracking leads to Gauss's unpublished work from 1805  needed to interpolate the orbit of asteroids . While Gauss's work predated even Joseph Fourier's results in 1822, he did not analyze the computation time.
[Links and refs are in the wikipedia article which has been used here]
Answer: One of the most famous examples is the Gauss's diary which was discovered in 1897.
Answer: Jean-Robert Argand published his geometrical interpretation of the complex numbers as points of the plane in 1806. It become a standard way of dealing with these numbers and now sometimes the complex plane is called the Argand plane. However, the same idea had been published in 1799 by Caspar Wessel, a norwegian surveyor, and it was forgotten. Wessel's paper was rediscovered in 1895, when Christian Juel draw attention to it. In the same year, Sophus Lie republished the paper.
Answer: Bayes' Theorem, fundamental in Bayesian statistics, was considered unremarkable by Thomas Bayes and so not published.
After Bayes' death, Richard Price edited Bayes' manuscript for reading at the Royal Society for which he was elected a Fellow.
Answer: Leonard James Rogers (1862 - 1933) obtained degrees in Mathematics, Classics and Music from Oxford. During 1888-1919 he was Professor of Mathematics at Yorkshire College, before returning to his Alma mater. In 1894 he published the paper 'On the expansion of some infinite products'.
This contains the Rogers-Ramanujan identities, so called because they were rediscovered, without proof, by Ramanujan before 1913. In 1917 Ramanujan chanced upon Rogers' paper and expressed great admiration. A correspondence followed, and Rogers was led to a considerable simplification of his original proof.
In 1936 Atle Selberg, published a 'generalization' of the Rogers-Ramanujan identities which turned out, in fact, to be another special case of Rogers' original result.


Guidelines to request information?

Question: Is there a place to review guidelines and rules for asking questions within this app? Aside from being respectful and courteous of course.
Answer: If by "this app" you mean Stack Overflow, see:

site tour: https://superuser.com/tour
help pages: https://superuser.com/help/asking
the meta forum: https://meta.superuser.com/

Note that Stack Overflow is a sub-site of the overall Stack Exchange site. Every sub-site has its own rules and guidelines, so visit their websites before posting.
Comment: Technically the "rules for asking questions" within Super User's help does *not* cover the "rules for asking questions" for *each and every Stack Exchange / Stack Overflow website*. Also, I've never heard of the Stack Exchange *network* referred to collectively as "Stack Overflow"; when I read "Stack Overflow" I think of the site that can be reached at http://stackoverflow.com or the *company*, but **not** the network. The [blog](https://stackoverflow.blog/2015/09/were-changing-our-name-back-to-stack-overflow/) announcing the change supports this 100%.
Comment: Also, *even if* they decided they wanted to change the term for the network from "Stack Exchange network" to "Stack Overflow network", you're still missing the term "network". Using the unqualified term "Stack Overflow" should always unambiguously refer to either *that specific site* and *not* all the other sites in the network (whatever the network's name is); or the *company* that employs people, etc. Since this post has nothing to do with the company, the term "network" is definitely needed to distinguish it from you answering a meta.SU post about the rules on stackoverflow.com.
Comment: I hope you mean Super User :)
Comment: Originally that was "every site in the Stack Overflow network", because I couldn't remember what the network was called this week. Apparently migration doesn't preserve [edit history](http://superuser.com/posts/1180271/revisions)...
Comment: As I understand it - we're still part of the stack exchange network, The company is Stack Overflow
Comment: Only as a trading name. It still says Stack Exchange at the bottom
Answer: Someone ironically (or unironically?) our standard poor quality question mod message has a lot of what you need.

An overview of how our system works
A brief guide on how to ask questions
A short summary of questions we permit
Help on formatting your questions

I'd start by saying a good question gives the person reading it enough information to make a reasonable guess to how to solve your problem. Formatting it in a readable fashion makes things simpler. Sticking to what you need and adding things on is fine. It makes a lot of sense to search first and see how similar well received questions are structured too
Read comments, build your question and be at least a little patient and you'll be fine.

Guidelines to request information?


Why Content-Encoding gzip rather than Transfer-Encoding gzip

Question: The API responses are returned in gzipped format. But by using Content-Encoding gzip, the burden of unzipping is on the user of the API. On the other hand if the server uses Transfer-Encoding gzip, many http client libraries (for eg. Python's urllib) will do the unzipping automatically. The server gets the same bandwidth savings.
Comment: + for a good question.
Comment: No, this is not the case. Look at the python wrappers [here](http://stackapps.com/questions/198/py-stackexchange-an-api-wrapper-for-python).
Comment: Related: http://stackoverflow.com/questions/11641923/transfer-encoding-gzip-vs-content-encoding-gzip
Comment: I dont know much about this area, but if this is true this would be very helpful for python API calls.  Currently you need to read the request into a temporary file-like buffer then do the decompression with a separate gzip call -- it is kind of a pain.
Answer: Transfer-Encoding is hop-by-hop, while Content-Encoding is end-to-end.
This means that if there is a proxy involved, anywhere, the proxy will see the TE gzip,  unzip it, and not necessarily forward the request as TE gzip.
So, the choices are

CE gzip and always know what you will be getting, requiring logic to decompress the response.
TE gzip and never know what you will be getting requiring logic to decide whether to decompress the response and the logic to decompress it when required.

The logical choice is CE gzip.
Answer: It's the same as much of the web.
As a rule, you don't want Content-Encoding: gzip or Content-Encoding: deflate a good 99.9999% of the time (to underestimate a bit).
What you want is the actual content, exactly as it would be without the content-encoding, but to get it faster. That is to say, you want Transfer-Encoding: gzip.
Transfer-Encoding: gzip also makes better logical sense on the web, since it is hop-to-hop, so proxies can apply it for capable clients talking to non-capable servers, or undo it for non-capable clients talking to capable servers. At the same time, the burden of the hop-to-hop nature is nil, as a pass-through has the correct effect (while conceptually a proxy will undo and then redo the compression, the simplest way to have the same result is just to pass it through). It's also nice to get the final size rather than the compressed size, in the header, and there's no need to change e-tags between the different versions of the document (something that causes bugs in a lot of cases, e.g. last time I looked, mod-gzip correctly changed the e-tag when it should but had a bug in the implementation of doing so resulting in invalid e-tags), and all in all it works better in every way.
Content-Encoding: gzip should really only have been used when someone wanted to actually get the gzip-encoded stream as such (e.g. to save as a .gz file).
So all in all, Transfer-Encoding is the blatantly obvious choice both here and in just about every other case where Content-Encoding is used.
However, the support for Content-Encoding is vastly greater than for Transfer-Encoding, with tool-kits, apis and libraries for both client and server giving support for the former vastly outnumbering those that do for the latter, which results in a spiral - it's not worth servers supporting it when clients don't use it and you can kludge it with Content-Encoding, and it's not worth clients supporting it when servers don't use it and you can kludge it with Content-Encoding.
Which makes it a case of "if all the webservers, browsers and web-client toolkits jumped off a bridge, would you do it too?" To which the answer is "since we have to interoperate with those toolkits, yes".
Comment: @CMCDragonkai `gzip chunked` to indicate that first GZip had been applied, and then chunked. (Which incidentally is a rule in itself; if chunked is applied along with another encoding, it must be the last applied, though it doesn't really make sense to do anything else anyway).
Comment: I have to disagree with the opinion that TE is always preferred. TE makes sense when you are compressing on-the-fly. CE makes sense when you're serving already-compressed content directly from storage. For your textual static content (JS, CSS, SVG, maybe HTML), you should have already-compressed copies to serve; you don't want to re-compress them on every request. In that case use CE. Similarly, caches benefit from storing the compressed content if it will be requested repeatedly. Ideally you use TE only for dynamic content -- because that's the only content compressed on-the-fly.
Comment: @KentonVarda the difference between static and on-the-fly is an implementation detail. The distinction is one that simply isn't present as far as the transfer protocol goes.
Comment: @KentonVarda at the level of the protocol the difference between "static" and "on-the-fly" simply doesn't exist, so yes it is an implementation detail. You're correct that it can have that have that effect on byte-identity (though you could still use no, or a weak ETag) though it need not. That's another reason to favour TE in such cases, though in no way does it make CE better.
Comment: If you wanted to gzip and chunk encoding the content and you wanted to use Transfer-Encoding and not Content-Encoding. What would you put in the Transfer-Encoding header? Would it be `gzip` or `chunked` or something like `gzip chunked`?
Comment: I checked some place else and it seemed that the correct notation is `gzip, chunked`. Does it need a comma?
Comment: @CMCDragonkai sorry, yes: `gzip, chunked`. The lack of comma above was just a typo, and it is required. For the reasons I give though, you might find just using `Content-Encoding` for the gzip works better in practice.
Comment: @JonHanna It's not an implementation detail. The question to ask is: are the bytes *exactly* the same, or merely equivalent. TE does not imply that the (compressed) bytes are exactly the same as served by any other request. CE does (assuming matching non-weak ETag). This is important for caches and especially important when serving range requests. If you are compressing on-the-fly, you can't really guarantee identical bytes; e.g. an update to the compression code might change things.


Lukasiewicz Logic Tautology

Question: Suppose a statement form $\varphi$ always has value T or U. Show $\varphi$ is a classical tautology.
Comment: This question is quite badly formulated. What is T? What is U? Do you mean first-order or just propositional?
Comment: See http://en.wikipedia.org/wiki/Three-valued_logic
Comment: Did you write out the truth table?
Answer: Suppose that a statement $\varphi$ of propositional logic (using only $\wedge$, $\vee$ and $\to$) is not a propositional tautology in classical logic. It follows that some row of the truth table for $\varphi$ has value $F$.
Now, consider the truth table of $\varphi$ in Łukasiewicz three-valued logic, which is called Kleene logic on the Wikipedia page. The key observation is that Łukasiewicz three-valued logic agrees with classical logic on classical logic input. In other words, if all the propositional variables of $\varphi$ are given classical T/F values, then the truth value of $\varphi$ will agree with the classical logic value. Thus, since $\varphi$ had a classical row with value $F$, the very same row will have value F in the Łukasiewicz truth table of $\varphi$, contrary to the assumption that $\varphi$ had only values T or U.
Comment: The Wikipedia page actually has the correct table for Lukasiewicz three-valued logic.

Lukasiewicz Logic Tautology


Linked Server Security under SQL Agent Job Context

Question:
I have two SQL servers V1 and V2. Both 2012.
V1 has linked server connection to V2.
There are two Windows accounts: one running SQL server, the other
running the Agent service. The two accounts are common to V1 and V2.
I have a SQL Agent job that is owned by a non-sysadmin login, an SQL Server account. This account is also present on both servers with the same name and password.
On Linked Server Properties, Security tab, there are no explicit mappings. The default then is set to "Be made using the login's current security context"

Here's the problem.
I run SQL statement against V2 from V1 in SSMS as the non-sysadmin login and it works. However, when I create a job owned by the login with the same query, it fails with:

Executed as user: NONSYSADMIN_USER.
  Linked servers cannot be used under impersonation without a mapping for the impersonated login.
  [SQLSTATE 42000] (Error 7437).  The step failed.

Then I run in SSMS with EXECUTE AS which results in pretty much the same:

Msg 7437, Level 16, State 1...
  Linked servers cannot be used under impersonation without a mapping for the impersonated login.

I then schedule another job which is owned by sysadmin, running the same query and that works.
From my understanding, if the job is owned by sysadmin, there is no impersonation, the job runs (and steps as long as there is no run as or proxy set) as the Agent service account.
So, my question is, shouldn't the sysadmin owned job also fail since it's using Windows account, and as far as I know there isn't any delegation configured for the account. Or does the fact that it works indicate that the delegation was configured?
My ultimate goal is to have a job that is owned by a non-sysadmin login, which is a windows account, that runs queries against the linked server. Will this work?
According to the Microsoft's KB article, it would not without employing workarounds. Can anyone confirm it?
Here are some of the references I've used (among others):

SQL Server Agent jobs and user contexts, Tibor Karaszi's post on sqlblog.com
Linked Server Properties (Security Page) on TechNet
Answer:
Put NT AUTHORITY\SYSTEM user in sysadmin server role
Add this user into linked server login mappings with remote user name and pwd
Comment: Upvote, still a bad solution security wise..


Why is my bike slipping gears?

Question: I have a 1997 Gary Fisher Tassajara that got a complete overhaul and tune-up at a bike shop a year ago.  (to the tune of $180, but some of that was new tires- I'm the original owner)  I ride between 4 and 8 miles on logging roads and easy dirt trails several times a week, and didn't have this issue until late Spring.  The slipping started infrequently, but has gotten much worse in the past two months.  It doesn't slip in the highest gear, and I can sometimes find a lower one that will work for me- but other times I end up having to put the chain back on mid-ride.  I'm a little worried about the chain or gears actually breaking while I'm out in the wilderness alone, so have limited my backwoods trail-taking until I get this issue taken care of.
Comment: Did they replace the chain? For that price I'd expect a new chain and cassette, but if your bike needed a lot of ther work maybe not.
Comment: Sounds like cable stretch, have a look at this vid for a how to index https://www.youtube.com/watch?v=Bbk5RcH0bbQ
Comment: +1 @Mσᶎ maybe they replaced tires, overhauled bearings, but cassette was in pretty good shape yet.
Comment: First off, invest $10 in a [chain wear gauge](http://www.parktool.com/product/chain-wear-indicator-CC-3-2).  Then clean and lube your chain and derailers and adjust the cables.  The [Park Tool](http://www.parktool.com/blog/repair-help/categories/derailleur-systems) site should have instructions.
Comment: (As the others indicated, if your cables were replaced then they are probably due to be adjusted, as new cables stretch quite a bit.  Normally the folks that did the overhaul should give you one free cable adjustment, if you don't want to try it yourself.)
Answer: When your bike was overhauled they likely replaced the shifter cables. The cables will stretch over time. The result is the derailleurs don't shift as accurately as they should. It is a fairly simple process to readjust them. There are many on line tutorials that will show you how to do this yourself. If you don't feel comfortable doing it yourself your local shop can help you.
Answer: When riding in wet/dirty terrain it's important to make sure your chain is well oiled and operating smoothly. If the chain isn't clean and lubricated it will feel like it "slips".  If it feels stiff in a couple places after cleaning, lubrication, and a ride around the block, it might be time to replace it.
A thorough cleaning and good lubrication only works if your derailleurs are aligned properly though. Check your derailleurs and make sure they aren't overshooting the correct gears. Cables stretch and often times I find myself tuning my derailleurs at least once after new cables are installed.
Answer: This is a textbook cable tension issue. Since you stated that your highest and lowest gears are working well, I assume that the middle gears are the ones that are slipping. You could take it back to the bike shop and explain this to them and they'll surely fix it for you. Given the time that has passed since they last touched it, they'll probably charge you. If you want to just fix it yourself, use the thumb and index-finger adjusters either up near your shifter or down at the derailleur. First, shift to a gear that slips, preferably the most centered gear on your cassette. Looking down onto your bike from above, or from behind the back tire, align your eye with your chainline and your cassette. Twist the cable tension adjuster to increase or decrease the cable tension and watch the derailleur move away from, or toward your spokes. Center up the line that the chain is running by watching your cassette and the derailleur pulleys. These will likely be very small adjustments! Center it up and then jump on and go through the gears. If you get it close, then use the adjuster up near your shifter to fine tune it while you pedal. If you can't get it, the cable might have stretched to the point where it needs to be reset at its anchor point at the derailleur. Bike shops should know to stretch all cables when they are installed and test ride everything, but this is a good thing to know how to do.

Why is my bike slipping gears?


How to properly ground a MacBook Pro

Question: I have a MacBook Pro 4.1. In the past - from time to time - you could feel a bit of electricity close to the aluminium case when working in AC mode, but now things are getting worse. I can feel the electricity all the time, especially close to the opening button and to the corners. Talking with other MBP users, I have been told that the whole MBP 1.4 series has got this problem and that it is due to the presence of the aluminium case. Is it a known issue? Is there any workaround to properly ground the laptop?
Comment: Possible duplicate of [MacBook Air passing me electricity](http://apple.stackexchange.com/questions/10545/macbook-air-passing-me-electricity). Answers there cover this question.
Answer: tl;dr
Use the extension cord! It is grounded.
Apple's grounding madness
You need your device to be grounded. The charger can be grounded because the metal pin that holds the adapter is (subtly) also the ground:

You need the plug to be grounded too. Obviously a 2 pin/prong plug is not grounded, you'll need one with 3 of them, but even in this case you have to check if the adapter's socket/shoe has metal in it (AKA is connected to the ground), because you can't take that granted at Apple! Just check out this picture from this article:

This is a 3 prong UK plug that has a grounding prong, but they haven't connected it! Fortunately at the extension cord there is a connection. You have to carry that extra 1.8 meter of cable tho...
So at Apple, the rule of thumb is that if it is an extension cord, then the socket is connected to the ground pin so it is probably grounded, if it is the small adapter, then there is no connection in the socket so no grounding for you:

The left picture from this answer shows the difference. The metal is more visible in the magnified picture on the right.
Hacky solution
Technically you could hack the not grounded 3 prong UK (Type G) adapter (that I mentioned before) to connect the ground prong to the grounding pin as shown in this tutorial. Of course, unless you want to use it with a Type G socket instead of the many other types, you will need to use another (grounded!) adapter to convert it to your desired (grounded!) wall socket.
Comment: Turns out you can still buy grounded UK Apple or third party extension cables (e.g. https://www.amazon.co.uk/dp/B082PGGK9H) which fix the problem even on power supplies that didn't originally come with an extension cable.
Answer: Your specific mac only grounds itself through the magsafe connector if you are using a grounded plug. In the US, standard power means the "duck head" two prong connector is ungrounded. (Or unearthed to some) Use a three conductor plug to ground the device and check your MagSafe pins to be sure they extend fully and mate correctly with the Mac.
The adapter article from Apple has some good tips and a nice picture.

You shouldn't be able to feel any tingle due to you being better grounded than the mac if your outlet is properly grounded.
You'll have to check with an electrician or take your mac to another outlet that is known to be properly grounded if you are already grounding it through the wall if you still feel the tingle with a grounded cord.
This sort of ground current can be irksome (even though it's normally totally safe). I have on occasion intentionally grounded one of the plastic feet with foil (ground the case of the machine to the surface it rests on - not changing the adapter) when I am waiting for the electrician to fix an outlet or I am working in a location where I can't get a proper ground through the Apple grounded cord.
Comment: Besides the extension cord, the only other grounded adapter I'm aware of for North America plugs is this [3rd party grounded duckhead](https://www.amazon.com/Grounded-Duckhead-Apple-Mac-Adapter/dp/B0B452LS67/).
Answer: Well I have just experienced this tingle on my Macbook Pro with the magsafe 85w power supply and the 3 pin plug lead with a UK 3 pin plug.
I could not believe that Apple would not earth the machine via the magsafe adapter, so I detached the power lead from the 85w power supply block and took a look how they earth it.  The power supply block has a 2 pin connection for live and neutral and the earth connects via the 10mm dia stainless steel stud that the plug lead [or the plug with no lead] slips over to lock it onto the block.  Then I saw the problem! On the end of the 10mm stud, the manufacturer had put a 12mm disk of protective plastic [the peal-off film type that you often find on say a new phone screen]. So in their efforts to keep the stud looking shiny and polished, they insulated it from electrical connection, that is they insulated the EARTH STUD !!  Just peal it off, plug it back together and [unsurprisingly] there is no more tingle from the alloy case.
Comment: Great catch - I've unwrapped so many plugs, it's not even something I consciously think about when removing the plastic from the power adapters. This would certainly be a great thing to check!
Comment: I've been having this problem with my MBPro6,1 17" (circa 2010) which gets much worse when I attach a Lacie flat panel display. As per Paul Churchill above, I find that by replacing the 2 blade quick connector on the power block with the supplied cord which has a 3 prong connecter, I become better—though not fully—grounded. BTW, I'm in North America. t
Answer: Note: This might be dangerous, don't do this unless you know exactly what you are doing.
I ended up with the solution in this link. You just need to connect 3 ping adapter's earth and the earth pin of the charger.
Comment: yes i do understand that. but having something connected is better than nothing.
Comment: Well, since this looks bit hacky when traveling; later I used an extension cord received with my old MacBook Pro 2014.
Comment: there's a reason why the ground pin on the plug is much thicker than the live wire...
Comment: @RasikaPerera How did it go? I am doing the same but a bit scaled of breaking something
Answer: Actually, this problem gets really bad, when you connect a 3.5mm plug from your headphones to your MBP, you can hear the buzz from the electricity, I must unplug the MBP from the electrical outlet to avoid that buzzing sound (which is realy high and loud), I must find a way to ground the laptop, I have found that if I touch it it reduces the amount of buzzing sound, so I will connect a cable from the body to some sort of metal to see if that helps, until i found a longer solution.
Comment: I use a stereo tube DI box to buffer the iMac/PC headphone from 3.5mm into a pair of transformer balanced XLR connectors. This drops the noise floor a lot and I can turn the volume up to full without a lot of hiss afterwards. Same thing as used onstage.
Comment: Any better solution for this?
Comment: My solution, https://www.dell.com/en-uk/shop/laptops-notebooks-and-2-in-1-laptops/xps-13-laptop/spd/xps-13-9380-laptop
Answer: Note: This might be dangerous, don't do this unless you know exactly what you are doing.
Here's a simple fix to this design flaw. Whoever thought of ending the ground circuit at the pin on the transformer, where it connects to the plastic channel on the UK plug adapter needs to be sent on a long holiday. I finally got my Trackpad working (while the charger's plugged into the computer), by ensuring continuity between the transformer's earth pin and the one on the UK wall plug.
Comment: Just noticed the extension cable's connector has grounding capability where it joins the transformer, naturally. Apple are normally fairly good with logic, but in this case it seems the exception proves the rule!
Comment: Definitely - insulated looks better but in this case there's no risk of accidental connection. You kinda have to see it to agree.

In other news, I've just upgraded to a 2017 MBAir with the exact same power supply design and... no zippy zappy where it shouldn't be. Trackpad wprks fine and no more tingling when I rest my arm on the edge of the computer case... which is a relief. Maybe in 7 years when things start wearing out???

BTW, I eventually gave up on this hack as it fell apart. I adapted to grounding the case with my left hand while I operated the Trackpad with my right.
Comment: The insulated approach above is safer. Risk of electrocution or fire if the exposed wire slips off the pin at the wall side and inadvertently bridges live or neutral to earth. But I admire the spirit of your fix!
Answer: I accidentally solved this problem by connecting my macbook pro to an external monitor(using USB type to VGA adapter and connected monitor via VGA cable). Since the monitor is using 3 pin power connector for power supply, so indirectly my macbook also got earthed. I tested this using electrical tester pen screwdriver and it shows zero current on macbook body if the setup is connected. Also, i don't feel the current anymore even if I touch the macbook bare foot.
Comment: This is a fix, but you may get seriously electrocuted if your hand or finger get between you  external monitor cable grounding part and your laptop. this happened to me not from a macbook but similar principal. the tingling you feel will multiply if your body is properly grounded and your mac is not (Multimeter show it was above ~100v in our 220v grid). Also your cable will carry more current/voltage that it was designed for
Comment: @ahmed points taken. Thanks for bringing this point. I think the best option would be then to invest in 3 PIN extension cable of the mac adapter.
Answer: Use the extension cable that comes with the magsafe as that has an earth connection to the 10mm stud which is not present on the non extended plug block
Answer: To add to this: if you buy 3rd party power supplies to replace genuine they often do not have an earth* (the stub which the cable slides onto is plastic, but the Americans barely use earth on the American model of this laptop, and seem to survive.
*AKA 'ground'
Answer: The same problem is now evident with the new MacBook Air.  I called Apple and they admit there is a lack of earthing/grounding when the UK 3 pin plug connector is in use. Apple quote a UL and IEC approval which says that no earthing is required where the amperage induced is negligible.  While I'm not suggesting that the levels of current are harmful they are intensely irritating requiring me to stop working, lick my finger and touch the metal case.  This WAS NOT the case on my old Air book.
Answer: There is no protective plastic On the end of the 10mm stud with any of the 2013 models. So what you are saying, Paul Churchill, is incorrect. The problem with electrical current flowing through all the MacBooks can not be fixed. Only Apple can fix it, but they don't want to fix it.
Of course it is unhealthy & unnatural when an external electrical current flows through your body, no matter how small. It messes up your whole electrical system in your body. All nerve signals, all organ and all functions in general in your body function through the bodies own electrical current system.
I have noticed it too, and will return all my Apple products that conduct electrical current. So please watch out if you care about your health and don't want to get seriously sick in the long run.
Comment: I would welcome a reference to explain the criteria for what level of current you feel is unhealthy. Your initial post comes across as folk medicine/FUD without some sort of rationale why electrons on the surface of your skin are "unhealthy & unnatural" since if that were true, any child with a balloon and sweater would be at risk.
Comment: "Apple" isn't going to delete this content, because this website is in no way affiliated with them; this is a community-run Q&A site for Apple products. If your answer is downvoted or flagged for deletion, it's because visitors to the site found it unhelpful, or it was determined by the moderators (also community members) to fall under [these criteria](http://apple.stackexchange.com/help/deleted-answers) for deletion.
Comment: Not sure if it's an Apple issue as much as it is an issue with things with a lot of anodised Aluminium + stray capacitance +my house has 14 volts AC between the cold tap and Earth.

How to properly ground a MacBook Pro


Is ritual described in the Pali canon?

Question: There are a great many Buddhist rituals which vary across Buddhist schools and traditions. Did the Buddha describe any rituals which were  to be done as part of practice in the Pali canon? Or are the rituals we see today later additions perhaps emerging from specific cultural or historic contexts.
Comment: The words of the Buddha for today (July 25) in [this book](http://www.buddhanet.net/pdf_file/words_of_buddha.pdf) is regarding ritual.  And [here is a dhamma talk](http://meditation.sirimangalo.org/live/20150726_0059_livestream.mp3) by Venerable Yuttadhammo regarding this passage and rituals. Thought you might find it interesting. :)
Answer: I do not know of a sutta where the Buddha suggested ritual. (There may be one; I just don't know of it.) But I do know of a sutta where the Buddha guided a follower to understand that ritual is ineffective. In SN 42.6, Paccha-bhumika Sutta: [Brahmans] of the Western Land the Buddha gave 4 examples of crowds trying to affect an outcome with rituals. Here are two for example:

"Very well, then, headman, I will question you on this matter. Answer as you see fit. What do you think: There is the case where a man is one who takes life, steals, indulges in illicit sex; is a liar, one who speaks divisive speech, harsh speech, & idle chatter; is greedy, bears thoughts of ill-will, & holds to wrong views. Then a great crowd of people, gathering & congregating, would pray, praise, & circumambulate with their hands palm-to-palm over the heart [saying,] 'May this man, at the break-up of the body, after death, reappear in a good destination, the heavenly world!' What do you think: would that man — because of the prayers, praise, & circumambulation of that great crowd of people — at the break-up of the body, after death, reappear in a good destination, the heavenly world?"
"No, lord."

and also:

"Suppose a man were to throw a jar of ghee or a jar of oil into a deep lake of water, where it would break. There the shards & jar-fragments would go down, while the ghee or oil would come up. Then a great crowd of people, gathering & congregating, would pray, praise, & circumambulate with their hands palm-to-palm over the heart [saying,] 'Sink, O ghee/oil! Submerge, O ghee/oil! Go down, O ghee/oil!' What do you think: would that ghee/oil, because of the prayers, praise, & circumambulation of that great crowd of people sink, submerge, or go down?"
"No, lord."

The sutta ends with the only effective "ritual" that I'm aware of from this time; which is the listener going for refuge.

"I go to the Blessed One for refuge, to the Dhamma, & to the community of monks. May the Blessed One remember me as a lay follower who has gone for refuge from this day forward, for life."
Answer: Most of the Buddhist rituals are about paying respect to the Triple Gem. Paying respect is praised and encouraged in the Suttas.

Asevanā ca bālānaṃ paṇḍitānañca sevanā,
  Pūjā ca pūjanīyānaṃ etaṃ maṅgalamuttamaṃ.
  - Not to associate with the foolish, but to associate with the wise, and to honor those worthy of honor — this is the highest blessing - Mangala Sutta
"Here, student, some woman or man is obdurate and haughty; he does not
  pay homage to whom he should pay homage, or rise up for whom he should
  rise up, or give a seat to whom he should give a seat, or make way for
  whom he should make way, or worship him who should be worshipped, or
  respect him who should be respected, or revere him who should be
  revered, or honor him who should be honored. Due to having performed
  and completed such kammas, on the dissolution of the body, after
  death, he reappears in a state of deprivation... - Cula-kammavibhanga Sutta

Is ritual described in the Pali canon?


Unity Transport Layer API - How to manage client-server connections

Question: I am currently working on a "Master server" system for our Unity Game using Unity's Low Level "Transport layer API" for networking.
My problem is that I would like to prevent clients from connecting to eachother. I have tried not giving them a port on the Addhost() call, but it doesn't seem to change anything. They also do not seem to detect the connections, so basically I find myself with NetworkTransport.Connect(..) calls that work (the error byte is 0, meaning no error) but no actual connections. I don't understand what's going on.
I can't really show my code because it's quite long, but here's how it works, in summary :
The Clients objects initialise a Socket as normal with only one Reliable channel, no port, and one connection allowed by default. Then they have the ability to connect to another socket, as you'd expect. My problem COULD be coming from there : for testing purposes the IP I use for testing is 127.0.0.1. What I do not understand is, how can it "find itself" when it is not bound to any port ? And more importantly how can it NOT find the Master Server object whose socket IS bound to a port ?
Speaking about Master Server, it's an object that also initialises its socket, but with a port and many allowed connections.
When a client connects and the connection did not yield any errors, it considers the connection to the Master server to be successful and proceeds sending a message containing some information for the server about this client : the username chosen by the player for example.
When the master server receives a connection event, it registers the received ConnectionID and waits for more information from that same connection, for example the aforementioned username.
Both the client and the server handle receiving messages with the NetworkListener class (Static). On each frame it executes the Listen() method which executes a "normal" NetworkTransport.Receive() body. I can give you that part of the code as it is fairly common in design :
public static void Listen()
{
    int recHostID;
    int recConnectionID;
    int recChannelID;
    byte[] buffer = new byte[1024];
    int recDataSize;
    byte error;
    NetworkEventType e = NetworkTransport.Receive(out recHostID, out recConnectionID, out recChannelID, buffer, 1024, out recDataSize, out error);
    Debug.Log("Listening");
    switch(e)
    {
        case (NetworkEventType.Nothing):
            break;
        case (NetworkEventType.ConnectEvent):
            Debug.Log("Connection established. ConnectionID = " + recConnectionID);
            if (OnConnectionReceived != null)
            OnConnectionReceived(recHostID, recConnectionID, recChannelID);
            break;
        case (NetworkEventType.DataEvent):
            Debug.Log("Received data !");
            BinaryFormatter f = new BinaryFormatter();
            MemoryStream stream = new MemoryStream(buffer);
            Message = f.Deserialize(stream) as NetworkMessage;
            break;
        case (NetworkEventType.DisconnectEvent):
            Debug.Log("Connection terminated. ConnectionID = " + recConnectionID);
            break;
    }
}

Network message is a simple data structure which contains a ConnectionID (the one it's from), a message title and content. The title is used to determine the general purpose of the message. The content is the rest of the information.
What happens in my current build of the client :
The user is prompted to enter a username, then he clicks "Search for match". The search for match button is supposed to trigger the connection to the Master Server. The logs say that the connection was successful (as no errors are detected) but no Connection event is received on either side. This of course prevents everything else from working.
If you need further description of the problem just ask and I'll answer ASAP.
Thanks a lot in advance !
Answer: Your Listen method needs to be called in the Update "loop", like such:
void Update()
{
   Listen();
}

Edit:
If the connection establishment works, you should check your if statement. Thanks for the downvote..
You could also use the debugger to check your source code or simply use google :)


When a tax is imposed on the sellers, the price of the good rises. So, why doesn't the demand curve shift?

Question: A tax imposed by the government on the sellers would drive up the price of the good. I understand that the supply curve will shift upwards due to this but the won't the demand curve also shift downwards due to the increase in price of the good?
Answer: I think you're confusing quantity demanded, and the demand curve.
The demand curve tells you how much quantity should be demanded at each price point. Therefore changes in price should change the quantity demanded, not shift the curve. You want to think of this in terms of demand and supply shocks.
For example:
Imagine it was discovered that bananas gave you super powers. Now the ability to supply bananas hasn't changed (no supply shock), but the desirability of bananas at any given price point has increased (demand shock).
An increase in price due to taxation has not impacted the desirability of goods at any given price point. It simply changes the price point.
Comment: Yes that's correct. It's represented by moving along the demand curve. Shifts in the demand curve however are caused in changes in quantity demanded at a given price point.
Comment: But won't the goods become less desirable when I have to pay more for the goods?
Answer: The demand curve is a function that shows the relationship between price and quantity demanded. This curve is made up of an infinite number of points, with each point corresponding to two pieces of information: a price and the quantity that would be demanded at that price. If you consider a different price, you only need to then consider a different point on this curve - so there would be a movement along the curve if the price changes. We say that price is endogenous to the model.
When the demand curve was constructed, some other factors were assumed to be constant. These are the factors that do not appear directly on the graph (like price), but are behind the scenes. So, for example, if you want to consider how government expenditure affects a demand curve, you would need to draw a different demand curve based on the different level of G, because G is assumed to be constant for any one particular demand curve. We say that these other factors are exogenous to the model.
The reason why taxes on production shift the supply curve upwards is because they increase the cost of production. Those costs need to be added onto the price of the product, so the price increases for any particular quantity.


Effects of samatha

Question: Are there any negative effects of samatha that were mentioned in the Pali Canon (Tripitaka), the commentaries, or just from your experience?
I have heard on an occasion that someone who might concentrate on a color such as a blue kasina might end up only seeing everything in blue.
Answer: Summary: "Negative" is a subjective term - I believe there is learning to be had in every moment in life.
Certain Samatha and Vipassana experiences can puzzle the unstable or ignorant mind. The damage in these cases is self caused or self amplified.
I'm not saying one can be stuck seeing blue, but if one does, so what? Observe it too, like anything else, without a positive or negative attachment.
This mindset that wants some special experiences, and does not want other experiences is the real danger for any meditator.
Samatha jhanas and powers like any conditioned event are impermanent and will arise and pass away eventually. There is no wholesome joy to be had in special events in life - the wisdom is to be peaceful no matter what while developing the wisdom to know what is right and wrong.
There is not a lot of harm in curiosity, and some thrill seeking, but it comes at the cost of delay in the arising of wisdom.
It is ideal, though not always possible to have the tactical knowledge or a knowledgeable teacher at hand to guide one through some of these experiences. This ensures one does not compound errors in method.
If not that, then, developing an equanimous mind that is unattached to  events is the best safety net.
Whether one is stuck in a sensation of bliss, or misery, the wise mind will remain unattached, unmoved, knowing it will all end.
Comment: I agree. That was a very good answer. "There is not a lot of harm in curiosity, and some thrill seeking, but it comes at the cost of delay in the arising of wisdom". These are wise word. I like this one too "I'm not saying one can be stuck seeing blue, but if one does, so what? Observe it too, like anything else, without a positive or negative attachment."
Comment: You're welcome, glad it was helpful.
Answer: Practiced correctly, there aren't many negative effects of samatha meditation.  That being said, there are quite a few "detours" that one might stumble down without proper guidance.  I think the greatest danger is bliss seeking and clinging to the bliss of jhana.  From personal experience, I can tell you that this is particularly pernicious.  Even knowing full well how easy it is to slip into this sort of thing, the highs that sitting can usher in are spectacularly enticing.
The subtle craving that the adsorptions engender (and sometimes they ain't even that subtle) really throw up a number of road blocks in your practice.  For instance, you might start thinking sits where you don't get into jhana to be somehow "missed opportunities", you might start trying to reconstruct the feeling of absorption without letting it arise naturally, and perhaps most damaging, you start to think of enlightenment as this kind of blissed out alternative to samsara and not the resolution of form and emptiness as taught by the Buddha.
Jhana is Buddha, but pain in your legs is also Buddha.  Almost feverish restlessness is every bit as important to your practice as ascending to the Brahma heavens.  The danger is in distinction.

Effects of samatha