Why is Ubuntu shipped with firefox?

Question: I'm just curious, and some of my friends too. Personally I think "chromium-browser" is better (faster, less crashing) than "firefox", and, why Ubuntu not shipped with more than 1 web browser?
Answer: From an interview in 2011:

Canonical founder Mark Shuttleworth is a big fan of Google Chrome, and says the browser could replace the standard Firefox in future versions of Ubuntu Linux. <..>
<..>In fact, Shuttleworth says, "We looked at it closely in the last cycle and the decision was to stick with Firefox in 11.10."
11.10 is the next version of Ubuntu, to be released in October as part of Canonical's twice-a-year release cycle. Chrome probably won't replace Firefox in 12.04, due out in April 2012, either, because that will be the long-term support version, making it an unlikely candidate for major changes.
"That probably keeps us on Firefox for another year, at least, and we'll see from there," Shuttleworth said.
If that sounds like a wishy-washy answer, Shuttleworth also made it clear that he is a believer in the future of Chrome on Linux.
The work Google is doing with the Chrome operating system, which runs the Chrome browser on top of a generic version of Linux, "is having a hugely positive impact on the performance of Chrome on Linux," Shuttleworth said.

So... it is up for discussion (as are all other default packages) with every release that is not LTS. This time around Firefox wins. Maybe next release it will be Chromium.

Why Ubuntu not shipped with more than 1 web browser.

Ubuntu ships with at least 10 browsers: you can find them in Ubuntu Software Center. There is of course only 1 default browser and as such only 1 is installed directly. In our case Firefox but you are seconds away from installing another one.
Comment: @Seth The recent changes in add-on functionality and anticipated drop of support for old-style extensions in favor of WebExtensions is a pretty big change now, legacy extensions (and other extensions that would be too intensive to rewrite or use features WebExtensions doesn't support) will be dead this fall if that decision doesn't get modified/postponed.
Comment: Thanks for your answer. So Chromium still have a chance to become default browser in Ubuntu, and Firefox is chosen because it will not having a lot of major changes.
Comment: Yes, every 6 months @nur ;)
Comment: Actually, although Firefox has been getting lots of update recently there hasn't been any design changes since version 4 (except the new downloads menu). They've thought about it, and almost changed some things, but it seems they've given that up.
Answer: There's no reason to come with more than one browser pre-installed as that will just take up more space on any installation media. It isn't difficult to download a variety of others one everything is installed.
As for why Firefox, I would say that the ethics of Firefox as a open source web browser match more with Ubuntu than that of the Google sponsored Chrome or it's open sourced experimental arm with Chromium.
Answer: One reason may be because Webkit has so many rendering issues? According to this article "jQuery Core has more lines of fixes and patches for WebKit than any other browser. In general these are not recent regressions, but long-standing problems that have yet to be addressed."
Ubuntu developers might also see the Firefox as more community driven vs more Apple & Google driven development, which may be another reason they continue with Firefox.
Comment: Firefox definetely isn't community-driven.

Why is Ubuntu shipped with firefox?


Why don't myopic people see the world upside-down?

Question:
I found this image while reading optical instruments in physics. If we look at the uncorrected rays, we see that the image they outline gets inverted. So why don't people with myopic vision see images as inverted representations?
Comment: Could that diagram be exaggerated? Maybe the uncorrected ray in a real eye is focused just in front of the retina rather than in the middle of the eyeball.
Comment: @user137 even if that's the case then still it would be inverted, right?
Comment: @LucyferZedd - I slightly modified your wording. Please feel free to roll back, it's just a suggestion.
Answer: You have misinterpreted the nature of the light rays shown in the diagram in the question.  The two rays are representing light coming from the same (distant) point in the environment, that is, some small feature on an object is reflecting (or emitting) light in slightly different directions and reach the eye separated by a small amount (less than the width of the pupil).  The rays are almost, but not quite, parallel.  The two rays, coming from the same point, should be focused on the same point on the retina (as are the red rays corrected by the external lens).  The spread of the uncorrected rays in myopia or hyperopia sends them to different places of the retina, causing the image to be out of focus, not upside down.
The path of light from an entire scene can be illustrated like this:

As this diagram shows, the image is upside down for all of us, in focus or not.  That the image top is at the bottom of the retina is not especially important -- the cells doing the interpretation could have been located physically located anywhere as needed.
Comment: seems, it's not the light rays coming from different parts of the object reflecting the light, but rather the light rays reflecting off of the same part or closely adjacent part of the object but going to different parts of the eye, "misaligned rays"... a quote from opthobook: "punch a small hole in a paper card, and have your patient reread the eye- chart while looking through this pinhole. This technique can actually improve vision by several diopters. It works because the paper blocks most of the misaligned rays that cause visual blur, and allows the central rays to focus on the retina."
Answer: Overview
Myopia does not cause image inversion. @mgkrebbs provides an answer with a clearer diagram than the one you have provided that illustrates how only the focussing ability, not the orientation, of an object changes.
However, an image can be inverted by special inversion glasses. Furthermore is that the brain can convert the image to the right way around.
Although myopic vision can't cause the inversion, the answer you're looking for is probably that perceptual adaptation, a phenomenon that occurs to correct our vision, comes into play in cases of inversion. The brain "gets used to" inverted images and what you visualise becomes the correct orientation. So lets say myopia did cause inversion, the person with naturally inverted vision wouldn't experience anything unusual.
Experimental Evidence
The below text from the wikipedia entry describes an experiment with inverting glasses. These glasses contained prisms that flipped the real world image before it reached the eye. Note the experiment was carried out in the in the late 1800s.

On a later experiment, Stratton wore the glasses for eight whole days. By day four, the images seen through the instrument were still upside down. However, on day five, images appeared upright until he concentrated on them; then they became inverted again. By having to concentrate on his vision to turn it upside down again, especially when he knew images were hitting his retinas in the opposite orientation as normal, Stratton deduced his brain had reprocessed his vision and adapted to the changes in vision.

A more recent study by Linden et al., 1999 confirmed the same thing happening with more up to date inverting glasses. The subjects reported slightly different results. Rather than the image being inverted, it was more the case that the subject felt their reality became inverted to match the inverted image. I can't see someone suffering with myopic vision being able to make this distinction since they would only be used to one orientation.
Figure 1 from Linden et al., 1999
On removal of the glasses, the world becomes temporarily re-distorted, but normal vision and perception returns.
Comment: Undoubtedly interesting, but not relevant to the question; myopia does not cause image inversion.
Comment: How myopic do you need to be to invert the image? I don't notice any problems taking my glasses off, so the image either isn't inverted or my brain adapts within the half a second it takes to remove the glasses.
Comment: @user137 I had doubts that myopia would cause inversion except in extremely severe (possibly only hypothetical) cases, but mgkrebbs explains why this wouldn't happen. Here I am just answering a hypothetical about the brain correcting an inverted image.


What is the different between first path attainer from a meditative commoner?

Question: During meditation can path attainment be identified? How ? Is it gradually progressing  of the path in first path attainers?how this is differ from a meditative commoner?
Answer: The common meditator [outsider] has wrong views, wrong conviction, wrong opinions in regards to the instruction generally presented by the Buddha to his disciples and is considered an outsider.
A person who doesn't hold wrong views, one who has faith in the parts of the dispensation generally presented by the Buddha is called a faith-follower. This person is guaranteed to attain the path-fruition of Sotapatti before passing away.
A person who has penetrated the meaning of that instruction & has come to an agreement through pondering those elements, is called a dhamma-follower but this not yet an awakening to the truth. This person is also guaranteed to attain the path-fruition of Sotapatti before passing away.
A person who having exerted himself, has both realized the ultimate meaning of the truth with his body & has seen with discernment, is said to have gone beyond conviction. This one has awakened to the truth, he knows & sees having realized the path of Sotapatti & lives having attained it's fruition.
Comment: Would  faith follower  and dhamma  follower attained fruit immediately after the path or after sometime?
Answer:
During meditation can path attainment be identified? How ?

Yes. The noble right view is what the ordinary have been before, so they don't find any view and paths like this before by the past-lives-recollection, when the practitioner meditated the 4th Jhana at mastery level and look back his past lives with analysis the arising and vanishing trillion times per second of Nama and Rupa, they will realize "this right view never happen before even in the lives which I was a Jhana-Mastery-Attainner".

Is it gradually progressing of the path in first path attainers?how this is differ from a meditative commoner?

No any ordinary has the right view before in the past lives, never.
So, when the ordinary look back on the past lives, nothing like the first path appeared.
An enlightening moment never happens in an ordinary person's past lives.
However, the difference from the common concentration meditation attainment is insight meditation, the viewing of trillion times per second mind arising and vanishing. This happened before in past lives but never access an enlightenment moment for an ordinary.
Comment: How to identify the access an enlightenment  ,is it mind shut down?
Comment: No, mind is shut down form 5 strings on Jhana-Attainment as well. So, the first core is
 the right view, of the dependent origination,  which never happens in any past lives before.
Comment: So if you see through  the meditation ignorance  cause mind fabrications will it leads to enlightenment?
Comment: 1. According to many Suttas, Sotapanna to Anagami still have an ignorance and mind fabrications, except wrong view. 2. Stop thinking is good because the practitioner can stop knowing 5 strings to focus on 8 Jhana Mastery for 8 Vijja. They all support each others step by step. However, stop thinking is not
only  enlightenment moment. The ordinary's jhana also stop thinking too.
Comment: Reduction of obsessive thoughts as noticed when they were appearin, samadhi  leads to reduce clinging will that put on to the right view?


Draw sharp tool / subdivide

Question: I made a head with the cube.
I added a cube and turned it into a sphere by subdivision surface but now I'm trying to sculpt the face, and I noticed that I can't use draw sharp tool because of the edges, because the faces are too large and they have distance between them.
Now whatever I do I can't subdivide the cube in a way that doesn't change the form of the shape . I even used the ⇧ Shift +  R keyframe to raise the amount number of the surface but it won't work.
Answer:
Set scale to 1 always whenever you sculpt
Don't use subdivision to sculpt. Use remesh or multiresolution modifier.

Draw sharp tool / subdivide


How long did Gollum have the ring for?

