Is there any solver intended specifically for integer and binary variables alone on the optimization model other than solvers for MIP, MILP?

Question: Any solvers which can be integrated in python where we can quickly solve if we have integer and binary variables alone in our model other than normal solvers for MIP, MILP?
Comment: Can you elaborate on why you don't want to use a MIP or MILP solver? Those solvers usually perform quite well on general pure integer problems. Are they too heavy-weight for your application? Knowing why you don't want to use them may help in suggesting alternatives.
Comment: It takes too much solver time to solve for MILP where I have complex constraints and large non-zero elements . I thought if the solvers restricts its algorithm or heuristics to branch and bound only for integers, it might perform better. Correct me if I'm wrong.
Comment: Unless you find a solver that is dedicated to your problem type, I would guess that your best option is to go with an existing (potentially commercial) MIP or MILP solver. Maybe it makes sense to discuss your problem or problem formulation rather than looking for a somewhat generic solver alternative.
Comment: One instance is in the following link where i posted my code, if you can, please check it: https://or.stackexchange.com/questions/6699/how-to-solve-milp-efficiently-using-mip-python-any-other-solvers-to-quickly-sol
Comment: And I agree that it will differ with problem specific and model, the way you formulate it. Lets say if we know that all my variables in my model will be integer or binary and at optimality, all constraints non zero elements, objective value, everything will be integer or binary alone, but MIP/MILP solvers will check for larger solution space even if I can declare my variables are integers or binary, but In a feasible solution, my non zero elements and objective function may take fractional value based on my complexity of the constraints which wont be optimal.
Comment: Maybe have a look at Constraint Programming and related technologies.
Answer: For binary only there are the following classes of solvers:

SAT Solvers and MaxSat for optimization
Pseudo Boolean Programming or Pseudo Boolean optimization

For integer valued there are the following approaches:

Constraint Programming
Rephrasing as Boolean Problem provided the search space is finite
SMT solvers and Optimization modulo theory

As well as local solvers which might be able to solve both.
As for whether such software is callable from Python:

SAT solvers: yes, for example  Lingeling
Pseudo Boolean solvers: no, as far as i know, but you can generate a problem file a solver like RoundingSAT could work on and read it's output files.
Contraint programming: yes, see Python constraint
SMT solvers, yes see Z3Py
Local solvers, yes see LocalSolver

All those solvers use different proof systems from MILP solvers, so it is possible that they solve certain formulations of certain problems better than MILP solvers. However there is no single approach that dominates MILP on every task.


What lands first a bullet shot or dropped

Question: I think that when you shoot it, it will land later because since the earth is round wherever it land will be slightly lower than were the dropped one landed.  So why do they say they will land at the same time?
Comment: Bullets don't typically go far enough that the curvature of the earth becomes significant.
Comment: The effect of air drag will be *far greater* than any curvature effects. What Chris said. But if you ignore both effects the landing time will be the same, assuming you shoot horizontally. Vertical and horizontal movement are perfectly independent, you see.
Comment: Mythbusters tested this; it's easily found on YouTube.
Comment: @KyleKanos: you don't *seriously* watch MB, do you? 99 % of their myths can be busted with a piece of paper and a pencil! LOL. But they SO love blowing things up, these cr*tins.
Comment: @Gert There's more to life (and physics) than paper and pencil.  :-)
Comment: @Gert: if by "*seriously* watch MB" you mean, "do I trust their results?" then not fully, but I think it's not unreasonable to accept their results with some reservations.
Comment: [Mythbusters YouTube](https://www.youtube.com/results?search_query=bullet+fired+dropped+mythbusters).
Comment: @Gert Paper and a pencil only ever really tells you information about things your factoring in already.  The nice part about experiments is that any non-considered factors could still be relevant, making the results agree better with reality.
Answer: Edited to fix a mistake.
You raise a very good point. As everyone has said, it is a very small effect for bullets. But if you go faster than a bullet, it becomes important. And if air resistance is a problem, you can go above the atmosphere to try it.
Without air resistance, the bullet follows a parabolic path in a uniform gravitational field.
But if we are considering a region large enough that the curvature of the earth matters, the field is not uniform. The force is toward the center of the earth. The trajectory is an ellipse.
If you drop the bullet, the "ellipse" is very skinny - a line. You only get part way through the ellipse before you hit the earth.
If you shoot sideways with a low velocity, you go part way around the earth before the ellipse hits the earth. It is a little like shooting from the top of a hill. The bullet fall farther before hitting, and takes longer than on level ground.
If you shoot fast enough, it would go halfway around the world before it landed. At this point, it would be half way through the ellipse. It would be traveling horizontally, and just graze the earth.
If you shoot faster still, it would not hit the earth. It would follow an elliptical orbit all the way around and come back at the same altitude as it started.
Faster still, and the orbit would become circular.
Faster still, and the orbit would be elliptical, but the point where you shoot would be the lowest point of the orbit.
If you shot extremely fast, faster than the escape velocity of the earth, it would fly away into space and never return.
Answer: This is a typical question of the style illustrated in the image.

Assuming air resistance is neglected, the key point is that there is only the force of gravity acting vertically in both situations.  As a result of $\vec F=m\vec a$, there is no acceleration horizontally in either situations, so that ball 2 with merrily continue its horizontal motion, unaffected by the vertical motion, and the vertical motion will be unaffected by the horizontal motion.
Since the vertical force is the same in both situation, both balls will hit the ground at the same time if they start with $0$ velocity from the same height.  The curvature of the Earth is unlikely to be a factor unless your bullet travels significant distances.
Comment: Not sure the OP will correctly interpret your diagram but nice answer anyway.
Comment: But what about **with** air resistance. Then it becomes a very interesting question.
Comment: @ja72 indeed it does, but if you want to model air resistance it becomes much much much more complicated.  Unless one does very simple modeling - which also requires assumptions not stated in the question- various ballistic factors - muzzle velocity, rotation and shape of the bullet etc - come into play. This *appears* to be beyond what is OP is asking.
Comment: It seems easy to do simulation with various values of horizontal velocity and measuring the time to hit the _flat_ ground and see what the curve looks  like. It might have a minimum or a maximum at zero speed because it has to be an even function (due to symmetry).
Answer: I assume you mean "shot horizontally". A bullet shot vertically upwards will certainly land later!
You are technically correct: due to the curvature of the earth the bullet has further to fall and hence will take longer to land. In practice it will be very hard to tell, though.
If the bullet travels 1 km, the earth's curvature adds 8 cm to the height. If the range is 5 km, then the earth drops 196 m over that range. See this page for calculations. Those extra heights may seem significant.
However, in most cases the bullet cannot travel that far as it will be falling. If we fire from a 1 m height, then the bullet will drop all of that 1 m in only .44 s. Assuming a typical bullet speed of 500 m/s, in 0.44 s it has travelled only 220 m. The earth's curvature over that distance adds only 3.8 mm to the drop height.
In other words @Chris's comment is correct: you'd be hard pressed to measure the difference.
The measurement is also affected by various possible errors, including the following:

the exact levelling of the gun
the flatness of the land
timing errors

All of these can have effects that are greater than the difference caused by the curvature.


High CPU performance on a cloud hosting platform

Question: We need a cloud hosting platform that provides high CPU throughput for a very specific high-CPU utilization application we have. Can anyone recommend a cloud hosting platform whose virtual instances that actually performs well for such an application?
Answer: No, none will. Buy a server, put it into a rack ;)
If you need a complete CPU  / Multiple CPU's dedicated for yourself cloud computing simply is not for you.
Comment: Well, a virtual processor normally is one processor core, shared and pioritized. Askj yoiur cloud computing provider how the handles that - he is the only one who could tell you.

But in general, high performance intance computering is not what a cloud is for.
Comment: mmm... any site which provides information on what these virtual processors are "equivalent" to?
Answer: If you are particularity interested in doing this in the cloud rather than buying hardware, actually Amazon have just created high CPU based instances for exactly this purpose.
I reposted the content of the amazon announcement here which outlined the benefits of their new HPC (high power compute) instances which are specifically designed for high CPU utilisation.
The spec of these is as follows:
23 GB of memory
33.5 EC2 Compute Units (2 x Intel Xeon X5570, quad-core "Nehalem" architecture)
1690 GB of instance storage
64-bit platform
I/O Performance: Very High (10 Gigabit Ethernet)
API name: cc1.4xlarge
These are only available in US east region and cost $1.60 per hour on demand.
Alternatively if you don't need something that powerful the most commonly used option is what amazon refer to as "High-CPU Extra large" or c1.xlarge for short. This comes with 20 ECU's (8 cores) and 7gb of RAM.
An on-demand instance cost $0.76 for linux per hour or $1.16 in the EU per hour.
Something to keep in mind is if your application can be distributed across multiple servers you may be able to get better value for money by running more smaller instances rather than fewer large instances. You will need to test how your application responds to the various different hardware options available.
Hope this helps.
Edit later: Also posted this question and answer on the Cloud college blog. good question.
Comment: Thanks ccame... had a look at those options earlier, but eventually found that there were too many questions/doubts (for us) in context to amazon's ec2


Are there any disadvantages of Progress Draw Mortgage?

Question: I am thinking about getting a Progress Draw Mortgage on a home currently being built, and the builder is willing to cover all the interest until the possession date. Are there any disadvantages of such mortgage?
What I am getting out of it is that mortgage provider would be able to hold my mortgage rate up to 1 year, while a completion mortgage can't hold it for more than 3-4 months.
Answer: Presumably, the inverse of the advantages?

