Can I specify CSS media types in the style attribute?

Question: I was wondering if I can specify any CSS media types in the style attribute? and what can I specify in the style attribute?
Comment: I am running into this same question now, specifically related to styling email in a way where we can hide certain things when the email is being printed out. Useful for invoices where we don't want all the details to be printed...
Answer: Not that I know of. Your best bet is to define a class rather than inline styles. Then, you'll have more flexibility.
You can include different stylesheets by specifying the media attribute on your link tag to include a stylesheet, or you can also specify that rules within a stylesheet should only apply to a given media.
For example:
Including a CSS file by specifying a media:
<link media="print" href="styles.css" type="text/css" rel="stylesheet">

Specifying a media within a stylesheet:
@media print
{
    .myStyle { display: none; }
}

Also, see the W3C media type list for all your options.
Answer: You can't specify media type, but you can specify whatever CSS properties the element will support.
Comment: Seriously, downvoter? This is accurate information and was the first answer given (therefore not copied from one of the others). In fact, the other answers, while more verbose, are in accord and might be construed as elaborations on this one.
Answer: Media types is specific to style sheets only, per the w3 css specification:

One of the most important features of
  style sheets is that they specify how
  a document is to be presented on
  different media: on the screen, on
  paper, with a speech synthesizer, with
  a braille device, etc.