Question: The books (and the movies) talk about the origin of Gollum and how he first attained the one ring. It also talks about how the ring warps his mind and body (and prevent Gollum from ageing normally). But I've always been curious about how long Gollum actually had the ring for, and how long the ring had been warping and corrupting him. Is this ever talked about in the books?
Comment: http://scifi.stackexchange.com/questions/13519/why-didnt-gollum-grow-old-and-die-after-he-lost-the-one-ring-to-bilbo
Comment: I have a feeling this is a duplicate, but I can't find what it's of.
Comment: I had a feeling it might be too, but I looked and there are questions that ask about how he is corrupted or how the ring stops him from ageing, but nothing giving a timeline for how long he had the ring for.
Answer: Approximately 478 years.
From The Tale of Years, Appendix B of Return of the King:

2463: The White Council is formed. About this time Déagol the Stoor finds the One Ring, and is murdered by Sméagol.
...
2941: Thorin Oakenshield and Gandalf visit Bilbo in the Shire. Bilbo meets Sméagol-Gollum and finds the Ring.

Both years are in the Third Age calendar, which is dated from the fall of Sauron to the Last Alliance of Elves and Men.
Comment: Can you elaborate?
Comment: Was doing so as you commented. :-)

How long did Gollum have the ring for?


Shipping self-published books directly from Amazon to bookstores: bad idea?