You are guaranteed the interest rate that is written on your mortgage commitment as long as the first draw happens before the rate hold expiry date (typically 120 days from application date). In most cases, it takes at least 6 months or more to build a home from the ground up. That means that you are taking a chance at what the interest rates and qualifying criteria will be several months down the road. You can normally only lock in 120 days prior to possession with a 'Completion Mortgage'. Lenders are constantly changing their guidelines and rates are predicted to increase over the coming months. That means you are much better to obtain draw mortgage financing to avoid any of these uncertainties. You will know that you have your financing in place right away before construction even starts. This is a huge peace of mind so you can relax and get ready for the big move.

So thus, if interest rates are lower 6 months or a year from now, that'd be the disadvantage -- a longer lock-in period.


Asp.net MVC - Returning to "host" controller when using partial views

Question: I have a controller called Parameters which allows some parameters common to my object model to be edited/viewed. Creating/viewing is performed using a couple of partial views - ShowParameters.ascx and CreateParameters.ascx.
I have a number of other controllers that all use ShowParameters.ascx to show their related Parameters. That works fine.
However, I have a problem with my CreateParameters.ascx partial view. It calls an action named CreateParameter in my Parameters controller to create the parameter. My problem is, I would like it to return to the previous controller and show the Index view for that controller, so that the user can see that the parameter has been created.
How can my Parameters controller determine which controller it should return to?
Thanks,
Tubby
Answer: You could pass an additional returnUrl parameter to your CreateParameter action so that it will redirect to this given url. And in your CreateParameters.ascx partial view you could pass the current controller name and action when you construct the link.
Another option would be to always redirect to the Request.UrlReferrer inside your CreateParameter action.


How to disable GRUB installation

Question: on my hard drive, I have Archlinux with fully customized GRUB. I want to install Xubuntu 14.04 on other partition. How to disable GRUB installation during Xubuntu installation process?
Answer: I think you can install Xubuntu with a Live CD/DVD, and choose to place bootloader on your Xubuntu partition and not where your grub is so grub stays as it is. After you finish installing Xubuntu, you can boot into Archlinux and play with update-grub or better use another Live CD or some USB pendrive with Boot Repair on it to fix your dual-boot configuration. Boot Repair can be written on USB with Unetbootin tool. But you need to make sure you can boot into Archlinux after first reboot when finished with installing Xubuntu.
Oh, also make sure you download the right iso image for Boot Repair, they have iso images for both 32bit and 64bit machines.
Comment: That is only with Something Else or manual install. The partitioning screen has a combo box below it on where to install the grub boot loader. Grub does not like installing to a partition, but in this case installing to partition, in effect is just to be a throw away, as you will not be using it. You still have to update grub in Xubuntu so the grub in Arch finds the newer kernels on updates. Or you can manually configure to boot the partition or just the links to the most current kernel in root.
Comment: Yes, 'Something Else', the 3rd choice for installing Xubuntu is the right one. I don't know much about Grub or Linux in general but I think 'throwing away' bootloader for Xubuntu as an intermediary step can prevent some major boot issues after first reboot when finishing installing Ubuntu/Xubuntu. Boot Repair CD helped me fix certain boot issues worse than this one. The 'Recommended repair' button saved me more than once but only after fixing boot problems for the original operating system I had running prior to installing Ubuntu/Xubuntu.
Answer: Run ubiquity -b or ubiquity --no-bootloader to skip the grub installation step. See ubiquity --help for more details.
Answer: My solution is:
Install Xubuntu with GRUB on sda.
Boot Archlinux from Xubuntu's GRUB.
Run
# grub-install --recheck --target=i386-pc /devsda
# grub-mkconfig -o /boot/grub/grub.cfg

After that, I have Archlinux's GRUB.
Comment: The only disadvantage is that grub remembers where to reinstall on major updates. So a major update to Xubuntu will overwrite Arch's grub. Easy to fix just by booting into Arch and reinstalling its grub. But you can edit how grub remembers with: sudo dpkg-reconfigure grub-pc
#Enter thru first pages,spacebar to choose/unchoose drive, enter to accept, unchoose everything.
Answer: Wanted to do the same, I decided to add this answer with captures.

Open a terminal
tape the following command:
ubiquity -b

This will open the ubuntu installer program after a few seconds.
Don't close the terminal though.

Now assuming you selected the Something Else option (see below image)

Now, you won't have the option to chose where to install GRUB. Like in this following image.

Instead, that options is removed Like in this next image.  So GRUB won't be installed.

How to disable GRUB installation


What are the criteria for the stopwatch stamp?

Question: On the level complete screen there is a bronze stopwatch or clock stamp/badge alongside the green gems and the yarn ball), but there is no time information as to what triggers it. Is the stamp based off of completion time or some other factor, like deaths? If based on completion time, which co-op player's exit stops the timer? How does it differ between levels and difficulties?
Answer: The only criteria is the Level Time, although it is not displayed in the story mode.

Level Time is a certain amount of time assigned to the level.
  Players must complete the level before running out of time to earn the badge.
Comment: Please add the source of the quote
Answer: If you look at the checkpoints in some level's there is a time listed on each one of them.  This is the time (or sooner) that you should hit these checkpoints.  If you hit each checkpoint before the time shown(and make it to the end in a reasonable time) You should get the Stopwatch Stamp.
I am trying to figure out if it is only the time trial levels that this shows up on or if it is all of them.  I will try to edit this answer when I find out.
Comment: As far as I know that is not correct, the times in the checkpoints are the times of your previous runs, the first time you run a level they have no time at all.
Answer: Mostly we finish game based on the time taken i.e. clearing obstacles and encountering difficulties of level and reaching the exit. Early they finishes and earn higher rank.
In other case you may calculate based on tries made and time taken.


What are some examples of x=f(x) type questions

