How long to defrost 11 1bs. of chicken in the fridge?

Question: We made 11 1bs. of chicken breast into kebobs and then froze it.  How long will it take to defrost in the fridge?
Comment: Is it in one giant block? A bunch of kinda flat freezer bags?
Answer: To a first approximation, heat exchange occurs on the surface of an object, and then the heat must conduct through the object. So, again, continuing the approximation, the time for something to heat (or cool) completely depends on how thick it is.
Other things that matter a good deal are: the temperature difference (the colder your fridge, the longer it'll take); the amount of airflow (moving = faster); and finally how fast the air gives up heat. (You can't change how fast the air does, but you can defrost under cold running water instead, water gives up heat much better than air).
How cold your freezer is doesn't actually matter that much. This is because water's transition from solid to liquid actually takes a lot of energy; it dwarfs any difference from a -5F freezer v. a +5F freezer. (Also why ice cools so well.)
So, if you have frozen them in a thin layer, and your fridge is close to 40F (the hottest it should be, for safety reasons), it'll defrost fairly quickly. Probably within an hour or two.
If you have a 11 lb block of chicken, it'll take a long time, I'd suggest looking up turkey defrosting times for comparison. 11 lb block of chicken in a 34F fridge would take days.
Remember that since defrosting in the fridge keeps the kebobs out of the "danger zone" for the entire time, you can safely hold the defrosted kebobs in the fridge for a day or two. So if they defrost a day before you need them, it's not a problem.
Answer: I'm going to disagree with a couple of points here, sorry, new here, don't want to cause trouble.
I've never had even the smallest bits of meat defrost in the fridge in an hour or two.  You're almost always looking at 24 hours.  One lb of cubed stew meat takes a day.
Also, I wouldn't take a chance with chicken, ever.  I wouldn't assume that the outer layers of a huge block of chicken thawing on Tuesday are as safe as the core which eventually will thaw out on Friday or Saturday.  Every bit of raw chicken goes bad fast, even in the fridge.
Whenever in doubt, I thaw out my meats in ice baths.  That's a big bunch of chicken, so I would half fill my sink with ice water and set the bag or bags in.  They'll float, don't worry, as the they thaw they will sink. Put something heavy on top to hold it down, like a pot or roasting pan, but a little float-age isn't a big deal. Keep adding ice every hour, drain some water if you need to.  You should have it all completely thawed in 3-6 hours, depending on how densely it's packed.  This is how I do my whole chickens and 15 lb turkeys.
Thus it all thaws out in a short interval of time and then yes, you can totally keep in the fridge cold for a day or two till you need it.


What are the Properties of eigenvalues and eigenfunctions of periodic Sturm Liouville problem?

Question: I've read for a regular Sturm-Liouville problem for each eigenvalue there corresponds unique eigenfunction.
For periodic Sturm Liouville problem Which of the following are true?
Each eigenvalue of (periodic Sturm Liouville problem) corresponds to
1. one eigenfunction
2. two eigenfunctions
3. two linearly independent eigenfunctions
4.  two orthogonal eigenfunctions
What are the Properties of eigenvalues and eigenfunctions of periodic Sturm Liouville problem?
Are these depend on boundary conditions or same for all periodic Sturm
Liouville problems?
Comment: This is addressed thoroughly in Coddington-Levinson's *Theory of ODEs*, chapter 8, section 3.
Answer: This isn't an answer, but evidently I don't have enough points to leave a "comment." I don't have a reference on Sturm-Liouville problems handy. However option (2) doesn't make sense. If there is one eigenfunction, there are infinitely many for the same eigenvalue: just take your eigenfunction $u$ and multiply by any non-zero real $\alpha$. Also, (3) implies (4): if there are two linearly independent eigenfunctions, you can produce two orthogonal functions (spanning the same subspace) using a Gram-Schmidt type argument.
Hope this clarifies a couple things.


Input and Output Impedance of a BJT

Question: Hi I'm new to electronics and I would like to know how to measure experimentally the input and output resistance of the following common emitter configuration. I have access to a voltmeter, signal generator, power supply and an oscilloscope as well.
Answer: Measuring input/output impedance is little more than calculating the resistors in a voltage divider. Consider the following two situations:

simulate this circuit – Schematic created using CircuitLab
Important is that the whole circuit is not clipping, so the voltage \$U_i\$ is small in relation to the supply voltage. There should be no distortion. Also it is essential that you measure only the AC component, so in case of the output impedance you do your measurements at the right end of the output capacitor.
For the output impedance you have to do two measurements at a given frequency. For audio 1kHz is a good start, but as Andy states, you might be interested in the impedance at various frequencies.
With a known input amplitude \$U_i\$ do two measurements:

Measure the voltage amplitude \$U_{o}\$ with \$R_l\$ removed (left situation);
Measure the voltage amplitude \$U_{o}\$ with a known \$R_l\$ in place (right situation);