Question: I have a book published by Kindle Direct Publishing.  Most of my sales are to bookstores and up until now I have been ordering books (author copies) from KDP then shipping them to bookstores myself.  Is it considered bad form (from the bookstore's point of view) to have the books shipped direct from KDP?  To be specific, books shipped from KDP come in Amazon-branded boxes and I know many stores have a rather poor opinion of Amazon.  Would having my books arrive in Amazon-branded boxes reflect poorly on me (and potentially harm sales)?
Comment: If you are selling primarily through bookstores, have you considered finding a printing house to do short print runs? By the time you give Amazon 30% of your royalties, you may find short print runs are cheaper. You'd have to do the math. Printing houses will be used to shipping direct to distributors.
Answer: You may be in breach of contract if you sell your books anywhere but Amazon.
I'm not having much luck finding definitive contract information about this but according to one source an exclusivity agreement with Amazon's KDP Select program will forbid you from selling in other marketplaces. This restriction only applies to the "Select" program.
It also appears that Amazon has gone from it being difficult for bookstores to order direct (via Ingrams) to basically impossible.

From: "http://Amazon.com" mailto:email@example.com
Subject: Your Amazon KDP Inquiry
Date: January 24, 2019 at 10:06:53 PM CST
"From your email I understand you want to know how can your vendors
order wholesale copies of your book …
Unfortunately in KDP does not offer CreateSpace Direct as a
distribution option so that copies of your book can be ordered at
wholesale price. They will have to now place order for your books from
Amazon at the price list on Amazon."

So your options are to have the bookstore place their own wholesale order through a distributor like Ingrams or for you to do what you suggest, buy author copies and send them to the bookstore.
It's unclear if your books will even be in the distributor catalog, but it's worth checking.  This is the best option.  Completely above board and what most bookstores prefer.
For you to buy and ship books means double shipping fees (if you aren't local to the store) and it's unclear if it's allowed by your contract.  If you ship the books directly to the store you avoid double shipping fees but it may not be allowed.
I don't understand why you're asking about the Amazon-branded boxes.  If the bookstore wants copies of your book in this way, they won't care what boxes they come in.  If you're sending them on spec, well, it's a waste of your money.
Comment: Just to clarify, I'm not using Select so there are no contractual issues.  I'm ordering author copies and sending them to bookshops and handling all billing, etc.  What I'd like to be doing is ordering author copies with the shipping address being the bookshop (I haven't seen anything stating that this is disallowed).  As far as expanded distribution goes (e.g. Ingram), those sales are basically nil for me so thus not a concern.
Comment: @AlexHajnal ask the bookstores.  Why pay double shipping if you don't have to?
Comment: Yea, double shipping (cost + latency) is what I'd like to avoid.  Not sure how I'd go about asking the bookstores what their view is since the crux of the matter is that I'm concerned that having stores know I'm using Amazon for printing could harm sales.


How do measures of error or uncertainty change, when the underlying variable is transformed?

Question: If I have a measurement $A$ with uncertainty $\Delta A$, then what is the error if I do a calculation like $\frac{A}{\sqrt{3}}$?
Comment: To add to the answers, more generally search for error analysis.
Answer: In general, if the calculation is multiplication by a constant, then you multiply the uncertainty by the same constant. That's assuming that "uncertainty" refers to something like standard deviation, rather than to variance: if it's variance, then you multiply by the square of the constant.
If it's addition of a constant, it doesn't change the uncertainty.
If it's doing anything fancy like taking a log or raising to a power, or including some other random variable or more than one observation of your existing variable, then it gets complicated: and as a general approach, one can run a Monte Carlo simulation to get a numeric answer.
Answer: I'f I understand correctly the error should be (delta A)/sqrt(3). Then the percentage error would be that over the actual answer.


How can I use a lens from a Nikon S1 on a D3300?

Question: I have a Nikon S1 that I wanna use the lens from on a D3300.
Is there a adapter I can use?
Comment: Possible duplicate of [Can I use lens brand X on interchangeable lens camera brand Y?](http://photo.stackexchange.com/questions/62000/can-i-use-lens-brand-x-on-interchangeable-lens-camera-brand-y)
Comment: Although in this case, it's "lens brand X on camera brand X (but a different line".
Comment: @mattdm Had that thought, too. But retitling to "mount/brand X" and "mount /brand Y" could get cumbersome. :)
Answer: No. That is not really possible without additional optical elements. The S1 has a much shorter flange distance than the D3300, so there are adapters to use F-mount lenses on a 1-mount camera but not vice-versa. Also note that the field-of-view will change completely when you adapt between different sensor sizes, so your everyday lens may not be one anymore. As a matter, lenses for the S1 are unlikely to cover the image circle needed for an APS-C DSLR.
As for something for the D3300, the concept of everyday or walk-around lens is highly subjective. A good amount of people like a wide-to-mid-range zoom but some are OK with a single prime lens and others feel the need for a super-zoom. You will have to decide based on your own experience. Its is much about how you see the world and conditions you shoot in.
Among Nikon lenses, I would opt for an AF-S 17-55mm F/2.8G as a general purpose lens but would actually prefer a Sigma 18-35mm F/1.8. A lighter weight option is the Nikkor AF-S DX 16-80mm F/2.8-4E which seems interesting but I have not tried to yet, so I have no idea how it performs. Again,  this is a personal opinion based on my shooting habits.
Comment: Thank you for your help!  My everyday len I use on my S1 is Nikkor 10-100mm 1:4-5.6 VR this lens for me is a nice everyday, I do wanna get a macro lens for close up but thats when I'm rich lol.  My zoom is 70-300mm 1:4.5-5.6 VR  This one was my first and it does reach out lol I'm still learning as I go.   As far as the D3300 it has 18-55mm 1:3.5-5.6 she wants more zoom so maybe I'll have to look for that instead of a everyday shot lens. again thank you for your help!!
Comment: You see, the 10-100 is equivalent to 27-270mm on a full-frame. Since the D3300 is APS-C, 18-180mm would cover the same range. As it turns out, Nikon has an 18-200mm which is one of the better super-zooms, it's not fantastic but such is the compromise for a long reach. At least, it performs much better than the 18-55mm kit lenses.


How to configure DHCP to assign devices to subnets?

Question: I have Windows 2008 R2. There are three classes of devices on our network- IP phones, Handheld (WM5 & 6) devices, and everything else (Computer, printers, servers). I use 2 Cisco Catalyst switches and have everything on a single VLAN. Our IP phones are Cisco also. I would like to create three subnets to handle these three different classes of equipment. I have a remote site with a Windows 2008 DHCP server that I would like to configure. What is the best way to set this up? Thanks for your help!
Answer: You need to have a separate vlan for each subnet, and that means a switch that supports layer 3 to route between the vlans. Then you set an ip-helper in the switch for each vlan that allows the switch to pass dhcp traffic through to your server.
Now you can set up the separate subnets (scopes) in your dhcp server. The dhcp server will know which scope to use for which request because of which virtual interface the switch used to forward the request. If your phones are sharing ports with the PCs (connection passes through the phone to reach the PC), you can set LLDP information in the phones and configure the switch to use that information to know to assign the proper vlan to them.
Answer: You can have everything on a single VLAN, but YOU have to define how to separate them. I wouldn't recommend using Windows 2008 as the DHCP server, isc-dhcp-server is much more powerful. Here's how I would do it:
<code># MODIFY TO MATCH YOUR ENVIRONMENT
class "phones"    { match if substring (hardware,1,3) = 00:11:22; }
class "handhelds" { match if substring (hardware,1,3) = 00:33:44; }

# Common configuration
option domain-name "your.domain.name.here";
option domain-name-servers 192.168.2.2;

shared-network lan {
        # phones
        subnet 192.168.0.0 netmask 255.255.255.0 {
                pool {
                        range 192.168.0.10 192.168.0.254;
                        allow members of "phones";
                }
                option routers 192.168.0.1;
                option subnet-mask 255.255.255.0;
        }

        # handheld devices
        subnet 192.168.1.0 netmask 255.255.255.0 {
                pool {
                        range 192.168.1.10 192.168.1.254;
                        allow members of "handhelds";
                }
                option routers 192.168.1.1;
                option subnet-mask 255.255.255.0;
        }

        # Everything else
        subnet 192.168.2.0 netmask 255.255.255.0 {
                pool {
                        range 192.168.2.10 192.168.2.254;
                        allow unknown-clients;
                }
                option routers 192.168.1.1;
                option subnet-mask 255.255.255.0;
        }
}
</code>
Comment: Yes, `(hardware,1,3)` means the first three octets of the MAC address.
Comment: OK, I don't have choice on the DHCP server, but reading this configuration as a human, it looks like you want me to configure DHCP to subnet devices based on MAC address, right? And the hardware 1,3 definition at the top is a DHCP option number, right?


Reading & Writing Serial Port COM3 connected using USB to serial connector

Question: I am using Direct IO for reading and writing data to serial port for sending sms using the modem (SIMADO GDT11 IN). Reference: http://php.net/manual/en/book.dio.php
Code was working fine in windows10 32 bit but now I have upgraded to 64 bit OS, Now the code is not working. Can anyone let me know what will be the issue and help me to sort it out.
Answer: Direct I/O is only usable with 32bit operating systems.
Most of the legacy applications (16bit or 32bit) either won't run well under 64bit operating systems.
Comment: Either you can downgrade to 32 bit or create a 32 bit virtual machine.
Comment: Thanks for the info. Can you let me know how to create 32 bit virtual machine? @Michael


What if the numbers and words I wrote on my check don't match?

Question: I accidentally submitted a check today where I put the wrong cents amount in the written portion, i.e. "Two hundred nine and 00/100", and put the correct amount in the number portion, "209.53". The check is being paid to the state department; will the correct amount get accepted, or will it be rejected?
Comment: Does this answer your question? [What if I received a check with two different amounts written on it (words vs. number)?](https://money.stackexchange.com/questions/13372/what-if-i-received-a-check-with-two-different-amounts-written-on-it-words-vs-n)
Answer: If the check is paid, the written words would take precedence.  So if it is paid, it should be paid for 209.00 as written.  However, it may take some time for the bank to notice the discrepancy.  It is possible that it would be paid for 209.53 and then a 53 cent correction would subsequently be made.
It is also possible that the recipient would reject the check because the amounts don't match rather than cashing it and spending time dealing with any corrections that are made.  Conceivably, the bank might reject the check but that would generally only happen if they thought the discrepancy was the result of attempted fraud (i.e. someone added the "53" to the courtesy line) and it seems unlikely anyone would commit check fraud to add 53 cents to a check amount.
Comment: In the UK figures are the 'courtesy' amount;  the words are the 'legal' amount,  and that is what would normally be taken if in doubt. However the application by banks is inconsistent and some will only take the lower amount - whichever that is. And some banks won't accept it mismatched cheques at all. When I worked in payment processing for a large UK body, we used to send back any cheques that weren't 100% correct, including differing words/figures.
Comment: Given that this is the state department, there is a chance they will take the routing and account number and just debt the correct amount via an e-check.  The actual check will never make it back through to the bank in this case and no one will see the discrepancy.
Comment: I tagged the question as US-related. In some countries mismatched amounts would render the check invalid.
Comment: @rtaft: I recently renewed my US passport (which is almost certainly the service that OP is purchasing, based on the price), and the check number does appear in my bank statement, which suggests to me that they processed the paper check as such rather than doing a whole transaction from scratch. Curiously, it is marked as an "ACH" transaction rather than a check, but I assume that's just because all of this stuff gets settled electronically these days, rather than because they actually transformed the check into a different sort of transaction.
Comment: @Kevin I too recently renewed my US Passport, the entry on my statements looks like `PASSPORTSERVICES PAYMENT SERIAL NUMBER: #### PCTB############ 00000000000####` where a normal check looks like `CHECK 00000000000####`.  There is NO check image available, which is what made me think of this.


Hindi Typing Tutor application

Question: I have been trying to learn hindi typing which uses Devanagari script.  Do we know if there are any typing tutor applications for Hindi language (देवनागरी लिपि)?  The standard official script adopted by Indian govt. for administrative purposes is "inscript".  There are different varients of Hindi keyboard layout, but I am specifically looking for the "inscript" layout.
Answer: I believe this is the link where we can download the typing tutor but so far I am unable to download it as it gets timed out.
http://pune.cdac.in/html/gist/down/key.asp
Comment: link is working but the program is for windows only and is not working through wine
Comment: This seems to be obsoleted by your other answer which provides more details.  At the time, editing your existing answer to update it would have been preferred, but now you should probably just delete this one.
Answer: Here is another thing I discovered over a period of time.  We can download the hindi typing tutor from http://pune.cdac.in/html/gist/down/key.asp
CDAC have designed it to work in DOS.  In Ubuntu we have an application known as DOSBOX.  This is basically a windows DOS emulator.  After installing this application, we can practice hindi typing in Ubuntu.  All it requires is the learning of basics of DOSBOX to run the .exe files.
Comment: link doesn't work. try searching for GIST CDAC
Answer: I know that Klavaro claims to be language- and layout-agnostic. It starts with teaching you the home row and branches out, teaching you groups of keys at a time. You can also supply texts to use as practice. I don't know how good it is with non-European languages in practice, but it's free and available in the Software Centre, so you could give it a go.
Comment: does not have hindi!
Comment: not even marathi!!

Hindi Typing Tutor application


Overflying the 100 hour when airplane is not for hire

Question: Suppose I have a 100 hour inspection at 2000 hours total time. From 2100 to 2190 the aircraft is not being operated for hire. If I then have a 100 hour inspection at 2190, when is the next due?
Answer: Its good until 2290 on the clock. If you look at the wording of the FAR

(b) Except as provided in paragraph (c) of this section, no person may
operate an aircraft carrying any person (other than a crewmember) for
hire, and no person may give flight instruction for hire in an
aircraft which that person provides, unless within the preceding 100
hours of time in service the aircraft has received an annual or
100-hour inspection and been approved for return to service in
accordance with part 43 of this chapter or has received an inspection
for the issuance of an airworthiness certificate in accordance with
part 21 of this chapter. The 100-hour limitation may be exceeded by
not more than 10 hours while en route to reach a place where the
inspection can be done. The excess time used to reach a place where
the inspection can be done must be included in computing the next 100
hours of time in service.

In other words when you are operating the aircraft in a situation where the 100 hour inspection is required, to be legal for such operations, such inspection had to have occurred at some point in the last 100 hours (or within the last 110 hours if you are flying the aircraft to a location to have the inspection done).


When Should Namespaces Become Their Own, Independent Class Libraries?

Question: I could use a little advice on naming my assemblies
(ie. When to turn a logical naming convention in my
namepaces into its own DLL).
I recently downloaded an example project with a ton of
class libraries in it that almost exactly mirrored the
namespaces.
To date, I have been building one massive class
library - MyProject.DLL - and referencing it in my
project. This way, I only need one library and can
access all namespaces using it.
But, in the project I downloaded, there seems to
be a DLL for every namespace (and, in some cases,
subcategoreis within a namespaces. For example,
SomeProj.Web.Security has SomeProj.Web.Dll and
SomeProj.Web.Security.Dll).
I understand that having multiple DLLs can make
it easier to focus on particular areas of the project
(and, probably, updating the DLL withing the site
easier) but is there a best practice here?
Thanks in advance...
Answer: OK, this pretty much answers my question:
http://msdn.microsoft.com/en-us/library/ms229048.aspx


Discrete Variables and Regression

Question: I have only discrete independent variables (gender, religious affiliation etc) and continuous dependent variables.  Is it possible to use a regression model?
Answer: Yes, though you will want to convert the categorical variables into dummy/indicator variables.  Most statistical packages will do this for you as long as it is clear that they are categorical.
Technically when all predictors are categorical you are doing ANOVA, but since many of the statistical packages use their regression code to do ANOVA anyways, it does not matter.  If you design your dummy variables appropriately then the regression approach can give more insight than a simple ANOVA fit.
Comment: It might help to clarify the distinction b/t *discrete* variables & *categorical* variables for the OP.
Comment: Just a note to add to @greg snow's response: Most (if not all) statistical packages will make these dummy codes for you. Certainly SAS, R and SPSS will

Discrete Variables and Regression


Existing touch gestures meaning "create new"?

Question: I'm looking for any existing touch gestures that mean "create new" (e.g. "create new document", "create new graph", "create new tweet", etc). Can anyone cite any existing "create new" gestures?
Answer: Gestures that don't mimic real physical interaction are not easily learned. I would suggest you do not use a gesture for this but a button, icon, or text instead.
Questions to ask before introducing a gesture:

Am I adding value? Or is it a gimmick?
Does this gesture make sense if it were manipulating the physical.
How many seconds does this add to the users goal? Both in action and in learning.
Comment: No, it really shouldn't be a commit as it points out a very valid point of when to use gestures and cite reasons not to make one up for a "non physical" action.  Just because you are in a "gesture environment" does not mean you should have a specific gesture for each action.  A button labeled "create new" is much more intuitive to a user the any gesture you'll create.
Comment: @evil-closet-monkey I would say jonshariat's answer suggests a general heuristic, but like most heuristics, there are usually exceptions. My question was very pointed and didn't require any specific use cases, BUT lets say a power user wanted a qestural shortcut that could be used anywhere on a app or site... then we've created the gestural equivalent of a keyboard shortcut. Such a gestural shortcut *does not* preclude the existence of a obvious button, icon or text link.
Comment: The original question is still valid, this answer should be a comment on the original question
Comment: @hammerbrostime Did you see my questions? Do you feel your product requirements passes those? Perhaps expand more on what the product does?
Answer: This movie on Vimeo displays the Clear iOS app. It demonstrates some gestures that create new items. I'm not saying they are standard, but it may be a start. They seem to have two: pull down, and pinch out.
Answer: I believe a gesture would come with familiarity in using a product, much like keyboard short-cuts on OSX & Windows.
A button should be provided to create new, which can be hidden within an option screen, along with the ability to create the gesture for create new.


Security concept

Question: How do we know that the systems that we are using are secure? At what point do we have to audit the software that we use? How do unknown security threats affect software over time?
Comment: Hopefully the edits made this more clear...
Answer: Nothing is ever really secure.
That's true as long as people are still people. If you ask any developer about their programming project they can probably give you two-to-three hypothetical scenarios where someone could exploit their code (and how). In every development project there are always high-level decisions to be made, many in regard to the level of security the project warrants. This happens either because of lack of budget, lack of planning on the part of the development (or management) team, and simple oversight (can't see the forest for the trees). Because everything that we as a people do these days interfaces with some sort of external connection whether it's an ethernet cable, bluetooth dongle, wifi card, a cell tower, an ATM card reader (maybe a stretch), or even external USB devices such as thumb and hard drives there are never any secure machines.
Software audits should happen frequently (if not multiple times a day), but the frequency of the audits depend on a few things:

Is it a production machine in a production role?
How much do you need to keep the machine running? (Is it mission critical?)
What kind of protections are in place on the system? (antivirus, firewall, etc)
What kind of access avenues do outsiders have into the system?

Unknown security threats that arise after a software (or hardware) is released are commonly patched. Since most patches are released publicly as security updates, software updates, and firmwares this makes all other versions of the software(s) prior to the most recent currently patched version vulnerable to the now documented exploit the patch is supposed to be fixing.
An undocumented attack where no patch exists is referred to as a zero-day attack. Here is a recent warning about a Microsoft Internet Explorer 8 Zero day attack vector.
Most major antivirus / security monitoring applications will have a Bayesian pattern matching system sometimes referred to as a heuristic analysis in place that tries to prevent anything that looks similar to a documented style of attack that is happening live on a machine.
Answer: Security isn't about making something impossible to break.  It is about a cost/benefit balance between usability and protection.  It is practically impossible for any system to be 100% secure, however it is possible to make the effort required to break a system exceed the potential value of compromising the system.
Additionally, protective measures may reduce the value of the system to the legitimate users, so the risk has to be assessed and an educated decision made about where the appropriate balance between investing in protecting against attackers vs allowing ease of use for valid users.
The essence of security is about figuring out the best ways to allow users to do good things while preventing attackers from doing bad things in order to maximize the amount of protection that can be provided to make attacking less worthwhile.  In most cases (unless you make yourself a target) you don't have to be completely secure, you just have to be more secure than the next guy of equal value.  Even if you are targeted, you just have to be secure enough that the attacker will spend more attacking you than they will get from the result.
But no, we can't know things are secure, because even if a good effort has been made, a sufficiently determined attacker could always find a way to break it (even if that way is coming over to your house and threatening to bash your kneecaps with a wrench.)
Answer: In a (too simplified) nutshell, you have to balance the cost of loss and/or theft of information, with the cost to (try to) prevent them.
The book Practical Unix & Internet Security (3rd ed.) has a good (and very general, for every systems) introductory chapter talking about the security -vs- cost approach, and is a very interresting read.

Security concept


Sql Server xml column with Entity Framework - how to keep insignificant whitespaces

Question: Sql server 2005 (even 2008) strips the insignificant whitespaces by default.  To keep one can use the CONVERT funtction with the last argument as '1' (Ref. Article).  How can we do the same thing in Entity Framework?
thanks
Answer: I found a workaround for the problem. You can set the xml attribute 'xml:space=preserve" at the document level.  Both Sql server 2005 and 2008 respect the attribute setting and keep the whitespaces.  it was a pleasant surprise.  Unfortunately, MSDN documentation does not explicitly say this.


How to (Right click + Move mouse to the Left) in MACBOOK PRO

Question: I am using Genymotion and playing game: Clash of Clan. To Zoom in I need to : Right click + Move mouse to the Left. How can i do this Macbook pro retina display 15 inch. I know that  tapping with two fingers means right click. I tapped with two fingers & without pulling them back i moved them to right of screen but nothing seems to happen. I also used my third finger to move right while tapped with 2 fingers but neither of these two tricks worked.
Comment: Try Control/click or Cmd/click [system uses ctrl, some games use cmd]
Answer:
Press down on the trackpad with two fingers to click the trackpad.
Keep the fingers held down and move them left.
Release fingers.


Why I can only launch linssid from terminal using sudo

Question: I installed linssid from appcenter and it wont launch. It only launchs from the terminal using sudo. how can I fix this?
Answer: I think this is because an outaged version of linssid in appcenter (2.9 I guess). The way how to get Super User privileges in GUI has meanwhile probably changed (you will need administrative privileges to sniff network traffic).
You can download an updated version from here and install the deb manually or add a ppa to your system and install via terminal:
<code>sudo apt-add-repository ppa:wseverin/ppa
sudo apt update
sudo apt install linssid
</code>
Please consider this (old but still relevant) question and answer when adding external repos to your system.
Comment: Thnks for answer but downloading the updated version didn't solve it. I tried to add a sudo command in the launcher but didn't work.


Change squid3 access.log

Question: Where lies the config file to change the output of the access.log file?
I want to remove the website the user was browsing and format the time so it's human readable.
Answer: You can define a custom log format in squid.conf with the logformat directive. This can then be used in the access_log directive:
logformat nourl  %tl %6tr %>a %Ss/%03>Hs %<st %[un %Sh/%<a %mt
access_log daemon:/usr/local/squid/var/logs/access.log nourl

will output a log file similar to the squid default, with time in local time and HTTP method and URL removed.
Comment: Glad it worked, and sorry for confusion - I did link to the documentation so thought it might make it clear (although I see now that it's not clear that the `directives` don't look like hyperlinks). I've modified the answer for future reference.
Comment: Awesome. Worked like a charm!
The only thing that didn't work, was the last bit of logformat. "%<a %mt" should be a capital 'a'. And at first I didn't know that you have to set it up in /etc/squid3/squid.conf file. Thought it was kinda misleading to write "This can then be used within access_log". Should rather be "within squid.conf". Thanks though.
Comment: Thanks for this, wanted to log the proxy username, and helped me too. It was %un btw

Change squid3 access.log


iTunes is changing the number/order of tracks in an album when it loads into my iPod. I want the tracks to stay in order

Question: iTunes changes the number (and therefore) the order of tracks in an album when make a new playlist. Therefore, I cannot listen to an album in the correct order. I want the tracks to stay in order when I create a new playlist. It is worse than shuffle because the actual number of the tracks gets changed, so I cannot tell what order the tracks should be in.
Comment: When you say it changes the "number", do you mean the actual track number, or the number all the way to left of the track when viewing the playlist (as shown in [this screenshot](http://i.stack.imgur.com/YvU4z.png))?
Comment: Are you certain all the tracks on the album are "checked" so they are all *supposed* to be synced?
Answer: I'm not sure why this is happening, but you can fix it by clicking on a track, going to File > Get Info (or ⌘ Cmd-I) and changing the track numbers back to the correct information.
To get the correct track number, you can try googling the album. Somewhere will surely have the titles and track numbers.
Comment: ah, there it is "kbd", not "key" :D
Answer: Easy to EDIT playlist and put in order downloaded or whatever.  Click DONE and will put in new order.  My problem is I have to do this every time I open iTunes.  I agree it won't "stay" in the order set.  Especially a problem for downloaded books.  Need to make sure each playlist is in correct order before you sync.
Answer: There is no answer.  The latest version of iTunes completely boned all users  You cannot drag folders into a playlist and have the order of the songs be proper.  Yes you can edit them by switching to "songs" view and sorting by "playlist order" (the first column), but that is a major hassle and I now hate iTunes because of it.
The only way I have found to import a folder of songs and have them retain their proper order, is instead of dragging in the folder, highlighting and dragging the songs.  For each folder.  It's a terrible waste of time but at least you don't have to rearrange each song in the playlist.
It started with version 12 and there is absolutely NO GOOD reason for this, and they'd better fix it soon.
Answer: I may have found an answer, go to view In iTunes and select "sort by playlist order", it seems to have stopped tracks on a CD  appearing in the wrong order.
Hope this helps.


What is the use of unsafe_unretained attribute?

Question: I know the definition of unsafe_unretained.
So i don't expect anyone to write its definition.
I want to know its use with example, and how it works with memory management.
Comment: You can check
http://stackoverflow.com/questions/8592289/arc-the-meaning-of-unsafe-unretained
Answer: unsafe_unretained only exists in ARC (Automatic Reference Counting). It works like assign in MRC (Manual Reference Counting). These properties won't be retained. Usually, you'd want to use such properties for delegates, because they don't need an owner which retains them.
weak properties are like unsafe_unretained, except that they work a bit smarter. When the object assigned to the property is released, a weak reference automatically becomes nil, to avoid crashes when sending messages to that object (its memory address).
unsafe_unretained properties don't do this. They will always hold on to the memory address (unless you manually change it) assigned to it, regardless of the object associated to that address. Weak references can prevent crashes in such a case, but the result still won't be as expected. If your code is organized and well-written, this shouldn't happen.
So why would you use unsafe_unretained instead of weak? Weak references are only available on iOS 5 and higher, so if you're building an ARC app targeting iOS 4, you need to use unsafe_unretained properties. And again, sending messages to a released property isn't anything you want to have in any code. If your code is well organized then you shouldn't have any problems with this.
Answer: Previously to ARC, one might specify a delegate or other reference-to-parent property as assign to prevent retain cycles. With the introduction of ARC and the newer compilers you would instead use unsafe_unretained.
So you use it any time you do not need ownership of the reference, and when you don't need or want to use the new weak reference type (which nulls out the reference when it is deallocated).
Answer: Here is a specific use case for unsafe_unretained. Say two classes reference each other, one direction being strong and the other direction weak. During dealloc of the first class the weak reference to it from the second class will already be nil, preventing proper cleanup to take place. Replacing the weak reference with an unsafe_unretained reference will solve this issue. See the code sample below:
@class Foo;

@interface Bar: NSObject

//Replacing weak with unsafe_unretained prevents this property from becoming nil during Foo.dealloc
@property (nonatomic, weak) Foo *foo;

- (id)initWithFoo:(Foo *)foo;

@end

@interface Foo : NSObject

@property (nonatomic, strong) Bar *bar;

- (void)startObserving;
- (void)endObserving;

@end

@implementation Bar

- (id)initWithFoo:(Foo *)foo {
    if ((self = [super init])) {
        self.foo = foo;

        //Start observing
        [self.foo startObserving];
    }
    return self;
}

- (void)dealloc {
    //Since foo is a weak property, self.foo may actually be nil at this point! See dealloc of class Foo.
    [self.foo endObserving];
}

@end

@implementation Foo

- (id)init {
    if ((self = [super init])) {
        self.bar = [[Bar alloc] initWithFoo:self];
    }
    return self;
}

- (void)dealloc {
    //This will trigger the deallocation of bar. However, at this point all weak references to self will return nil already!
    self.bar = nil;

    //endObserving is never called, because Bar.foo reference was already nil.
}

- (void)startObserving {
    NSLog(@"Start observing");
}

- (void)endObserving {
    NSLog(@"End observing");
}

@end

Answer: unsafe_unretained does not interact with memory management at all. In ARC, the following code
{
    __strong id obj = someObject;
    obj = someOtherObject;
}

is equivalent to
{
    id obj = [someObject retain];
    [obj release];
    obj = [someOtherObject retain];
    [obj release];
}

in a non-ARC environment. So strong references keep the object alive. If you assign them a reference to another object, the old reference is first released. The same thing happens if such a reference goes out of scope. Note that references are strong by default, so usually you never have to use __strong unless you want to emphasize that a variable is strong.
A weak reference won't keep the object alive and becomes nil if the retain count of the object last assigned to it becomes zero.
__weak id wobj = nil;
{
    __strong id obj = [Object new];
    wobj = obj;
    // wobj points to the same object as obj
}
// wobj is nil again

Inside the scope obj keeps the object alive and thus wobjc points to the same object as obj. But when obj goes out of scope, the object is released and as that was the only strong reference to it, is deallocated. As a result wobj becomes nil.
An unsafe_unretained retain reference is just a pointer to the object that has no knowledge about Obj-C memory management at all. The code
_unsafe_unretained id wobj = nil;
{
    __strong id obj = [Object new];
    wobj = obj;
    // wobj points to the same object as obj
}
// wobj points to the memory address where an object used to be.
// This object has been deallocated! wobj is a dangling pointer!
// Trying to access the object via wobj may crash the app or cause
// other undefined behavior.

is equivalent to
id wobj = nil;
{
    id obj = [Object new];
    wobj = obj;
    [obj release];
}

in a non-ARC environment. wobj won't be nil but the object it used to point to has already been dealloced and the memory may not even belong to the process anymore or it may have been recycled to store another object or any kind of allocated data (e.g. using malloc()).
Usually you want to use weak for references that don't keep the object alive. A typical situation where this is a problem is if object A has a strong references to object B A->B, and the other way round B->A. That is a retain cycle and now neither object A nor B will ever get released again, because A keeps B alive and B keeps A alive, and that is still true if nobody else has any reference to either A or B, both objects will always have a retain count of at least one. To fix that, one of both must have a weak reference to the other one.
E.g. if you write a XML parser, then XML nodes will have strong references to all their sub-nodes, to keep those alive and accessible but sub-nodes typically have a reference to their parent node and that would then be a weak node. That way you can get back to the parent node from any sub-node but they don't keep the parent alive, so if nobody else does (neither its parent nor any external reference), the parent node dies and the sub-nodes of it die with it.
Usually the only reason to use unsafe_unretained is performance. First of all, every object has a linked list containing all the address pointers of weak variables pointing to this object, so when the object dies, all these variables can be set to nil. Managing that linked list consumes time and the list itself consumes memory. Then every weak reference must temporarily become strong to ensure an object won't be released why you call a method on it. And finally, all of this must happen thread-safe, so it will always involve locking, even if your process is single threaded.
__weak id obj = someObject;
[obj performMethod];
obj = nil;

in fact is complex code behind the scenes and roughly equivalent to
lock(memlockOf(someObject));
id obj = someObject;
addWeakRefToLinkList(someObject, &obj);
unlock(memlockOf(someObject));

lock(memlockOf(obj));
id temp = [obj retain];
unlock(memlockOf(obj));
[temp performMethod];
[temp release];

lock(memlockOf(obj));
removeWeakRefFromLinkList(obj, &obj);
obj = nil;
unlock(memlockOf(obj));

And keep in mind that C pointers cannot be weak, so they are always unsafe_unretained. If you do this
id obj = [Object new];
void * cptr = (__bridge void *)obj;

Then cptr is in fact an unsafe_unretained reference to the object. You can make a C reference "quasi strong" if increase the retain count
id obj = [Object new];
void * cptr = (__bridge_retained void *)obj;

this is equivalent to
id obj = [Object new];
void * cptr = (void *)[obj retain];

in a non-ARC environment. The retain counter is increased by one and thus ARC will never release that object, as even if all ARC references go away, the object has at least a retain counter of one left.
But now the object is never released at all, unless you balance that with transfer bridging:
{
    id obj = (__bridge_transfer id)cptr;
    // Use obj all you want but don't touch cptr after that!
}

which is equivalent to
{
    id obj = (id)cptr;
    // Use obj all you want but don't touch cptr after that!
    [obj release];
}

in a non-ARC environment. It's important that "transfer" means you are transferring the ownership back to ARC and thus you must not touch the cptr variable after doing so, as now ARC decides when the object dies and it won't set cptr to nil when that happens. Transfer means "make a strong ARC reference out of it but don't do anything with the retain count", so the retain count is not increased but once the strong reference is lost, the retain count is decreased as usual and this balances the extra retain of the retained bridging where the retain count was just increased but nothing else did happen.


Doppler effect and apparent frequency

Question: What is meant by "apparent frequency"?
I mean the answer we get by applying the formula; what does it signify?
If it is the frequency received by the observer, does it mean that the observer receives the same frequency no matter what the distance of the source?
Shouldn't distance of play a role?
Answer: Actually, in an ideal situation distance of the source will not matter. In real life, the farther the source, the greater the damping effect on the wave. The sound loses energy and hence the amplitude and intensity fall.
However, this does not affect the frequency. Frequency is given by the formula fλ=v where symbols have usual meaning. When observer moves towards the sound source, he receives more waves per second, irrespective of the distance. When sound source moves towards observer distance between consecutive waves i.e wavelength decreases and hence frequency increases, depending only on speed of source and not distance. Everything related to frequency depends upon the speeds of the waves, source and observer.( I chose not to go in detail about the workings of the Doppler effect as that is not actually the focus of your question. I hope that you have a basic idea of this phenomenon).
Answer: Picture yourself at seaside, and consider the frequency at which waves are reaching your feet. This frequency does not depends on where you stand. Distance plays no role.
Now if you move towards the ocean, or towards the beach, the period between two successive waves is altered.

If you run to the beach as fast as the wave moves, you will follow a crest and never get reached by the following one - the frequency is down to 0.
If you run towards the ocean, you will face crest after crest more often then if you stay still - the frequency is increased.
Answer: Doppler effect is the change in frequency (pitch) of a source when there is a relative motion between the source of the observer. It occurs in both sound and light waves.

Doppler effect and apparent frequency


Relative $A$-Boundedness of Operator

Question: Let $A, B$ operators on a Banach space $X$ with $\operatorname{dom}(A) = \operatorname{dom}(B)$. Futher let $A$ and $A + B$ closed. Then there exist $\alpha, \beta \geq 0$ with
$$\Vert B x\Vert \leq \alpha \Vert A x\Vert + \beta \Vert x \Vert$$
for all $x \in \operatorname{dom}(A)$. I don't see how to achieve this inequality. Since $A$ and $A + B$ are closed I know that the graph norms are complete but I dont see how to use that. I also tried to use the sequence characterization of closedness but i struggle to facilitate that. I would appreciate some hints on the topic :)
Answer: Let $X \oplus X$ be the Banach space of pairs $(z_1, z_2) \in X\times X$ with the norm
$$||(z_1, z_2)|| = ||z_1|| + ||z_2||.$$
Consider the operator $(A, A+B) : D \to X \oplus X$ where $D = dom(A) = dom(B) \subset X$. We claim it is a closed operator. To see that, suppose
$$x_n \to x \in X;$$
$$(A, A+B)(x_n) \to (y, z) \in X \oplus X.$$
Considering how we defined the norm on $X \oplus X$, the second equation gives us
$$Ax_n \to y$$
and
$$(A+B)x_n \to z.$$
Now it follows from the closeness of $A$ and $A+B$ that $y=Ax$ and $z = (A+B)x$.
Next observe that the projection $(x, Ax, (A+B)x) \to (x, Ax)$ from $\mathrm{Graph}\, (A, A+B)$ to $\mathrm{Graph}\, A$ is obviously continuous so the open mapping theorem gives us an estimate
$$||Bx|| \le ||x|| + ||Ax|| + ||(A+B)x|| \le C(||x|| + ||Ax||).$$
Comment: @Yaddle, the graphs are closed so they are Banach spaces with those norms. The projection in my answer is a continuous bijection so we can apply the open mapping theorem https://en.m.wikipedia.org/wiki/Open_mapping_theorem_(functional_analysis) and get that the inverse of this projection is continuous as well. That's what we wanted.
Comment: I don't see how you get the estimate to be honest. I see that you get by continuity an estimate of the form: $\Vert Ax \Vert + \Vert x \Vert \leq C(\Vert(A + B)x\Vert + \Vert Ax \Vert + \Vert x\Vert)$. But how does this help you?
Comment: Now I see it. Thanks :)

Relative $A$-Boundedness of Operator


Will the recently found OpenSSL vulnerability Heartbleed affect my public site for which I obtained an SSL certificate from a CA?

Question: I had generated the CSR with OpenSSL. Do I need to regenerate a new CSR with no vulnerability due to OpenSSL in order to obtain a new certificate from a CA?
Comment: Yes. Otherwise you're using the same key, which defeats the purpose.
Answer: There is no problem with CSR's generated with a vulnerable version of OpenSSL.
This doesn't mean your keys were not compromised via an actively running server, but it sounds like you understand that.


Should I remove this carpet glue from basement concrete before laying a floating floor?

Question:
I'm looking to remove my basement carpet and replace with a floating floor. Not sure if I need to scrap up this glue when I will be laying a 6 mil vapor barrier over the concrete anyways. The black part in the picture is where I tried scraping some of the glue.
Comment: If you do decide to get the glue off, Goo Gone is your friend. It turns the stuff to mush in ten minutes and then the glue and stuff comes right up with a scraper. Otherwise it is back breaking work.
Answer: if you follow the directions for the new flooring, the answer would be yes, to scrape it all up. here's the thing, when doing floating flooring, the floor underneath needs to be smooth, or you could feel imperfections through the floor as you walk. now that being said, as long as there are no big ridges in the glue and its all smooth, you should be able to get away without removing it. make sure that you remove all of the old tack strips and nails, getting the subfloor/concrete as smooth as you can before you install the new flooring.
I put in laminate flooring with attached underlayment back in april. There were a couple of spots on my subfloor that were not 100% even, joints in that were off by 1/4" and I was able to leave them, and now you cant even tell they are there.


Installed Ubuntu on Surface Book. No inputs

Question: I installed Ubuntu on my Surface Book this week, wiping Windows. During installation I noticed that the keyboard and mouse weren't working, so I used USB to install, deciding I'd fix the inputs later if they still didn't work. I genuinely thought I'd get my head around this, but I still haven't. Is there a way to repair the input drivers so they work like normal again, or am I going to have to re-install Windows 10? I just don't know quite where to look for the drivers, or at least in a format that would make them usable on Ubuntu.
Comment: You might find some useful info on [this Reddit thread](https://www.reddit.com/r/SurfaceLinux/comments/3qcqha/ubuntu_on_surface_book/)
Answer: Ubuntu 16.04 doesn't work straight out of the box on a surface book. You need to use an external keyboard after installation to get the dock to work. I followed these instructions and Ubuntu 16.04 works on my surface book. In summary:

Create a partition for Ubuntu in Windows
Download Ubuntu 16.04 ISO image, and set up Live USB install using rufus: https://rufus.akeo.ie/
Enter UEFI settings by shutting down surface, press and hold volume up button on surface, and at the same time press and release power button
In UEFI menu disable 'Secure Boot'
Go to Boot configuration and either: Swipe left on 'USB Storage' OR configure boot order so that USB Storage is on top, then restart

Install Ubuntu, then in a terminal, run:
<code>sudo apt-get update
sudo apt-get upgrade
echo "deb http://ppa.launchpad.net/tigerite/kernel/ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/tigerite-kernel-trusty.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 984AE706D31B333A && sudo apt-get update
sudo apt-get install linux-surface
</code>
And reboot


Can I use my WP with mobile operator 000-IT even in Germany?

Question: What is the meaning of a mobile operator version 000-IT (I think it's italian)?
Can I use that windows phone even in Germany or have I to change the operator? And when, how can I change it?
Answer: That is a carrier customization identifier (I think it's called a CSC when describing ROMs; I don't mess with those). The first part identifies the actual carrier (000 means it's not specific to any carrier). The second identifies the country that the phone was made for (IT is, as you guessed, Italy).
I see no reason this shouldn't work for you. The fact that it's not carrier-specific means it won't be SIM locked or anything like that. Being designed for Italy it may default to Italian language, but you can change that easily enough (it should ask you during the initial setup, in fact). So far as I know, there are no nasty regulations in Italy that would require the phone to have something on it that you wouldn't want, or to be missing something you would want (a lot of services are unavailable in China, for example, so Chinese phones tend to lack the ability to use them).
The only really likely problem would be a mismatch of mobile frequencies. If you use different bands (say, 1700MHz instead of 1800MHz) and the phone supports one but not the other (which is unlikely; I think pretty much all of Europe uses the same bands and new phones usually support all common bands) then you could have trouble.
For the record, if you really want to, you can probably re-flash the phone with a ROM from your carrier, or at least from your country. The only common reason to do that is if you want some carrier-specific customization that the phone didn't come with, though. You would use Nokia Care Suite, or whatever it's called now, to do this for a Lumia; for another model you'd have to find the tool and the ROM to flash onto it. Sorry for the vagueness, as I mentioned, ROMs aren't my thing.


When will an atom emit alpha particle, beta particle, or gamma rays?

Question: How can we predict which particle the radioactive element will emit?
Comment: Are you asking which decay channel an isotope with multiple possible decays will take and when the decay will take place? That's unpredictable. Or are you asking how we can predict the possible decay channels?
Comment: I am just asking that how will we know whether the emission that is going to happen is alpha,beta or gamma?
Comment: I can take a guess... my nuclear physics is very rusty. The primary driver for decays is nuclear binding energy. A radioactive isotope has to be in a higher energetic state than the sum of its decay products. Possible decays channels are to lower Z by alpha decay (Z->Z-2), by conversion of a proton to a neutron (Z->Z-1), to the same Z by emission of a gamma or to higher Z by conversion of a neutron to a proton (electron capture). The higher the energy difference between the initial and the final state, the more likely the process. The details are greatly complicated by nuclear structure.
Comment: Processes with shorter half-life are more likely to occur.
Comment: You get alphas from very heavy nucleii (e.g., actinides).  The daughter nucleus then often has an excess of neutrons.  Nucleii with an excess of neutrons tend to beta- decay.  Other, more esoteric decay modes tend not to occur in nature, but can happen in nucleii that have been transmuted in a reactor or in a particle accelerator.  Gamma emission often follows immediately or soon after other types of decay which usually leave a nucleus in a high-energy state.
Answer: An unstable nucleus may have a set of possibilities of decay channels, as you say, alpha decay, beta decay, neutron(s) emission, proton emission, gamma rays. A nucleus with deficit of protons is likely to emit positrons. A nucleus too much rich in neutrons may undergo beta decay.
Now all these possibilities compete, however, the most likely to be chosen is the channel with the shortest half-life. (See also the information in the comments below.)
Still, this is statistics, it can be applied for a sample of many nuclei.
Comment: Please see: none of the models is perfect. A good book on the decay is that of my advisor, Doru Delion, "Theory of Particle and Cluster Emission". It's hundreds of pages of theory. For instance in the alpha decay there is a competition between two processes, the alpha formation (more exactly construction) from its nucleons, and the emission. Now, prof. G. Royer prefers to work with the liquid drop model. The truth is probably somewhere in between all the models. Anyway there are different formulas for $T_{1/2}$ for even-even nuclei, for odd-odd, odd-even and even-odd. Indeed, it's not simple.
Comment: Are you aware of simple rules of thumb in nuclear physics to estimate the decay channels and half lives? My last nuclear physics class was decades ago and I never had to look at that question since.
Comment: I am currently dealing with the decay. Half-lives have to be calculated and the calculus is according to very complicated formulas, and these formulas are provided by nuclear models as liquid drop model, cluster model, shell model and others.
Comment: Thanks! I figured that there is no easy way that gets around the structure calculations.


How can I verify a job offer is legitimate

Question: I have checked out the company they say they represent and I believe Amerigroup is legitimate.  However, I question that the Online interviewer actually works for this company as stated.  They offered the position after an online interview and stated I should join them online at 8 a.m. the next morning (10/28/16) and that I would be working at home until they completed a facility in my area...they would send me a check to purchase what software I would need to perform the job from home.  When I checked the company out they have offices in West Palm, Fort Lauderdale and Orlando, FL  I am in Stuart, FL which is about 45 minutes from West Palm.  Just doesn't feel right!
Comment: [Quite similar, but not quite a duplicate](http://workplace.stackexchange.com/questions/3831/how-can-i-determine-if-an-ad-for-an-unusually-high-paying-job-is-a-scam)
Comment: So why haven't you contacted Amerigroup directly and asked them to confirm the interviewer's claims? VTC.
Comment: What is the job you would be doing?
Comment: Nij, I went online to do just that and can't find a number to call.  When you click on careers it directs you to Anthems, they do not list the job as one they have open.
Answer: If the job is something like processing payments, it is probably a well-known money-laundering or similar scam.
I would independently look up the phone number for the company (ignore what the interviewer gave you). Phone them and ask to speak to HR. I would explain the situation and ask them if they can confirm the job offer over the phone - and in writing too.
Never phone from a landline directly after receiving a call from the interviewer, they can hold the line open and pretend to be whoever (e.g. a bank or an employer) they told you to phone. Use a different phone or call a relative or friend whose voice you recognise first, then make the important calls after 30 minutes.
Never forget that a check can bounce weeks after it is credited to your account (after it appears to have "cleared") - you will be left owing the bank money. The people who sold you the special software they say you need, are the ones who benefit from this sort of scam.

Other references

Look for These Five Key Phrases to Identify a Work at Home Scam
Comment: calling a relative wont guarantee that they are off the line as they could use the number you dialed on a 2nd line of theirs and join the 2 calls.
Answer: If it sounds too good to be true, then it probably is. The red flags for me are:

It is implied in your question that you didn't apply to them, but they got in touch with you. Unless a recruitment consultant or someone you know makes contact with you, then it is unlikely to be legitimate
Not meeting a real person, face-to-face for interview is a big red flag. Even if someone reaches out to you electronically, then it is best to meet the hiring manager face-to-face before accepting an offer
Offering that you work from home is unusual. I've been fighting to work from home with my employers for 7 years now, and they haven't budged an inch. Working from home is a red flag here, because it may imply that there isn't a real office or a real business involved
Offering to send you a cheque to buy equipment just sounds wrong


Are intervals the same as chords?

Question: So are harmonic intervals the same as chords? I understand that an interval is the difference between two notes (pitches?), and to get them you have to play these two notes simultaneously. Isn't that the same as a chord?
Answer: An interval is just the difference or distance between two pitches.
https://en.wikipedia.org/wiki/Interval_(music)
Wikipedia differentiates between "harmonic" and "melodic" intervals. If the two notes are played simultaneously, it's a harmonic interval, but if they're played sequentially, it's a melodic interval.
A chord on the other hand consists of a number of notes (how many, opinions differ, but at least more than one note), and each pair of notes is within some distance i.e. interval from each other.

A three-note chord has three intervals.

the interval between the first and the second note
the interval between the second and the third note
the interval between the first and the third note
Answer: They are not the same, but they are deeply linked. Think of a card game like poker.

An interval is the value of the card in relation with another card: queen and king have an interval of one, jack and king an interval of two, and so on.
A chord is a collection or a group of cards: a hand, the turn flop and river, a deck, a stack, etc.

In short, an interval is a measurement of distance between two things, and a chord is a collection of those things (those things being musical notes in this case). Using people, an interval would be like the difference in height between two persons, and a chord would be like a group of persons (a classroom, a convention, a friend gathering, whatever).
So no, they aren't the same thing. We can dive deeper into why and how.
Interval
An interval is the distance between two notes. The interval can be melodic (one note is played after the other) or harmonic (both notes are played at the same time). So, an interval is relevant to both scales (melodic) and chords (harmonic).

In music theory, an interval is the difference in pitch between two sounds. An interval may be described as horizontal, linear, or melodic if it refers to successively sounding tones, such as two adjacent pitches in a melody, and vertical or harmonic if it pertains to simultaneously sounding tones, such as in a chord.

Can two notes be a chord?
It depends on who you ask. Some authors define a chord as three or more notes played at the same time, other authors define it as two or more notes played at the same time.

Ottó Károlyi writes that, "Two or more notes sounded simultaneously are known as a chord," though, since instances of any given note in different octaves may be taken as the same note, it is more precise for the purposes of analysis to speak of distinct pitch classes. Furthermore, as three notes are needed to define any common chord, three is often taken as the minimum number of notes that form a definite chord. Hence, Andrew Surmani states, "When three or more notes are sounded together, the combination is called a chord." George T. Jones agrees: "Two tones sounding together are usually termed an interval, while three or more tones are called a chord."

Are intervals the same as chords?
No. They are not the same.
You can think of the interval as the building block of scales and chords. Intervals build scales and chords, but they are not scales or chords themselves.
A major triad is composed of a major third interval between the root and second note, and a minor third interval between the second and third notes.
The diatonic scales are composed of a sequence minor and major seconds (harmonic minor has one augmented second).
If we define a chord as two or more notes played at the same time, then an interval when played harmonically can "be" a chord, but that's just because you are using the smallest building block available.
Some more concrete differences:

An interval is a magnitude of distance, while a chord is a collection of pitch classes. (distance measurement between two things vs a group of those things)
Chords can have an infinite number of notes. Intervals pertain two notes exclusively, not more, not less.
For a chord you need different pitch classes, while an harmonic interval can be between two pitches with the same class (unison and octave, for example).
Answer: A great question which needs answers!
No, they're not the same. Intervals are not chords, and chords are not intervals.
They do, however, have a sort of relationship, but it can get confusing - hence the question!
An interval - any interval - is defined as the space between two notes. It also needs the names of those two notes to be classified. To clarify - an inteval that sounds like m3 could well be. If the notes named are C and E♭, then yes it is m3. But C and D♯ sound the same. As do B♯ and E♭, but those are given different names, and fulfil different functions.  As such, any given two notes, sounding an 'interval', may have the same sounding interval, but different names. Like C>E♭ - a minor third. And, in 12tet, C>D♯ - an augmented second. Their sound together is identical, but the function they work in is very different, and, they won't look the same on the stave. They will, however, sound exactly the same. Every interval between two notes has this 'problem' - diminished 5th and augmented 4th as another example.
A chord - to most people - contains two or more intervals. Those between the first/second notes, and between second/third notes. There will be as many intervals as the number of notes minus one. (Moving sequentially from each note to the next one up). I'm not getting embroiled in 'two notes makes a chord' here - for now, two notes makes an interval.
So, taking a three note chord - a humble major chord - we start at the lowest note. Call it C. Going up (intervals are calculated from the lower note up) there's a major 3rd to the next note - E - and a perfect 5th from that same C to G. Thus CEG constitutes a C major chord (in root position).
Confusion awaits, though, as if we examine that chord interval-wise in a different way, it gets odd. C >E is M3. But - E>G is m3! We now have a major chord with a minor 3rd in it. Move things about, and Cm could be construed as having m3 (C>E♭) with a M3 above (E♭>G). Bear in mind that in both, C>G is P5. Maybe this is where OP is mixed up?
So, to sum up. An interval is the distance between two given named notes. A chord is three or more notes played simultaneously, and the relationship between those notes is quantifiable by use of interval names.
Comment: @topoReinstateMonica - what I mean is a 'minor third' sounding interval sounds the same as an aug. second. Without naming the actual notes involved, it's impossible to say for definite that it is one or the other. C>Eb, C>D#. B#>Eb, B#>D# all sound the same, but each is classified differently.
Comment: I'm not quite sure what you mean by *an interval needs the names of those two notes to be classified*? It's possible to give an interval a name (e.g. "minor third") without naming any notes; it's also possible to define an interval in terms of semitones.
Answer: Harmonic intervals:
A chord contains 2 or more intervals. The intervals can be related to the root note of the chord, to the Bass note or to any other tone of the chord.
We can say  a C maj7 is built by a major third a perfect fifth and a major seventh or we can say it contains 3 thirds (major,minor, major) whereby the highest note is a minor second lower than the octave. So it would be quite confusing to use the terms identically.
(Btw.:it is already confusing enough that we count the lower and the higher notes too when naming the "interval", what means that the definition Interval = the difference between 2 tones is actually not all correct.)
For melodic intervals this question doesn't play a role.

So are harmonic intervals the same as chords?

One point we have to consider:
We use the same names of the intervals for the degrees and these terms are also meaning the triads and other chords on a certain  degree:
I II III IV V etc...
So if we say: the fifth  of the of C is G we spell it the same way and we also mean the fifth as interval and the fifth as degree that is the dominant chord of C.
This will lead to some confusion for beginners and your question is quite legitimated and understandable.
Answer: Intervals are not the same as chords.
TL;DR
Intervals are not the same as chords. But the difference is not really the common explanation of "chords are three or more pitches and intervals are two pitches" which is a short hand hacked together from the proper terminology.
Interval is a measurement type. It is the "distance" between two pitches. The units are semi-tones (or half-steps) and seven letters ABCDEFG assigned to specific pitches. The "distance" between letters is 2 semi-tones, except between BC and EF which are separated by only 1 semi-tone. Ex. 12 semi-tones is a perfect fifth and C to G is an example.
Chord is the simultaneous sounding of more than one pitch. The succession of chords is topic of harmony.
Tertian harmony is a system that creates chords using intervals of third with the seven musical letters and sharp/flat/natural symbols.
Triad is a chord in the tertian system using three pitches ascending by thirds, ex. C E G.
In the 18th century the concept of chord root emerged (look up Rameau's Treatise on Harmony) which essentially works like this: take the pitch letters of any chord, try to re-arrange them in ascending thirds, the lowest pitch in the series is the chord root. Ex. ascending G E C in intervals is a major sixth followed by a minor sixth, the letters can be rearranged as C E G which in intervals is a major third followed by a minor third, the pitches are now arranged in thirds and the lowest pitch is C, so C is the chord root. We don't need to get into how to know the specific quality of chords, but in this example the chord is a C major triad. Importantly, any arrangement of pitches C E G is a C major triad. G E C, G C E, E G C, etc. are all (different inversions and voicings of) a C major triad, and they all have the same root C and the same quality of major.
In regard to your question there is a reason to get into the detail of tertian chords, chord roots, etc: chords are not merely the specific pitches played, chords are theoretical constructions. Chord G E C must be theoretically analyzed to determine it is a C major triad.
Another area where the theoretical nature of chords comes up is when some pitches in a piece of music don't fit into the theoretical description of the harmony. We can look at a short demonstration of that by analyzing a passage of music involving a suspension:

In that example there are 3 moments when we have distinct, simultaneous groups of pitches. Using octave numbers those 3 groups are: C3 G3 E3 C5, G3 D4 C5, and G3 D4 B4. Notice that the second group cannot be arranged into ascending thirds. The closest you can get is G C D. It is a chord, because it is simultaneous pitches. But at that exact moment the chord doesn't fit into the tertian concept of chords made of thirds.
So what do we call that chord? This is where we can really see chords are theoretical concepts that can only be identified by analysis. We could propose that one of the pitches is "out of place." Perhaps G C D could be G C E where the D is an "out of place" E, or G C D could be G B D where the C is an "out of place" B. When we look at the third chord it is clearly a tertian triad of G B D. This supports the analysis that in the second chord G3 D4 C5 the C is an "out of place" B which moves into the "right place" in the third chord. The labeling in that notation example of 4-3 and highlighting the C in red are ways to indicate that analysis.
The technical term for such "out of place" pitches is non-chord tone and there are various style-bound conventions for handling non-chord tones. The example above is a very conservative, old, contrapuntal treatment of a proper suspension. In regard to chords and the naming/labeling of chords in an analysis, it is important to note that the example might be labeled with chords names and Roman numeral analysis like this:

...notice that the entire second measure is simply labeled as one thing, either a V chord in C major (the bottom labeling) or just G for a G major triad (top labeling.) Theoretically that analysis is say there are really just 2 chords. The C5 on beats 1 and 2 or measure 2 is held from the C chord, suspended as a non-chord tone until it moves down to the B3 to properly complete the G major triad.
Side note: jazz/pop would label the chords like this C Gsus4 G. Those chord labels are for performance and are not harmonic analysis. In terms of analysis that system is a bit of a muddle. Gsus4 could be regarded as indicating a proper suspension. Or, it could be regarded as a bona fide chord type, at which point you would no longer be dealing with tertian harmony, and you would have a new conception of what chords are, namely quartal harmony.
Sorry for the long winded answer, but only the details make things clear.

interval is a measurement, it is a concrete idea
chord is simultaneous pitches, it is a theoretical concept

Intervals are not the same as chords.
Answer: Probably not the best possible answer, but I use intervals to think about music when composing, but chords when communicating with others. Both are mechanisms for describing the relationship between notes, but they are not the same underlying thing.

Are intervals the same as chords?


Android NDK passing long values to native method

Question: This is my function:
Long Java_my_package_MainActivity_getDistance(JNIEnv* env, jobject obj, Long a_id1,Long a_id2)
    {
        char temp[128];
        sprintf(temp,"ID1: %u , ID2: %u",a_id1, a_id2);
        __android_log_print(ANDROID_LOG_INFO, "From NDK : ", temp);
        return(0);//just to test ...
    }

Long is a type def:
typedef long long Long;

because i have some values that are grater than the max value of int type
in my java class:
 static {
            System.loadLibrary("module");
        }
        // declare the native code function - must match ndkfoo.c
    private native int getDistance(long id1, long id2);

I call the native function with this line:
getDistance(1234,2456);

the output in the logcat is:
ID1: 1234, ID2: 0

I always get ID2 = 0 !!, i don't know why the second parameter always evaluate to 0 !
Answer: Or try that:
#include <jni.h>
#include <android/log.h>

#define TAG "Java_my_package_MainActivity"
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__)

// ...

JNIEXPORT void JNICALL Java_my_package_MainActivity_getDistance(JNIEnv *env, jobject obj, jlong a_id1, jlong a_id2){

    // ...

    LOGI("ID1: %lu , ID2: %lu", a_id1, a_id2);
}

Comment: when passing down a final testLong = 256L from Java, I find that LOGI "%lu" prints different results from "%llu". @fadden answer may explain that.
Answer: Your sprintf needs to use %llu to print a 64-bit quantity rather than %u.  I believe you're you're actually getting the correct values through JNI, but the sprintf call is being told to expect two 32-bit values and is printing the high word of the first argument.
Also, you should probably be using jlong in JNI declarations rather than your own custom type (it's defined in jni.h).


Unity via tightvnc on Ubuntu 13.04

Question: I can not seem to get unity to run and be accessible via VNC, all I get is the ubuntu desktop wallpaper, and mouse etc.
But no Unity launcher or top bar.
Currently using the default xstartup to get that result.
Also tried the set up found here tightvncserver on ubuntu 12.04 server with ubuntu-desktop installed no unity But that does not work as ubuntu-2d no longer used.
What Xstartup settings would I need to use to get unity working right? I would rather stick to using tightvnc as the vnc server as there is no physical screen.
Answer: I've never managed to get unity working on my Ubuntu 13.04. Try launching
gnome-session --session=gnome-fallback
, you're right in that ubuntu-2d is no longer there; it was removed in 12.10.

Unity via tightvnc on Ubuntu 13.04


How can I solve a Hamiltonian with numerical methods?

Question:
Hamiltonian in terms of two level atom's operator (0 is ground state and 1 is excited state) which are 2*2 matrices and cavity modes are given by $a$ and $a^\dagger$. Rest of the parameters are constant. I am looking for numerical simulation of the operator $(a)$ over a long duration of time. I want to see the evolution of the operator $(a)$.
Comment: It might be useful to say, what you want to solve... If it is about time evolution, you should have a look at `NDSolve` and/or `NDSolveValue`
Comment: You should show what you have tried - otherwise not many people will even know what you're asking. I've added an answer using my interpretation of your question.
Answer: The main step is translating the notation of the question to a matrix problem that Mathematica can solve numerically. Once you know what the symbols in the question actually mean, the rest is quite straightforward. Here I define the matrices a and ketBra corresponding to the physical interpretation of your symbols, and then rewrite the Hamiltonian using these matrices.
a[dim_] :=
 KroneckerProduct[IdentityMatrix[2],
  SparseArray[{Band[{1, 2}] -> Sqrt[Range[dim - 1]]}, {dim, dim}]]

ketBra[dim_][i_, j_] :=
 KroneckerProduct[
  KroneckerProduct[UnitVector[i + 1], UnitVector[j + 1]],
  IdentityMatrix[dim]]

h[dim_][Ω_, δ_] := -Ω (ketBra[dim][0, 0] +
     ketBra[dim][1, 1].ConjugateTranspose[a[dim]].a[dim] +
     ketBra[dim][0, 1].a[dim] +
     ConjugateTranspose[ketBra[dim][0, 1].a[dim]]) - δ ketBra[dim][1, 1]

With[{δ = .1, Ω = 1},
 Eigenvalues@h[10][Ω, δ]]

${-10.0901, -9.089, -8.08764, -7.08589, -6.08356, -5.08032, -4.07546, \
-3.0674, -2.05125, -1., -0.1, -0.0487508, -0.0326009, -0.0245371, \
-0.0196838, -0.0164377, -0.0141126, -0.0123646, -0.0110023, \
-0.00991072}$

The important ingredient is KroneckerProduct, which is needed here to construct the matrices in the direct-product space in which the objects $\vert i\rangle\,\langle j\vert$ and $a, a^{\dagger}$ live. For a numerical solution, the operators $a$ have been defined as finite matrices even though they are in fact the ladder operators of the harmonic oscillator and therefore infinite-dimensional. The truncated dimension is called dim.
To combine the operators $\vert i\rangle\,\langle j\vert$ and $a, a^{\dagger}$, I define the direct-product space such that the first component refers to the two-state system and the second factor is the state space of the harmonic oscillator. This determines the order of the factors in KroneckerProduct which combines the operators from the two component spaces. I also use KroneckerProduct to define the individual $\vert i\rangle\,\langle j\vert$ that correspond to outer products of two-dimensional unit vectors (this is why there are two KroneckerProducts in ketBra).
Since each operator acts only in one of the component spaces, I have to multiply it by an identity matrix for the respective other space. This is the reason for the IdentityMatrix[2] and IdentityMatrix[dim] above.
Comment: Thanks sir...Shall i differentiate the hamiltonian to see the time evolution of operator a? I am looking for numerical simulation and i want to see the effect of this operator in long duration of time.
Comment: It looks like your question is not about *Mathematica* but about physics. Unfortunately, the question has been closed because it wasn't clear what you want to calculate, and how the operators are defined. If you add more details, maybe it will be re-opened. For example, since the Hamiltonian is time-independent, the operator `a` will be easy to compute in the Heisenberg picture, but I don't know if that's what you mean.
Comment: Ok Sir ..yes i want to see the effect of evolution of operator(a). Thanks...
Comment: It would help if you explain what you mean by "effect" here. Do you just want to see a big matrix as a function of time? I answered based on the interpretation that "solving a Hamiltonian" means finding its spectrum. You will have to be more specific about the time-dependent information you're looking for.


Is is standard practice to have the same include derivate in a header and source file?

Question: When working with say, the standard strings class in c++.
Do you need to have #include<string> on both the header and source file?
can you not just have #include<string> only on the header file?
Comment: Yes, some people just do it for complete-ness.
Answer: Including on the header file may indicate a dependency at the class definition level (for example you are accepting or returning Strings). In this case you have to put the include in the header; however if you are only using Strings in your implementation you may need to include only on the source file.
Answer: The best practice is to include an header file individually in every header or source file which requires it.
Including required headers indirectly through other header files gives you the drawback that
when you pull out a included header from source file at some point in future you might end up with obscure compilation errors because of the missing (indirectly included)header.
Answer: The file inclusion is done by replacing the include directive with the contents of the included header file (in practice, it is probably not done by replacement in a text stream but by a semantically-equivalent operation).
This means that all files included in a header, will be included in files including that header, so no, you don't need to include it twice.
That said, there are many policies for including files and choosing one is more of a matter of what you're focusing on and best practices than what you need to do.
For example, you could strive for completeness and include files whenever you use symbols defined in those files.
I've also worked with a project (low level, cross-platform C library) where client code was responsible for including header file dependencies explicitly, before including a header file. This was done to keep the header dependencies explicit, and to eliminate/minimize (as much as possible) hidden dependencies limitations imposed by the library to clients.
In the end, it's up to you (and/or your team).


Mutual Information and curse of dimensionality

Question: Is the estimation of Shannon's mutual information from data subject to the curse of dimensionality? And if yes why?
Comment: Do you have a specific problem in mind? I believe the answer is yes, because estimating the probability distribution of a random variable in high dimensional space is subject to the curse of dimensionality. Does it make sense?
Comment: No. I am just considering the general problem of MI estimation. I know that there are different techniques. Maybe some are not subject to the curse of dimensionality or maybe they all are. But, if they are, it is not clear to me why.
Answer: "Simple" approaches would definitively suffer from this problem. For example in this paper: https://arxiv.org/pdf/1910.00365.pdf, they state

One unfortunate consequence of the (KSG) estimator of the first kind
is its reliance on the L∞ norm for finding neighbors. [...] Such a choice can lead to problems in regions where
the probability varies greatly, which can easily happen in spaces of large
dimension. Unless the density of samples increases exponentially with
respect to the dimension of the space, the errors in choosing L∞ will compound quickly.

In other words, this estimator suffers from the curse of dimensionality.
So, why are simple approaches subject to the curse of dimensionality? It's because estimating the mutual information involves an estimate of the probability density distribution $P(X, Y)$ and of the marginal distributions $P(X)$ and $P(Y)$.
Estimating these in high dimensions is really hard, precisely because of the curse of dimensionality. In high dimensions, every point is a snowflake, and it's really hard to get a decent density of samples.
As you say, there might be more sophisticated estimators that are more robust to this problem, but I don't know the literature well enough.


If a dart is thrown Randomly and hits the dart board,The probability of a dart hitting closer to the center than the edge of a circular dartboard?

Question: I think the probability is zero because a circle doesn't have any edges
Comment: The edge is the circumference of the circle.  If I were throwing the dart the probability would be zero because my darts would always be outside the circle.  Here you are expected to assume the dart hits uniformly within the circle.
Answer: The region whose points are closer to the centre of a circle with radius $r$ than to the edge is easily seen to be another circle of radius $r/2$. Hence the desired probability is $\left(\frac12\right)^2=\frac14$.


Design a composite material with good wear resistance and electrical conductivity

Question: For a electrical switching device which opens and closes frequently and forcefully. Would a combination of a soft polymer matrix and a conductive metal fibre be a good choice for this? While polymer in itself is not known for having good wear resistance, since it is opened and closed forcefully, using an elastomer could take the energy from the forceful closing and just deform very shortly. The metal matrix inside is protected and could be the charge carrier. Are my assumptions correct? What other ways are there to achieve what I mentioned?
Answer: One problem is that you may not have good contact between adjacent metal fibres. In general resin/fibre composites aim to completely coat the fibres so it is entirely possible that a metal/plastic composite could have very low conductivity, depending on how the fibres are orientated. Equally fine metal fibres will have a layer of oxidation on the surface which will further decrease conductivity.
I can't really see any reason why a metal composite would be better than solid metal for this sort of application.
If you want the spring/damping  characteristics of an elastomer it would probably be better and simpler to mount a brass contactor on a polymer leaf spring.
Mechanical (as opposed to semiconductor) electrical contacts are most commonly made from brass as it has a good balance of conductivity, mechanical properties (reasonable hardness, toughness, ductility and strength) and corrosion resistance.
Comment: Is it possible to construct a composite of any (non-conductive) matrix and arrange/design the fibers in a way that they will make the resultant composite conductive?
Comment: You could do it by aligning all of the fibres in the direction of the current flow but that largely defeats the purpose of a composite and it seems unlikely that any polymer composite is going to have better wear resistance than a solid metal part. Using a semiconductor based switch would eliminate mechanical wear entirely.