Question: I was wondering of examples where authors examine their own framework using their framework. I'm especially interested in 'larger' examples where an author may put their reasoning for creating a metaphysic through their system of metaphysics or where theorists examine their own theory using that theory, but I would also appreciate 'smaller' examples, like for example "all categorical syllogisms are constructed of words, all words are constructed of letters, therefore all categorical syllogisms are constructed of letters"
Comment: I'm not sure I understand the question, but x = f(x) means the x us a fixed point of the function f. There is a wiki list on fixed point theorems in maths. Not that it is relevant more than that your notation suggests it.
Comment: Not very clear what you are looking for, but look at [SEP Self-Reference](https://plato.stanford.edu/entries/self-reference/) and [Fixed points in computability and logic on Math SE](https://math.stackexchange.com/q/1002540/152568).
Comment: @Panda thank you for the clarification, I guess I meant more along the lines of x, a*x(x) but Conifolds answer, like yours, is close to what I mean so thank you
Answer: This is what Wikipedia says about Stephen David Ross

He began in American pragmatism, reading it to question itself fundamentally and to entail the inexhaustibility of nature and reason, the mysteriousness of things.

But I guess the most famous example would be Jesus :

If a man slap you on one cheek turn the other as well

...

If a man take your shirt give your coat as well

Treating the gospel account as factual the manner of his death seems to have authenticated his commandments.
Likewise Socrates.
He claimed that unlike others similar to him who had some claim to be "wise men" – the sophists – he not only was interested in wisdom (sophia) he actually loved it (her?) – philo-sophia.
And so like Jesus, when he was murdered

he refused to back down from his claims/beliefs
he refused to run away (and stop making trouble)
most strikingly his (recursive) love in his sophia-love stood him in such good stead that he died cheerfully and fearlessly.

Brings me to the confusion that your question seems to be causing: you've phrased it in terms of fixpoints. It would be better stated in terms of recursion. The former expresses the latter via the fix point combinator so it's not wrong. But it is confusing!

This question on performative contradictions is in the opposite direction to your question. This direction can also be interesting for the egregious example of failure to "practise what you preach".
I particularly commend the comment by @conifold


Why does the focus point of the eye does not burn the retina?

Question: To see an object, its light rays have to meet on the retina in the focal point. But the focal point is a small white dot. Basically nothing would be distinguishable and the retina would burn because all energy is concentrated at a single point? Obviously, this is not happening. But why?
Comment: Because the people whose retinas got burned out all died.
Comment: > *"To see an object, its light rays have to meet on the retina in the focal point."* This seems wrong. Instead, a seen object has a small image on the retina. Only point source maps to a point image; extended source maps to extended image. Source?
Answer: In ordinary life, only a point object will focus to a point image. Otherwise the light is spread out, just as the object is spread out. But a very intense object can injure your retina: don't stare at the sun!
With lasers, collimated light simulates a point object at large distance. Lasers can be seriously hazardous to your vision.
Answer: The following diagrams show how the eye focuses:

There may be people with vision problems such that the focal point is a single point on the retina, but this can be corrected with glasses.
Comment: The trouble with the diagrams, especially the first one, is that it suggests that light from the top of the tree only passes through the top of the lens, comes together at a focus in the middle of the eyeball and then spread out again to form an image.  That is deceptive and the last sentence is incorrect.  No lens can ever bring light from different parts of an object together at a single point.
Comment: This is by far the best answer so far.
Comment: *There may be people with vision problems such that the focal point is a single point on the retina, but this can be corrected with glasses.* Is this condition harmful for the retina when not wearing glasses?
Answer: Even with ideal vision, all the light from an extended object is not focused onto a single point in the retina. Instead each point on the object is brought to a focus at a different point on the retina - the image of the whole object is spread out. So only very bright objects (such as the sun) can cause damage to the retina.
Comment: Doesn't this imply that the focal point must be slightly in front of the retina and not directly on it?
Comment: @StefanH No. A simple lens dos not have a single focal point. Its focal point depends on the direction of the incoming rays. These focal points all lie on a *focal plane*. With ideal vision this focal plane falls on the retina.
Comment: Then the pictures given by @Xavier confuse me on that. In these pictures, the focal point (where the rays meet) seems to be in front of the retina...
Comment: @StefanH You are misreading the diagrams. A focal point is a point where all the different rays from *one* point on the object converge. These points all lie on the retina - this is clearer in the second diagram, where rays 1 and 2 from the top of the tree converge at a point on the retina.
Comment: I see. I think I confused what is often called *the focal point* as the point where all rays entering in parallel (coming from infinity) are concentrated. But if I got it right, every point on one side of the lense has it unique focal point on the other side. So, there are infinitely many focal points for every lense, and the *the focal point* is just picked out because rays coming from infinitey are somewhat special.
Answer: Part direct answer, part reply to your follow-up question on Gandalf's answer, "Doesn't [light from an extended object not focusing on a single point] imply that the focal point must be slightly in front of the retina and not directly on it?"
Concentration of rays on a single point in geometric optics is an approximation. A target and a light source are in thermal contact. If we could make energy go from the source to the target such that the target was hotter than the radiation temperature of the place where the light was originally emitted, we would be transporting heat from a cold region to a hot region without doing extra Work, which violates the 2nd Law. In optics this limitation is expressed as the conservation of optical etendue. The light from a given source can't be more squished together than the the light emanating from the surface of that source. This is why very bright (the sun) and very squished (a laser) light sources are both hazardous.
(Note as regards the temperature of sources and targets that the light from a laser is emitted from deep inside the tube where the extremely hot lasing medium is, not the comparatively cool tip where the light comes out of the tube.)
Answer:
To see an object, its light rays have to meet on the retina in the focal point.

That's not what focus is. Not that the light rays from A and B don't meet up at the same point on the retina.

If all the light from an object was brought together at a single point, there would be no image formed.  Lenses don't do that. Instead they bring light from different points on the object together at different points on the retina.
It is impossible for any lens to bring the light from different points together at single point.  To see this just imagine the lens in reverse.
This is true of any lens.  Even if you have used a "burning glass" to focus the sun, you don't bring the sun's rays to a single point; you create a small image of the sun, small enough to be very hot.
Comment: *It is impossible for any lens to bring the light from different points together at single point.* If I consider a vertical plane between the object to the left and the eyeball to the right, then this plane intersects, for example, the three blue rays in three points. Image I remove the object but put three glowing objects at these three points. Then they emit rays along the blue lines and these three rays all meet at point $a$ on the retina. So, light from three different points is brought together at the point $a$, right? So, what do you mean when you say this is not possible?
Comment: Consider putting a point source at that focal point,  then the light rays of light emitted from that point source would follow exactly the same path backwards,  ultimately forming an image of a tree.  So how did the lens make an image of a tree from a point source? why not an image of a dog?  The image forming process must be reversible, so the image cannot be a single point.
Comment: You mean, in *one* vertical plane? Otherwise, I guess, it is possible. For example, move the point $B$ up and to the right to the intersection point of the uppermost red line and the lowermost blue line. Then, the rays of the replaced point $B'$ hit the retina at the point $a$ as well. If this is right, then the information that arrives at the point $a$ does not correspond to a single point. I am not quite sure why our eye is not affected by such obstructions and still can reconstruct the image perfectly, but according to this explanation some uncertainty in $a$ is present.
Comment: No, if you move point B to B' as you say, then point B will not be in focus on the plane of the retina
Comment: I see. Got it. Thanks.
Answer: There might be a confusion about what you call focal point.
The focal point of an ideal lens is a single given point. Only the light rays parallel to the optical axis will pass through the focal point. Parallel rays at an another angle will be collected at different points in the so-called focal plane.
Light rays coming from (not too distant) point sources will be collected at other points again, behind the focal plane. (However the lens in our eyes can adapt and reduce its focal distance, so that the image formed behind the focal plane falls on the retina.)


Is it possible to save session in Ubuntu?

Question: Is it possible to save session in Ubuntu?
I mean when you switch it on and off or simply restart it and after logging in the screen looks exacly the same as before (with all windows open, and application running)?
Same as going back from 'Suspend' mode. So you can continously work on the same PC?
Answer: As of Natty you can not. Is was dropped due to flaws that could not be addressed and because hibernation/suspend actually does this better.
From the announcement:

Hey fellow desktop lovers,
Here is a notice on what we decided during the Rally: we drop session
  saving from natty in Ubuntu. The disablement is already effective in
  natty.
What was the option about?
The option was about launching on session start, the applications
  which were running when you close your session, and getting them in
  the exact same state than when they were closed.
It was available through gnome-session-properties in a dedicated tab.
  It was possible to choose there to save right now all opened
  applications or to do that everytime on session close.
Why removing it?
We saw a lot of side effects during the previous cycles when we
  started to use multiples session (like in UNE, desktop session and
  such):
  - the saved applications contains the list of all running application, including the window manager, the panel and such… Consequently, we got
  a lot of patches and hack to avoid saving mutter, compiz, metacity,
  and the panels in lucid and maverick, so that when someone wanted to
  start a session, the required components from the session will indeed
  been launched instead of the saved one.

We tried last week to change the desktop order but it went quite wrong with a lot of settings and we had to revert it.
In addition to that, session saving never really worked with all the default applications we have (for instance, openoffice, firefox…) and
  even with supported applications like gedit: the opened documents
  weren't started again, making the feature quite useless.

And now?
As there is no strong intend to solve that in the short term and we
  need to focus on other parts of the desktop area first, we decided
  than instead of shipping a broken feature (there was already a lot of
  side effects people using this feature encountered that cycle, and
  time to debug it, to find it was coming from a saved session was quite
  expensive…) to unable it for natty. With that, it will enable us to
  ensure a first class experience in natty on the ubuntu desktop,
  without getting a lot of upgrade failures and people rebooting getting
  a blank background.
I still personally think that this feature can be really good addition
  to Ubuntu default experience if we can take time to make it very
  polished as well as working for most of - if not all - major
  applications (at least, all applications by default on the CD). If
  someone wants to jump in this hard and long task, he's more than
  welcome to discuss it either on this mailing list or in the #ubuntu-desktop channel on freenode.
Thanks for your attention,
Didier Roche


Isaiah 29:18 about the Quran?

Question: A few Muslims claim that Isaiah 29:18 is about the Quran what would you answer?

Isa 29:18 - On that day the deaf will hear the words of the scroll,
and out of the deep darkness the eyes of the blind will see.
Comment: Welcome to BHSX.  Thanks for joining the group.  Please remember to take the tour (link bottom left) to better understand how this site is different.
Answer: Interpreting Isaiah 29:18 as a prophecy about the Quran is not supported by the context or the broader message of the passage. If we look at it in its original context, Isaiah 29 is addressing spiritual blindness and deafness of the people of Israel. The verse you mentioned is part of a larger passage.

Isaiah 29:9-10 NKJV
The Blindness of Disobedience
9 Pause and wonder! Blind yourselves and be blind! They are drunk, but not with
wine; They
stagger, but not with intoxicating drink. 10 For the Lord has poured
out on you The spirit of deep sleep, And has closed your eyes,
namely, the prophets; And He has covered your heads, namely, the
seers.

Isaiah prophesies about the restoration of Israel and the coming judgment on their enemies.
The verse speaks about a time when those who were spiritually blind and deaf would receive understanding from God.

Isaiah 29:18 NKJV
18 In that day the deaf shall hear the words of the
book, And the eyes of the blind shall see out of obscurity and out of
darkness.

Isaiah 29:24 NKJV
24 These also who erred in spirit
will come to understanding, And those who complained will learn
doctrine."

This enlightenment is not about a new scripture but about a deeper understanding of God's truth and revelation! It's very unlikely that Isaiah, an Old Testament prophet speaking to the people of Israel, would be referring to a future scripture that belongs to a totally different religious tradition altogether!
Furthermore, interpreting Old Testament passages as references to the Quran can be seen as a form of retroactive prophecy, meaning that later beliefs are read back into earlier texts. This is very dangerous because such interpretations might not align with the original intent of the authors or the historical context for that matter!
Answer: That is a strange claim for any Muslim to make, given what scholars of Islam have stated about having a very low opinion of the Hebrew scriptures. They have effectively consigned the Law, the Writings, and the Prophets to their spiritual dustbin. Here is a sample:

"The Holy Book of Islam is revered as the product of God's message delivered directly to one human intelligence operating over a period of twenty-three years. In contrast, Muslims find the Christian Holy Book to consist of a varied collection of documents (including the Jewish Holy Book), all of independent authorship, spanning more than a thousand years...
The writings of the Old Testament, the Gospels and the Epistles, all
represent vicarious experiences retold at second, third, or fourth
hand by their authors with an additional reworking by redactors and
editors...
Muslims argue that Christians and Jews were not fit custodians of
their own Holy Books and that they tampered with them in various
ways... The original form is irrecoverable and corruption has occurred
in the present versions." Islam: the way of submission Solomon
Nigosian (Crucible, 1987) last chapter, pages 193 to 195

This places the onus on those Muslims who make that claim about Isaiah 29:18 to prove that that one verse, at least, was never tampered with, and so can be taken as 100% accurate, and thus fit to be interpreted in an Islamic way.
To set about such a task, it would first be necessary for those "few Muslims" to be named, and direct quotations made from them to see if that claim about Isaiah 29:18 is the case, and that they have Islamic, scholarly qualifications to make such a claim. Then the process could begin of examining their rationale in light of their otherwise condemnatory view of the Hebrew Scriptures. That, in turn, would raise the question, If that one verse is the original, and accurate, what other verses might not also be God-inspired? Until more detailed information is provided by the OP, no real progress can be made in delving into an answer.
Answer: The suggestion that Isa 29:18 was/is fulfilled by the production of the Quran is not possible for two simple reasons:

The context in in V17 makes it clear that the prophecy has something to do with the re-greening of Lebanon
The prophecy is explicitly about the "Holy One of Israel"

The Quran accomplished neither of these.  Further we might add that the following extra reasons why the OP's interpretation is untenable:

the deaf did not "hear" the Quran
the blind did not see

In fact, the Isaiah prophecy is clearly a Messianic prophecy about Jesus.  Certainly Jesus made the deaf to hear and the blind to see and made the humble increase their joy in the LORD.  Benson summarizes this well when he says:

Isaiah 29:17. Is it not a very little while, &c. — The following paragraph, to the end of the chapter, relates to the times of the
gospel; the prophet foretelling therein, in figurative language, the
rejection of the Jews and the calling of the Gentiles. Lebanon, a
barren mountain, a desolate wilderness, here stands for the Gentile
world. This was to be turned into a fruitful field — Hebrew, לכרמל,
into Carmel, or the vineyard of God, as the word signifies. On the
other hand, the fruitful field, what had formerly been the vineyard of
God, the Jewish Church, should be esteemed as a forest — See this
interpretation confirmed, Isaiah 32:15; and Matthew 15:7-8.
Comment: Why can't an Islamic explanation claim re-greening Lebanon refers to the Islamic conquest of the entire levant?
Comment: @AviAvraham - historically, Islamic conquest of the middle east often had the opposite effect - much vegetation lost in the battles.

Isaiah 29:18 about the Quran?


Why does Special Relativity apply to more than just light?

Question: It is my understanding that time dilation is derived from the constancy of the speed of light in vacuum. I would assume this implies that the quirky consequences would therefore apply only to light. But they don't. They apply to all material objects. Why?
Comment: It was the brilliant contribution of Einstein to apply the Lorenz transformations that had been derived for electromagnetic waves (hence the name Lorenz)  to particles also. It was a hypothesis that has been proven correct experimentally innumerable times. It is now and axiom in all modern physics theoretical models. So the answer to the "why" is "because" this is the way nature works.
Comment: Because your assumption just doesn't follow. That B is derived from A does in no way imply that B has to "apply" only to the same things as A. It just holds true if A is true, but we can't say anything about the scope of B. I'm not sure what the question about that is.
Comment: Stew, it's because of the wave nature of matter. Check out pair production. You can actually make matter out of light. Also see electron diffraction and annihilation.
Answer: The basic idea is that physical laws are same in all inertial frames. Framing your question in a different way: Why do we generalize a formula(which gives time-dilation) whose derivation is based on a light clock to physical clocks and even the biological clock?
A very interesting argument was given by Feynman in his Lectures on Physics, Vol:1.

""To answer the above question, suppose we had two other clocks made exactly alike with wheels and gears, or perhaps based on radioactive decay, or something else. Then we adjust these clocks so they both run in precise synchronism with our first clocks (the light clock). When light goes up and back in the first clocks and announces its arrival with a click, the new models also complete some sort of cycle, which they simultaneously announce by some doubly coincident flash, or bong, or other signal. One of these clocks is taken into the space ship, along with the first kind. Perhaps this clock will not run slower, but will continue to keep the same time as its stationary counterpart, and thus disagree with the other moving clock.
Ah no, if that should happen, the man in the ship could use this mismatch between his two clocks to determine the speed of his ship, which we have been supposing is impossible. We need not know anything about the machinery of the new clock that might cause the effect—we simply know that whatever the reason, it will appear to run slow, just like the first one.""
Comment: Formatting note: you can blockquote a section of text by preceding it with a >
Answer: The special theory of relativity is a new theory of the space and time and all phenomena in the spacetime. The key constant that determines how strong the new "quirky" effects are is the speed
$$ c = 299,792,458\,{\rm m/s} $$
which is the speed by which the "spatial directions" may be converted to the "temporal direction" in the spacetime. Whenever the speed of object is at least comparable to $c$, the new "quirky" effects arise and cannot quite be neglected. The closer $v$ is to $c$, the stronger the effects become. Here, $c$ is the maximum speed that the information may propagate by according to the special theory of relativity. And it's also the speed that may never be surpassed – and not even quite reached – by massive objects. But the massive objects' speed $v$ may approach $c$ arbitrarily closely.
This speed $c$ is normally referred to as the "speed of light in the vacuum" because this was the first way how this speed appeared in physics. 100 years ago, people knew basically nothing else than light that could have moved this fast.
But that doesn't mean that the constant $c$ has some special relationship with light only. There are many other things that it's the speed of. I've already mentioned it. It is also the "limiting maximum speed for massive objects" – and the constant could be called in this way, too.
Also, it's the speed of the gravitational waves. Much like electromagnetic waves, gravitational waves – for example those whose discovery by LIGO was announced in February 2016 – propagate by the speed $c$. In fact, many physicists would agree that it would be far more conceptually meaningful to use the name "the speed of gravitational waves" for the constant $c$. The speed $c$ is the speed of light in the vacuum but it is not "just" the speed of light in the vacuum. It's the maximum allowed speed of information of any form, the speed of the gravitational waves, the speed of other things that may exist (and 99.9999972% of it is the speed of the protons at the LHC). It's a fundamental conversion factor between space and time, energy and momentum etc. that is important in all of physics. The fact that the light in the vacuum propagates by this limiting speed is really a consequence of the special theory of relativity. It's one important but surely not isolated example of the omnipresence of the constant $c$ in fundamental physics, not a unique meaning of the constant $c$.
Planck's constant $\hbar$ is similarly omnipresent in Nature thanks to the theory known as quantum mechanics. It's the energy-to-frequency ratio of photons and all other particles, it's the quantum of the angular momentum (minimum nonzero amount for a boson), it's the natural unit of the action in the principle of least action, it's the minimum product of the uncertainty of the position and momentum, and many and many other things. All these descriptions may be shown to be governed by the same constant. The constant could be called "the quantum of the action" or "quantum of the angular momentum" etc. but we just use the neutral "Planck's constant".
Similarly, $c$ could very well be called "Einstein's constant", to remove the unfairly close relationship with light. The only problem would be that this name would be highly ahistorical. The constant $c$ was present in physics and approximately measured centuries before Einstein was born. He was the man who appreciate all the numerous roles that the constant plays in physics but he wasn't the first one who encountered the constant.


WYSIWYG vs. BBC Code vs. Plain Text

Question: When Putting in a place for users to put it content, (for example, posting a question,answer or comment on this site) What are some things to consider when deciding to use some form of WYSIWYG editor, some form of BBC like markup, or just giving users a plain textarea to work with?
Comment: @artlung - I think anyone from the UK would find 'BBC like markup' a tad obnubilating!
Comment: I'd not seen BBCode abbreviated like that - link - http://en.wikipedia.org/wiki/BBCode
Answer: I think SO's minimal editor with markdown syntax has been remarkably effective for the purpose that it serves.
In my opinion, the less HTML you have to deal with in submitted data, the better. Unless users need to organize and post data in tables or something, I really don't see the need for a WYSIWYG editor.
The common tags that you'll want to allow are:

Paragraph formatting is easily done on your side. With the exception of a few, markdown or creole can handle pretty much all of that, and validation / sanitation isn't as cumbersome on your end. BBCode is also fine, but not as flexible.
Unless the user is authenticated / trusted somehow, you probably don't want them having at a WYSIWYG editor. Even then, they should be really trusted, beyond just verifying their e-mail or something else that can be trivially accomplished.
Comment: +1 For keeping WYSIWYG for trusted input. It can bring up security problem if it's not secured properly and making sure WYSIWYG is secure is pretty hard. There is just so much thing you can do to execute Javascript outside of script tag.
Comment: Good point, I hadn't thought of it like that. My only concern is that less tech-savvy users might not like/understand the markup idea.
Comment: @GSto - you can always give little buttons above the textbox to make it simple for them, while more advanced `ninjas` will appreciate being able to just use the markup directly.
Answer: I've run into SO many problems with Microsoft Word as a UI person who specializes in custom CMS solutions.  While many tools out there have "paste from word" features in them, I can't tell you how many times I've gotten calls late at night because a user "forgot" or "refuses" to use that feature.  Without additional post-processing to scrub the miles of gibberish that Word pastes can leave behind, I've even seen DB errors caused by an attempt to inject too much data into a record (on a commercially purchased solution I had to support, nonetheless)  My solution, in addition to Tidy, is to standardize on CKEditor because it is programmed to strip out Word markup whether the user "pastes from word" or simply drags-and-drops.  Additional post processing and escaping is enabled to protect from injection, spelling errors, flagged keywords and disallowed HTML.
If you're going to give the user the ability to add "extras" to input, carefully consider what extras you're going to give them.  Out of the box, most editors have quite a bit that they probably shouldn't in the toolbar.  For that reason, BBCode has been something I've pondered many many times.  However, for some reason I just keep being drawn back to WYSIWYG because of the "awe" factor it gets in sales meetings and its simplicity for the user (when all is well)
Comment: I was looking @ CKEditor as an option,and I agree there are too many options in many editors. all i really need are line breaks, links, and some form of simple list.
Answer: Generally, as few options as possible to allow your users to express their ideas. Some sites simply add bold and italic buttons and that works. Any other system will require a certain amount of training. Others to consider are the Markdown and Wikipedia syntaxes. It's also notable that many large sites simply don't allow any additional markup, for example, the Facebook activity stream.
Comment: thank god Facebook doesnt allow markup... would only make it more irritating.

WYSIWYG vs. BBC Code vs. Plain Text


PHP Redirector Counter for a link

Question: I need a way to count how many times a link is being clicked and I was thinking of creating a php script to redirect to and do the counting. Is there a better way to do this and how would i count each time the user visits the link and would it be best to save in the database somewhere...any suggestions
Answer: Yes, it must be a PHP script - JavaScript for example won't work all the time.
So - instead of a link to
http://some.site.com/page2.php

You would link to
http://some.site.com/redirect.php?page2.php

And in the redirect.php you will track, for example, in a database, the values, and in the end throw this header:
header("Location: http://some.site.com/".$_SERVER["QUERY_STRING"]);

To redirect to the path after ?...
// yeah - logs might work... a little bit more work, though and it is also very server specific.
Answer: I would analyze your web log files as this will work whether it's a static page or a script.
If the page you need to count is a script, you could insert code that updates a table.
Website statistics is a big industry and there are many free and pay solutions out there to explore and get ideas from.
Answer: If you need to track clicks on a specific link then you'll probably need to use javascript to capture the click and send a notification to a tracking server.  If you need to track page views then you're best off looking at your server logs.  Remember that a page can have many links pointing to it, you have to differentiate between link clicks events page page impressions.  Another possibility, depending on your application, is to use Google tracking, or a similar third party tracking app.

PHP Redirector Counter for a link


should I flag newbies?

Question: Sometimes I feel I should no flag newbies or new users. Should I comment instead and ask them to explain better? ...or should I leave this to the moderators?
Answer: Everyone is encouraged to help newbies get their sea-legs on the SE sites.  I would comment and/or as needed to improve posts.  This is especially important when it is apparent that English isn't the posters first language.
Comment: In general, flags should be reserved for something that only a moderator can handle, which is typically converting an answer to a comment (not an answer flag), immediate closing (eg, off-topic flags), or immediate deletion (eg, spam).  If I see another user trying to help out a newbie, and it looks like the post can be salvaged, I will delay acting on it.
Comment: but should I flag them? or give them the chance to redo the question or answer before flag them?
Answer: If you find a post that needs to be flagged, flag it independently from who posted it. Whatever the post was created from a new user, or from a 10K user, a post that should be flagged still needs to be flagged.
As for leaving that to moderators, moderators don't go hunting for bad posts; they just act on posts that caught their attention in some way (such as when a post is flagged), or on posts that are blatantly wrongs, such as blatantly off-topic questions.
There are cases where a flag should not be used, such as for:

Asking a moderator to judge the correctness of an answer
Asking a moderator to edit a post, if not in the case sensible information is revealed
Asking a moderator to down-vote a post
Asking a moderator to change a comment into an answer

should I flag newbies?


What property of an electromagnetic wave can change with distance?

Question: I want to figure out if the total distance traveled by an electromagnetic wave can be calculated by change in any of its properties from source. Is there any property that changes with distance?
Comment: yes, the amplitude; so if you know the emitted wave's amplitude and you that there are no multipath reflections then the amplitude is inversely proportional to the distance travelled ( far-field)
Answer: Yes, several quantities vary with distance from the source. One useful quantity is the radiant flux (the amount of energy passing through a given area in a given amount of time -- basically how 'bright' it looks from your position). In fact, for a source that is spherically symmetric or far enough away that we can regard it as spherically symmetric, the radiant flux falls off nicely as
$$
F \propto \frac{1}{r^2}.
$$
Basically, the power of the wave is being spread over larger and larger spherical shells as it spreads out away from the source, and so the 'amount of energy' passing through one spot per unit time varies inversely with the surface area of that sphere.
So if we know the flux $F_e$ emitted at the surface of a spherical object (say, a star), the flux at our location is simply
$$
F = \frac{R^2}{r^2}F_e,
$$
where $R$ is the radius of the source and $r$ is the distance from the source to us. Often it's easier to work with the source's luminosity, which is all the light energy emitted by the object per unit time. The luminosity of the object is related to the flux at our location by
$$
L = 4\pi r^2 F.
$$
So if we know the luminosity of a spherically symmetric source and if we can measure the flux at our location, we can compute the distance $r$ to the source.
This is actually one of the ways astronomers can determine how far away stars are. Astronomers will determine the effective temperature of a star from its spectral type, and employ some clever tricks to determine its mass. From there, our astronomer can guess at the star's radius from our models of stellar structure. Using this, he/she will employ Stefan-Boltzmann Law to obtain the flux or luminosity, which he/she will compare to the flux (i.e. brightness) observed here on earth to determine the distance.
The mass measurement is often difficult to do directly -- we usually need our star to be part of a sufficiently well-behaved binary system. There are other ways to get the luminosity of a star, such as in cases where the star behaves in ways that depend on its luminosity (e.g. we can obtain luminosity from the periods of variable stars), or we can get the distance to a star by recognizing that it's close to a star whose luminosity we can measure, but there is no general method that works in every case.
Comment: this is a useful exposition, thanks and welcome to the stack exchange! -NN
Answer: Intensity changes because energy of the wave is absorbed by the medium in which it propagates. Also the wavefront appear different. Far away from a source, waves have plane parallel wavefront, like light from the stars.


Should I use only pip in virtualenv?

Question: While in a virtual environment, what will happen if I use other methods of installation such as apt or manual install? Will the installation go into the virtual or global environment? I am asking this because some packages can't be installed using pip.
Answer: pip install in the terminal installs by default to the global environment. pip install in my experience fails about half the time in both the global environment and the virtual environment, so I prefer to use pip in the virtual environment whenever possible, because it allows me to easily correct problems caused by pip install by manually deleting files that have been installed by pip install in the virtualenv virtual environment.
In Python, an environment is a folder (directory) which contains everything that a Python project/application needs in order to run in an organized, isolated fashion. When you delete the environment folder, you also delete everything that was installed by pip from that environment.
There's also pip uninstall but even so, it's safer to use pip in an isolated virtualenv virtual environment in your /home directory, because it puts the files installed by pip somewhere in the /home directory instead of in a directory that is owned by root.

Should I use only pip in virtualenv?


How to write letters with a slash on it?

Question: How do I write letters like the following in mathjax?
Comment: You can also use [this](https://detexify.kirelabs.org/classify.html) to look for individual symbols. Some preset "not" type symbols are already there.
Comment: The syntax "\require{cancel} \cancel {a+b}" works.  You only need to use the "require" command once per session.  See [the tutorial](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference/13183#13183)
Answer: If there exists a specific symbol, you should use that: such as \notin $\notin$, \neq $\neq$, \nmid $\nmid$.
Alternatively, you can use \not. For example, \not\in $\not\in$, \not= $\not=$, \not\mid $\not\mid$, \not\equiv $\not\equiv$.
I will quote from "MathJax basic tutorial and quick reference" - current revision: "You can use \not to put a slash through almost anything: \not\lt $\not\lt$ but it often looks bad."
Comment: `\not\exists` looks OK: $\not\exists$, but `\not\forall` doesn't: $\not\forall$.
Comment: I wonder if `\not\in` isn't now special-cased to expand to `\notin`.  I can remember earlier times when it looked substantially worse than `\notin`.  Certainly `\not\mid` must be doing that.
Answer: @MartinSleziak has already mentioned almost everything important, so I would only mention a few alternatives and additional information.
For a character/symbol (which I will write as [symbol]) you don't necessarily have to write \not[symbol]. Alternatively, you can also use \not{[symbol]} (both look the same, but it's useless if you use it quite often in one line or it's not a $\LaTeX$ command that you have to write with \. E.g. \not{a} is $\not{a}$.
Unfortunately, some $\LaTeX$ symbols cannot be written correctly with \not{[symbol]} and do not have \not[...] in their names. Instead they use \n[...]. E.g. \nsupseteqq is $\nsupseteqq$, but \notsupseteqq does not exist and \nsupseteqq ($\not{\supseteqq}$) looks much different. For some symbols even this doesn't work. E.g. you have to write \varnothing for $\varnothing$.
If you don't like any of the variants, you can also use \![...]\! / Use as an alternative. \! is a kind of negative line spacing, which moves your text after it (here the /) further into the character before it. E.g. x \!\! / is $x \!\! /\!$, x \!\!\! / is $x \!\!\! /$, x \!\!\!\! / is $x \!\!\!\! /\,$ and \not{x} is $\not{x}$. The same goes for \backslash ($\backslash$) or \setminus ($\setminus$). With this you can also get other symbols like $\therefore \!\! \because$ (\therefore \!\! \because).
Comment: +1 : kudos for mentioning negative line spacing.


How do I get custom icon for apps in Unity dash

Question: How do I assign an icon for programs which doesn't have any specific icons ? (ie. vncviewer, rdesktop, etc). Today it appears as a gray icon with question mark on the middle as a default icon in unity launcher.
Answer: Sure.

Open the text editor.
Drag and drop an iconic link onto the text editor.
Open a new tab in the text editor.
Drag and drop the question mark icon onto the editor.
In the first tab, replace the image address with the address of the image you want.
Copy the link address from the second tab and paste over the link address of the first tab.
Save the first tab under a new name somewhere on the Desktop.
Answer:
Select a .png file and copy/paste it to a location where you are not going to move it in the future.
Open Files and browse to /usr/share/applications/ . Here you are going to find your applications and their different icons.
Right-click the application icon that you want to change and from the pop-up context menu select Copy.
Run apt policy gksu to check if gksu is installed. Install gksu if it is not already installed with sudo apt-get install gksu. Open the terminal and type gksu gedit and after it on the same line paste the location of the icon that you copied in step 3.
In Ubuntu 18.04 and later gksu has been discontinued, so use this command instead:
sudo -H gedit /path/to/file &>/dev/null

Select the new .png file from step 1, right-click it, and select Copy from the pop-up context menu.
Paste the location of the .png file that you copied in step 5 in the line in the open gedit text editor that starts with Icon= .
Replace:
Icon=/path/to/old/file

with:
Icon=/path/to/new/file

Save the change you made to the open file in gedit and close gedit.
Answer: I found a good answer to this question here:  How can I change which icon an applet uses?

Edit the app's configuration to change the icon
Edit /usr/share/applications/diodon.desktop and change Icon=gtk-paste
  to Icon=/usr/share/icons/Faenza-Darkest/actions/22/gtk-paste.png
Note that editing system files is generally a bad idea. You might be
  able to copy diodon.desktop to
  ~/.local/share/applications/diodon.desktop and then edit it. I'm not
  sure if that would work.

For me I wanted to give Rubbyripper an icon, and this worked like a charm.  I did edit the system file though.  Didn't try the .local method.


Need a Sandbox with unlimited space for Knowledge Articles without Production Data

Question: One of my Requirement is that i need a sandbox with unlimited space for Knowledge Articles. Can i get this in Partial Data Sandbox  or  in Full copy Sandbox ( But in Full Copy Sandbox i do  not need Production Data only Configuration Data should copy).
Answer: You'll never have unlimited space for Knowledge Articles - each article will consume 2Kb of your record storage limit so you will eventually run out of space.
All sandboxes will copy over configuration - the partial and full copy will also take some or all of your Salesforce data, which will consume a chunk of your record storage.
A developer pro (the new name for the old config only sandbox) now comes with 1Gb of storage, which is enough for over 500,000 knowledge articles.
A partial sandbox comes with 5Gb, so enough for over 2.5 million articles, but you'll need to specify a sandbox template and copy some data over as well, which you will then have to delete to free up the data. You should be able to reduce the amount of data by choosing a very restrictive set of objects in your sandbox template - you may even be able to specify no data, but that's not something I've tried myself so I can't say for sure that it would work.
A full copy sandbox will come with as much storage as you have in production, but will also copy most of your production data over which you will again have to delete.
Answer: You haven't provided the details as to why you need 'unlimited space' but you might be just fine with a developer sandbox.
We have a custom import process in our org that imports thousands (near 10k) of articles into Salesforce and also makes thousands of updates (new article versions and translations) , we often make test imports and updates in a developer sandbox and so far we have not reached any data storage limits. If you will be using that sandbox just for knowledge articles I don't think you will have to worry about this.


Will Ubuntu auto-update to the next version?

Question: I am really new to this. If I install Ubuntu 17.10, which is supported for the next 9 months, then if there's an update to Ubuntu (in this case 18.04 LTS) will it auto update to that version? Otherwise after 9 months would I need to get the newer version's ISO on the Ubuntu desktop download page?
Comment: You *should* be able to update to 18.04 (the next version), although sometimes people do like to write a new USB and start over.
Comment: Automatically upgrade without consulting you? No. The system will merely remind you, if you so desire. You must initiate the release-upgrade.
Answer: Although your Ubuntu system will not automatically upgrade itself to the next release of Ubuntu, the Software Updater will automatically offer you the opportunity to do so, and it will also automate the process of upgrading to the next release.
There is potential for confusion here because there are two things someone might mean when they say the release upgrade is automatic. One possible meaning is that it will happen even with no action from the user, which is not the case. Regardless of the user's configuration, no Ubuntu release will start an upgrade to a later release without the user's action.
However, Ubuntu will automatically tell you when a new release is available and as you if you want to upgrade to it. Even if you say no, you will still be able to go into the Software Updater and start the upgrade to the newer release.
This is different from security and stability updates within a release. You should almost always install those immediately when they become available, and you can configure Ubuntu so that this can be done behind the scenes without even prompting you. In contrast, unless you write a script yourself for this--which I strongly recommend against--you will never sit down at your computer to discover that you are, all of a sudden, running a different release of Ubuntu than you expected.
Although some users prefer to reinstall from scratch for each release, you don't have to do this. Only if you want to do that will you need to download the ISO image for the next Ubuntu release. The Software Updater does not need this ISO image to perform a release upgrade. It will download everything you need automatically after you tell it that you do want to perform the release upgrade.

Now, with all that said:
You might want to have an ISO image for the release of Ubuntu you are running or plan to upgrade to on hand, because you can use it as a live environment in which to run Ubuntu. This has two advantages: it should help you test if that release will be able to use your hardware successfully without any additional configuration, and you can use it if you ever need to run that release of Ubuntu but you don't have a computer with it installed and working. Note that these advantages apply regardless of how you upgrade, because they are separate from upgrading.
You might want to install an LTS release, currently 16.04 LTS, instead of a non-LTS release like 17.10. LTS releases are supported longer--LTS stands for "Long Term Support"--and they are almost always more stable than non-LTS releases. When you have an LTS release, you can still upgrade to a non-LTS release if you so choose, or you can skip them and (eventually) upgrade to the next non-LTS release.
The disadvantage of using an LTS release when there is already a newer non-LTS release is that the LTS release doesn't have the newest software and features. But that is, well, also the advantage of LTS: the software you use is more tested and established. Most users will probably prefer to stick with LTS releases, but even non-LTS releases are heavily tested and you should definitely feel free to use them.
See What's the difference between a Long Term Support Release and a Normal Release? for details.

You may also be interested in what it is like to upgrade from one Ubuntu release to another. For that, I recommend you take a look at this official walkthrough. We also have How do I upgrade to a newer version of Ubuntu?, which is useful but might make upgrading seem more complicated than it usually is because the goal of its answers is to cover most of what one might ever have to consider or fix.
Answer: In a few words, it will "auto update".
It does depend how you've set up the "updates" section.
Go to System Settings, Software / Updates and check the Updates tab to see how it set up.There are a number of "update" options there, so choose what you think is best for you.
My preference would be, if this is a fresh install you've done, check it and leave it.
Comment: I think there's potential for confusion here: Ubuntu will automatically ask the user if the user wants to upgrade to  a newer release. If the user says yes--or says no but later starts the release upgrade from the Software Updater or by running `do-release-upgrade`--then every step of the upgrade will be automatically performed. But it won't upgrade itself to a newer release with *no* user action. That is, users don't sit down and discover that they're running a different Ubuntu release than they thought. (The "exception" is that one does automatically get the next *point release* in an LTS.)
Comment: Agreed. I was being a little too simplistic with my reply, to try not to confuse.


Why does audio sound different in waveform v. multitrack?

Question: I've been editing in Audition, and I can't figure out why my audio sounds different in waveform than it does in multitrack. It looks/sounds fine in Waveform, but it's super loud/constantly going into the red in multitrack. I can't figure out why. The dB is set at 0 in the multitrack, and the only effect in the multitrack is a graphic equalizer (when I turn that off, it doesn't make a difference).
Answer: At the moment, I can think of only one thing. You said the level is at 0 dB on the track, and you mean the one on the left side where I have +0 in my screenshot below, correct?
But there is a second place to set a level, circled red in my screenshot. When I increase it, only the multitrack playback is affected, not waveform. Click on the icon and hold it, then move your mouse to the left to decrease it. If it's at 0 dB the icon looks a bit different and there is no text. If that's the case my answer won't help you and it's something else.
Comment: I think that was it — it was indeed set higher in the circled area. Do you know how to change the levels for all the clips in the track at once by chance? Or should I change them one by one?
Comment: Thank you for the feedback. I don't know a way to change it for all tracks at once.


Emacs 24 GUI on OXS turn off transparency

Question: I'm using GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org (from emacsformacosx.com) and I've got this annoying transparency going on and I don't know how to disable it. See attached image (it's not easy to spot but it's there).
Comment: Do you mean the transparency of the title bar? That is a OSX Mavericks feature, it is not emacs specific.
Comment: It's possible the `alpha` frame parameter is set to something other than 100 (full opacity).  Try evaluating `(set-frame-parameter (selected-frame) 'alpha 100)` and let us know if you're still seeing the transparency issue.
Comment: Can you describe what the problem is because it is hard to spot whatever is the spot you are referring to? Start with location of the spot.
Comment: I've added another photo (took it with my phone) since I realised the issue is not noticeable in the screenshot. I'm pretty sure now it's got nothing to do with Emacs since I can see the issue on other apps too but maybe someone knows about it.
Answer: If you're working on a MBPro Retina or Thunderbolt Display, or any display that uses in-plane switching (IPS) technology, your issue is likely image persistence.
I was experiencing the same problem on my Mac with all programs. I would close or hide a window (or Emacs frame), and I could see a very faint remnant of that window (frame). It also occurred when I switched OS X 'spaces.'
After putting it off for some time your question prompted me to finally investigate the issue. I would recommend Apple's article on Avoiding image persistence on Apple displays. The punchline:

To clear the persistent image, allow the screen saver to run for approximately as long as the image was being displayed.


web based form to collect data and populate to a fillable PDF

Question: Is there a script that anyone can suggest that would allow me to create a HTML or PHP web based form to collect data and save that data. the call the data to be populated in a fillable pdf?
Answer: If you have an existing PDF that you want to populate, and that PDF just has text fields (no checkboxes or radio buttons) then CAM::PDF may be able to help you.  You can use it as a Perl library directly, or use its command-line interface.  CAM::PDF is not useful for generating PDFs from scratch, however.  Furthermore, if you have embedded fonts, then you need to ensure that all of the characters you plan to insert are represented in the embedded font.
Comment: Thanks guys! These were helpful.
Answer: Use a normal web page to get the data. If not sure how to do it, look for "php forms" on google, there are plenty of tutorials.
Then use a php pdf generator, like this one, to create the PDF file. If you look hard enough, you will probably find a pdf generator that will let you use a template with placeholders where the entered data should be.


my enter key is not working for form?

Question: I have a form which has one field username. If some one submit the button "enter" the next field pop up. I have  done using the jquery . And it after entering the password in that field when i click the "login" button (input type of button is submit in both case) request goes to the server. Every thing working fine for all browsers except firefox. When someone click the login button it works fine but when when i want to submit the form by hitting the enter key nothing happens. Each time for submit in firefox i have to use mouse. So, what can be the problem. I am not putting the code but it is simple form.
Comment: If you want an answer you'll have to provide some code.
Answer: The documentation for jQuery says:

Depending on the browser, the Enter
  key may only cause a form submission
  if the form has exactly one text
  field, or only when there is a submit
  button present

If those conditions are not met, you may need to assign a key listener and listen for the enter key.  Also, I wouldn't be surprised if the "submit button" has to be an input of type submit, not a button... but I don't feel like testing it to confirm :-)
Answer: Are your next buttons actually <input type="submit"> buttons, or just regular <button></button> buttons?
As per my recent question, the only way to process a form by pressing enter is to have 1) a sumbit button or 2) an onkeypress (or oninput) event in the input fields to listen for the enter key.
Answer: I may be wrong, but the solution to your issue may be to set the focus on the button:
document.getElementById('buttonID').focus()

Hope this helps.

my enter key is not working for form?


What is the car Cruella DeVil drives in the TV series Once Upon a Time?

Question: In OUaT, Cruella appears as a live-action recreation of her 101 Dalmatians cartoon character, complete with car. The car appearing in OUaT shares some styling cues with the Panther De Ville appearing in the live action movie, but it is a distinctly different vehicle. My question is: what is it? The pastiche of design features doesn't appear to match up to any manufactured vehicle, past or present. Apparently a custom creation for the TV show, but what was it built from, and what does it borrow from?
Answer: In an interview with Access Hollywood, Victoria Smurfit (who portrays Cruella De Vil in Once Upon a Time), reveals that the car is a Zimmer Golden Spirit:

Victoria's Cruella is now showing off the whole striking, high-fashion package, as well as her slightly minimized haughtiness (she's trying to convince Regina and the gang she's changed) as she motors from street to street in a Zimmer Golden Spirit.

This is a picture of the car from the show:

And this is a 1985 Zimmer Golden Spirit, as posted on a classic car retailer's website:

Although it's obviously had some work done (especially on the front), the two cars look largely identical in the body.
There's a thread from a model car forum that discusses some of the modifications made to the car:

Ace-Garageguy: The car from "Once Upon a Time" is a Zimmer Golden Spirit coupe. Looks like about a mid-1980's version with a few kustom touches, including the ultra-superfly side-pipes removed from the hood, and somewhat more "tasteful" chrome louvers added instead.
Comment: The top picture (two-tone grey/black car plated DEV IL) is from the show. It does look like the car used in the show is a Zimmer, but it has been tweaked/dressed a bit. For one thing, the radiator of the "DEV IL" car is pretty much straight edges and angles, where the radiator of the "known" Zimmer is more curved/rounded off.
Comment: @AnthonyX They do seem to have made some modifications to the front; I found a forum thread with some people discussing that, which I've added to the answer
Answer: Look closer. It's a Zaiker, not a Zimmer Golden Spirit. A web search reveals very few were made in the late 80s and/or early 90s using Ford Mustang as the donor car. These are called "neoclassic cars" and there were numerous different neoclassical makes and models built in the 70s and 80s. Sort of the "retrorods" of that era such as the fiberglass muscle car bodies of today mounted over modern interiors, chassis, drive-trains, etc.
The most obvious difference between the Zaiker and the Zimmer is the grille. The Zaiker grille looks as though it came from a mid to late 70s Lincoln. The Golden Spirit grille looks as though it's its own grille. Also note the curvature of the hood tops and edges on the two cars to accommodate their respective grilles. The Zaiker more closely matches the car's flatter hood in "Once Upon a Time" over the slightly curved-hooded Zimmer. The headlight buckets on the Zimmer have sort of a wedged taper at the rear contour while the Zaiker and OUaT headlight buckets have a bullet-like rear contour. The front fenders are a little more squarish on the Zaiker and the OUaT car versus the Golden Spirit. Notice how the tops of the Zimmer fenders have more curve than the tops of the Zaiker and the OUaT fenders. Also compare the front fender inboard contours that flank the grille. Look closely at the bottom contours and crease lines of the fenders around the wheel wells on all three cars. Look and compare these same details around the rear wheel well too. There is a noticeable body line that wraps the lower front section of the rear wheel fender flare on the Zaiker and UOaT car. The Zimmer does not have this line. Also, the fake sidepipes aren't on the Zaiker just as they aren't on the "Once Upon a Time" car. While the pipes could have possibly been removed from a Zimmer, it is unlikely that anyone would justify modifying the curvature of the fiberglass from the way it came on the Golden Spirit to the way it is on the "Once Upon a Time" car. Both cars used Ford Mustangs as the donor car and while Zimmer Golden Spirit is a good guess, closer examination of the few online Zaiker photos reveal the Zaiker is more likely the answer. Even the logo is almost identical. They both start with the letter 'Z.' There is one close-up photo on the web of the Zaiker logo that shows how similar it is to the Zimmer logo. It's possible the Zaiker builder used some of the molds or attempted to closely replicate what Zimmer had churned out in the 80s.
With all the copyrights, I'm hesitant to post other people's pictures here so if you conduct a web image search using the words "Zaiker" and "car" and other similar keywords, you will find about 12 pictures or so of about four different Zaikers. Then compare those with the OUaT car and Zimmer Golden Spirit pictures. There's even more differences than I've pointed out between the Zimmer and the OUaT car but I'm hoping I've given enough that will lead you to discover the other details on your own. This is why I believe the OUaT car is a Zaiker which is a neoclassic car built on a Mustang.
How these producers came upon and decided to use a Zaiker of all the neoclassic cars out there is what I'd be curious to find out. Perhaps they wanted to find a neoclassic car that was so rare that no one could figure it out. This achieves uniqueness without the cost of custom coach work and fabrication.  It's a little oddly proportioned though and there are other neoclassic cars out there with better proportions.
There's only one Zimmer Golden Spirit in this grouping and the rest are Zaikers:
Answer: The car is a very customized 87-93 Ford Mustang. The "Fox body" Mustang interior in the classic, "porno" red is visible in some shots.
Comment: Found a Wikipedia page for [Zimmer](http://en.wikipedia.org/wiki/Zimmer_%28automobile%29); The vehicle in the show **is** a Zimmer, but the Wikipedia article states that these cars were based originally off Mercury Cougar and later Ford Mustang, so I suppose this answer is somewhat correct. My intent was to find out if the "DEV IL" car was built or customized for the show (or any other movie or TV use), and if so, what it would have been built from. Since it apparently already existed as a "production" Zimmer, calling it a Mustang wouldn't be entirely correct.
Comment: Legally, it's a Ford or Merc and they're made "on order".
Answer: The chassis is definitely a fox body mustang (87-93). Most likely a notch-back LX model. Heavily modified to look like the zimmer. Having owned a few mustangs for over a decade the a-pillar, side mirror, door handle, and door are mustang. But the interior is a dead giveaway especially that arm rest.


Single Cycle Data-path Requirements

Question: How having separate instruction and data memories helps in implementing a single cycle data-path for mips instruction set? i want to know why we can only use data-path element once in a cycle for making the data-path capable of executing any instruction in a single cycle?
Comment: How could you use the datapath twice (more than once) in the same cycle? Be specific.
Comment: @BrianDrummond why can't we use a functional unit twice in the same cycle. Can't we use that functional unit during some duration of the cycle and then again use it some other duration in the same cycle?
Comment: So ... sequentially. Then what distinguishes between those portions of a cycle? ... a faster clock. Which means you now have >= 2 cycles. You can only do this because your original cycle was too slow.
Answer: Your question implicitally ask about a processor with separate instruction and data memory (and most of all: separate buses) compares to a processor with a shared instruction and data bus with regards to performance expressed in "number of cycles".
We should agree that a cycle refers to the clock cycle.  We could also be talking about the instruction cycle.  An instruction cycle can be multiple clock cycles, and instructions "always" execute in one instruction cycle.
However the goal of RISCs such as the MIPS is to execute one instruction per clock cycle.
There should not be any cycle faster than the clock cycle in the processor.  Access to external memories can not be faster than that.  If you have only one bus, you can load either an instruction or data in a single clock cycle, not both at the same time.  So if your instruction is a load, you would first fetch the instruction, décode it, and the proceed with the load.  That would require two clock cycles.
By separating the buses, you can read an instruction and data in a single cycle.  So every cycle can read an instruction as well as read or write data.  Without this, you can not do it in a single cycle.
Separating buses alone is not enough.  You could have a shared memory space, but your memory needs to have two interfaces that allow access to two different locations at the same time.  With separate memories you immediately have the possibility to put them on separate buses, if not the memory architecture is more complex.
It is not because you can access instructions and data at the same time, that the data is related to the instruction that is read at the same time.  It can very well relate to the previously read instruction.  For instance a first instruction can perform a LOAD from memory to R1 (register1), and the second instruction could add 4 to R1 which would hold the loaded value "at the same time" as the second instruction is fetched - just in time to add "2" to this loaded value.
To be clear about your second question "why we can use the data-path element only once in a cycle?", as explained above, you can do only one memory access in a clock cycle because that is the "fastest" cycle in your system.

Single Cycle Data-path Requirements


Django ManyToMany returning error "MultipleObjectsReturned while rendering"

Question: New to Django so apologies if this is head-smackingly obvious.
My app's models include a Band class, a Release class for music CDs, and a Press class for reviews of these CDs. The Press class looks like this:
class Press(models.Model):
    def __unicode__(self):
        return self.title

    class Meta:
        verbose_name_plural = "Press"

    band = models.ManyToManyField('Band', null=True, blank=True)
    release = models.ManyToManyField('Release', null=True, blank=True)
    title = models.CharField(max_length=500)
    article = models.TextField(blank=True)
    url = models.URLField(max_length=100, blank=True)
    screenshot = models.ImageField(upload_to='press/', blank=True)

I recently changed this (before, the band/release were ForeignKeys) and resynced my database. Now I get this error anytime I try to list my Releases:
"Caught MultipleObjectsReturned while rendering: get() returned more than one Press -- it returned 4! Lookup parameters were {}"
The code causing this is:
def release_list(request):
    r = Release.objects.order_by('-release_date')[:5]
    return {'release_list' : r}

Am I doing something obviously wrong here? I'm not trying to access any of the Press fields so I'm not sure why it's trying to get them.
Full traceback here.
Thanks,
Matt
Comment: What do you mean with "resyncing"? Did you drop the tables and ran syncdb, or just syndb?
Comment: Can you post your model for Release?
Comment: Apologies for the delay. Here's the Release model: http://pastebin.com/89ubZ6rw
Comment: Oh, and I dropped the tables and ran syncdb, yes.
Answer: Never mind - inside my views I was referring to a Press var that no longer existed. Annoying that Django didn't point to that specific line of code, but all fixed!


Icon, Index and Symbol

Question: Does anyone know a visual sign that is an icon, an index and a symbol at the same time for all speakers in one community? I thought of the visual sign of a dove, but I'm afraid it is not an index.
Thank you very much!
Comment: What class is this for?
Comment: @curiousdannii I think this is very much a part of linguistics - at least since Jakobson (but also Saussure and in a different way Jespersen). It's certainly all over intro to linguistics textbooks. I wish it wasn't (see my answer) but that don't make it so.
Comment: I'm voting to close this question as off-topic because it's not about linguistics.
Comment: @DominikLukes Linguistics has to be about language, not just symbols. Visual signs comes under semiotics, but pure semiotics shouldn't be on-topic here IMO.
Comment: Is it really important whether this is for a class or not? Welcome to Linguistics SE Sarah!
Answer: This sounds like you're asking for help with homework. But it's perhaps an important issue to address, so here it goes:
The very way the question is formulated shows how confused and pointless this tripartite typology of sign is.
You ask about something being both icon, index and symbol for a community of speakers. But, of course, something being a sign for something in a community of speakers is the very definition of symbol which describes a situation where the signifier (vehicle) is related to the signified (object) through convention. So if something is an icon or index, it should be related by virtue of similarity of contiguity. But we know that all such relationships are conventional and do not hold across cultures. So every possible example of an icon (arrows, maps, images) or an index (symptoms, parts) is also symbolic. But for something to be both an icon and an index is a contradiction in terms.
Of course, many signifiers are both symbols, icons and indexes but not in relation to the same signified. For instance, smoke is an index in relation to fire, icon in relation to itself (e.g. in a picture of smoke) and symbol if used to communicate some preagreed meaning. But that does not seem to be what you're asking.
However, all of this does not help us solve any interesting or useful problems in semantics. It's a classification that's at best of interest to itself. The only important part is the question about symbolic communication (ie about convention) which is why I believe Roman Jakobson brought this to the attention of linguistics. However, ever since it's been treated as some sort of taxonomy on par with Linnean classifications which it is not.
It is much more useful to talk about the range of motivation for the relationship between the signigier and signified (if we even want to talk in such terms). Because, there are many more motivations that enter this relationship than can be captured by such simplistic division. Just think about the fine grained complexity behind the attempted renaming of French to Freedom fries. Or the more common and successful renaming of government departments or academic disciplines. Those are all symbolic but a result of a range of motivations that include those of iconicity (similarity) and indexicality (contiguity) but also so much more (narratives, categorisations, scenarios, etc.) (See Lakoff, Women, Fire and Dangerous Things for an interesting elaboration of this. Ch. 4 and 5 in particular.) Any simplistic and fixed classification like this one can only get in the way. It is the sort of things linguistics textbook authors and teachers of intro courses revel in but that's more useful as an exam question than a real analytic category.
Comment: thank you so much for your detailed answer!! I really appreciate that! :-)

Icon, Index and Symbol


What kind of documentation do I need to fly alone within Europe, when under 18?

Question: To fly alone from Denmark to the Netherlands, without any transfers, what kind of documentation, signature from parents or any other kind of paper does an under 18-year-old person need?
Comment: @MertKarakaya Do you have a source for that? Many countries don't "do" notarisation - eg in the UK important documents are witnessed rather than notarised - so I'd be surprised if there's a blanket requirement for something that's only used in some countries
Comment: There certainly are, but they're rather expensive, and only really deal with people trying to fill in official forms for other countries. Given that one of the points of EU rules is to harmonise things between countries with different systems, I very much doubt there will be a hard requirement for something only found/used in a subset of the EU member states.
Comment: What is the actual age? And not sure if that matters, but also which airline?
Comment: @mts 16, and it will most likely be 'Transavia',
Comment: You would need a notarized writing from your parents saying that they allow you to travel alone. You might need to contact the airline as well, but I don't think it is really necessary.
Comment: @Gagravarr There are notaries in UK (http://www.thenotariessociety.org.uk/what-is-a-notary) which do authorization for the documents with intended use "abroad". My source is personal experience. To travel to Austria alone (with dual citizenship Romania and Turkey), they require you to have notarized permission document stating the flight details and the person taking care of the minor in the arrival country.
Comment: My kids flew a occasionally alone when they were underage, mostly transatlantic. The never had a problem and no special paperwork was required.  I recommend checking with the airline to make sure. EDIT: Lufthansa will allow kids to fly alone age 12 and up
Answer: Your principal concern will be with the airline.  They can impose a variety of requirements, but these can vary from company to company.  You can generally find information on the company's web site, or, presumably, by calling the company's customer service office.
Transavia appears to have no special documentary requirements.  For children from age 5 to age 11, unaccompanied children must pay for and use the unaccompanied minor service; from age 12 to age 15, this service is optional.  For sixteen and seventeen year olds, therefore, we can infer that the service is unavailable.
You are probably also wondering about legal requirements imposed by the countries you'll be traveling in.  There appears to be no definite requirement in international, EU, or Dutch law.
For example, from http://europa.eu/youreurope/citizens/travel/entry-exit/eu-citizen/index_en.htm:

Documents for minors
In addition to their own valid passport or ID card, all children travelling:

alone; or
with adults who are not their legal guardian; or
with only one parent

may need an extra (official) document signed by their parents, second parent or legal guardian(s) authorising them to travel.
There are no EU rules on this matter, each EU country decides whether or not it requires such documents. Check, before the child travels, the requirements of the country you are travelling both from and to:

Here follows a "choose country" link that allows you to check the requirements for various European countries.  This is followed by a disclaimer and some additional information:

The European Commission is not responsible for the content of external websites
Bear in mind that, even where a country does not require minors to carry such an authorisation to leave or enter its territory, other countries they transit through may still ask them to show one.
When travelling by air it is highly recommended that you check with the airlines beforehand as many require such authorisations and have their own specific forms for this purpose.
As each country's rules may change without notice you are also encouraged to check with the authorities themselves or with the respective embassies or consulates.

It is definitely a good idea to follow the above advice.
Using the "choose country" link for Denmark, we find

Other than their own valid travel document (passport or ID card), no particular extra official document is required authorising minors of any EU country to enter or leave Denmark.

For the Netherlands (omitting some text irrelevant to your case):

Other than their own valid travel document (passport or ID card), no particular extra official authorisation is required for minors of any EU country to enter or leave the Netherlands.

Finally, although it appears not to be required, it would not hurt anything to carry a letter signed by your parents or guardians stating that you are traveling with their permission.  You could bring a photocopy of their passports or ID documents to support the authenticity of the letter.  You would also want a copy of the document showing their relationship to you.  This would normally be your birth certificate, but if they are adoptive parents or court-appointed guardians, it would be the adoption papers or a court order or the like.


OpenCV: Getting black frame when trying to get camera output

Question: I am currently working on a camera capture project. The problem is, even though camera gets opened correctly, sometimes the cap.read(frame) returns a black frame. After some tests, I noticed a workaround: putting a Sleep of 1-2 seconds after cap.open() solves the problem. Without sleep, seems like that cap.read() is performed before that the camera is actually ready for capture. But instead of failing and returning false, it just grabs a black frame. Also, checking for frame.empty() does not work, since frame is not empty, it is just all black.
Any idea on how to solve this, of course without having to sleep for a while after camera open?
  #include <opencv2/objdetect/objdetect.hpp>
  #include <opencv2/highgui/highgui.hpp>
  #include <opencv2/imgproc/imgproc.hpp>
  #include <Windows.h>

  // .......... previous not relevant code

    VideoCapture cap;
    cap.open(0); // open the default camera
    if (cap.isOpened()) // check if we succeeded
    {
      // Sleep(2000);
      Mat frame;
      while (!cap.read(frame))
      {
        MessageBoxA(0, "unable to read frame", "CamDll", 0);
      }
      // Process frame data...
    }

Answer: I suggest to use cv::countNonZero(InputArray src) to check if the frame is black.
if (cv::countNonZero(frame) == 0)
{
   //discard frame
} else
{
  //proceed with frame
}