Ref:  http://www.w3.org/TR/CSS21/
The only thing that can be specified in the style attribute is property:value pairs for styling the specific element.
Answer: You can specify a ; delimited list of property: value pairs. You can not include the media type.
99% of the time, you are better using an external stylesheet. I use style attribute mainly for animating the element via JavaScript. Occasionally I use the style to specify a background image (where it is dynamic and echo'd to the markup), where it would be too cumbersome to add a preprocessor to my raw CSS files.


Convert document/e-book to audiobook

Question: Customer gives me an e-book or a document, I record audio of that document and send it to the customer. I am not redistributing that work, I only charge the customer. Will this infringe the copyright law? The customer could be giving me an e-book that he bought.
Comment: Please include the jurisdiction in the tags. Copyright law does differ between Europe and the US (and elsewhere).
Comment: Just to clarify: Is the customer the copyright holder?
Answer: The audio book would probably be an infringing derivative work because the client could redistribute it once the client received it. It sounds very much like a product that is regularly sold by merchants relying on copyrights.
Conceivably, simply reading a book aloud to a client in some sort of streaming context that could't be shared with others or replayed would merely be fair use, much like hiring a baby sitter to read a book aloud to your children would be clearly fair use.
If there were an automatic text to sound converter as opposed to an individualized performance, it might not be considered infringing. There are people with programs that do this who haven't been sued, but the boundaries haven't been explored very thoroughly.
Honestly, there isn't a lot of guidance in this area from statutory language, and the questions would often not be guided by much case law involving similar facts. Your intuition living in the modern world is probably almost as good as a lawyer's in this situation.
Comment: For a text-to-sound converter, also check the license of that converter. For example, the various voices coming with a Mac or iPhone come with a license that allow you personal use, but don't give you the right to produce sound recordings that you then distribute.
Answer: So far as I can find, there is no US Supreme Court case directly on point for this issue. So called "time shifting", recording a broadcast musical or audiovisual work for later playback, has been held to be a fair use in Sony Corp. of America v. Universal City Studios, Inc., 464 U.S. 417, 421, 456 (1984). Some have urged that "space shifting" involving converting a copyrighted work from one format to another (particularly one digital format to another) should also be fair use, but there is no definitive ruling on this point. In Recording Indus. Ass'n of Am. v. Diamond Multimedia Sys., Inc., 180 F.3d 1072,
1079 (9th Cir. 1999) a court held that it was fair use to engage in  "space-shifting" a copyrighted musical recording from a computer hard drive to a portable player. However in  UMG Recordings, Inc. v. MP3.com, Inc. 92 F. Supp. 2d 349, 352 (S.D.N.Y. 2000) (A court ruled that medium shifting copyrighted musical recordings from purchased CDs to computer hard drive was not a fair use.
If the audio version is made only for the personal use of the owner of a lawful copy of the ebook, it is at least arguably fair use, and in any case is very unlikely to be the subject of a copyright suit. However, should the client copy and distribute the audio recording, that would pretty clearly be an infringement, and the person who created the audio version would quite possibly also be found liable.
A written statement by the client that the audio version is only for personal use, and will not be redistributed nor will further copies be made might help protect the recording artist.
This answer is quite US-centric, and the law will be different in other countries.

Convert document/e-book to audiobook


What graph properties only consider neighbours of a node in their calculations?

Question: I'm looking for graph properties which only consider neighbours of a node and do not go beyond that. For example, nodes degree only considers neighbours or clustering coefficient also consider only neighbours, but shortest path considers all nodes in the graph. Are there any other property (except node degree and node coefficient clustering) which only considers neighbours of a node in its calculation?
Answer: There are several measures like clustering coefficients that sort of satisfy this, such as edge embeddedness. But this looks at the number of neighbours in common to two adjacent nodes.
The property of v being simplicial is an important structural property used in algorithmic graph theory, and is fully characterized by only the neighbourhood of v.
Notice that the two examples you gave are: (1) the number of nodes in v's neighbourhood, and (2) the number of edges in v's neighbourhood. Perhaps You might also be interested in the number of triangles in v's neighbourhood (i.e. the number of K4s that v is in) or perhaps the number of $P_3$s in v's neighbourhood, etc.
Perhaps you could loosen your requirement of locality, or else you will only be asking about properties such as "the number of _ in v's neighbourhood," which might be too limiting.
How about the number of connected components in v's neighbourhood? Something similar to this was used in a recent Kleinberg paper on predicting spouses by looking at Facebook egonets.


What does 'educated risk' mean?

Question: Can anybody help to explain what 'educated risk' means? I recently met this phrase and need to translate it into another language.
The sentence I met is 'Encouraging educated risk'.
Thanks...
Comment: It's more common in my experience to speak of taking educated guesses and calculated risks.
Comment: cf. http://idioms.thefreedictionary.com/an+educated+guess
Answer: Educated risk is also known as informed risk. It means a risk for which the calculated potential payoff outweighs the calculated possible loss, given the knowledge one has about the circumstances. (Here is an article on informed risk.)
An uninformed risk or blind risk is one where the risks are not known and, therefore, the possible loss cannot be calculated.
Answer: An educated or more commonly calculated risk is:

a hazard or chance of failure whose degree of probability has been reckoned or estimated before some undertaking is entered upon

An educated risk is one where a person is aware of the risk involved in taking an action, understands the consequences and potential for success and chooses to take the risky action anyway. To a certain extent, it also implies that the person has taken some steps to minimise the risks where practical.
For example, crossing a road is risky. If I chose to close my eyes, and walk across the street on blind faith, that is irresponsibly risky behaviour. However, if I step to the curb, check traffic and wait until safe to cross, quickly and directly I have taken an educated risk.
Answer: Educated risk is a term that merely means you are taking a risk while knowing what that risk means.
For example:

Investing in the stock market after doing proper research is an educated risk.

Compare this to a blind risk:

Jumping off a cliff without looking what is down below is a blind risk.

Educated risk is a form of risk management.  By educating yourself to the possible risks you can mitigate the potential negative effects of said risk.
In the context of Encouraging educated risk ... I presume this is either:
A mandate to take educated risks in the hopes of positive outcome.  For example, investing in high-yield investments that are not guaranteed, but investor research appears extremely promising.
or
To minimize blind risk by being educated about the risk management consequences.  For example, keeping careful documentation of conversations with patients in a medical practice.
(It would depend upon the context around it.)
Comment: If I were to jump off a cliff, I don't think looking and knowing what's down there is going to matter.
Comment: @Jim Clearly you've never seen cliff diving . . .
Comment: I live near Hollywood and a few stuntmen. I was thinking of an giant air mattress. I wouldn't jump in any case.
Comment: @Jim neither would I.  It was just an example of a blind risk.  Knowing there is enough water below shifts it to an educated risk that I wouldn't decide to take.

What does 'educated risk' mean?


Does the International Space Station always travels in the same path?

Question: From the 3d visualization http://www.satflare.com/track.asp?q=25544#TOP (the right image with the red line indication the path of the ISS) it looks like always the ISS takes the same path. Is it the case?
Comment: Same path in what frame of reference?  There _is_ a frame of reference in which the ISS traces out approximately the same ellipse, again and again.  That frame is _centered_ on the Earth, but it does not _rotate_ with the Earth.  ("approximately" because the ISS orbit decays due to interactions with the Earth's magnetosphere and the outer reaches of Earth's atmosphere, and every month or so they have to fire motors to boost it back up to where it belongs.)
Answer: Given the page, I am assuming you're asking about this image.

It shows the orbit of the station around the earth as a red line.  From this view, the position of the line is approximately fixed around the center of the earth, with the angle almost fixed with respect to the stars (inertial frames).
In this view, the earth turns to the right (west to east) underneath the path, causing the ISS to pass over ground farther to the west every orbit.
If the earth were a perfect sphere and alone in space, the orbital path in this view would not drift.  But it does move over time.  The largest contributor to the shift is the fact that the earth is not a sphere.  The squished earth has more mass around the equator than it does near the poles.  This asymmetry causes the orbital path to precess (east to west) at about 5 degrees per day$^1$.  If you were in the same position relative to the earth and the stars, you would see the orbital plane rotate around Antarctica over the course of two and a half months.
1 This document lists several parameters of the ISS orbit, including a calculation of precession.  The calculation appears to match that found on the wiki page for nodal precession.
Comment: @Talespin_Kit, you are correct that all locations at the correct lattitudes (mainly less than 52 degrees) can see it.  Even without precession, this would happen due to earth's orbit around the sun and earth's rotation.
Comment: Nice explanation. There are also smaller orbit changes as they sometimes fire thrusters to dodge debris.
Comment: @BowlOfRed > **This asymmetry causes the orbital path to precess (east to west) at about 5 degrees per day** . Wow, that means every one on the earth will get a chance to see the ISS with naked eye. Is that correct? If yes what is the maximum distance of the hypotenuse b/w a view point on the earth and the ISS will considering that 5 degree deviation in the orbit of the ISS per day.
Comment: Can you please point to the authentic source regarding this 5 degree deviation?
Comment: @Talespin_Kit - The nodal precession of a satellite due to the oblateness of the planet has been known since the late 1700s thanks to work by Laplace on the inner moons of Jupiter. This nodal precession isn't of much use with regard to the ISS. It is of incredible use with satellites inclined by a bit over 98 degrees. The nodal precession that results is what enables things such as [the A-train](https://en.wikipedia.org/wiki/A-train_(satellite_constellation)) to exist.
Comment: @Talespin_Kit, I added a couple of links.
Answer: No.  The ISS is in low-earth orbit, so it won't maintain a specific ground-track along the earth.  Wikipedia has a picture of the orbit at different times that I'll attach below (open source image):
Comment: >  **they can generally get coverage of the whole earth every two days.** Does this mean all the points on the earth will be covered every two days once?
Comment: @Talespin_Kit that's something that is specific to the stuff that I work on, but there is overlap in what the satellites see. I'm going to delete that section of my answer because I think it will just cause confusion.
Comment: More specifically, it's in an *inclined* low-earth orbit.


How are non-text files encrypted?

Question: I thought encryption algorithms (like AES) are used to encrypt texts. So, how are files or folders (containing pictures, videos, etc.) encrypted? What is it that encryption algorithms exactly encrypt?
Comment: *Modern* crypto algorithms all operate on bits. Even PBKDF2 - which is used to derive keys from passwords - operates on bits instead of text. In modern crypto, the terms plaintext and ciphertext are rather confusing as neither one of them are actually text, you actually need **character-encoding** such as UTF-8 to convert from text to binary and **encoding** schemes such as base 64 to convert binary to text. So *in that sense* encrypting a file is actually easier as no encoding needs to be applied.
Comment: You have to open it in binary mode. How to do this depends on your language/runtime environment. Most runtimes should provide tutorials for this; opening files is rather common :) Note that in practice crypto is petformed on sets of 8 bits called octets or bytes.
Comment: I could find some useful information here: http://crypto.stackexchange.com/questions/2423/how-to-perform-file-encryption-using-128-bit-aes?rq=1
Comment: @owlstead. I steel don't know how to access to a file bits?
Comment: Can use Hex Editor for this purpose?
Comment: No hex editors are for debugging mostly. Even if they would provide crypto functionality it would not be for everyday use.
Answer: Encryption algorithms encrypt bits. All digital media (text, pictures, videos, etc) is stored as bits at the lowest level, therefore, they can all be encrypted.
Comment: Yes, reading them in an array is one option. For larger files *binary* streams and memory mapping may be more efficient though.
Comment: So how can i access to those bits?
Comment: In any programming language, you can read them in to an array.
Answer: All files (text, video, whatever) consist of bits. The general procedure with symmetric encryption algorithms (such as AES) is they generate a stream of pseudo random bits, which is derived from a key or password, and then they mangle (typically XOR) the original data with the random data. Thus resulting in new data that appears to be totally random.
Without the key or password, there is no way to predict or generate the peuso random data, so it's also impossible to distinguish the original bits from the encrypted result.
Decrypting works the same way: when you enter the valid key, the same pseudo random mangle data is generated, so it can undo the mangling (e.g. XOR again) and restore the original data.
It makes no difference whatsoever whether you encrypt text, or pictures, or video, or data that might even be already encrypted otherwise. Data is just data: a fancy collection of ones and zeroes.
Comment: The key stream is "only" generated for stream ciphers and block ciphers used in a mode of operation (e.g. CTR) that produces a key stream. The still very common CBC mode of encryption encrypts by splitting the plaintext/ciphertext in blocks and does not use XOR for the last step. Otherwise the answer seems well explained to me.
Answer: Others have already given the answer, so the following just uses slightly different words that might be helpful.
Files on a computer consists of bytes. Bytes are made up of bits. A bit is a 0 or a 1. A byte consists of 8 bits. That is, a byte is a string of 8 1's and 0's (a binary string). Most encryption algorithms works of the bits. So if you have a file, then the algorithm treats the file as a binary string.
If you want to find the string of bits or bytes making up a file you can use a Hex editor. If you are on Windows I can recommend XVI32. You simply open the file with the program and see the bytes. Now since you are using a Hex editor, the bytes will be written as two hexadecimal digits. For example, the byte E2 corresponds to the dcimal value 226. As a binary string this is 11100010. There are a bunch of applications online that will give you this conversion and there are many good explanations of how this works.
Now AES is a 128 bit block cipher. That means it encrypts the file is 128 bis blocks. 128 bits is 16 bytes (128/8 = 16). So you take chucks of 16 bytes and encrypts them. There is a lot more to how exactly this is done. There are, for example, different modes of operation.

How are non-text files encrypted?


What is the reason behind high frequency radio wave attenuates faster compare to low frequency?

Question: What is the reason that high frequency radio wave experience more attenuation compare to low frequency radio wave? Is high frequency experiences attenuation at high distance or at low distance?
Answer: There is no attenuation in free space, no matter what the frequency. Other mediums (like the atmosphere) have their unique attenuation spectra. For radio frequencies, there is more attenuation through the atmosphere for higher frequencies because they are better absorbed by the moisture in the air.
Comment: Thank you for answer but can you elaborate about the moisture thing. How moisture in the air can absorb high frequencies?
Answer: Actually it depends on which frequencies and the propagation environment.
As Digiproc says correctly at higher freqs the atmosphere absorbs more. This is mainly true above 18 GHz, and as you go up it a absorbs a lot more. There are absorption windows (i.e., less absorption) in a band somewhere in the 30 to 40 GHz region and then up at about 94.
Below 18 GHz down to about 10 GHz it goes down (less absorption), and from there down to KHz it basically is transparent (some absoprtion still). If you go low enough to the HF band you get ionospheric reflection and absorption. You can get most of that in a couple graphs in books.
Dependong on your application other things are more important. For instance, for terrestrial ground to ground propagation the scattering, reflection, diffraction and absorption of vegetation and man made object is more determinative. Lower frequencies get absorbed less, and diffract more so go around objects. From 2-4 GHz there some of that, but then worse up to 10 GHz. So, for so called non-line of sight propagation lower frequencies, even below 2 (HZ and down to and in,coding VHF are better. In wireless comms the preferred frequencies are around 700 MHz because they penetrate buildings more. Yes, at lower frequencies you have more multipath degradation (multipath interference) but you can process a lot of that out with some freq and code diversity, and MIMO.
But if you want GHz bandwidths you have to go higher. So it all depends on what you want.
If empty space they all go like $1/r^2$. At lower freqs you do need bigger antennas, if you want the same beam size. if omni unless you go to HF and below its no big deal. At real high freqs, above 100-1000 GHz you are now in the THz band, and the device physics/engineering is non-trivial. Even above 100 GHz it's not trivial.
Answer: The real underlying reason (speaking broadly) that higher freq electromagnetic radiation attenuates more quickly than lower f's when interacting with matter lies in the physics of atoms interacting with light. The "cross section" describes the probability of a scattering event and such scattering with some absorptive loss of energy causes the attenuation. See summary of this in link below, and note the main result: cross sections scale with the square of the light freq.
https://www.sciencedirect.com/topics/earth-and-planetary-sciences/scattering-cross-section#:~:text=In%20other%20words%2C%20the%20differential,per%20unit%20solid%20angle%2C%20d%CE%A9.


Which axioms of the foundation of natural numbers are used in the proof of the pigeonhole principle?

Question: The pigeonhole principle is so obvious to me that I am not able to think of a proof based on the axioms of natural numbers. Can anyone please explain its proof clearly mentioning the axioms?
Comment: The pigeon-hole principle states that whenever $A$ has smaller cardinality than $B$, there does not exist a surjective map $A\to B$. This is the *definition* of "smaller cardinality". - So I suppose you want a proof by induction that $\{1,\ldots, n\}$ has smaller cardinality than $\{1,\ldots,m\}$ whenever $n<m$?
Comment: Can we use the "order axioms" for natural numbers instead of defining "smaller" by a map ?
Comment: Alternate formulation: if there exists a surjection $A \to B$ then there exists an injection $B \to A$. The pigeon-hole principle is the contrapositive of that (for $A$ = holes and $B$ = pigeons).
Comment: @dxiv Well, the usual pigeonhole principle is the converse of that statement *restricted to finite sets*. Note that that more general statement requires (indeed, is equivalent to) the axiom of choice . . .
Comment: @NoahSchweber That's entirely correct, but the context here was pigeonhole'ing, which doesn't work for infinite sets anyway as you noted, AC or not.
Answer: It can be proved by induction; so the crucial axiom is that the natural numbers are well-ordered, that is, any nonempty set of natural numbers has a least element.
For a proof of the pigeonhole principle, see my answer to this other question. (Strictly speaking, what's proved there isn't exactly the pigeonhole principle - instead, it's the statement "There is no injection from a set of $n$ elements to a set of $m$ elements, if $n>m$" - but it's easy to get from this to the pigeonhole principle.)
Answer: Here is a non-numeric version of the pigeonhole principle that may interest you. The formal proof is too long to post here (several hundred lines, see "The Pigeonhole Principle" at my math blog).
Let $P$ be the (non-empty) set of pigeons, and $H$ the set of holes. Suppose each pigeon is put in a hole. Suppose further that there are more pigeons than holes, i.e. that no function mapping holes to pigeons is surjective (onto).
Then at least two pigeons will be put in the same hole.
More formally:
$\exists a:a \in P\space\space$ i.e. there is at least one pigeon
$\implies \forall f:[f:P \to H\space \space\space$ i.e. each pigeon is put in a hole
$\land \forall g: [[g: H \to P]\implies g$ is not surjective] $\space \space$   i.e. there are more pigeons than holes
$\implies \exists b,c,d: [b\in P\land c\in P \land d\in H \land [b\ne c\land f(b)=d \land f(c)=d]]]\space \space$ i.e. at least two pigeons will be in the same hole.


What's going on with my Green Buttonwood?

Question: All the new growth is stunted. I was told it could be a thrip of some kind.
Any help would be appreciated as I planted this to replace my Ficus.
Comment: Is it in a pot or in the ground? What part of the world are you in? Have you examined the plant closely, including backs of leaves and stems (preferably with a magnifying glass) to check for insect infestation?
Answer: There are at least three things to consider: herbicides, insects and availability of water. Let's take the last first - why did the Ficus have to go? If it was because of dry soil then a buttonwood will be a backward step since buttonwood is more associated with mangrove and wetlands than a dry spot. Once the initial flush of growth is over it will require water. A number of insects can be responsible and that you can find by close inspection of the foliage and roots. As for herbicides, this should be easy to consider since presumably you would have intimate knowledge of whether any roundup or broadleaf weed killers have been used, or even fertilizers for grass containing herbicides.


Preventing Caching of swf files in Adobe AIR

Question: I'm trying to prevent caching of swf files in Adobe AIR application.
The situation is like this, I've my AIR application running and i'm dragging and dropping swf files from external (flex builder) onto AIR application. The swf files are loading. But if i recompile the swf files with some changes and drop the swf file onto already running AIR app, the changes are not reflected instead if i restart the application, the changes are reflected. Here the swf files are loading from the cache and i want to prevent this from happening.
I'd appreciate your thoughts on this.
Thanks,
Swaraj.
Answer: Add an unique string to avoid caching:
<code> file.swf?nocache=" + new Date().getTime());
</code>


Can steamOS and steam Link run simultaneously using one PC?

Question: I have converted a Dell Optiplex 760 to a SteamOS machine. Can I run both SteamOS and Steam Link simultaneously using one PC?
Comment: From what I know, Steam Link is a separate device. This means that you can't run both on 1 PC
Answer: The Steam Link is just hardware that you can stream your games to for cheap. Your PC does the work of running the game while the Steam Link just displays the video and sends input back.
Steam inherently has the ability to stream games to other computers that are logged in with your account, meaning you will be able stream games to the Optiplex with SteamOS.
If you're logged into your account on your main PC, and the Steam Machine you should see the ability to Stream game whenever you look at your library. This will run the game on your main PC, but send you the Video and Audio and send back your inputs


How best to remove and replace this gasket on swivelling spigot

Question:  has worn out and is leaking.
How to install the new one without damaging it?
Answer: If using a tool at all, a plastic credit/id/rewards card (use the corner) is the best bet. Tools (such as steel ones) that are harder than the (probably brass) o-ring groove/seat can scratch that surface and cause a leak.
In most cases you should not need a tool at all. Clean the outer surface of the o-ring with rubbing alcohol and a paper towel to remove any grease on the surface, so you can get a grip on it. Pinch it between your thumb and a finger (on opposite sides of the central metal part), and then move your pinching thumb and finger to one side - this should raise a loop of o-ring out of the groove on that side, which you can grab. You are stretching the other side and pushing up slack material on the side you are moving towards.
The latter method has the advantage of not damaging the o-ring, either - which does not matter when you are replacing it, but does matter when you would prefer to re-use it.
Clean the whole metal thing above and including the groove very carefully, then lightly lubricate the new o-ring and check that there is no dirt/sand/hair adhering to it, and roll/slide it down into the groove. Clean the inside of the part that goes over this as well, before reinstalling it.
Answer: That looks very much like a rubber o-ring that has been flattened out by the swiveling action of your faucet spout.
Use a thin awl, ice pick, or hooked "dental tool" to remove it. You could also use a very small thin flat head screwdriver. Pry up and over the lip, you want to try to roll it up and off without breaking it. Spray lube might facilitate easier removal.
Take it to your local plumbing shop or "mom and pop" hardware store, they will have an assortment of replacement o-rings to choose from. A knowledgeable sales clerk can probably help assess for proper size as yours has been squished for years. Pick up a tin or tube of waterproof plumbing grease and apply a thin layer to the o-ring and surrounding surfaces that rub.


Truffle vs Hardhat vs Foundry and web3js vs ethersjs

Question: I am relatively new to Web3 and Solidity . When writing smart contracts I usually get struck in which framework to use ... Truffle ( the most I've used so far ) , Hardhat ( just getting started ) and Foundry ( I just know that it exists ) .
Which one is the best according to you ? By best I mean best in terms of community support , minimal problems and easy usage . Main problem that I face is when I am learning through articles / video tutorials , majority of them use Hardhat , some of them use Truffle and the rest use Foundry.
Same is the question I have for using web3js or ethersjs .
Answer: For me it's just foundry. You have the telegram chat for support with the developers of it, it's faster than all the competitors and you can write your own tests/scripts with solidity itself. This means that you don't have to worry about any kind of BigNumber or importing the ABI's for contract interaction.
On the other side, I find that ethersjs is just objectively better than web3js, you can just use RainbowKit, Wagmi or any collection of hooks if you are working with react that will make your life way easier!
Answer: Hardhat + ethersjs gave me the best experience in development(web3js gave me anxiety and a wish to die). I have 2 years of experience with these and I could implement complex projects using Hardhat+etherejs. I'm not a fast learner but these ones seem logical when you use them.
I would like to try Foundry because I heard is very nice for testing.


iOS: How to fix "Software Update Failed"?

Question: I am trying to update my iPhone to iOS 11.4.1. However, when attempting to check for software update, I am receiving the following error message:

How do I overcome this issue and install the software update?
Comment: Is your device jailbroken or has it been in the past?
Comment: I don't think so. I randomly received it at late 2016. It was once iOS 10 or 9 before. I am currently in ios 11.0.3.
Answer: This error can occur due to a variety of temporary issues. Make sure you have an active Internet connection. To install the software update, try the following approaches one by one:
Approach I: Wait for some time and try again
Software update download could fail due to Internet connectivity issues or an issue at the Apple's software update server end. Such issues are often temporary and get resolved automatically in a short while. Tap on Close button in the alert shown and try again after some time. You may also toggle Wi-Fi off and on before re-trying.

Approach II: Update via iTunes
If you have a Mac or a PC handy with iTunes installed and an active Internet connection, you can download the software update on the computer and install in on device. Connect your iPhone to the USB port via the Lightning cable and launch iTunes.
If this is the first time you are connecting the iPhone to this computer, the computer will ask for your permission to access the iPhone. You'll need to unlock the iPhone and will see and alert asking you to trust the computer. Trust the computer to process.
Select the device in iTunes, click on Summary and click on Check for Update button. iTunes will check with the software update server, download the update and install it onto the iPhone.

Approach III: Install the update manually with iTunes
If the above two approach fail to download the software update file, you can manually download the IPSW (iPhone Software) file and use it to install the software update.
Do note that this approach erases the device contents and sets it up as a brand new device. Only proceed with it after creating proper backups.
Head to ipsw.me website, choose your device, and download the signed IPSW. You should get a file with .ipsw extension. Once the file is handy, with the device connected, go to iTunes, select the device and click summary. Now press and hold the Option (Alt) key on the keyboard and click on Restore iPhone... button (shown in previous illustration). A file open window is shown. Browse to the location where .ipsw file was downloaded. Select the file and you are good to go. iTunes will start installing the firmware on the device.
Caution: Use this method only as a last resort, when the first two approaches fail and you absolutely need to update the software. Even after downloading the .ipsw file, you'll need an active Internet connection as iTunes will need to verify the .ipsw file signature with Apple servers.
Also, please note that this approach erases the contents of device. You may wish to backup your device prior to installing software via this approach and restore the backup later.
Answer: I've had the error "Unable to install update" today, but not with "An error occurred downloading" as in the screenshot, but after the successfully completed download.
In my case, this was because I had turned off the iPhone pass code. After creating a new pass code, I was able to start the update installation and it went through.
HTH!

iOS: How to fix “Software Update Failed”?


the sugar content of raw corn on the vs cooked corn on the cob

Question: Is the sugar content of cooked corn on the cob higher than the sugar content of raw corn on the cob? I had a nutritionist tell me uncooked corn on the cob was like eating a non starchy veggie.
true or not true?
Comment: Are you interested in sugar or in carbohydrates? Because you ask if sugar in cooked is higher, and then ask if it is higher in uncooked?
Answer: This is a difficult question, as there are many different varieties of corn on the cob -- the stuff sold in the United States is typically significantly sweeter than that grown in Europe.
Once cut, corn starts a process that will convert its sugars to starch.  To make store-bought corn taste like fresh cut corn, they've specifically bred corn varieties that are extra sweet.  'Sweet' corn used to have a sugar concentration of around 10%.  Today's 'Supersweet' varietals are closer to 30%, and the sugar lasts longer after it's been harvested.
Cooking stops the breakdown of the sugars, so if you cook freshly cut corn, it'll have more sugar than a similar ear that's let sit for a few days (in transit, in a grocery store, etc.)
If you're buying raw corn on the cob in the grocery store, it will likely have less sugar in it than that same variety sold as cooked corn, simply because they'd have cooked it within a day of the harvest, if not the same day.
However, variety can play just as much of a role, as 'sweet corn' cooked an hour after harvest might still have less sugar than raw 'supersweet corn' a day after harvest.


Breeze: How can I create a GUID key for new entities on the client?

Question: Using Breeze, what is the simplest way to populate a GUID key when an entity is created?
Answer: I'll assume that your entity is configured such that the client is responsible for setting the Guid key for new entities. That's the default for the Guid key of an Entity Framework Code First entity; it is as if the key property were adorned with [DatabaseGenerated(DatabaseGeneratedOption.None)]
The obvious approach is to set the key after creating the entity and before adding it to the manager, e.g.:

function createFoo() {
    var foo = fooType.createEntity();
    foo.id(breeze.core.getUuid()); // Knockout implementation
    manager.addEntity(foo);
}

This may be all you ever need.
On the other hand, you may find that you're creating new Foos in many places and for some strange reason you can't use the createFoo function. You certainly don't want to repeat that code.
You can extend the Foo entity type with id-setting behavior after which you'd be able to write:

function createFoo() {
    var foo = fooType.createEntity(); // foo.id is set for you
    manager.addEntity(foo);
}

There are two approaches to consider - custom constructor and type initializer; both are described in "Extending Entities"
Constructor
You can initialize the key inside a custom constructor. Breeze calls the constructor both when you create the entity and when it materializes a queried entity. Breeze will replace the initial key value when materializing.
Here's an example that assumes the Knockout model library.

function Foo() {
    foo.id(breeze.core.getUuid()); // using KO
}

// one way to get the MetadataStore
var store = manager.metadataStore;
// register the ctor with the Foo type
store.registerEntityTypeCtor("Foo", Foo);

Pretty simple. The only downside is that Breeze will generate a Guid every time it makes an entity, whether creating a new one or materializing one from a query. It's wasted effort during materialization but so what? Well, I suppose that might become a performance issue although I wouldn't assume so until I had measured it.
Initializer
Suppose you measured and the repeated Guid generation is a serious problem (really?). You could set the key in a type initializer instead and only call the Guid generator when creating a new entity.
Breeze calls a type initializer after the entity has been created or materialized from query just before returning that entity to the application. Clearly you don't want to overwrite a materialized key from the database so you'll test the key value to make sure it's not real (i.e. to make sure you're fixing a created entity) before assigning it. Here's an example.

function fooInitializer(foo) {
    var emptyGuid = "00000000-0000-0000-0000-000000000000";
    if (foo.id() !=== emptyGuid) {
        foo.id(breeze.core.getUuid());
    }
}

var store = manager.metadataStore;
// register the initializer; no ctor in this example
store.registerEntityTypeCtor("Foo", function(){}, fooInitializer);
Comment: The `breeze.core.getUuid` method mentioned above is an undocumented, unofficial Breeze utility. I think it will become official ... perhaps under a different name ... but I can't confirm that. Use at your own risk (as I do) or copy its implementation and make it your own utility.
Comment: just double-checking: Is the exclamation point a typo on the if statement?
Answer: Assuming you have a Guid surrogate Key on all your entities like we have in our case, you could code a createInstance factory that does the following in a very generic approach:
function createInstance(breezeEntityManager, typeName) {
    var keyProperty = breezeEntityManager.metadataStore.getEntityType(typeName, false).dataProperties.filter(function (p) {
        return p.isPartOfKey;
    })[0];
    var config = {};
    config[keyProperty.name] = breeze.core.getUuid();
    return breezeEntityManager.createEntity(typeName, config);
}

This way, you won't have to create an initializer for all your entities.


How did Rutherford change input energy of Alpha particles

Question: How did Rutherford in the Gold Foil experiment change the input Alpha particle energy without particle accelerators? If they did, how would they even know the speeds?
. This graph shows scattering of high energy alpha particles at a fixed angle which can be used to estimate the radius of the nucleus. This was possible performed during the gold foil scattering experiment. How/did they change the input energy if it was just alpha particles decaying from some radium.
Comment: It looks like the plot is from "A review of alpha particle scattering" R.M. Eisberg and C.E. Porter, Rev. Mod. Phys vol33, p190 (1961)
Answer: From Geiger and Marsden's 1913 paper, "The Laws of Deflexion of α Particles Through Large Angles":

In order to determine the variation of scattering with velocity the apparatus was somewhat modified. A conical glass tube coated with active deposit was again used as source of radiation. This source was placed about 1 mm. from the mica window (E, fig. 3), so that it was possible to insert additional sheets of mica between the source and the window to reduce the velocity of the α particles. Mica sheets were used for this purpose on account of their uniformity of thickness in comparison with metal foils.
Answer: The data in that plot decidedly do not come from a Geiger-Marsden style apparatus (which is limited to a little over 5 MeV by the available alpha decay sources).
The plotted data was likely taken sometime after dual van~de~Graff accelerators became available. In short the experiment in Rutherford's lab didn't find the nuclear radius: they only put a upper limit on it that was much smaller than the known size of the atoms.
Comment: Ah okay so they had an idea of the atom size and found out the upper limit, but it wasnt until more modern times with the particle accelerators did they actually create enough initial kinetic energy for the scattering to stop and them find the actual size of the atom :) Cheers
Answer: It is always possible to control the speed of charged particles, like the alpha, with an accelerating grid in the same fashion as in the Franck-Hertz experiment.  To my knowledge, the original Geiger-Marsden-Rutherford experiments, unlike the data you present, focused on the angular dependency of the cross section at constant initial alpha velocity [see wiki Geiger–Marsden experiment].


Are Devaronians fire proof?

Question: In the Mandalorian Episode 6 "The Prisoner" Mando gets into a fight with Burg the Devaronian.  Mando uses his arm mounted flame thrower (ZX miniature flame projector?), that has worked on others in the past including armored stormtroopers, on Burg's face to no effect.
In my research I found that Devoronians have two livers that remove toxins and carcinogens, they use sulfur as a stimulant, and the males look like 'devils'.  All these things are associated with fire but there is no direct connection I could find. Are Devoronians shown to be immune to fire in other canon sources or is this to show that Burg is a Giant Mook or The Brute? (caution TV tropes)
Answer: Most of what we know of Devaronians comes from Star Wars Legends.  It is possible that this is just part of Devaronian biology in canon.

Are Devaronians fire proof?


Understanding a method of vector multiplication

Question: Recently, I attempted to implement the HQC Post-Quantum KEM in (almost) pure python. In the scheme specification whitepaper, it states the following:

Here is a simplified version of the function I used to calculate the vector product (the actual function is implemented using bit-twiddling but this makes it more readable):
def _convolute(b, a, l):
        aa = [int(c) for c in ('{0:0' + str(l) + 'b}').format(a)]
        bb = [int(c) for c in ('{0:0' + str(l) + 'b}').format(b)]
        out = [0] * l
        for i in range(l):
            if (aa[i] == 0):
                continue
            for j in range(l):
                out[(i + j) % l] ^= bb[j]
        return int(''.join([str(c) for c in out]), 2)

Here, l, is always going to be the cryptosystem parameter $n$. This is an attempt at implementation of the vector product method described above. The vector a is always going to be incredibly sparse (~100 1s), so the naive method works fine. I believe the actual implementation uses a constant-time method to avoid SC timing attacks, but I'm not too concerned with that now.
I implemented this, and the cryptosystem worked as expected, encryption and decryption were correct, and the essential arithmetic given in the correctness proof section of the whitepaper was also correct, so I didn't give it much thought.
However, revisiting the project I decided to actually test all the functions against the KAT data given in the submission package. From the 04/10/2019 submission, I checked against the hqc-256-3 data for the reference implementation.
For the values of x, y, and h given in the data, the value of $s = x + y \cdot h$ does not match against my implementation, so I decided to take a look at the function again. Using Sage to perform arithmetic in the quotient ring $\mathcal{R}$ defined in the whitepaper, my _convolute function does not agree with it (using the interpretation that vector bits correspond to coefficients of the polynomials). I can't check against the reference data as Sage appears to do the calculations too slowly and cannot take advantage of sparse polynomials, so I was using elements of smaller degree for testing.
In conclusion, where am I going wrong? Am I correctly interpreting/implementing the vector product method in the whitepaper with the convolute function? Is a direct comparison to multiplication in $\mathcal{R}$ misguided? Lastly, would anyone be able to provide an algorithm which definitely works for computing products in $\mathcal{R}$, preferably without using FFT or similar, and just done in a schoolbook method.
In addition, if my method is completely incorrect, to what extent is the cryptosystem actually weakened by this wrong product computation?
Answer: I can't completely answer your question, but I don't see how sage can't compute the polynomial multiplication - are you computing in the residue ring modulo $x^n + 1$?
The following executes within a few hundreds of milliseconds on my computer:
R.<x> = PolynomialRing(GF(2), "x")
RR.<z> = R.quo(x^57367 + 1)
RR.random_element() * RR.random_element()

Maybe you can use this to debug your implementation.
Hope I could help!


Deadlift and Rack Lifts

Question: My max deadlift (for now) is 435lbs, my above knee max rack lift is 605lbs, my just below knee max rack lift is 450lbs....does this indicate that my 'take off' is the weak part of the lift? and if so, what can I do to improve the bottom part of my dead lift?
Comment: Do I recall that you're working with a bar that is low to the ground? If not, and you're pulling from regulation height, maybe deficit pulls (from lower than prescribed) might be useful. Haven't tried it myself.
Answer: Most people are much stronger above the knee than below.  However, if you feel that the disparity is too great, there are a few potential problems you may want to check:

Starting position with the hips too high.
Poor mobility causing low back rounding just to grab the bar
Losing body tightness due to poor breath control.
Simply just being weak off the floor.

If your hips are too high, you are pulling from the most mechanically inefficient position.  Additionally, it is putting a lot of strain on your back that can potentially be dangerous to your lumbar region.
The best thing to do is get some video of yourself to see what you look like.  Take it from a couple different angles: 3/4 view on the front, and a side view.  The 3/4 view is from the front but at an angle that also lets you see your leg and back position.  A good example, as well as some professional deadlift critiquing would be in this video from Brandon Lilly: http://youtu.be/vdINRhBUvsM
You want to breathe into your spine.  In other words when you take a deep breath, that breath should fill and brace your spinal position before you attempt a pull.  Hold that breath until you are fully erect.  Just breathing into your stomach or chest isn't going to help the spinal position.
If you don't have mobility or body position issues, there are some exercises that can really help:

Double-paused deadlifts reinforce technique and body alignment, as well as provide more time under tension at the problem points.
Snatch grip deadlifts help both the power off the floor and lockout.  Use 50% of your heaviest deadlift for the day and do 2-3 sets of 10-15 reps.  Aim for more volume, but if you can barely make the minimums it's OK.  Your glutes and traps may be particularly challenged at first.
Speed Deadlifts help reinforce technique, and pulling with the intent to break the bar off the floor as fast as possible.  Essentially use 55-65% of your training max, and do 10-15 singles on a 30s clock.  In other words, every 30 seconds get into position breath in and pull.

Both of the above are assistance exercises I've used and have produced some good results.  They shouldn't replace actually training the deadlift off the floor.  Make sure you pull the bar toward you throughout the movement, activating your lats.
Answer: If you need to improve off the floor, rack pulls definitely help when you set the height just below the knee. Using chains, bands & other tools can definitely help as well.
As Berin mentioned, taking a video would definitely give some more visual as to how you are pulling.

Deadlift and Rack Lifts


1564 (I V vi IV) chord progression for Minor

Question: Many of I-V-vi-IV chord progression examples are C major. My question is Minor. For example of Am key signature, the 1564 is Am , Em, F, Dm; however, I-V-vi-IV should mean major-major-minor-major. May I have your help on this?
Answer: True that in major I V vi IV  is maj. maj., min., maj. But why on Earth should that pattern be carried across to minor? i doesn't equal I, iv doesn't equal IV, etc.
i v VI iv is what it is, there's no direct musical correlation, just the numbers are the same (in Arabic, not RN!)
The sound isn't the same, the intervals between the chords are the same, but that doesn't mean their sound will be the same - after all, major and minor chords will always be different. What did you expect?
Comment: Thanks for your reply. Does it mean I-V-iv-VI  is only for major key signatures?
Comment: Since I is the root, and represents the key involved, then, yes!
Comment: It could also be i V VI iv (or even i V VI IV given the right melody) and still be a minor version of "1-5-6-4".
Answer: I'm not sure I understand your question but each mode technically has only certain notes at its disposal.  At least when you follow rules such as those in partimenti.
So a I chord in Ionian mode (major scale) key of C would be CEG and a IV chord would be FAC.  Both are major.
In C aeolian mode (natural minor) the notes are 12 b3 45 b6 b7 8 which means your i and iv chords are now minor. C Eb G and F Ab C.
Each mode changes some note degree and if you obey the regole or rules, it will yield a different harmonic landscape.  So if you played C dorian the notes are 12 b3 456 b7 8.  The most important note in Dorian is the natural sixth. That means your i is obviously minor but your IV is now major giving the Dorian mode a happier sad than the two minor chords in aeolian.  To hear the difference play these chords I IV I, then i iv i, then i IV i.  But the sixth is not the only important note.  Each mode changes where the half step notes are and that has huge harmonic differences, too.
All the modes are like this.  It is also why the early church used modes for different emotions.
Answer: I think you need some explanation of what the Roman numerals actually represent.
First, the Roman numerals represent the tones of a key signature which are used for the roots of chords. No chord qualities like major, minor, diminished are represented at that level.
Secondly, in some Roman numeral analysis (RNA), upper/lower case, along with symbols o and ø is used to show major/minor/diminished quality.
Not all RNA systems use upper/lower case and are only concerned with identifying the scale degrees of chord roots. So, in that kind of system you get...

Roman numeral - Scale degree
I             - Tonic
II            - Supertonic
III           - Mediant
IV            - Subdominant
V             - Dominant
VI            - Submediant
VII           - Leading Tone (or Subtonic of minor key signatures)

At this point the important thing is those seven Roman numerals will apply to both major and minor key signatures, because that simple system does not use upper/lower case to distinguish chord qualities. (A well know text that uses this system is Walter Piston's Harmony - at least the first edition, not sure about later editions.)
If we use that system to write out the progression, it would simply be...

I V VI IV

...which in plain English would mean...

tonic triad, dominant triad, submediant triad, subdominant triad

...in either a major or minor key.
With that understanding, let's use upper/lower case to indicate chord quality. We will start with major keys, because that is simplest...

I V vi IV

...which would read something like...

tonic major triad, dominant major triad, submediant minor triad, subdominant major triad

When you get to minor keys things become a little complicated, because the sixth scale degree (the submediant) and the seventh scale degree (the leading tone) are often raised a half step from the key signature. (Read up on minor key harmony, it's too complicated to go into here.)
Theoretically, the various forms of the sixth and seventh scale degree in minor result in a large number of possible Roman numeral chord symbols in minor keys, but if we keep things simple and realize that I V VI IV forgoes a cadential progression, we can say the VI and IV chords will simply be diatonic chords of the key signature, and using letter case, they will be VI and iv. Of course the tonic triad will be minor in a minor key, so that will be i. That leaves only the dominant triad to be considered. If you want to sound of the proper major/minor harmonic system, the dominant triad will be a major chord, and so that would be V. But, if you want a more "modal" sound, the plain diatonic sound of aeolian mode, you could use the minor dominant triad of the unaltered key signature, which would be lower case v. So, by this reconning, you have to basic possibilities for the progression in minor...

Am: i V VI iv
Am: i v VI iv

Keep in mind there are other ways this kind of chromatic inflection can happen beside minor key music. The most common is borrowed chord harmony. A really common example is using a minor subdominant in a major key...

C: I V I iv | I...

The take-aways are then...

Roman numerals first represent the scale degrees of the key signature
The sixth and seventh scale degrees vary in minor key harmony
Borrowed chord introduce alterations from the key signature
You need to decide how to chromatically "inflect" chords in a progression
Select letter case and other symbols in RNA to represent chord qualities after deciding how various tones are chromatically inflected.
Comment: Personally, I've never used *only* or seen *only* RN capitals, ever. Caps for major, lower case (i, ii) for minor, etc). Perhaps I've lead a sheltered life, so I'm off to search!
Comment: @Tim, I've seen it in older theory book. A _seminal_ example is Piston's _Harmony_. My point is to first associate the RN with a scale degree and secondly with a chord quality.
Comment: FWIW, I checked my 1987 *Harmony, 5th Edition* by Piston (& Mark DeVoto since Piston died in 1976) and it still uses all caps RN.  (Maybe you're supposed to SHOUT THE CHORDS?)
Comment: @Theodore, interesting, I wasn't sure about later editions. My copy is a first edition.


What limits are there on taking missions?

Question: I seem to recall reading somewhere that you were limited to only two missions at a time, but since many of the missions seem to not be completable when you receive them, this doesn't seem to make much sense.  What are the limits in terms of taking missions?  What happens if you reach that limit and then talk to someone that would normally give you a mission?  Is there a way to review the missions that you are currently on?
Comment: I'm not positive, but I've never found two missions at the same place. At least usually, if not always, you only get one or two missions at the start and more unlock when you complete that one.
Answer: You can take 2 missions at a time per area per timezone.
I'm not sure about what happens if you accept more than 2 missions i cant help you on that.
There is no overview of all the missions you are currently doing. But you can see all the missions you are doing in the area you are in now by opening the map for the current area.
Comment: you can't accept more than 2 missions, the npcs that would give you missions otherwise simply aren't talkable when you have 2 missions open ;) (believe me, i tried >.<)


To where is the mouse sending signals of a computer?

Question: When we move the mouse, we can see the cursor moving on the monitor. I know that mouse can send signals according to its movements. Which component of a computer is receiving those signals in the first place? Is this whole process happening only between device controllers and device drivers? Is there any involvement of the OS in this?
Comment: The mouse talks to a USB controller (previously a Serial controller), and the latter to the CPU via the device driver.
Comment: Ofcourse the OS is involved, even the device drivers need to be executed on the cpu, and  that is one of its responsibilies.
Comment: @RinkeshP, it might work like that, but it doesn't have to. The device controller could keep track of the position itself, send an interrupt to the OS when something changes, and the OS can query it when it wants the information.
Answer: Your mouse is plugged into a USB port, yes? And you're using a pretty normal PC?
First off, USB devices never send signals by themselves. They're only allowed to respond to questions they get from the computer (formally, the "host"). The computer is asking the mouse, typically 125 times per second, whether it's moved. Some expensive mice get polled 1000 times per second, but it uses more bandwidth on the USB bus. So let's answer the opposite question first: how do these requests get from the operating system to the mouse? and then the answers go back the opposite way to that.

If you were to trace the wire (don't bother, it's tiny and probably goes underneath other wires) you'll find it goes - past some circuits to defend against static electricity zaps - back to a component called a USB host controller. The host controller can be a separate chip, or it can be inside the CPU chip or the Platform Controller Hub. You can (and probably do) have more than one. To keep things simple let's assume it's a separate chip.
The USB host controller's job is to control the USB bus. The host controller is fully in charge of the USB bus (at least the one it's connected to - you have several), but is itself a slave to the rest of the system. It sends out these polling requests 125 times per second, all by itself, because it was told to.
Who told it? Well, the host controller, being a kind of adapter, has two sides. One side is the USB bus where you plug in your mouse. The other side points towards the CPU. There are many different host controllers that connect to CPUs in different ways, but since you have a PC, your one is probably connected to a PCI Express bus. The PCIe bus passes through a chip called the Platform Controller Hub (whose job isn't important here) and then on to the CPU. Actually, since the CPU is in charge of everything, I should say it goes from the CPU, through the PCH and on to the USB host controller.
The CPU can send PCIe transactions or "packets" to the USB host controller, more-or-less directly. The CPU redirects certain memory addresses to the PCIe bus, and PCIe packets are sent using the memory read and write instructions.
That covers the hardware side. How does the software look?
On the software side, you have a driver for the USB host controller, which knows what PCIe packets to send it to make it send these polling requests 125 times per second. That driver acts on behalf of the mouse driver, which knows that it has to send polling requests 125 times per second. And when it gets a response back (saying the mouse was moved) it passes that response to the mouse driver to interpret the mouse movement.
A USB bus can have several things plugged into it (via hubs) so the one host controller can interface with several USB devices at the same time, and therefore the one host controller driver can interface with several USB device drivers at the same time.
The USB mouse protocol is standardized, so you don't need to install a special driver for your mouse - the built-in one for "any USB mouse" will do.

It's quite typical that the software looks like the opposite of the hardware. You have a mouse driver that wants to talk to the mouse. But it can't talk directly, so it enlists the USB host controller driver to send the needed USB packets to the mouse. Some CPU designs (not yours) don't speak PCIe directly, so they might even need a PCIe driver to send the PCIe packets to the host controller. And we can go upwards, too: if you plug in a hard drive with a USB-to-SATA adapter, the SATA hard drive driver has to call on the USB-to-SATA chip driver to send SATA commands, which calls on the USB controller driver to send the USB commands telling the adapter chip to send the SATA commands.

The involvement of the operating system is that it's the framework within which all the drivers sit. You'd expect the operating system to mostly stay out of the way, apart from loading the necessary drivers depending on which hardware is plugged in.
The OS will scan the PCIe bus to see what devices are attached. It will see the USB host controller, and load the USB host controller driver, which will scan the USB bus to see what devices are attached. It will see the SATA adapter and the mouse, and get the OS to load the SATA adapter driver and the mouse driver... you get the idea.


Can match officials take decisions which are not written in the book but seems correct in a common sense?

Question: For example, there is no such rule which states a player cannot get in contact with opposing team's goalkeeper in goalkeeper's 6-yard box. However, in the local league, the referees gives a foul agaisnt the attacking team even if goalkeeper fouls the attacker inside defending team's 6-yard box. I guess, the reason for such thing is, the coaches, players, and fans usually expect such a foul call after a physical contact with goalkeeper and attacking team's player inside the 6-yard box. So, as shown in the example, can match officials take decisions which are not written in the book but seems correct in a common sense?
Answer: No, they can't. Every call must be made according to the rules.
However, some rules have room for interpretation. For example:

not every physical contact is a foul
challenges can be be risky for both players
playing in a dangerous manner (what actually IS dangerous?)
...

In your example the 6yd box used to be the goalkeeper's area years ago and it was not permitted to challenge the goalie in there. Referees often still call challenges against the goalie against the attacker, primarily because the attackers endanger the goalkeeper. Or they simply do, because the keeper already got their hands on the ball. From there on it's no longer allowed to challenge them. Without visual evidence it's hard to tell why a certain call has been made.


Can I supply a device rated for 1A with 15A power supply?

Question: I'm talking about a big difference between output current of the power supply and rated current of the device here. Would it burn up?
Comment: If the grid can supply 10kA surges and you apply a 0.1A clock to AC outlet will it burn up?
Comment: No the device will take up what it needs.
Comment: unregulated power supplies don't reach specified voltage until specified current is drawn, so in that case you would have way too many volts. But, at 15A, it must be a regulated switching supply and you're fine.
Answer: Think about it.
You have an electrical supply to your house. How many amps can it supply. My main fuse is rated at 63 A.
You have a light bulb. It's rated at 20 W. How many amps will it draw. Answer: \$ I = \frac {P}{V} \$ so that's about 0.1 A in 230 V land or 0.2 A in 110 V land.

I'm talking about a big difference between output current of the power supply and rated current of the device here.

Me too.

Would it burn up?

No. As in the case of the light bulb, the load will draw the current it requires and that's all.
You may want to consider limiting the current to a safe value in the event of a fault. Add a 2 A fuse in-line and you should be fine.
Answer: The power supply provides up to 15 amps. This does not mean that it has an output of 15 amps, always. The power supply will give the current requested by the device up to a maximum of 15 A.
Answer: Short answer: yes.
The 15 amp rating shows the maximum current which it will supply. It will also supply lower amounts of current just fine.
Think of it as a speed limit (although you shouldn't take the analogy too far). If your car can do 100 mph, that does not mean that it will always go that fast - only that it will if you need to. Likewise, a 15 amp rating only says that it will supply that amount of current if it needs to.


How are related questions ordered?

Question: This thread discusses the mechanism for choosing related questions at a high level. I'm wondering how those questions are then displayed on the RHS. Just going through a few examples by hand, it's definitely not by vote score, and it doesn't seem to be in order of relatedness. The API mentions a "rank", but every example I've looked up has had the related questions ordered simply by question ID (ascending). Can anyone confirm or deny this?
Answer: As Joel explains here, Elasticsearch is being used to give the results.
So the order is most likely by Relevance, same way search results are ordered.
When searching for something, the default sort is "relevance":

Each search result then have a relevance score, generated by Elasticsearch. It's hidden in the markup, for example the first result in above search has score of 205.0617 and the second has a score of 93.1004, etc.
In the related questions list I couldn't find the score, but pretty sure the sort is by that score behind the scenes.
Comment: Hmm, not sure I would assume that the related questions ordering would follow the same logic as the search results ordering, though I agree that relevance makes sense. However isn't it odd that every single question's related question list is ascending by question ID? Surely it can't be that questions posted earlier are always more relevant than later ones...
Comment: @rebz good point about question ID! Missed that, and it might as well be the sort method. I'm afraid only SE developer can say for sure, and sometimes it take years, if at all, until they give answer.

How are related questions ordered?


IIS7 shows welcome screen in Firefox, Internet Explorer works correctly

Question: Has anyone encountered the following problem: I have IIS7 running on my computer. On that same computer, I open IE7 and the website works (http://localhost/web.site/Default.aspx). Put that same url in Firefox 3 and I get the welcome screen of IIS7, a big image with IIS7 in the middle and 'Welcome' in several different languages. Clicking on the image leads you to http://www.iis.net/.
Answer: One browser accesses your server via 127.0.0.1, and another via your external IP.
Make sure virtualhost works with all network interfaces.
Answer: Perhaps your browsers have different locals set , only guessing as I have not used IIS7
Answer: Strange. That happened to me this morning (April 9, 2009), but the other way around. I was trying to get to Dell.ca. IE7 brought me to that IIS7 Welcome screen and Firefox brought me to the correct site. Happened 3 times before it corrected itself.
I do not have IIS anywhere on my network and my default home page is Google, which came up without a problem. The redirection occurred when I typed the new URL. I wonder if Dell is using IIS7...


2003 Honda CRV grinding noise from starter - possible flywheel damage?

Question: I have a 2003 Honda CRV and my starter started skipping or slipping. It was making a horrible grinding sound, so I bought a new one and installed it only to have it do the same thing. The grinding sound is terrible, so is it possible the problem is the flywheel? Please help, they are very difficult to change out. Honda gave no room and placed it under the intake manifold.
Comment: Is this an automatic or manual transmission?
Comment: Did you see any evidence of damage to the pinion gear on the old starter?
Answer: If the starter is the correct one and is fitted correctly then it sounds as if there are flats on the ring gear, this is a circular gear that is fitted to the flywheel. If the noise is as bad as you describe you could try pulling the starter out and looking into the hole where it fits, if you rotate the engine (by hand) you should easily be able to spot the parts on the ring gear that are worn.
If the ring gear requires replacement then the gearbox has to be removed to do it.
Answer: okay so it actually does answer the question , my own question because after buying another aftermarket starter only this time paying $180.00 more than the first one it fixed the problem, the less expensive one was around .150 shorter and the bendix also had a .150 less travel so this was the reason it would not engage.


Can classical logic hold without causality?

Question: Consider a universe where causality failed to hold. Would that universe be described by classical/standard logic? Or would we have to use a radically different logic where causality was not necessary? If causality is violated, would this break any laws of logic?
Comment: Is there a "classical standard logic"? There are some basic principles necessary to any logical system, are those what you mean? Also, there are different kinds of causality, for example temporal causality demands a forward flow in time, but atemporal models of causality also exist. Which do you mean?
Comment: Logic, classical or not, does not describe the universe, it describes our reasoning. It is not clear what you mean by "causality", but if it is [determinism](https://en.wikipedia.org/wiki/Determinism) then quantum mechanics is already indeterministic on standard interpretation. And generally, causality is a physical notion and whatever holds physically does not have any direct effect on logic, although we may find it convenient to change how we reason about some things. This was attempted with [quantum logic](https://en.wikipedia.org/wiki/Quantum_logic), but did not work out.
Comment: Classical logic, whatever precisely that may be, deals with logical, not causal, relations.
Answer: Classical logic can't be incompatible with an acausal universe, because it never talks about causality. It is merely rules of inference. Truth tables say nothing about something causing something else (although, of course, we can still prove the validity of a syllogism that mentions causality, or any other noun). In particular, to a logician "if p then q" just means q and/or not-p. "If Paris is the capital of France, Jupiter is the Solar System's largest planet" doesn't imply the two parts are causally related.
Comment: @Speakpigeon Perhaps you're looking for [something](https://en.wikipedia.org/wiki/Strict_conditional) [stronger](https://en.wikipedia.org/wiki/Logical_consequence) than a material conditional.
Comment: "*to a logician "if p then q" just means q and/or not-p.*" Not to any good one, no.
Answer: Ayn Rand thought that "the law of causality is the law of identity applied to change," saying that "you can't have your cake and eat it too, nor eat your cake before you have it" (paraphrase of J. Galt's absurd speech). If we think this or that causal fact is essential to some object, we might say it was analytically (meaning logical-identitywise) true that such an object causes this or that.
The issue is akin to that of "thick concepts," then. In ethics this is the sense that some concepts are more than just a bare normativity + descriptive factors. Rather, the "thick" concept's "parts" are strongly united. I personally find the idea of "thickness" here to perhaps be suspicious, an attempt to validate preconceived descriptors, and re: causality there are kindred examples (claims that something was essential to a species or subspecies, like women's blood would be damaged if they voted (or some such excuse as patriarchists used)).
Otoh, think of time as a general function system. Let the past, A, be relatively determinate, and the future B relatively indeterminate. The variables of B can only be "solved for" by the determination from A plus the general function of the system, or rather all things related under this system as such exhibit causation. However, this is more or less Kantian causality, which might be logically presented but not as a derivation from the law of identity...
Comment: Could you relate the 'thick concepts' terminology to a particular philosopher/philosophy please?
Comment: https://plato.stanford.edu/entries/thick-ethical-concepts/ is a good overview of the context where the notion is emphasized. So is https://iep.utm.edu/thick-co/ and see esp. the Broader Applications section.
Answer: Logic:

If Trump and Biden both are candidate, then Biden is candidate.

Not logic:

If Trump and Biden both are candidate, then Biden can win.

You can reason logically from assumptions made about causality or about the causal relation of events, but the assumptions would not be logical in themselves, that is, you can reason logically without assuming causality, and so you do not necessarily assume causality just because you are reasoning logically.
Of course, maybe it is the case that our world is causal and that causality is a necessary condition of what we are. If this is true, then maybe we would not be logical without causality to make us logical, so to speak. In this case, without causality, logic would not hold. But, presumably not much else would either.
Logic can only tell us, if it does, whether it is true that if something is true, then something else is true.


Is it possible to verify that the output of an executable came from its unaltered control flow?

Question: I suppose an executable could contain a key which signs its output, but that key could be extracted and used to sign other data. Is it possible to verify that the output of an executable is the direct result of its own unaltered (assembly) control flow?
Comment: I think that in generality, this would be equivalent to solving the Halting problem (which is not possible on a Turing machine equivalent).
Answer:
that key could be extracted and used to sign other data

Correct. An attacker can extract the key and sign anything.

Is it possible to verify that the output of an executable is the
direct result of its own unaltered (assembly) control flow?

Generally speaking, no.
It can be verified only in some specific cases. One approach can be to use signed executable (signed by its provider) which is running in a controlled environment. By verifying the signature you will be sure the code is not modified. By using controlled environment you will be sure that neither input nor output was modified, nor the code was modified when executable was loaded by operating system, nor the memory used by executable was modified by other process.
Answer: Generally speaking, in an uncontrolled environment (e.g. the OS can be modified), this is not possible. Whatever you come up with (verifying the machine code, checking for digital signatures, etc.) could just NOT be done by a copy of your software, and signing the output would still be possible.
Verifying that the actual code that is loaded and running is from a specific author can only be done by the OS (or system in general) without the possibility that it is forged by a third party.
And trusting this verification would only that the system itself can not be tampered with.
So no, i don't think that there is a practical way of doing this. The closest you come to such a closed system is maybe iOS/iPad OS. And at least I am not aware that there is such a system function available there. I even have searched for it before, because I would have found it pretty handy if, for example, iOS could sign a web request and include the app's manufacturer in the signature. To my knowledge, this is not possible, though. (Especially because even iPhones can be jailbreaked)
In an embedded (closed) system, on the other hand, where you can control every interface that can be used to load code, you could implement this yourself. This is as secure add the anti-tampering is, though. And add we know, this is never perfect.
On your average laptop or PC, however, I don't think it's possible.


Are wallet addresses in the crypto exchange website actual ethereum accounts?

Question: a newbie here,
I am trying to understand how ethereum based CEX's work. Users create accounts/wallet addresses (not email-linked user accounts) on the exchange. Are those addresses actual ethereum accounts from the mainnet?
I am asking this because this exchange has about 1000 users, but when I type eth.accounts in geth console, it shows only one ethereum account, which I assume to be the exchange account. Shouldn't there be 1000 accounts? How does the exchange handle it when a user deposits/withdraws from the exchange to the external account in the mainnet?
Answer: If you can send funds to it from mainnet, so it is an Ethereum account.
(I received this reply in another community.)


Where i can find information about updates

Question: Some minutes ago I gained "restar to updates take effect"(don't remember exectly the words). But I didn't see update program window. I by my self runing this program. Result: last information about updates - 1 day ago. May be it becouse my time 00:44 AM. But no settings allow to install updates without my "last word". But i have installed gnome more settings(themes and icons and... So wher i can find information about -- What was update?
Answer: The package manager keeps logs in /var/log/apt. You can see changes made with:
cd /var/log/apt
cat history.log

Depending on how long since the upgrade, the relevant entries may have been compressed to save space. The /var/log/apt directory will contain archived log files named history.log.X.gz where larger values of X mean older log files. You can read the compressed log files using zcat without needing to manually uncompress them:
cd /var/log/apt
zcat history.log.1.gz

You should see lines like
Upgrade: package1:arch (oldversion, newversion), package2:arch (oldversion, newversion)...

from which it should be fairly easy to see what was upgraded recently.


Questions about economic and human development in developing and the emerging countries (3rd world)

Question: I am wondering if the questions related to socio-economic human development be posted on this site or on politics site? The questions in this category will be related to challenges leading to development in countries of Africa or India for example. Also the questions related to international affairs and international efforts to development (like the sustainable development goals of UN) be directed here?
Answer: That depends on content of those questions.

This is Q&A site so you should ask answerable questions not questions that are meant to create discussion.

You should make sure that the content of question is on-topic. For definition of what is on/off topic on this site have a look at our help center.

Note that on this site you should ask:

something that a member can answer using facts, studies, economic theory and reasoning -not moral/political/religious/philosophical values.

The topic you mention seems to have overlapp with politics/philosophy and perhaps even moral values or law. Make sure you pose your question in a way that tries to avoid these topics by focusing on economic elements of the question. E.g. you could ask how automation can affect employment, and then you can use the answer to make further inferences about how that impacts human rights as defined by UN, but on this site you should not be asking whether automation affects human rights which is moral/political question that cannot be answered with economics and should be asked on philosophy.se or politics.se.

Preferably, before asking question you should make your own search/research first and mention in your question why  you still do not understand something or if you could not find anything on the topic you are interested in at least mention/link articles/books you had look at but did not answered your question.


Altium: How to change designator font when creating new library?

Question: I am creating a new schametic library in Altium Designer and wondering how can I change the text font of designators, pin names and pin numbers for all components in this library.
Comment: Have you asked Altium?
Answer: It's a bit tricky, but for single parts/components you can do that. You have to be in the SCH Library. Just go to "SCH List" in the panels.

A new Window should open. You have to change the mode from "View" to "Edit" and change the objects to "non-masked objects" at the top-left corner.

Afterwards, you can change every font, size and color of every parameter. For designators you just scoll down to "Designator" and in the "Properties"-panel the Font, Size and Color might be changed.

If you want to change all Fonts, just select "all components" and include only "Designators".

But I would NOT recommend doing it. Because if you add another component to you lib, you have to think about this process and change it every time. Same goes for parts and components that are from third-party.
Answer: If I remember correctly the font is set in your Altium preferences, not on a per-library basis.
Just checked, you can find it here:

Similar question asked here: http://www.edaboard.com/thread275975.html
Comment: this way can be used to change the font on the whole altium settings! However, I just want to change for a specific library ?
Comment: You're probably SOL @G.Zambrotta . Altium just uses its set system font when dropping components onto a schematic IIRC.


Derived H160 address is different than showing in metamask?

Question: I know ss58 public key and private key, also I have derived the EVM HS160 account from the same public key, next is how I can import that EVM HS160 Account in metamask. If I put the private key of ss58 address, It points to some different HS160 Account Address from What I have derived.
Answer: It depends on the deriving algorithm.
// sr25519
privatek --f(privatek)--> publick1
// ecdsa
privatek --g(privatek)--> publick2
// derived ecdsa (from sr25519)
privatek --f(privatek)--> publick1 --derive(publick1)--> publick3

During the process that I show above. IMO, publick1 == publick3 is impossible.
And I don't recommend you use the same private key everywhere.


Prevent part of plugin loading in another menu

Question:

I am trying to remove this part from the menu, my appologie buy im not sure how to take and copy the code from Inspection menu. I do hope this is enough for someone who knows how to. I was thinking maybe i can use custom css to prevent this part from loading. I have noticed if i Deactivate plugin HivePress the menu dissapears. Other than that im not sure how to disable it.
Thank you
Comment: If it is from the menu, see if you can find the menu items in Appearance > Menu section. If not and the menu is created via a plugin, you should try the plugin support. They can help you faster.
Answer: Managed to sort it out with css code
<code>.hp-menu__item { display: none; }</code>


Windows Equivalent to "chmod -R a-w"

Question: What is the Windows equivalent to "chmod -R a-w" to recursively remove write permissions of a directory?  The tricky part is to leave the rest of the permissions the same (e.g. if subfolderA is only readable by groupA, do NOT open the folder permissions to Everyone).
Comment: Note that if you want to make an entire share read-only, you can do this by changing the share-level permissions.
Answer: I would say there is no "equivalent" way as the design of access control on Windows is quite different from that on Linux.
Anyway, you may achieve something similar with the icacls command, PowerShell script, VBScript, etc.
For each file there can be grant rules and deny rules attached to users or groups. And deny rules overrides grant rules. So you may have different ways depending on existing ACL configurations on the files. E.g.:

Users inherit both read and write permission: add a rule to deny write
Users inherit read permission and a rule that allow write is already exist on the file: just remove the allow write rule

Here is an example for case 1 to add a rule that deny a bunch of write permissions using icacls:
icacls C:\myFolder /deny UserOrGroup:(WD,AD,WDAC,WO,WEA,WA,DE,DC) /T

To add the rules for multiple users/groups, you will need to wrap it with a loop in batch script.
Since you have tagged powershell in you question, a PowerShell script similar to the above icacls example is:
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule("UserOrGroup", "DeleteSubdirectoriesAndFiles, Write, Delete, ChangePermissions, TakeOwnership", "Deny")

Get-ChildItem 'C:\myFolder' -Recurse | ForEach-Object {
    $acl = Get-Acl $_.FullName
    $acl.AddAccessRule($rule)
    Set-Acl $_.FullName $acl
}

PowerShell is more complicated but provides more flexibility. E.g. you can get user/group from existing rules on the file/folder and add the deny rule dynamically.
Note: You can probably find even more relevant question and examples in serverfalult, superuser or stackoverflow with keywords like "windows chmod", "powershell acl", "icacls", etc.
Comment: One thing to be aware of is that the deny permissions really do take precedence, which makes it difficult to apply a deny rule to "everybody except administrators".  Someone used to Unix may expect administrators to have implicit access regardless of the permissions, but that's not true on Windows.  (Administrators have backup/restore privilege which can override permissions, but does not do so automatically, and built-in support for leveraging this is limited.)

Windows Equivalent to "chmod -R a-w"


Retain original value in DataBase when NULL value is passed to Stored Procedure

Question: Hi I am a newbie in SQL and require help
I have a parameterized stored procedure which contains a Update query like...
UPDATE sometable
SET
    price1 =    @param1,
    price2 =    @param2,
    price3 =    @param3,
    price4 =    @param4,
WHERE
    ID = @param5

Now when I execute this SP by setting any of the parameters value as NULL it gets updated in DB, what  I want to know is if one of the parameters value is NULL then can we retain that columns original value in DB instead of updating it with NULL.
Answer: In SQLServer the tidy way is to use ISNULL(@param1, price1).
This takes @param1 and checks if it is NULL.  If it is NULL it is replaced with the value from price1.  I like ISNULL as it's very readable, does what it says on the tin.
It's not ANSI SQL though, with a more flexible command existing there: COALESCE.  It's just like ISNULL, but takes any number of parameters.  It searches through them in order for the first non-NULL value.  If none are found, NULL is returned...

UPDATE sometable
SET
        price1 =        ISNULL(@param1, price1),
        price2 =        ISNULL(@param2, price2),
        price3 =        ISNULL(@param3, price3),
        price4 =        ISNULL(@param4, price4)
WHERE
        ID = @param5

UPDATE sometable
SET
        price1 =        COALESCE(@param1, price1),
        price2 =        COALESCE(@param2, price2),
        price3 =        COALESCE(@param3, price3),
        price4 =        COALESCE(@param4, price4)
WHERE
        ID = @param5

Also see: "COALESCE vs ISNULL"
Answer: Try wrapping the @paramx with a CASE statement:
CASE @paramx
    WHEN NULL THEN pricex
    ELSE @paramx
END
Answer:   UPDATE SET tgt.firstname = coalesce (src.new_FirstName, tgt.firstname)


convergence of $\int\limits_{0}^{1}\frac{\sqrt{x}}{\sqrt{1-x^4}}\, dx $

Question: I would like to prove that this integral is convergent. Although it's easy to evaluate it, I would like more ellegant way to do it. Thanks
$$\int\limits_{0}^{1}\frac{\sqrt{x}}{\sqrt{1-x^4}}\, dx $$
Answer: Close to $0$, there's no issue and close to $1$, the integrand is basically $\frac{1}{\sqrt{1-x^4}} \approx \frac{1}{\sqrt{1-x^2}}\frac{1}{\sqrt{1+x^2}} \approx \frac{1}{\sqrt{1-x^2}}\frac{1}{\sqrt{2}}$ but this is fine since $\frac{1}{\sqrt{1-x^2}}$ has antiderivative $\arcsin x$
Answer: We only have problems at $x=1$
Close to $x=1$ we can see $$\int_0^1\frac{\sqrt{x} \  dx}{\sqrt{1 - x^4}} = \int_0^1 \left(\sqrt{\frac{{x}}{{(1+x^2)(1+x)}}} \frac{1}{\sqrt{1-x}}\right) dx \leq \int_0^1\frac{M}{\sqrt{1-x}} \ dx=2M < +\infty$$
where $M$ is an upper bound for $\sqrt{\frac{{x}}{{(1+x^2)(1+x)}}}$ on $[0,1]$.


I have a .h file that contains structs&macros I want to use in a C# application. How do I include the .h file?

Question: Can you provide a simple example or a link to a simple example.
Answer: It's not entirely clear from your question what you are trying to accomplish.  There is no way to include the headers directly in any meaningful way in a C# project.  C# doesn't use header files and compiles to IL.
Here is a link describing the various interop methods between managed and unmanaged code if you are seeking to consume e.g. an unmanaged library in C#.  A search for PInvoke will turn up more references.
Edit: Better link to an SO post with more info
Answer: You can't.
You need to manually port the structs to C# structs with attributes.
Answer: There is no C# version of a macro from C++ or C.  You'll need to make actual methods in C# to do the same operations.
The structs will need to be ported to C# struct types, as well.  You cannot include a C or C++ header file into a C# program directly.
The methods that use the structs from the C or C++ DLL can be called from C#, if required, via Platform Invocation.
For details, see the MSDN Section on Consuming Unmanaged DLL Functions.


Why does my cat hide from my friends/company?

Question: When I have friends visiting, my cat will hide under my bed for the entire time my friends are over. Once they leave, she comes out of hiding and is being herself again. Why does she only hide at the time I have company over?
Answer: Most cats are happier if allowed to meet people one or two at a time, in quiet /calm surroundings, with a good escape route. I can't blame them; if I was that size I'd be cautious about the big apes too. Mine are slowly getting used to the fact that I host song circles occasionally; that or any other crowded/noisy event is a challenge for most cats.
Some cats are happier -- or at least less nervous -- if you explicitly introduce them to the new humans. If your cat is comfortable being carried, you might try holding the cat comfortably, cuddling a bit, then have the other person slowly reach out and let the cat sniff their fingers before offering a skritch or two. The fact that you're there to defend them but are permitting this contact, together with it being respectfully slow so the cat doesn't feel attacked, may work even for fairly shy cats; they may promptly run off when put down but will be more willing to approach that person later.
Outside of that introduction, letting the cat feel it has control makes a huge difference. I once moved a bit too suddenly in reaching toward a kitten and got the full arched-back bared-teeth hiss response. I immediately froze, leaving my hand where the kit could claw me if so inclined but not advancing further: "see, I'm not attacking you, and I trust you not to hurt me." Two seconds later the kit had accepted I was harmless and was enthusiastically scent-marking me.
Note that these techniques work with most small or shy animals, including humans in those categories. Keep it quiet, don't chase, don't rush, don't crowd.
They also work when adopting a new animal into your household; my cats spent most of their first month here under the guest bed with occasional forays to check out the house and/of me, and that was OK;  I knew I'd win them over eventually.
Answer: My cat does this all the time, well technically it's my sister's cat but we lived together while I was in college, ONE thing I noticed is that my cat was very dependent on my sister, like she would follow her around all the time and NEEDED to be with her most of the time, plus she never really liked going out, not being exposed to the "outside world" made her shy with other people I believe, the only people the cat would feel comfortable enough to be around was me and my sister, since she saw us on a daily basis, I believe it's just that she wasn't that exposed to other people when she was a kitten. Plus the fact that she became a very nervous cat.
So I think you just have to slowly and patiently work with your cat, do not just force the cat to be around people/shapes/scents the cat doesn't know.
Answer: In nature, a large animal the size of a human entering the territory of a cat is "Something That Can KILL ME".  So the cat reacts naturally - it hides to avoid the notice of the new thing.  If that works, it might use cat sneaking powers to get a peek at the new thing without danger - often from a high vantage point.  If things seem alright after that, it will then sometimes with caution come out and meet the new person.
You ignoring the cat lets him move through this process - running in and forcing the issue might set things back.
It isn't just people this happens with - to a lesser extent a big box being opened leads to a similar chain of events, possibly faster since the box doesn't make noise and move about.  Also a sudden noise can do the same thing.
The less high strung and confident a cat is the more it reacts.  I turned on my TV with a football game yesterday for the first time in months.  One cat was under the bed the entire time, one watched from the balcony above, and one could care less and napped.
Answer: My two cats have been doing the same. They are sisters and have lived with me all their life. I seldom have visitors, so the cats are not used to other people than me.
It has gotten better as I have had visits slightly more often.
The cats are just anxious about people they don't know, nothing worse. It will get better over time, granted they can hide when they want to.


Will faster drying interior polyurethane work over a layer of slow drying exterior poly

Question: I am coating a pine mantlepiece with gloss polyurethane. I used interior/exterior poly for my 1st & second coats for protection from sun exposure. Because of the longer drying time 24/48 hours there are quite a bit of dust nibs. Can I use a faster drying interior poly (2 hours) as my top coat or are the two types incompatible?
Comment: Hi, welcome to StackExchange. Just in general, it's really impossible to answer this definitely, because you might have problems but it depends on a host of specifics. The easiest solution here is to continue to use your interior/exterior poly and simply dilute it, so you can apply it as wiping varnish. This almost completely obviates problems with dust nibs, and simultaneously make it dry faster (thinner coat, ergo faster drying time) but of course you need more coats to build an equivalent finish.
Comment: BTW just to check, is the fast-drying interior poly also an oil-based varnish??
Answer: Since it has already been a day since your last coat coat, the polyurethane should be done drying (along with some curing) so you can safely apply another coat of polyurethane if it has the same base (oil/water).
There might be some issues if you apply different polyurethane (with the same base) within 2 hours since there will be chemical bonding between the two layers but that seems unlikely.
If more than 2 hours have passed but less than a day has gone by you should also avoid new coats since the difference in curing between coats might cause some weird patters to show up once it's all done curing.
If you are mixing between bases (oil/water) ideally you would wait a month, or more. That way you can be sure that it's done curing and won't have any interactions between the different polyurethane layers. Since it's been a few days you might be able to get away with just applying the new coat after some light sanding with 220 sandpaper (I would do this anyway to knock down those dust spots). However, there is chance you might get a weird texture/cracking in the finish.
Comment: You really shouldn't apply a waterbased topcoat over something oil based until the former has had a good long time to cure, and with varnishes and oil/varnish mixes the rule of thumb is until the characteristic odour can't be detected any more. And actually it's the same with leaner/faster drying finishes over a noticeable coat of something that 'dries' more slowly, otherwise defects can occur because the surface dries, contracts and begins to harden while what's underneath is not finished being mobile and shrinking.
Comment: I agree. I have put oil-base over water-base and vice-versa after base coat was dry, with no problems. Definitely shouldn't be an issue if both are the same type. Lightly sand to degloss, clean with tack cloth, use professional grade brush, good to go.
Comment: Graphus I agree that you should wait until the oil based poly is completely cured before applying another base, However I was under the impression this was due to the curing not the drying since most of the solvent is gone within a few hours. Whoever I've used oil bases poly, that smell was gone in like a week, then again I had good ventilation and didn't get next to the wood to try to smell it. .
Comment: Yeah the standard for 'it doesn't smell any more' is apparently to put your nose right on the surface when sniffing (source, Bob Flexner). This is really only concerned with something faster-drying over an oil-based varnish though, one could probably get away with trad varnish over a waterbased one after just a couple of days (although waiting a week+ would be ideal). BTW you have to use the @ before someone's username for them to get a notification of a reply.