\$(1) R_o = \dfrac{\Delta U_{R_o}}{\Delta I} \$
\$(2) R_o = \dfrac{U_i-U_o}{\frac{U_i}{R_o+R_l}} \$
\$(3) R_o = \dfrac{R_o+R_l}{U_i} (U_i - U_0)\$
\$(4) R_o = R_o + R_l - (R_o+R_l)\dfrac{U_o}{U_i}\$
\$(5) R_l = (R_o+R_l)\dfrac{U_o}{U_i}\$
\$(6) R_l(1-\dfrac{U_o}{U_i}) = R_o\dfrac{U_o}{U_i}\$
\$(7) R_o = R_l(1-\dfrac{U_o}{U_i})\dfrac{U_i}{U_o}\$
So the resulting formula to calculate the output impedance is:
\$(8) R_o = R_l(\dfrac{U_i}{U_o}-1)\$
Calculating output impedance follows the same method as calculating input impedance, you are just calculating the other resistor in the divider.
The input impedance is identical to \$R_l\$ in (6) where \$R_o\$ is the output impedance of your signal source (optionally increased by an extra series resistor. So:
\$R_l = R_{amp,in} , U_o = U_{amp,in} , U_i = U_{generator,out} , R_o = R_{out,generator}\$
\$(6) R_l(1-\dfrac{U_o}{U_i}) = R_o\dfrac{U_o}{U_i}\$
\$(9) R_{amp,in}(1-\dfrac{U_{amp,in}}{U_{generator,out}}) = R_{generator,out}\dfrac{U_{amp,input}}{U_{generator,out}}\$
\$(10) R_{amp,in} = R_{generator,out} \cdot \dfrac{U_{amp,in}}{U_{generator,out}} \cdot \dfrac{1}{(1-\dfrac{U_{amp,in}}{U_{generator,out}})}\$
\$(11) R_{amp,in} =  R_{generator,out} \cdot \dfrac{U_{amp,in}}{U_{generator,out}-U_{amp,input}}\$
Comment: Could you elaborate please on the input impedance, just as you did in the output impedance?
Answer: The input impedance. First, choose what frequency you are interested in. If it's audio then maybe 1kHz is a good single frequency to use. However, you may be interested in the frequency range from 10Hz to 100kHz and if you are, choose several points to measure. Conventionally logarithmic steps are used such as: -
10Hz, 33Hz, 100Hz, 330Hz, 1kHz, 3.3kHz, 10kHz, 33kHz, 100kHz - but tighter steps can be used depending on how precise you need things to be. Generally speaking though, a simple amp (as you've shown in your circuit) would be ok at those frequencies.
Measurement: A voltmeter probably won't be good enough unless it is a true RMS voltmeter with a decent frequency range. If you can get access to one of these or an oscilloscope then that is the way to proceed. Connect the scope to the output and look for the signal generated by V1 through the amplifier. Make sure it is a sinewave and make sure it looks clean. If necessary inject a smaller signal. I'm assuming R1 on your circuit is a variable resistor or decade resistance box because without one you can't determine impedance easily.
Make sure R1 is set to zero ohms.
Once you have the signal on the oscilloscope, increase R1 until the signal level halves on the scope. The value of R1 can be regarded as the input impedance of your circuit. For the simple circuit like you have shown it is reasonable to use R1 as the input impedance but on other circuits like RF amplifiers a more detailed value would be required; one which measures the complex impedance.
For output impedance, you have to load the output and I note you have conveniently drawn RL. This should be a variable resistor or decade resistance box. Start with RL at open circuit and look at the signal on the scope. Start lowering RL until the scope signal halves in amplitude - this is your impedance.
Again, I add that these are simple impedance measurements and this method won't necessarily be suitable for high frequency amplifier or measurments where complex impedances are required. This method may not be suitable for higher power systems because of the loading current when measuring output impedance.

Input and Output Impedance of a BJT


Can anyone provide a modern source for the average college student IQ of 115?

Question: I've read in various places that the average college student IQ is about 115, and the various estimations of IQ by college major reached by converting SAT to IQ all use 115 as the starting point for college students. However, the most recent source for this number is The Bell Curve, which was in the early 1990s. It is also just about the only source of the last 40+ years. Can anyone provide a more recent documentation of the average IQ of college students? (that isn't just a reference to an older study)
Answer: Ok I finally found the official demographic norming data from the WAIS-IV on page 104 of this book:
"WAIS-IV Clinical Use and Interpretation: Scientist-Practitioner Perspectives"
You can see a preview of this book at http://tinyurl.com/z3vr44e.
The answer to my question is: Some college:      102.28
                                College graduates: 110.77
Answer: If you search for "IQ students" on google scholar since 2012 you will find plenty of literature. However, the problem will be that there are many different "standardised intelligence tests", and not all of them call themselves "IQ". You might want to restrict your search to a specific test like the Wechsler Adult Intelligence Scale which is one of the most used. The norms for such tests are published, organised into age/socioeconomic groups, so that may be the "original" source. For Wechsler the citation is:
Wechsler, D. (2008). Wechsler adult intelligence scale-fourth. San Antonio: Pearson.
For a recent other example, this paper used this scale with 42 college students and found a mean of 105 which they (reasonably) conclude is "close to national norms":
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3389807/
You don't specify, but I am assuming you are talking about average US college students.
Since you are interested in the relationship between IQ and SATs, this recent paper might also be of interest, although it focuses on grade 8 students:
http://pss.sagepub.com/content/25/3/736.full
Answer: https://www.researchgate.net/publication/232514979_The_IQ_of_the_average_college_student
I found this article that seems to answer your question in the abstract. I didn't bother to sign up and read the whole thing though.
Comment: Unfortunately, that article is from 1958.


Connect Ethernet via Parallel or Serial in old laptop

Question: Is it possible to connect an old 386 machine to network (ethernet)? It has only parallel and serial ports. I'm not expecting much, just planning to use it as a remote terminal. The machine in question is a Commodore C386SX-LT
Comment: Is exactly Ethernet required, or just IP connection of any kind? Running PPP over serial against e.g. some router that has serial port may be the easiest.
Comment: Are you sure it does not have PCMCIA / PC Card / Cardbus slot? That was a quite common option back then. Do you have the brand and model of the computer? Also, what OS are you running / planning to run?
Comment: You may want to state the actual model number.  There might be possibilities.
Comment: I see that https://www.commodore-info.com/computer/item/pc386sx_lt/en/mobile lists  the model as having an expansion port for a modem. Does yours have that? I am not sure if it opens any options to solve the stated problem however.
Comment: https://oldcrap.org/2018/09/18/commodore-c386sx-lt/ also has pictures of the ports and slots as well as a teardown as a reference.
Answer: Yes. For example, the Xircom PE3-10BT is a parallel port adapter that allows an RJ45 connector be plugged into it. You don't get full 10 Mbps with it, but it works. Mine is powered via a PS/2 port passthrough plug and jack. I use mine with my 386 laptop.
Comment: More specifically, it's a parallel port adapter that allows an RJ-45 _ethernet_ cable to be plugged in to it. When you see an RJ-45 jack on older equipment, you could be mistaken if you blindly assume that it's an Ethernet port.
Comment: That would be my suggestion too if the machine cannot hold a real ethernet card.
Comment: Will this do the trick? https://www.google.co.uk/url?sa=t&source=web&rct=j&url=https://www.ebay.co.uk/itm/Retro-computer-Wifi-modem-Commodore-Apple-MSX-Sinclair-rs232-serial-interface-/193162166596&ved=2ahUKEwjQzrLZo-TpAhVMDmMBHb46ArYQFjAAegQIAxAB&usg=AOvVaw303vPUqbKrOGQngDokhLjo
Answer: If you have another computer to hook it up to and act as a bridge (or router), you could in principle run SLIP or PPP over the serial port to another machine. You're unlikely to get speeds exceeding 100 kb/s.
Comment: PLIP might be better over parallel ports especially if it is an enchanced one.
Comment: The 386 might be better off simply running a terminal emulator like minicom or similar, and merely shoving characters around between keyboard/screen/serial port.
Comment: @criggle That's useful if all you're after is "just a remote console", but having SLIP/PLIP/PPP and an actual IP stack gives more functionality, even if it's not fast. I suspect I'd probably go the "terminal emulator and [xyz]modem for file transfers" route, myself.
Answer: Since it's a pretty early laptop without a PCMCIA port, there won't be a way to add an Ethernet port. Your best approach is to use the serial port to connect via null-modem cable to a modern machine that either has an RS-232 serial port, or has hardware and drivers for bridging its USB port to RS-232 serial. Once the two are connected, use of the laptop as a terminal should be a trivial matter of running a terminal server on the modern machine and a terminal emulator, probably under MS-DOS, on the laptop (i.e. ProComm).
If you want to transfer files, there are Z-modem implementations on modern Linux machines, and probably for Windows too. So you can use a Z-modem capable DOS terminal emulator to easily transfer files at perhaps blazing speeds of 115 kbps.
Going beyond simple file transfer, FreeDOS could be installed on the laptop along with TCP/IP, PPP, and applications like telnet, ftp, and wget if you wanted to connect the laptop to the Internet. Again, a Linux peer can be the bridge for this, effectively simulating an old "dial-up" type of Internet connection for the laptop. Setup is much more complicated than just using the terminal emulator approach.
If you really want to use the Parallel port, you could try to get LapLink going. This would be the period-correct way of connecting a laptop to a desktop. But your desktop will need to be able to run either very old LapLink software, or a modern work-alike (I know of none). Alternatively, MS-DOS 6.22 has INTERLNK.EXE, if you can run its server using MS-DOS emulation on your desktop. This was Microsoft's answer to LapLink back in the day...
Things get more interesting if the laptop has a PCMCIA port or built-in Ethernet. Obviously such machines are still pretty compatible with modern networking, especially if you can run TCP/IP. You could even just install Linux on such a laptop, and then it would be "plug-and-play" with modern computers, sort of... such setups require patience to get going and fail on first contact with modern SSL implementations.
Comment: @Mast the modern machine at the other end of the RS-232 connection may have USB ports: that is what is being described here.
Comment: I doubt OP's 386 has USB. I've never seen one that did. RS-232 to Ethernet is fairly common though.
Comment: @Kaz Oh, that makes sense. Thank you. Wouldn't that be severely overkill if an RS-232 to Ethernet adapter solves the problem just as well? I've used those on old systems often enough.
Comment: @Mast In this instance, the modern machine would be doing the RS-232 to Ethernet bridging in software. Using a modern RS-232 to Ethernet dongle would be an alternative, and worth writing up as its own answer.
Answer: One option is to use a modern Linux board to act as a fake modem connected to serial port. Then you can use any old software that would connect to internet by a modem connection, without actually having to pay the massive phone bills of the 1990s.
The software setup is not very complex, mainly requiring installing ppp server on Linux. There is also a tutorial for building a PiModem out of Raspberry Pi.
Hardware-wise, you need to get the correct signals connected, match the voltage levels and ensure that handshaking works. Handshaking is especially important as a 386 might not be up to continuously handling the full 115kbps of data, considering fastest modems were only half that speed. Depending on the UART used on the 386, you might even be able to get 230 kbps or higher baudrates working.
Answer: Assuming you're looking to put your laptop on the internet as opposed to just do file transfers or some such, there are a couple of DOS TCP/IP stacks.  If you're lucky, you can find one of the Xircom PIO ethernet controllers.  More likely, you'll do it over the serial port.

You're looking for an IP stack that supports SLIP or PPP, which are IP-over-serial standards.  Once such open source package is mTCP which also includes a selection of client programs (e.g. FTP).
You'll need a router of some sort between serial and ethernet.  Linux can do this just fine, and probably the easiest and best documented way to do this.
You'll need a serial "null modem cable" to attach the laptop to the router.

Depending on what DOS stack you end up, you'll then do something like the following on the router to bring the link up:
pppd -detach crtscts lock proxyarp local IP:remote IP /dev/ttyS3 38400 &
Fortunately, there's a lot of documentation once you're on track.


How do users check virtual mailboxs in Postfix?

Question: I have configured a new instance of postfix to use a virtual domain with a virtual mailbox. This means that my email recipients don't each have logins to the mail server. This is intended because I don't want to have to make a login for every mailbox owner since I don't want them logging into the mail server. But now I wonder. How are these people supposed to check their mail? I am still deciding whether to use courrier or dovecot as a POP/IMAP solution. But before getting that going they don't have associated credentials to retrieve emails with. What am I missing here? Is there supposed to be another mechanism to push messages from /var/mail to the users inbox wherever it may be hosted at?
Comment: /var/mail is their inbox your hosting it.
Answer: When you select Courier or Dovecot, you will configure it for the virtual users you have already set up. But you still have to pick one!


Is it true that there are no stabilized prime lenses (and if so, why)?

Question: Fast prime lenses like the Canon 50mm f/1.4 lens work nicely in low-light situations. But I'm quite sure they would work even more nicely if they had optical image stabilizers. It seems to me that no such lenses are available in the Canon system. Is this true? Maybe even for prime lenses in general? If yes, is there a reason for this?
Comment: In 2012, Canon launched a set of f/2.8 image stabilized primes, at 28mm and 24mm.
Comment: A more-specific version of this question: [Why there is no Canon 50mm *IS* lens?](http://photo.stackexchange.com/questions/8053/why-there-is-no-canon-50mm-is-lens)
Comment: And tangential but practically relevant if image stabilized short-teleophoto primes are something you really want:  [What is the difference between in-lens image stabilizing and in-sensor image stabilizing?](http://photo.stackexchange.com/q/15424/1943)
Answer: As of today there are 38 prime lenses with image stabilization. Almost half (16) of them are from Canon and 2 are Canon-mount Sigma (data from these search results at NeoCamera).
What you will notice is this is less common in the wide focal-length, with the only wide-angle stabilized lenses being Canon's 24mm, 28mm and 35mm, (all others below 100mm are designed for 1.5x or 2x crop sensors). This is because longer lenses benefit more from stabilization because they require higher shutter-speeds to give a sharp image.
Take for example a 500mm which would require 1/500s. This stabilization you can take it down to 1/125 or 1/60 even which is still a general purpose shutter-speed. Now take a 50mm which already gives a sharp image at 1/50s, you can bring that down with stabilization to 1/15 or 1/8 even. Those shutter-speeds are not suitable for moving subjects and even grass and leaves will blur. Now, of course, all shutter-speeds are useful, just that you gain more by stabilizing a long lens than a short lens. As a matter of fact, some people ask why certain wide zooms are stabilized, saying it's a waste of money!
Comment: As of end of Q1 2012 Canon released several new primes with IS, including a 24 and 28mm.
Comment: Canon has a 24mm IS lens.
Comment: Would it be appropriate to update this answer following lens releases since it was written 2 years ago?
Answer: Prime lenses with image stabilization do exist, and I believe they will become more popular with time.
One great example of the implementation is the Canon EF 100mm f/2.8L IS USM. It provides 4 stop hybrid image stabilization, great for angular as well as shift movement.
A 50mm prime will not benefit nearly as much as a 50mm, especially when you start considering macro capabilities.
As you go up the range, you will see that many prime lenses offer image stabilization, just in the situations that benefit the most from it, long telephoto prime lenses. Examples: 200mm f/2, 300mm f/2.8, 400 f/2.8, etc.
I think the main thing that it sounds like you are looking for is a wide angle or normal lens with image stabilization. For prime lenses that are wide especially this is not as important, but I do not believe any technical reason exists why this is not implemented. It more likely is just not sought after by most for price, weight, and size considerations.
Answer: Canon has recently announced the EF 24mm f/2.8 IS USM and EF 28mm f/2.8 IS USM image-stabilized wide-angle prime lenses.
Answer: The Tamron SP 45mm F/1.8 Di VC USD is the exception to the rule:
https://www.tamron.eu/lenses/sp-45mm-f18-di-vc-usd/
I own it and use it on the EOS 6D, it is a very fine lens with image stabilization and weather proofing too.
Comment: ... damn and blast, why do they NOT seem to make DSLM versions of that?
Answer: The Canon EF 100mm f/2.8L IS USM is the first thing I thought of when I read this post...
But it is true that you don't tend to find them at the wider end; simply because you can get away with slower shutter speeds and so the fast aperture is in itself enough to get you the sharp shots, and the addition of IS would add weight, cost, and something else to possibly go wrong! :-)
Answer: Do keep in mind that there would still be a big factor limiting the use of eg an f1.2 stabilized prime: If you are in the shutter speed range where camera shake becomes a potential problem... subject motion also does. People, foliage, vehicles... move. Neither OSS nor tripods help with it. One reason to use ultrafast primes wide open in low light situations - despite their disadvantages (heavy, flare prone, in many cases spherical abberation and coma ridden, difficult to handle DoF) - is allowing for subject-motion-proof shutter speeds.
Also, the way OSS systems appear to work is very similar to decentering the lens. Ultra fast primes are sensitive to decentering. While the ultra-shallow DoF can help composing around static decentering ... having to deal with dynamic decentering effects could become very frustrating quickly... and god knows what that will do to a lens using large aspheric elements (a purely spherical design that fast will be great to use on people wide open at night, usually NOT on infinity subjects. People=subject motion....).


Train a SVM-based classifier while taking into account the weight information

Question: Currently I have a data set which are known to belong to two classes, and would like to build a classifier using SVM. However, there exist different confidence levels for this data set.  For example, for some data points, we are very certain that they belong to class 1; while for some data points, we think they should belong to class 1 but not so certain. We can quantify this kind of confidence information as weight. But how can we cast these weight information into the training process? Does LibSVM support this type of training?
Answer: What you are asking doesn't really fall into the framework of the SVM. There is some work on incorporating prior knowledge into SVMs (see e.g. here but these approaches are generally not on an example by example basis.
I can think of one way in which you could approach this, if you have a lot of samples. You could use the weights as probabilities for inclusion in random subsets. You would then learn the SVM on each subset, and your final classifier is then a linear combination of these subsets. This is a variation on bootstrapping, which normally works over subsets of the features (see e.g. here, and might be quite interesting to analyse.
[Edit 1]:
Based on the answers from Jeff and Dikran it occured to me that you can just incorporate into the SVM objective. Normally the primal form looks like:
$\min_{\mathbf{w},\mathbf{\xi}, b } \left\{\frac{1}{2} \|\mathbf{w}\|^2 + C \sum_{i=1}^n \xi_i \right\}$
subject to (for any $i=1,\dots n$)
$y_i(\mathbf{w}\cdot\mathbf{x_i} - b) \ge 1 - \xi_i, ~~~~\xi_i \ge 0 .$
but you could just include another vector of confidence values, e.g. $0 < \delta_i \leq 1, ~~~~i=1,\dots n$:
$\min_{\mathbf{w},\mathbf{\xi}, b } \left\{\frac{1}{2} \|\mathbf{w}\|^2 + \frac{C}{\delta_i} \sum_{i=1}^n \xi_i \right\}$
subject to (for any $i=1,\dots n$)
$y_i(\mathbf{w}\cdot\mathbf{x_i} - b) \ge 1 - \xi_i, ~~~~\xi_i \ge 0 .$
which would mean that instances with low probability would receive a greater penalty in the objective. Note that now the $C$ parameter performs two roles - as a regulariser and as a scaling factor for the confidence scores. This may cause its own problems, so it might be better to split it into two parts, but then of course you would have an extra hyperparameter to tune.
[Edit 2]:
This can be done with libSVM  (MATLAB and Python interfaces are included). There is also code available in several languages for the SMO algorithm which can solve the SVM problem efficiently. Alternatively you could use an optimisation package, such as quadprog in matlab or CVX, to write a custom solver.
Comment: An anonymous user has argued that libsvm would be able to do this. See here: [Weights for data instances](http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/#weights_for_data_instances).
Answer: There is a technique called weighted SVM (see ref below), that appears to be supported by LibSVM (which I've never actually used). Weighted SVM solves the problem of having two classes with unequal training data. In this case, classification is biased towards the class with more observations. To compensate, W-SVM sets the penalty parameter C in proportion to the size of the class.
The same idea can be applied to confidence information by giving each observation its own C; though I'm not sure if LibSVM supports this. In this sense, you give a larger penalty to observations in which you have a lot of confidence, and a small penalty to observations with which you have little confidence. The end result is that the hyperplane is determined by weighting each observation by its confidence interval, as you desire.
Huang, & Du (2005). Weighted support vector machine for classification with uneven training class sized. Proc. of the 4th Int. Conf. on Machine Learning and Cybernetics, 4365-4369. Retrieved from http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=1527706
Comment: Huang and Du were by no means the first to come up with this idea.  Setting the penatly in proportion to the size of the class has some theoretical justification, however it breaks down with finite samples, so it is better to choose the weighting factor by cross-validation (or minimising a generalisation bound etc.)  However, in this case, I don't think this is what was meant by weight, but instead is to do with the confidence of the sign of the label.
Answer: A paper that might be of interest is "Estimating a Kernel Fisher Discriminant in the Presence of Label Noise" by Lawrence and Scholkopf, which deals with KFD rather than SVM, but the two classifiers are closely related and will give similar results for most problems.  Note that the KFD is equivalent to kernel ridge regression, and a 2-norm SVM is equivalent to KRR computed on only the support vectors, so it may be possible to port this approach to SVM.
In general dealing with label noise is easiest when you have a fully probabilistic classifier, so as tdc suggests, the SVM is probably not the best approach.  It might be worth looking at semi-supervised versions of the SVM, as the problem is similar in that in both cases you only have uncertain information about some of the labels (very uncertain for semi-supervised methods).  The approach tdc suggests is probably worth trying, or alternatively present each pattern twice, with different labels each time, with weights $p$ and $1-p$.
Answer: Try this package: https://CRAN.R-project.org/package=WeightSVM
It uses a modified version of 'libsvm' and is able to deal with instance weighting. You can assign lower weights to some subjects.


Does the Bible condemn white lies?

Question: Orthodox views on it state that any sort of lie is a sin by itself. More liberal Christians will say that it doesn't really mean that much provided it doesn't hurt anybody. But more importantly than personal opinions; what does the Bible have to say about white lies?
Comment: The only time I've ever heard any Christian defend lying was in the context of protecting the innocent. The typical example is the "I have Jews in my attic when the Nazis knock on the door" scenario.  But Pharaoh's daughter lying about the identity of Moses to protect him is a Biblical example where God apparently approved of lying.  And in neither of these cases would I call such a lie a "white lie."
Comment: Aquinas gives some defense of lying, as does Chrysostom, especially where a lie would be more charitable than the truth.
Comment: Just for clarification, responding no to "Does this dress make me look fat" is usually technically true. Cuz it's not the dress, it's the fat that makes you look fat :) (Coming from a fatman)
Answer: In the sermon of the mount, Jesus teaches about the sixth through tenth commandments, deepening their meaning.  For example, "Don't kill" he expands to "Don't have unresolved anger or conflict".  "Don't commit adultery" becomes "Don't lust".
For "Don't bear false witness", Jesus says (not quoting one of the ten commandments directly, but a related passage about making vows):

Again, you have heard that the ancients were told, "You shall not make false vows, but shall fulfill your vows to the Lord."  But I say to you, make no oath at all, either by heaven, for it is the throne of God, or by the earth, for it is the footstool of His feet, or by Jerusalem, for it is the city of the great King.  Nor shall you make an oath by your head, for you cannot make one hair white or black.  But let your statement be, "Yes, yes" or "No, no"; anything beyond these is of evil.
Matthew 5:33-37 (NASB)

The idea is that you should always follow through with what you say.  In other words, be trustworthy.  The same applies to the commandment: people should be able to trust you, whether that is in a courtroom, or in daily life.
White lies are not compatible with being trustworthy, because it tells others that you will lie for the sake of convenience.
Whether white lies are ok in the context of helping another, I don't know.  That leads to: "can the ends justify the means?"
Comment: Thank you for pointing out the obvious link to "do the ends justify the means"! That was in my head, but it's so ingrained into my worldview that I never thought to verbalize it.
Comment: Regarding the situations where it is not always unambiguous: I think God equipped us with something quite useful for this purpose: *conscience*.
Comment: Regarding marriage (and I am married), though in the short term a polite white lie might make your wife feel better, I think cultivating a culture of honesty and authenticity in the relationship will be better in the long term.  It will be more real.  And taking the time and energy to come up with real compliments instead of easy white lies will be worth it (disclaimer: I'm not good at this!).  I think we need to look at these moral conundrums in a long-term view; often they could have been avoided by a lifetime of following the corresponding virtue (i.e. honesty).
Comment: I think that you need to distinguish between deceptive white lies and non-deceptive ones.  Sometimes people dress up the truth but both parties still understand the real meaning.

Adversarial contexts, such as war, also need to be considered.
Comment: @BryanRosander, you're right on the first point.  I wouldn't consider non-deceptive white lies (such as sarcasm, theater, or humor) actual lies.  Regarding war, you'd have to first wrestle with the "Do not kill" commandment before you got anywhere near to "Do not lie".
Comment: @MattWhite: Unless your telling the truth will lead to others being killed...
Comment: Regarding non-deceptive white lies, I was also including husbands telling their wives they look fine rather than going into unflattering specifics.  Most of the time, they really do know what each other are thinking and just want and there is no deception involved.

On adversarial / wartime conditions, I would also include Christians protecting Jews in WWII and modern Christians being persecuted.  Ideally, they wouldn't have to deceive anyone and they could just not answer the questions, but I doubt that it is always that simple.
Comment: Regarding war, see my answer to [this question](http://christianity.stackexchange.com/questions/1048/is-the-ends-justify-the-means-compatible-with-christianity/6094#6094).
Comment: Jesus's deeper explanation of the commandments also helps us to shed light on the fact that we are all sinners who need a Savior, making it clear that  even those "little white lies" are not as benign as we think.
Answer: The answer is... "sort of". It seems the admonition against lying would be better explained as "Do not bear destructively false witness". While some might point to the ten commandments and leave that as their answer, saying that the rule is, "don't lie... ever" is easily refuted:

In the beginning of Exodus, the midwives are told to kill the Jewish boys but "they feared God and let them live." While you can try to say that they were telling the truth when they said, "the Hebrew women are not like the Egyptian women; for they are vigorous and are delivered before the midwife comes to them," you are doing some real verbal gymnastics to try to make it work (and, inevitably, it doesn't).
In Joshua, Rahab lies to the servants of the King of Jerico about the location of the two Jewish spies (Josh. 2:4), but this is counted as a good thing because it saves their lives.
In 1 Sam. 21, David deceived those he was with by pretending to be mad. While this is not outright, "lying" you are hard pressed to demonstrate the distinction.

Would Christ condemn these? Doubtful. Especially since Exodus says,

So God dealt well with the midwives; (Exo. 1:20, RSV)

The question then becomes, "What is actually prohibited?" and the Bible becomes very ambiguous. Yes, the weighted scale (Prov. 20:23) and the lying tongue (Prov. 6:17) are prohibited, but considering what is said above, we cannot say that God is condemning all deception. Rather, we must say that only the deceptions which arise out of desire for profit or are destructive should be considered forbidden. Now, this could include white lies which are told for flattery, but not necessarily.
In this matter, I have always (well, since I became Catholic) deferred to Chrysostom's Treatise on the Priesthood.

A man was once suddenly attacked by a fever of great severity; the burning heat increased, and the patient rejected the remedies which could have reduced it and craved for a draught of pure wine, passionately entreating all who approached to give it him and enable him to satiate this deadly craving— I say deadly, for if any one had gratified this request he would not only have exasperated the fever, but also have driven the unhappy man frantic. Thereupon, professional skill being baffled, and at the end of its resources and utterly thrown away, stratagem stepped in and displayed its power in the way which I will now relate. For the physician took an earthen cup brought straight out of the furnace, and having steeped it in wine, then drew it out empty, filled it with water, and, having ordered the chamber where the sick man lay to be darkened with curtains that the light might not reveal the trick, he gave it him to drink, pretending that it was filled with undiluted wine. And the man, before he had taken it in his hands, being deceived by the smell, did not wait to examine what was given him, but convinced by the odor, and deceived by the darkness, eagerly gulped down the draught, and being satiated with it immediately shook off the feeling of suffocation and escaped the imminent peril. Do you see the advantage of deceit?

No, it is not the Bible. But where there is ambiguity in the Biblical text, that is where the Church's guidance is the most important.

As a side note:
It should also be remembered that "false witness" does not necessarily mean lying. Half-truths and gossip can be particularly destructive. Imagine someone saying of St. Paul, as he entered a new town, "This man has persecuted us. He has done much to damage the Church and should not be trusted." Technically, whoever said that would be right. Paul even gave tacit endorsement of murder. BUT, he had reformed. The first two parts of the statement were 100% true, and the third part was completely subjective. Yet, that "truth" would be destructive and demonstrate a complete lack of charity.
Comment: Not one of those passages indicates that God was *pleased* with the lie. God was pleased with the midwives because they refused to murder innocents, not because they lied to cover it up. Like David Abraham lied to save his own skin and said that Sarah was his sister. It was cowardly, it showed a lack of faith in God's ability to protect him, and the result was a threat of a curse from God upon Abimelech. Just because the heroes of the faith lied and got away with it does not mean God condones it.
Comment: @DavidStratton: There's also no evidence in those verses that I see that God condemned their behavior. And given that the commandment is not to bear false witness, and not to "tell the truth, the whole truth, and nothing but the truth," I think there's still a burden of proof on anyone who says lying is always wrong.
Comment: @DavidStratton That is a hard sell. The passage about the midwives is particularly difficult for the, "you must never lie" crowd. Where else in the Bible can you find someone who is so completely rewarded for doing something which was so clearly against divine law?
Comment: @DavidStratton That's why the first sentence says that the answer is "sort of". It says a class of action which is wrong, and then it gives several counter-examples which clarify that it is not absolutely, "no lying."
Comment: That's fine, but the question still asks "what does the Bible have to say?", not "What can we imply?" perhaps a better, Mora accurate than this OR my answer would be "It doesn't specifically answer white lies." I just get so sick of seeing that answer here because we're so afraid of offending anyone.
Comment: @cwallenpoole, How will we respond to David's update on "lesser of two evils" http://christianity.stackexchange.com/a/6057/102 ?
Answer:
Proverbs 6:16-19 These six things doth the LORD hate: yea, seven are an abomination unto him: A proud look, a lying tongue, and
  hands that shed innocent blood, An heart that deviseth wicked
  imaginations, feet that be swift in running to mischief, A false
  witness that speaketh lies, and he that soweth discord among brethren.

There's no Biblical distinction between little or big lies.  Nowhere in Scripture does it distinguish between types of lies.  That's a human construct based on the idea that the ends justify the means. A white lie is a lie.
There's an article here that goes into depth, but in short, a lie is a lie is a lie.
However, I will agree that there is often a need to choose between the lesser of two evils.  I have difficulty with this because of James 2:10 (KJV)

For whosoever shall keep the whole law, and yet offend in one point,
  he is guilty of all.

However, we don't live in a perfect world, and I understand that sometimes we need to choose between two evils out of necessity.  We may need to lie to save a life, as some of the other answers point out.
I would argue, however, that those examples are not within the scope of the question.  The question asks about "white lies" which are understood as small lies that have no consequence and are often used to spare someone's feelings or avoid unnecessary conflict.

Answers to "Does this dress make me look fat?" or if I were to ask "Am I really that ugly?"  would qualify as situations where a white lie would be the usual answer.
Telling a Nazi soldier that there are no Jews hidden in your attic is not a white lie, but a deliberate choice between the lesser of two evils.

If I were in this situation, I'd lie, too, and my prayer after the fact (and even before) would be something like  "Forgive me, father for the lie.  I know it's against your word to lie, but it's also in your word to love, and to protect life.  I'm doing my best to choose between the lesser of the evils.  Please forgive me for the lie."

Lying to save your own skin never qualifies as a "white lie" either.
Comment: I gave some of the other answers and comments s a lot of thought over the last few days and modified this.
Comment: If you look at the case of bad situations the Bible definitely allows us to tell Nazis that there are no Jews in the house. 2 Samuel 15:34 The wise Hushai told a lie to protect a state secret and was never condemned. That said if your heart convicts you it is sin. I go so far to say it would be a sin not to lie to nazis but thats my heart. James 4:17
Answer: Ananias and Sapphira were killed for telling a "white lie." They sold a piece of land and told everyone that they were giving all the money to the church. However, they actually kept back some. Peter says they were punished not for keeping their money, but for for lying about it.

Acts 5:1-11 But a man named Ananias, with his wife Sapphira, sold a piece of property, and with his wife's knowledge he kept back for himself some of the proceeds and brought only a part of it and laid it at the apostles' feet. But Peter said, "Ananias, why has Satan filled your heart to lie to the Holy Spirit and to keep back for yourself part of the proceeds of the land? While it remained unsold, did it not remain your own? And after it was sold, was it not at your disposal? Why is it that you have contrived this deed in your heart? You have not lied to man but to God." When Ananias heard these words, he fell down and breathed his last. And great fear came upon all who heard of it. The young men rose and wrapped him up and carried him out and buried him. After an interval of about three hours his wife came in, not knowing what had happened. And Peter said to her, "Tell me whether you sold the land for so much." And she said, "Yes, for so much." But Peter said to her, "How is it that you have agreed together to test the Spirit of the Lord? Behold, the feet of those who have buried your husband are at the door, and they will carry you out." Immediately she fell down at his feet and breathed her last. When the young men came in they found her dead, and they carried her out and buried her beside her husband. And great fear came upon the whole church and upon all who heard of these things.
Comment: How do you know that Ananias didn't actually say he sold it for the amount he gave? After all, Peter asked the question of his wife, and it is clear she did.
Answer: The Bible speaks to lies in the 9th Commandment:

You shall not bear false witness against your neighbor.

If a lie is a "false witness" (which it certainly is), then it is forbidden.
Jesus called Himself "the Truth", and as CHRISTIANS, we are to be emulating Christ in everything we do.
Comment: What is your justification that lying is certainly bearing false witness?  My understanding is that the phrasing to "bear false witness" is legal terminology in the original language (it sure sounds that way in English, too), which seems to make the context both broader and narrower than strictly "lying."  That is to say, it is possible to bear false witness without telling a "lie"--and the more relevant point, I think it is also possible to lie without "bearing false witness."
Comment: False witness is a specific legal term. See more about it [here](http://en.wikipedia.org/wiki/You_shall_not_bear_false_witness_against_your_neighbor), but in short, that commandment says nothing about lying to protect yourself, or pathological lying, or lying to keep a birthday party a surprise, etc.  It is specifically talking about lying in court, to convict someone unjustly, or to let someone off unjustly. (Please note I'm not advocating self-preserving lying or pathological lying; a strong case can still be made against those from a Biblical standpoint; just not based on that partverse.)
Comment: @Flimzy - how is a lie *not* bearing a false witness? It is a falsehood.
Comment: This answer equates lying with bearing false witness, but that can't be true if Rehab is commended as righteous in lying to protect the spies.
Comment: @BenMordecai - God can use anyone, whether fully trusting Him or not, to accomplish His purpose. There was no way when she told the government officials who came to ask her about the spies that her 'testimony' was *not* a 'false witness'. Additionally, to fully qute her entry in "The Hall of Faith": "By faith Rahab the prostitute did not perish with those who were disobedient, because she had given a friendly welcome to the spies." She is *not* commended for lying - she is commended for welcoming them to Jericho peacefully.
Answer: Lying is characteristically condemned in general, but in a few rare specific cases it's actually the right thing to do. A notable example is when Rehab directly lied to her people for the protection of the Jewish spies.
The morality of her lie was never even questioned. The Bible commends her as trusting God.
This fits very well with Jesus' explanation that the law and the prophets are fulfilled in the command to love the Lord with all your heart and your neighbor as yourself.
It is exceedingly rare that telling a lie is loving to your neighbor and proceeds from a heart that isn't being self-serving, but it can happen and at that point it is appropriate to lie.
This is a perfect example of the distinction between the letter of the law and the spirit of the law.
In Islam, for example, charging interest is completely prohibited. The spirit of that law is to prevent usury, which abuses the poor who might take a loan in desperation only to find themselves enslaved by it to a merciless lender. Yet because of the nature of law in Islam, regardless of the spirit of the law, there is no interest allowed, period. It neglects the fact that loans can be a mutually beneficial and necessary arrangement to fund business transactions or allow a person to buy a house with enough time to actually live in it. Muslims had to invent an entire banking system that relies on shareholding rather than interest in order to be compliant with the laws of Islam.
Christianity is completely different. Jesus regularly violated the letter of the law regarding the Sabbath, but never once violated the spirit of it. Jesus regularly made himself unclean by kosher and temple standards through his interaction with people with skin diseases, adulterers, and so on, but never violated the spirit of cleanliness. His "uncleanliness" was to make many clean!
By extension, this means that there will be places where lying must or should occur, and even places where lying is simply inconsequential. For example, actors must "lie" by profession as a part of getting into character who will say things they don't mean or believe, yet acting is a morally neutral event. You can take pedantic views of lying out to the nth degree. What about getting an answer wrong on a test and incidentally saying something false? What about saying something that is true at one level of precision but false at another, like "I live 5 miles away" when you really live 4.9685744834 miles away? Let's get more ridiculous! That distance is constantly changing on a quantum level. It's actually a logical impossibility to create an air-tight falsehood-free statement in every scenario. By this point I hope I've reduced that idea to absurdity.
So to bring it all back together,

Never speaking falsehood will necessarily be impossible at some level
The Bible explicitly states that the spirit of the law trumps the letter
Jesus himself, who is sinless, violated the letter of the law in some cases
The Bible affords specific examples of people who knew they were lying and in their case it was not sin, but actually righteous.
The laws of God must be interpreted in light Jesus' teaching that the law is summarized in loving God and neighbor.

Thus the conclusion is: Lying is permitted when it actually serves to love God and neighbor, which is very rare. Additionally, if the falsehood was spoken in good faith without intention to deceive it's probably not sin either.
Ultimately, this is detailed for the sake of answering the question, but on a practical basis, the average believer probably would be best served by seeking the grace rid themselves of uncontroversially sinful dishonesty, and confessing and receiving forgiveness for those instances when they do sin.
Answer: Actually, there is nothing like white lies. 'lie' is 'lie'. Or do you want to say that white lies are small lies. The bible says ' do not lie'; it didn't say 'do not lie big lies/small lies'. No matter how big or small it is, it is still a lie. The hell those who lie a big lie will go that is the same hell those who lie a small lie will go. If you want to say about actors who lie in a movie, watch out, they do not end well in the movie and their secrets exposed.
Comment: Welcome to the site! I agree with this answer, but it would be better if you could expand it a bit, and provide supporting doctrinal or Biblical statements.  See [What makes a good supported answer?](http://meta.christianity.stackexchange.com/questions/692/what-makes-a-good-supported-answer).
Answer: This is what Jesus had to say on the matter:

John 8:44 "You are of your father the devil, and your will is to do your father's desires. He was a murderer from the beginning, and does not stand in the truth, because there is no truth in him. When he lies, he speaks out of his own character, for he is a liar and the father of lies."

We cannot say that we are acting in accordance to God's will when we act in accordance to the nature of the devil, the "father of lies". As others have already pointed out, there is no such thing in the Bible as a "white lie", and  Jesus commands our "yes" to be "yes" and "no" to be "no". Since a "white" lie is still a lie, and the Bible condemns lying, and specifically, liars:

Revelation 21:8 "But the cowardly, unbelieving, abominable, murderers, sexually immoral, sorcerers, idolaters, and all liars shall have their part in the lake which burns with fire and brimstone, which is the second death."

we cannot say that it is OK to lie.
Also, in case it was not immediately evident, no Christian has a "part in the lake which burns with fire and brimstone", no Christian will experience the second death,

John 11:25 Jesus said to her, "I am the resurrection and the life. He who believes in Me, though he may die, he shall live. 26 And whoever lives and believes in Me shall never die. Do you believe this?"

so therefore a Christian cannot also be a liar. A person who goes around telling lies, or even approving of the practice is by the above not a Christian. Diminishing the gravity of the sin of lying by saying there is such a thing as "white lies" is finding an excuse for sin, and certainly not a practice condoned by God either.
The examples above of certain lies not having been condemned are misleading. Many actions in the Bible do not receive an immediate notice of condemnation, because it is not necessary for the Bible to say "Rahab/Abraham/etc lied, and that is a bad thing, even though it was for a good reason and the result was good". The Bible is clear in other places in saying that lying is not good, and we should not argue otherwise from silence.
Hope that helps.
Answer: As a person working in a social services field I must say that most people lie to themselves. They live in denial or a false perception of themselves or others. So what is a lie? I think we need to be real careful. It is often said lying to protect Jews from Nazi's was acceptable yet we frown upon a parent lying on a resume to keep her kids fed and the rent paid. We all know good lies from bad lies. Bad lies are a betrayal they are personal. Good lies protect others. I believe the Hebrew meaning of lie is betrayal, to fail, to deceive. Our hearts will tell us if we are doing right or wrong. God's love for us is bigger than any lie you could ever tell,even the lies you tell yourself.
Comment: Hi, and welcome! When you get a chance, check out the [about us] page and read up on [what makes us special]( http://meta.christianity.stackexchange.com/a/1809/4188).

Does the Bible condemn white lies?


I bought Minecraft PE on kindle and want to play on ipad?

Question: I bought Minecraft PE on kindle and want to play on ipad? Can this be done or do i have to re-buy?
Many thanks!
Answer: You'll have to re-buy it if you want to obtain it legitimately. Same with buying an app on Android then wanting the same app on an iDevice
Answer: No, you can't share or transfer an app purchase from your Kindle or other Android device to your iPad, or vice versa.  There are some exceptions for in-app purchases (like comic book apps), but generally, purchases from one marketplace will not transfer to a device on another marketplace.  This is the case for MCPE.
Answer: I believe you bought the game from Amazon Appstore, but they do not develop and publish the iOS version, since this is against Apple's policy/EULA. So if you want your Minecraft PE Version on your iPad, you need to rebuy it from Apple's official App Store.


How is the night defined?

Question: The word night occurs in many hadith, but what exactly is night time relative to the Prophet's time?

a) Sunset to Sunrise
b) Isha to Fajr
c) Isha to Sunrise
d) Sunset to Fajr
Answer:
By the sun and its brightness
And the moon when it follows it
And the day when it displays it
And the night when it covers it
Surat al-Shams 1-4

During the time of the prophet, as was also the case in the Hebrew world and in pre-Islamic Arabia, the day was not calculated as a twenty-four hour period starting at midnight (as our current system of time does).  Rather, each day would marked at sunset, and would consist of two parts, starting with "Night" (ليل) and proceeding to "Day" (نهار).
The Qur'an itself does not define "night" clearly; while there are many references associating "day" with the sun and brightness and associating "night" with darkness and concealment, the exact delineation between the two is not so precise.  In fact, according to the classical text الجامع لأحكام القرآن, Imam Qurtubi claims that God alone knows the exact measure of night, based on the revelation in Surat Al-Muzzammil that "Allah determines the night and the day" (الله يقدر الليل والنهار).
According to Lane's Lexicon, ليل and نهار are opposites, with no intervening period between them.  Day, being defined as "the time from the rising of the dawn to sunset", would thus perfectly complement night, which would by extension be defined as the time from sunset to the rising of the dawn (i.e. sunset to Fajr).  Similarly, Brill's Encyclopedia of the Qur'an  considers the night to include everything from the "evening twilight" (شفق) until "the breaking of morning" (سحر), which immediately precedes the dawn (فلق) itself.
Surat al-Baqarah regulates the nights of fasting until "the white thread of dawn is distinct from the black thread" (يتبين لكم الخيط الأبيض من الخيط الأسود من الفجر), which correlates strongly with the above definitions.
It is important to note that, colloquially, the word ليل (night) can also be overloaded in a similar manner to the English "day", wherein it can be used to refer to an entire 24-hour period (more accurately, an entire period from sunset to sunset) rather than the night-time in particular.  The intended meaning is usually clear in context, especially when ليل is used in a pluralized form, but this too needs to be kept in mind.
While there has been significant scholarly interest in the exact definitions of night and day, especially in regards to the transitory periods of twilight and dawn, much of this research was not conducted until significantly after the death of the prophet himself.  As such, any references to "night" in the hadith literature were not necessarily (or likely) using the the term in any scientifically precise manner.
Answer: According to Muhammad al-Baqir --peace be upon him-- during a debate with a Christian scholar (see here), there is a period of time that neither is considered within day and nor night. But this time is a time from the heavens, Dua is accepted during such times and more, and this occurs between Fajr and Sunrise.
So that means that days are from sunrise to sunset. That is, when the sun is fully formed or at least part of it is viewable in the sky; nights are from Sunset to Fajr. Isha is when night has been settled and the Night of Qadr according to Quran [97:5] is until Fajr.
PS. I couldn't find the original debate's text apparently recorded in (تفسير جامع، ج1، ص412 ـ مفاخر الولايه، كاظميني بروجردي ص 189), but as much as I could remember the same was also true about the interval between Sunset (Qorub) and Maqrib (about half an hour after Sunset). So that I hope someone can find the original text and improve this answer.
Answer: Night (الليل) is defined as the time from sunset to either dawn or sunrise.
Ref:

الليل والليلاة: من مغرب الشمس إلى طلوع الفجر الصادق أو الشمس

Qamoos al-Muheet, Misbaah al-Muneer , Qawā'id al-fiqh
Answer: There is a huge conflict when it comes to the word "night" in terms of breaking fast in Ramadan. Quran 2:187 states "and seek what God has ordained for you, and eat and drink until the white streak of dawn can be distinguished from the black streak. Then complete the fast until nightfall."
Quran states "Fajr" as Sunrise but unlike the precise definition of sun visible in the sky, both Quran and science considers sun on the horizon as Fajr/Sunrise. Fajr prayer ends before the sun starts clearing the dark sky. Similarly "Lail/night" in Quran and science is sun below the horizon i.e. Maghrib/Sunset. The darkness of the sky is not "night" but a part of the night that begins when the sun sets. Hence the parallel ends of the fasting in Ramadan is pretty obvious, sun on the horizon marking the day's beginning and beginning of the night. Colors of the sky changing during night are exactly like the day. The color can vary but the basic concept is the sun above or below the horizon defining day and night.
Breaking fast is pretty simple once you understand the beginning of day till the beginning of the night i.e. the white streak of dawn is Fajr/Sunrise and setting of the sun is night time. If night was precisely considered the darkest hour then fast would be ending at Isha time when night has set in completely. Bottom line is the deep logic that the start of the fast is exactly parallel to end of the fast.
Also a huge factor in darkness of the sky is weather. On a rainy or snowy day, darkness will cover quickly the sky quickly and will create confusion among people. Thereby creating almost a separate time to break fast for each individual who will follow his own instinct as to when sky feels dark enough to be night. To be uniform and united, fasting will be between sunrise to sunset which is Adhan-e-Fajr to Adhan-e-Maghrib.
May Allah guide us all.
Answer: To explain "night" in the light of Quran, here are the verses that explain the different stages of night and its darkness making after sunset, beginning of the night.
And a sign for them is the night. We remove from it [the light of] day, so they are [left] in darkness.(Surah Ya Sin, 37-40) And the sun runs towards its destination. Such is the design of the Almighty, the All-Knowing.  And the moon: We have disposed it in phases, until it returns like the old twig. The sun is not to overtake the moon, nor is the night to outpace the day. Each floats in an orbit.
He created the heavens and the earth in true (proportions): He makes the Night overlap the Day, and the Day overlap the Night: He has subjected the sun and the moon (to His law): Each one follows a course for a time appointed. Is not He the Exalted in Power - He Who forgives again and again? (Surah Az-Zumar, 5)
Among His Sings are the Night and the Day, and the Sun and the Moon. Adore not the sun and the moon, but adore Allah, Who created them, if it is Him ye wish to serve. (Surah Fussilat, 37)
And in the alternation of Night and Day, and the fact that Allah sends down Sustenance from the sky, and revives therewith the earth after its death, and in the change of the winds,- are Signs for those that are wise. (Surah Al-Jathiyya, 5)
By the Night as it conceals (the light); (Surah Al-Layl, 1)
And for part of the night also praise thou Him,- and at the retreat of the stars! (Surah At-Tur, 49)
Stand (to prayer) by night, but not all night,- (Surah Al-Muzzammil, 2)
He merges Night into Day, and He merges Day into Night; and He has full knowledge of the secrets of (all) hearts. (Surah Al-Hadid, 6)
Behold! in the creation of the heavens and the earth, and the alternation of night and day,- there are indeed Signs for men of understanding,- (Surah Al-Imran, 190)
Your Guardian-Lord is Allah, Who created the heavens and the earth in six days, and is firmly established on the throne (of authority): He draweth the night as a veil o'er the day, each seeking the other in rapid succession: He created the sun, the moon, and the stars, (all) governed by laws under His command.s it not His to create and to govern? Blessed be Allah, the Cherisher and Sustainer of the worlds! (Surah Al-Araf, 54)
But those who have earned evil will have a reward of like evil: ignominy will cover their (faces): No defender will they have from (the wrath of) Allah.Their faces will be covered, as it were, with pieces from the depth of the darkness of night: they are companions of the Fire: they will abide therein (for aye)! (Surah Yunus, 27)
And establish regular prayers at the two ends of the day and at the approaches of the night: For those things, that are good remove those that are evil: Be that the word of remembrance to those who remember (their Lord): (Surah Hud, 114)
Indeed, your Lord knows, [O Muhammad], that you stand [in prayer] almost two thirds of the night or half of it or a third of it, and [so do] a group of those with you. And Allah determines [the extent of] the night and the day. He has known that you [Muslims] will not be able to do it and has turned to you in forgiveness, so recite what is easy [for you] of the Qur'an. He has known that there will be among you those who are ill and others traveling throughout the land seeking [something] of the bounty of Allah and others fighting for the cause of Allah . So recite what is easy from it and establish prayer and give zakah and loan Allah a goodly loan. And whatever good you put forward for yourselves - you will find it with Allah . It is better and greater in reward. And seek forgiveness of Allah . Indeed, Allah is Forgiving and Merciful.(Surah Al-Muzzammil, 20)
And it is He who spread out the earth, and set thereon mountains standing firm and (flowing) rivers: and fruit of every kind He made in pairs, two and two: He draweth the night as a veil o'er the Day.Behold, verily in these things there are signs for those who consider! (Surah Ar-Rad, 3)
And He hath made subject to you the sun and the moon, both diligently pursuing their courses; and the night and the day hath he (also) made subject to you. (Surah İbrahim, 33)
He has made subject to you the Night and the Day; the sun and the moon; and the stars are in subjection by His Command: verily in this are Signs for men who are wise. (Surah An-Nahl, 12)
We have made the Night and the Day as two (of Our) Signs: the Sign of the Night have We obscured, while the Sign of the Day We have made to enlighten you; that ye may seek bounty from your Lord, and that ye may know the number and count of the years: all things have We explained in detail. (Surah Al-Isra, 12)
"Perform As Salaat (Iqamaat as Salaat) from mid day till the darkness of the night (i.e. the Zuhr, 'Asr, Maghrib, and 'Ishaa' prayers), and recite the Qur'aan in the early dawn (i.e. the — Fajr morning prayer). Verily, the recitation of the Qur'aan in the early dawn (i.e. the morning — Fajr prayer) is ever witnessed (attended by the angels in charge of mankind of the day and the night)" (Surah Al-Isra, 78)
And pray in the small watches of the morning: (it would be) an additional prayer (or spiritual profit) for thee: soon will thy Lord raise thee to a Station of Praise and Glory! (Surah Al-Isra, 79)
Therefore be patient with what they say, and celebrate (constantly) the praises of thy Lord, before the rising of the sun, and before its setting; yea, celebrate them for part of the hours of the night, and at the sides of the day: that thou mayest have (spiritual) joy. (Surah Ta Ha, 130)
It is He Who created the Night and the Day, and the sun and the moon: all (the celestial bodies) swim along, each in its rounded course. (Surah Al-Anbiya, 33)
It is He Who gives life and death, and to Him (is due) the alternation of Night and Day: will ye not then understand? (Surah Al-Muminun, 80)
It is Allah Who alternates the Night and the Day: verily in these things is an instructive example for those who have vision! (Surah An-Nur, 44)
And it is He Who made the Night and the Day to follow each other: for such as have the will to celebrate His praises or to show their gratitude. (Surah Al-Furqan, 62)
Please, click the following site for the full list of each verse mentioning day and light in Quran: https://www.quranindex.net/kelime.php?id=8511

How is the night defined?


Best Way To Improve Davinci Resolve 12 Playback Speed?

Question: I run a 2011 MacBook Pro, and it can barely handle Davinci Resolve 12. The biggest problem I have is playback. Playback is very laggy for me, and that is a problem because I need cut and sync clips with the music. Is there a way I can improve the playback speed in Davinci Resolve 12?
Comment: Are you working with RAW files?  I have a [very strong](https://i.imgur.com/BY2HtvB.png) 2014 MBP, but even it still offers glitchy playback.  I don't have an issue with this though, as I'm only doing color correcting/grading and then exporting to Premiere Pro to edit.  If you are having issues trying to edit with your RAW files, I would do the color work first, export your RAW files to a more workable format, then edit with those clips instead.
Comment: @Manly I'm mostly using .mov and .mp4 files, nothing too big. None of them are bigger than 1080p. I also do all the editing in Davinci Resolve, not just the color correction.
Answer: Try generating optimized media (i.e. proxy files). Optimized Media is a nice feature that will allow you to playback, edit and grade video files that are optimized for smooth playback, but Resolve will still render from the original video files when you are ready to deliver.
Head over the Media tab and right click on the file(s) you want to optimize, and select "Generate Optimized Media". This may take a little while to run, so grab a coffee while you wait.
You can choose what compression format to use as optimized media (ProRes, DNxHD, etc) by opening Project Settings > General Options.
Here's a nice video tutorial that will walk you through it in more detail:
Comment: MichaelLiebman updated :)
Comment: In case the video becomes unavailable, could you summarize its content for future readers?


How to toggle between different monitors with one key on Windows 7?

Question: I recently found a post on switching between different sound cards with one key stroke (the answer I ended up using is Default Audio Changer). I am looking for similar functionality for switching between monitors. Win+P is not good enough, as it loops between four choices: Computer | Duplicate | Extend | Projector, and I want to toggle only between two monitors. It also takes at least four key strokes to toggle.
Answer: I'd solve this problem with a combination of Nirsoft's MultiMonitorTool and Chris Mallet's AutoHotkey. The former can accept command-line options to specify which monitor(s) to enable and disable; the latter offers a scripting language in which you can bind arbitrary actions, such as calling an executable with a given set of command-line options, to arbitrary keystrokes. (It's not what I would call a good scripting language, but when the alternative interface to the functionality involves writing Visual Basic script that's even hairier...)
Both are free, and neither is heavyweight; the only overhead involved is in keeping an AutoHotkey script running to catch the keystrokes you've bound to change monitor settings, but that lives in the system tray and idles any time it's not dealing with the specific keystrokes it knows about. Add it to Start Menu\Programs\Startup so it runs when you log in, and that should be all you need.
Answer: There isn't a windows built-in for this as far as I know, but if you have multiple monitors, I strongly recommend that you install UltraMon. It has support for (among many other things) creating custom profiles for display configurations (enable/disable monitors, setup resolutions, refresh rates, layouts and such), and then you can hotkey those profiles or make shortcut icons to click or whatever other method you like for invoking them.
Comment: I am trying to save 3 key strokes. I will not pay a dime for it. It's like, if you get a bazooka you'll be able to kill flies, too.
Answer: Windows key + Shift + Left key (or right key) if you only have 2 monitors it won't matter thou. If you have 3 or 4, then it will move the active window to the left (or right window)
Alternatively, you can try running the following from the RUN menu (Windows + R)
DisplaySwitch.exe
Comment: Could get `Windows key + Shift + Left key (or right key)` to move any windows in Win 1809. Might be this setup.
Answer: For anyone else who is looking for help with this, this worked perfectly for me on Windows 10 v2004 build 19041.508.
Keyboard shortcut for display profiles

DaveM121 Independent Advisor Replied on October 27, 2018 Hi Ze
In Windows 10 that is usually accessed by pressing Windows Key + P and
choose Extend or Duplicate
You could put a new shortcut on your Desktop (right click your
Desktop, choose New - Shortcut) and add the appropriate string in the
location box to perform the switch
For Duplicate:
%windir%\System32\DisplaySwitch.exe /clone
For Extend:
%windir%\System32\DisplaySwitch.exe /extend
For the PC screen only:
%windir%\System32\DisplaySwitch.exe /internal
For Second screen only:
%windir%\System32\DisplaySwitch.exe /external
Answer: Depending on the Video card and driver you should be able to do this with your Graphics UI; I know for example you can with nVidea you can set/save profiles; monitors and settings along with hotkeys.
You will want to check first that you have the latest driver installed with nVidea you open up 'nview properties' or the 'nvidia control panel' but I prefer the properties UI for most functions; if you save a profile with the settings you wish then: "Enable nView option in the Windows desktop right-click menu" option which is found in the General section under User Interface tab.
This will allow you to right click your active desktop and select your profile from that menu making switching back and forth literally as easy as the click of a button... or your mouse in this case!
Please note these 'instructions' are based on my software version and experience you may have to tweak yours to have it function according to your needs; also nVidia has a tab aptly named "Hot Keys" which you should benefit from.
Not much help for Radeon but their menues/options are similar goodluck hope that helps.
Comment: This doesn't fit the bill. Need to toggle with between two monitors with one key, without making any assumptions about the video card type. If this cannot be done generically in W7, then a script or simple utility program would do.
Answer: I wish I could tell you how to do it, because I frequently seem to turn something on that does this for me when I don't want it.  if I hit the #1 key, it turns it on and then when I hit the #2 key, the active window goes from 1 to 2.  Or if I'm on the 2nd display, hitting the #1 key moves it over.  I want to turn this off as it is driving me crazy.  My window has changed every time I typed either of those numbers in this post.  Any suggestions would be greatly appreciate!  I'm on windows 7 with an nvidia card.  I just found out that hitting the @ sign also moved the window.  So does hitting the ! key.
Answer: I was having the same problem as the person above.  I found that the way to make it go away was to hit the control button once and it stopped.  As to the primary question.  At least on my system (w7) I have a thing on the hidden icons box called super utility - this allows one to set up simple hot keys to swap active windows.  Hope this helps.
Answer: Alt + Tab switches the applications.
If applications are on différent monitors it has the same affect as switching the monitors.


Antminer 22nm or 14nm?

Question: I currently have two offers for buying antminer s9. One with a 22nm chip and the other with 14nm. Can somebody give be the pros and cons for both, because i understand that the power consumption would be bigger with the 22nm, but will that mean that i will be mining less than the 14th/s -+ 5% ? or will the electricity be only different. Hoping to have a good response and answer from you, thanks.
Answer: 14nm will hash more with the same power consumption of a 22nm assuming your basing it on power only. But if both were 1/ths the 14nm would save more electricity. Obviously the 14nm would cost more as its newer tech. You'd have to weigh your electric cost vs hashing power.
Comment: I think the question is whether they have the same maximum hash rate, regardless of power consumed.
Comment: both actually. All other comparisons are the same, i think that probably the 22nm use more electricity /but to what extend is the question? And probably the risk of getting hotter and thus frieing some part and wrecking the miner is bigger, but it all depends on the care i take of it. Still both say are 14th/s, i think that the one with 22nm will probably go 11,5+ and consume around 1500kw but is this the case or im in the wrong direction. My main reason to know is that i can get one for 2300 usd and the other at 700 like i said all aspects are the same except the use of the chip.

Antminer 22nm or 14nm?


Saying goodbye to a store clerk

Question: Many times I find myself saying thanks to a store clerk, flowed by their saying thank you very much. I am used to walking away saying bye or have a nice day, but am not sure what the equivalent is. What is the proper phrase for someone I don't know but a polite have a nice day. If this isn't common to do that is also good to know.
Answer: It isn't common, especially in those mass selling stores. Not I'm highly introvert, but most Japanese don't say anything, or just nod a little (which is a slightest form of bowing).
Of course, they do usual greetings as friends when the clerk and the customer have personal acquaintance (which is pretty often in my neighborhood store), but in most cases, the Japanese in-store conversation is the clerk unidirectionally greets the customer.
However, if you'd like to say something in response to clerk's ありがとうございました,

どうも, こちらこそ

should not sound very weird, or in restaurants,

ごちそうさまでした

makes you polite.
In some one-man managed small shops or boutiques, you might feel the real necessity to say a word like:

さようなら, また来ます, またよろしくお願いします etc.

but in my opinion this sort is nothing but general social conversation.
Answer: To give you an idea of what is normal in case you are not familiar,it's kind of strange if the customer doesn't know the clerk personally and still responds in an extra friendly manner. (which includes saying something like "have a nice day")

Saying goodbye to a store clerk


Famous people API

Question: I'm looking for an API for retrieving data about famous people, and most preferably to retrieve info about inspirational famous women in the last 100 years. Can you please tell me where to start looking? Is there any good REST API that I can use??
Comment: Please [edit] your question and add some more **actual** information about the definitions of *famous*  and (especially) *info*. And does it have to be free?
Comment: I once ran down this rabbit hole trying to see if 2016 was a particularly deadly year for celebrities (it doesn't appear to be), and decided that any person listed in Wikipedia (and thus wikidata) is famous by Wikipedia's inclusion criteria. It's far from perfect, but that's where I'd start.
Answer: You will need a way of measuring fame, but wikidata will probably be a good resource for you.
Here are women who could have been alive in the last one hundred years, who have the most Wikimedia articles about them (across all the different language Wikipedias, Wikiquotes, etc), and who have pages about them on English WikiQuote.
http://tinyurl.com/y9vrw835
<code>SELECT ?person ?name ?linkcount ?wikipedia_article
WHERE
{
  ?person wdt:P31 wd:Q5 ;   # human
     wdt:P21 wd:Q6581072 ;  # gender: female
     wdt:P569 ?born .
  FILTER (?born >= "1820-01-01T00:00:00Z"^^xsd:dateTime) .
  ?person wikibase:sitelinks ?linkcount .
  FILTER (?linkcount > 50) .
  ?person rdfs:label ?name FILTER(lang(?name)="en").
  ?wikipedia_article schema:about ?person .
  ?wikipedia_article schema:isPartOf <https://en.wikiquote.org/> .
}
ORDER BY DESC(?linkcount)
LIMIT 100
</code>

Famous people API


How to Download iTunes in Ubuntu

Question: How to Download iTunes in Ubuntu
Comment: Me thinks that downloading itunes isn't the real problem here.
Answer: Short answer:
http://www.ehow.com/how_5197743_download-itunes-linux-ubuntu.html
Longer answer:
You can follow the above steps, but it's a path that is fraught with pain and half-working features.  iTunes simply isn't going to work well in Wine (and therefore Ubuntu).  This is doubtful to ever change.
You may want to ask yourself why you're doing this.  Are you looking for something to play music?  If so, Ubuntu ships with Banshee and Rhythmbox, both of which can manage your collection and play most file formats.  Are you trying to play back songs purchased in iTunes store?  In which case if they're older protected songs you'll need to break the DRM and violate the DMCA.  Are you trying to sync your iPhone or iTouch? Well, then you may be in some serious trouble.  Even with a virtual machine it only kinda works.  Are you trying to sync an iPod?  In that case, Banshee and Rhythmbox both can do it for you.
Answer: The only thing you need iTunes for is the Itunes Music Store, and newer iPhones / iPods; older devices have been supported by Rhythmbox, Banshee, and gPodder.
ITMS...that's not going to work anywhere Apple doesn't want it to--and that includes Ubuntu.
Ubuntu is awesome; I run it exclusively at home--but I don't have any unrealistic expectations that everything will 'just work'. Everything will just work if everyone involved wants it to.
If you have a newer iPod/iPhone, the only thing you can really do is complain to Apple; they're the ones that encrypted the iTunesDB.
Answer: I've read that iTunes will work completely if you use a different approach: Don't install it inside WINE, but instead use VirtualBox in Linux. VirtualBox lets you run MS Windows inside a window on your Linux, and then you can install iTunes on that (virtual) Windows installation.
I'll dig up some details and reply.

How to Download iTunes in Ubuntu


How do institutions like banks do RSA with big primes?

Question: When encrypting with RSA it is often infeasible to decrypt by just doing c^d mod n, because for example when using the primes $(p,q)=(12553,1233)$, which are small primes compared to those in used by banks, one would often choose the Fermat number $65537$ as public exponent $e$, then the private exponent $d$ is $4267793$, which is a huge number when used as an exponent. How do banks etc. decrypt their data when they choose primes for $p$ and $q$ which are 100s of digits?
Comment: They use computers which have no problems working with large numbers.
Comment: You reduce modulo n after each multiplication. You only need about 1000 squaring and 1000 multiplications (on 1000 bit numbers) when you use [square-and-multiply](http://en.wikipedia.org/wiki/Exponentiation_by_squaring) to compute the exponentiation. So the whole thing takes about 1ms total.
Comment: As an aside, banks probably don't use numbers much larger than most organizations, or even people. They're more cautious about things like key management, but exceptionally strong crypto is widely available these days; it's more of a matter of ensuring your protocols are properly secure instead of picking a insanely high (computational) security level.
Comment: Incidentally, 10^254 is around 2^850. An 850-bit RSA key is awful. It's borderline breakable now. 1024-bit keys are considered deprecated and barely secure; 2048-bit keys are normally used nowadays.
Comment: @fgrieu Sounds pretty close. I get 1.5 ms (660 signs/s) on my 32-bit, four-year-old Xeon, Xen VPS with `openssl speed rsa` (single-threaded). (13,100 verifies/s, or... 0.076 ms.)
Comment: `How do institutions like banks do RSA with big primes?` no differently than what your computer does every time it visits an HTTPS site.
Comment: Are you sure that's it? I mean, decrypting some data with a decryption key with 255 ciphers, seems rather extreme.
Comment: Do you mean 255 digits instead of 255 ciphers?
Comment: A computer can do a few billion multiplications per second. So them being able to multiply 1000 bit numbers quickly shouldn't be a big surprise. One 1000 bit multiplication takes ~1000 32 bit multiplications or ~250 64 bit multiplications. Not that much.
Comment: @CodesInChaos Well, lets say the bank's computer has to calculate (a^b) mod n. Where a is some number, could be 065066067, which is ASCII for ABC and b is their 255 digit long decryption key, lets just say it's 10^254, that means, they have to do 065066067*065066067*065066067... 10^254 times, if their computer's processor can do 5 billion multiplications per second, then it'd take (10^254)/(10^9) seconds, which is 3.2*10^237 years
Comment: @CodesInChaos: if you can performs 1000 squarings and 1000 multiplications modulo 1024-bit numbers in 1ms on any single standard CPU core, I want it, and that magic code! That's 500ns per mulmod, which each require 512 (or 392 for squaring) multiply-accumulate of 64-bit arguments with 128-bit accumulate, thus we are talking like 1ns per such multiply-accumulate including various overhead; that much better than I expect. I would see 1ms for 1024-bit RSA private operation as the right ballpark using the CRT and two cores, or dedicated hardware.
Comment: But notice that OpenSSL is pretty fast with regards to these kind of calculations. You may have much worse results on interpreted code (e.g. on the JVM), let alone interpreted code.
Answer: First of all to encrypt/decrypt data such institutions as banks use some block or stream ciphers for instance AES (Advanced Encryption Standard), which are very fast compared to RSA algorithm, hundreds times faster to process same amount of data. But block and stream ciphers use symmetric key (which is usually 128-256 bits random number, much smaller than RSA keys), it means that both parties A and B who exchange data encrypted with ciphers need to have same symmteric key and for that they need to share securely this key.
To exchange a symmetric key an asymmetric encryption is used. RSA is an example of an asymmetric encryption system. Most asymmetric encryption systems are much slower than symmetric ciphers, mostly due to usage of big numbers (as you mentioned) in computation.
So to exchange a shared symmetric key, used to encrypt large amount of data, we encrypt this key using RSA public key of recipient. Because only small key (e.g. 256 bits long) is encrypted using RSA, quite small amount of time (e.g. 0.5-1 second) is used for that. After that large symmetrically encrypted data and small asymmetrically (using RSA) encrypted key are send to recipient. On the recipient side the opposite is done - first the symmetric key is decrypted using RSA private key and second large data is decrypted using symmetric key with block or stream cipher like AES.
Also usually some integrity check is done, e.g. by using MAC (Message Authentication Code) - MAC is computed on sender side and checked on recipient side. Or instead of MAC a digital signature (using e.g. DSA, Digital Signature Algorithm) is create on sender's side using sender's private key and verified on recipient's side using sender's public key. MAC is an integrity check value created using symmetric algorithms (e.g. AES, 3DES), while digital signature is created using asymmetric algorithms (e.g. RSA or DSA).
To answer your question about large numbers - in order to compute those large exponents by some large modulus arbitrary length big numbers simulation is done with numbers having thousands of bits, i.e. around one thousand decimal digits. I'll give an example of how exponentiation can be computed in a quite fast way instead of straightforward multiplication (which can take forever). All the multiplications, additions, subtractions and divisions are simulated as a huge numbers arithmetic in the memory using algorithms similar to those that we studied at school to e.g. multiply or divide long numbers on paper. To do a fast exponentiation a technique called Exponentiation by Squaring is used. We will compute value of C = M^E (mod N). This algorithm is proportional to the number of bits in exponent E, i.e. does several big number operations (approximately two multiplies and two divisions) per each bit in number E, so if E is from 1024 to 2048 bits (these lengths are usual for RSA) then algo makes around 1024 to 2048 blocks of 2 to 4 arithmetic operations on big numbers. There are two main versions of that algorithm exist, one is iterating through bits of exponent left to right (MSB-first (Most Significant Bit first) order), another one is iterating right to left (LSB-first (Least Significant Bit first) order) (cited from here):
// LSB Binary Exponentiation Algorithm (scans exponent's E bits right to left)
// Input: Exponent: E of k bits, message M
// Output: Ciphertext: C = M^E (mod N)
C =1 ; S = M;
// Scan E's bits from LSB to MSB (right to left).
for i := 0 to k-1
  begin
    // Multiply by degree of M.
    if (E_i = 1) C = C * S (mod N);
    // Square degree of M.
    S = S * S (mod N);
  end;

// MSB Binary Exponentiation Algorithm (scans exponent's E bits left to right)
// Input: Exponent: E of k bits, message M
// Output: Ciphertext: C = M^E (mod N)
C = 1;
// Scan E's bits from MSB to LSB (left to right).
for i := k-1 downto 0 do
  begin
    // Square result.
    C = C * C (mod N);
    // Multiply by M if E's bit is set.
    if (E_i = 1) C = C * M (mod N);
  end;

Answer: The standard algorithm used for RSA encryption and decryption is exponentiation by squaring.
The basic idea is to write the exponent out in binary.  For example, for $d = 4267793$, $$\begin{aligned} 4267793 &=
10000010001111100010001_2 \\ &= 2^{22} + 2^{16} + 2^{12} + 2^{11} + 2^{10} + 2^9 + 2^8 + 2^4 + 2^0.\end{aligned}$$
Now, given some RSA ciphertext $c$, we can express the decryption operation $m = c^d$ as $$\begin{aligned} c^{4267793} &= c^{2^{22} + 2^{16} + 2^{12} + 2^{11} + 2^{10} + 2^9 + 2^8 + 2^4 + 2^0} \\ &=  c^{2^{22}} c^{2^{16}} c^{2^{12}} c^{2^{11}} c^{2^{10}} c^{2^9} c^{2^8} c^{2^4} c^{2^0}.\end{aligned}$$
(Here, all the multiplications and powers are taken modulo $n$, of course, but I'm not bothering to write that out explicitly.)  Thus, we just need to compute all those powers of $c$ (modulo $n$) and multiply them together (again modulo $n$, of course).
How do we do that?  Well, $c^{2^0} = c^1 = c$, of course, and $c^{2^1} = c^2 = c^1 \cdot c^1$.  Going further, we have $c^{2^2} = c^4 = c^2 \cdot c^2$, and $c^{2^3} = c^8 = c^4 \cdot c^4$, and so on.  In fact, we have the following general formula: $$c^{2^{k+1}} = c^{2^k} \cdot c^{2^k}.$$
Thus, we can start with $c^{2^0} = c$ and repeatedly square it (modulo $n$) to obtain $c^{2^k}$ for any $k$.
To compute $c^d = c^{4267793}$, we need to do this (at least) 22 times, to obtain all the powers up to $c^{2^{22}}$, and then multiply together those $c^{2^k}$ for which the $k$-th bit of $d = 4267793$ is $1$.  Thus, in total, we need to do up to $2 \cdot 22 = 44$ modular multiplications (actually fewer; but see below), much fewer than the $4267793$ multiplications we'd need for naïve exponentiation.
There are various optimizations that can reduce the number of multiplications needed even further; see e.g. the linked Wikipedia article for details.

Ps. One potential security issue with this method is that the number of multiplications needed depends on the private exponent $d$.  Under some circumstances, this could leak information about the private exponent to the attacker, if they can monitor the time needed for decryption (or signing).  In fact, in some scenarios, the attacker might even be able to monitor the power consumption of the device doing the decryption, which can potentially leak even more information about which specific bits of $d$ are set.
To avoid such side channel attacks, we can modify the algorithm to always perform the same number of multiplications regardless of $d$.  One such variant is Montgomery's ladder method, which always does two multiplications (one of which is a squaring) for each bit of $d$.
Answer: When calculating terms in the form of $a^e\bmod m$ most libraries for arbitrary sized integer calculations (e.g. Java's BigInteger) use a special algorithm instead of first doing the exponentiation and then doing the modulo (since storing the result of $a^e$ with 4096-bit keys would require more RAM than even todays biggest computers have).
So this is how Java does it when $a^e\bmod m$ is to be calculated (Pesudo-code):

If $e$ is negative, then return $(a^{-1}\bmod m)^{-e}\bmod m\;$, where $a^{-1}\bmod m$ is computed using Euclid's algorithm.
If $e = 1$ the exponentiation can be ignored and the simple modulo $a^\bmod m$ is calculated.
$s=1$
While $e\ne0$

if $e$ is odd, then let $s=s\cdot t\bmod m$
$e=\lfloor e/2\rfloor\;$ (bitshift to the right by 1)
$a = a\cdot a \bmod m$

$s$ is the result.
Comment: You never defined $t$...
Comment: Fair enough. However, it sounds like your algorithm will give the same output for $e=\mathtt{0b1000}$ and $e=\mathtt{0b1011}$. that is, I can't see anywhere why you use the actual values of $e$, rather than just it's bit-length
Comment: Sorry for this, $t=a$
Comment: I just transcribed the code for the method modPow of Javas BigInteger class as seen here: [link](http://developer.classpath.org/doc/java/math/BigInteger-source.html#line.1176)
Answer: A lot of them (or their HSM) rely on the Chinese Remainder Theorem to speed up computation for decryption and signing.
To quote Wikipedia:

The following values are precomputed and stored as part of the private
  key:

p and q: the primes from the key generation,
$d_P = d\text{ (mod }p - 1\text{)}$,
$d_Q = d\text{ (mod }q - 1\text{)}$ and
$q_\text{inv} = q^{-1}\text{ (mod }p\text{)}$.

These values allow the recipient to compute the exponentiation m = cd
  (mod pq) more efficiently as follows:

$m_1 = c^{d_P}\text{ (mod }p\text{)}$
$m_2 = c^{d_Q}\text{ (mod }q\text{)}$
$h = q_\text{inv}(m_1 - m_2)\text{ (mod }p\text{)}$

(if $m_1 < m_2$ then some libraries compute $h$ as $q_\text{inv}(m_1 +
> p - m_2)\text{ (mod }p\text{)}$)

$m = m_2 + hq$,

This is more efficient than computing $m ≡ c^d \text{ (mod
> }pq\text{)}$ even though two modular exponentiations have to be
  computed. The reason is that these two modular exponentiations both
  use a smaller exponent and a smaller modulus.

This is typically the kind of things you may find implemented in smart cards or in constrained devices.
Comment: 1) CRT is only a factor 4 speedup. The OP has trouble understanding why modular exponentiation has anywhere near acceptable performance, a factor 4 is irrelevant in this context. 2) Larger devices will use CRT as well. It's just as nice on a large x86/AMD64 as it is on a constrained device.
Comment: do you have any sources to back up your claim that banks do this (not saying you are wrong, just that a source would add credibility).


Fourier transform of distributions with non-standard test functions

Question: This might be a quite simple question for function analysis standards, but it has some obstacles. I'll try to improve the readability a bit by not using the full tex code. A short motivation:
Given a Schwartz function $f \in S$ that is the density of some prob. measure, one can perfectly write for the Heaviside function $\theta$.
$\int \theta \operatorname{d\mathbb{P}}(x) = <\theta,f> = <\theta, F^{-1}Ff> = <F^{-1} \theta, Ff>$
where $F$ and $F^{-1}$ denote the (inverse) Fourier transform.
Now $F^{-1}\theta$ is well known:
$\frac{1}{2\pi i}[P.V.(\frac{1}{x}) + i\pi \delta(x)]$
But: Smoothness is a way too restrictive property. The distribution $F^{-1}\theta$ is a well defined functional for test functions that have a bounded derivative in a neighbourhood $E$ around 0, and where $\sup_{x \in R} |x^\alpha (Ff)(x)|$ is finite (hence it is in $L^p$, $p<\infty$). $\alpha$ and $E$ are fixed! One can define a norm on that space (let's call it $C_\alpha$) using infty norm and infty norm of the derivative in E. This is also the standard standard proof for $F^{-1}\theta$ being in $S'$, the dual of the Schwartz functions.
I want to weaken the restrictions of test functions $f$, but I need to justify
$<\theta,f> = < F^{-1} \theta, Ff>$
it holds if f is a:

Schwartz function
$L^1$ function, $Ff$ also $L^1$ and in $C_\alpha$

However it is not clear (to me), if it holds if the space of test functions is not closed under Fourier transform. I'd like it to hold for as much prob. densities as possible for which $Ff \in C_\alpha$.
Of course Schwartz functions are dense in $L^1$, so I thought about using density arguments. $L^1$-convergence of the sequence (say $\psi_n$) of Schwartz functions implies only pointwise convergence under fourier transform. Too weak. I need some form of uniform convergence also under Fourier transform. I could achieve it if I assume that $|f(x)-\psi_n(x)| < b_n(x)$ outside a compact set where b_n is some sequence of $L^1$ functions controlling the "tail behaviour" of the pointwise convergence. $b_n$ goes to zero pointwise for n to infty and $b_n < B$; $B \in L^1$. However, I think this is again a too strong assumption - it rules out many densities (the fat tailed I am interested in).
I am not sure how to "save" the equation $<\theta,f> = < F^{-1} \theta, Ff>$.
Comment: This site will render tex code, if you put it between $'s.
Comment: added the fourier-analysis tag.
Answer: OK, the proof doesn't seem so hard using density arguments and mollifiers! Needs a last check, but I think I got it.
Comment: This would belong better as an update to your main post, since answers shouldn't be used for comments. (Of course if you have a solution then by all means write it up here, as an answer, and you can then accept your own answer.)
Comment: I'll do that soon.