How to calculate snubber value for triac

Question: I want to use an optocoupler and triac to control a ceiling fan. How do I calculate the snubber resistor and capacitor value?
Will the inductive load of the fan change my snubber value?
Comment: @Tom: Ask your own question rather than try to hijack someone else's.
Comment: What is the role of C1 in this circuit?
Answer: I may have a few pointers for you:
The snubber is necessary in two cases :
   * You are using a 4 quadrant TRIAC (always use a snubber then)
   * You are trying to control an inductive load
Snubber will help the TRIAC properly turn off when needed. The turn off parameter is the crossing zero dI/dt. In case of resistive load, this value is zero or close to that; however, when the load is inductive, the phase between I and V increases this value.
My rule of thumb to calculate the turn off commutation of a given inductive application is the following:
$$ \biggl( \frac{dI}{dt}\biggr)_{application} = k \cdot 0.5 \cdot I_{T (RMS)} $$
(with IT(RMS) the evaluation of the current of my load in permanent mode).
k = 3 in case of universal motor and 1 for every other case.
The key parameter to look at is the turn off commutation of your TRIAC, aka (dI/dt)c. The TRIAC only turns off if the slope of the current when crossing zero is BELOW the value in the datasheet of the TRIAC:
$$ \biggl( \frac{dI}{dt}\biggr)_{application} < \biggl( \frac{dI}{dt}\biggr)_{datasheet}  $$
If you see that the TRIAC you use has a low (dI/dt)c, then only do you need to setup a snubber.
Example: Inudctive load of 3A RMS and 4A rated TRIAC. (dI/dt)app = 3
TRIAC Z0405MF, (dI/dt)c = 1.8 ==> TOO LOW ==> SNUBBER necessary
When it comes to calculating the values for the snubber, the minimum value of the capacitance should be 10 nF to 47 nF and the minimum value of the resistance should be 47 Ohm to 680 Ohm.
For more details I refer to the AN from STMicro
I hope all of this helps.
Comment: I'm confused. Isn't dv/dt the more critical triac parameter for inductive loads?
Answer: Snubber is essentially the capacitor of it, but the resistor is needed to prevent harmful (=destructive) too fast rising anode current (Ia ) peak from snubber's capacitor through the triac when the triac is triggered to ON state. In addition the resistor dampens oscillations that can occur with inductive load and snubber's capacitance.
The capacitor over the triac is needed to prevent too fast rising of the anode-cathode voltage Uak when the triac tries to turn off. No inductive load is needed for too fast Uak rise, a resistive load can well be enough if there's no capacitance inserted.
Mains voltage also has unwanted peaks, which sould be somehow suppressed. The snubber helps. The charging of snubber's capacitor slows down the rise of Ua because the load causes voltage drop. Snubber's resistor must not be too high because that would make the voltage rising speed limitation non-existent, Stray capacitances hopefully help over the start step at the turn-off
Inductive load will shift the turn-off further over the zero crossing of the voltage but the turn-off happens when the current drops under the hold level. A big inductor can even in that situation have remarkable energy which at the turn-off kicks Uak ultrafast up. The snubber must eat that pulse, That happens if the resistor isn't too big and the capacitance is high enough.
So, to design the snubber you must know the AC voltage, its unwanted peak estimations (can be found from design norms), how fast the anode current is allowed to rise (=dIa/dt -limit)at turn-on, how fast Ua is allowed to rise (=dUa/dt -limit) at turn-off , the hold current, what are the variation limits of the load (resistance, inductance) and what's the triggering angle variation range.
With these numbers you search with a circuit simulator which snubber values in all load and triggering situations prevent the  excessive dIa/dt and dUa/dt. As well the oscillations should be kept in control because they+input voltage can be too much.
Here's one whitepaper which contains the principles of the design math, if that's needed. Also all explanations there are useful https://www.st.com/resource/en/application_note/cd00004096-rc-snubber-circuit-design-for-triacs-stmicroelectronics.pdf
I have seen a case that no snubber alone was enough, there was needed also a saturating inductor to prevent too high dIa/dt at turn-on. The problem was the load which took a current peak due the capacitance.


can we prove the momentum operator is time inpdependent without using creation and annihilation operator?

Question: in free scalar field, the momentum operator is $$P=-\int d^3 x \pi \nabla \phi$$.
If we write it with creation and annihilation operator, then we can get the apparently time independent form,$$P=\int d ^3 p \vec p a_p^\dagger a_p$$. My question is that can we just use the commutation relation of $\pi$ ,$\phi$ and Hamiltonian to show that momentum operator is time is time independent?
Answer: Yes. Just take the time derivative of $P$ in its original form and use equations of motion. We have
$$
\begin{align}
\partial_t P &= - \int d^3 x \left(  \partial_t \pi \nabla \phi  +   \pi \nabla \partial_t \phi \right)  \\
&= - \int d^3 x \left(  \nabla^2 \phi \nabla \phi  +   \pi \nabla \pi \right)  \\
&= - \frac{1}{2} \int d^3 x  \nabla \left(  \nabla \phi \nabla \phi  +   \pi^2 \right)  \\
&= 0
\end{align}
$$
Comment: Just add an comment, $\nabla^2 \phi \nabla \phi=\frac{1}{2}\nabla(\nabla \phi\nabla \phi)$ since $\nabla \phi$ commutes with $\nabla \nabla \phi$


Piece is D harmonic minor. Should I sharp all Cs?

Question: If I'm playing a piece (piano) in D harmonic minor, I only sharp the 7th (C) if there is an accidental. Is that right?
Comment: What makes you think that the key is D Harmonic Minor? Note that there is no _key_ of D Harmonic Minor, but you could see a _key signature_ for D Harmonic Minor. In that case, the key signature would contain a B♭ and a C♯, but the key would still just be D Minor. Then you would sharp all Cs, no accidentals needed. But if there is no C♯ in the key signature, only sharp Cs when accidentals are encountered.
Comment: @DavidBowling - I think that is the point of the question. In a piece, say in Dm, then the key sig will have one b. That will mean all the Bs notes will be played Bb automatically. So, if every C is played as C# in the piece, it *would* make sense (at least to OP) to display C# also in the key sig.
Comment: @jdjazz -- From "I'm playing a piece (piano) in D harmonic minor" I took it that they were playing from sheet music rather than composing, but you may be right. It would be nice for OP to shed some light on the matter.
Comment: @Tim -- I meant the question at the beginning of my comment literally: does OP think that a piece is in D Harmonic Minor because the key signature they are presented with contains a B♭ and a C♯? Or do they have some other reason, e.g., the D Harmonic Minor scale just sounds good to them with this piece, yet there are no C♯ accidentals? In short, I was trying to get a better picture of what OP was thinking about.
Comment: @DavidBowling, I'm reading the question as if the OP is composing a song in D harmonic minor and is wonder how to write out the key signature. (In other words, I'm assuming the OP is correct in stating that the song is based on D harmonic minor.) A little more context might be helpful, though.
Comment: @DavidBowling a key signature with a B-flat and a C-sharp would be so unusual that I suspect most musicians would call it incorrect.
Answer: The piece is not in D harmonic minor.  It is in D minor.  Harmonic minor refers to a scale, not a key.  Only play C#s if they are written as sharps.  If not, just play C naturals.
Answer: D minor is the relative minor to F major. As such, it's given the basic key signature of that key - one flat - Bb.
Minor keys have vagaries which muddy the waters a little. There's the natural minor notes, which mirror those of F major exactly. Some pieces in Dm use those exclusively. Sometimes a more definitive leading note is needed, so the penultimate note of the natural scale is raised. Hence the C# from the question.
Sometimes, the interval between the 6th and 7th note in the harmonmic minor scale doesn't sound too good, so that's also raised. Hence the melodic minor.
However, the key signature of Dm stays as Bb only. If the piece needs C to be raised to C# each and every time, so be it. It gets an accidental each and every time.
Afew composers actually did write out key signatures with something like Bb and C#, to signify Dm, but it never really caught on. At the end of the day, it's not difficult to realise that with Bb as the key sig., and some C# accidentals, that it's going to be Dm, using harmonic notes. Just as, with the same key sig, if the piece centres around G, it's probably G Dorian.
Comment: Can you name a composer who used, or a piece that uses, such a key signature?
Answer: You're looking at this backwards.  Presumably you have a piece with a key signature of one flat, and a tonal centre of D.   So you, probably correctly, surmise it's in D minor.   It's very possible there will be a sprinkling of C# accidentals.  If they occur in a scalic passage, it's very likely a D harmonic minor scale.  That is One Of The Things That Often Occur In A Piece In D Minor. Nothing more and nothing less.  There are many more.  Some of them use notes that aren't in ANY form of the D minor scale!
Answer: An accidental is relevant for the note directly afterwards and for every subsequent note on the same line and clef in this bar, unless there is a natural sign.
In this example you would play C# C# C# C# | C C# C C


Turbogears 2.3.10 error kajiki template with pluggable application

Question: I used turbogears 2.3.10 with kajiki template, I created applicantion name samples and created pluggable application name plugapp.
(I see in http://turbogears.readthedocs.io/en/latest/turbogears/Pluggable/index.html?highlight=plugin)
I created package name master_view(templates/master_view) and file master.xhtml in plugapp(pluggable application).
 -plugapp
    --templates
        --master_view
            --master.xhtml
        --index.xhtml

In index.xhtml of plugapp(pluggable application), I changed
<py:extends href="master.xhtml"/>

to
<py:extends href="master_view/master.xhtml"/>

I run http://localhost:8080/plugapp. it show error
TypeError: coercing to Unicode: need string or buffer, NoneType found .

How do I fix it? thank you.
Answer: The error can definitively be better, but what's trying to tell you is that there is no such template as when specified by a relative filename, the templates are looked up inside the templates directory.
Which is the templates directory of the base application (as the base app configuration applies), not the template directory of the pluggable.
As the application where you are plugging the module into has no templates/master_view/master.xhtml file kajiki is unable to load it.
Whenever referring to something contained into a pluggable app, you should use the dotted notation. So that you can refer to the python package of the pluggable app.
In this case you want to create an __init__.py file inside your master_view directory and use py:extends="provaplug.templates.master_view.master" to load the expected master.html file.
As you are explicitly pointing to master_view/master.xhtml contained into the provaplug package (where provaplug is the name of your pluggable app) you will be loading the one of your pluggable app


Consistent Seg Fault at 2850800 blocks

Question: I'm attempting to sync the monero blockchain using the monerod CLI on my M2 MacBook. However, every time the sync reaches 96% complete (2850800 blocks), the process errors with a segmentation fault. Every time I restart the daemon, it exits immediately with the same error. After running monero-blockchain-import --pop-blocks 800 and restarting the daemon, it starts syncing again, but once again hits a seg fault at 2850800. I have deleted the blockchain data twice now and restarted the daemon, first with the --db-sync-mode safe flag, and again with that flag and the --prune-blockchain flag, but neither seem to fix the issue.
Answer: This is likely the same issue as described in this GitHub issue: issues/8657.
If you installed Monero via homebrew (or another third party package manager) you will likely be building / installing a version that uses a version of the macOS SDK that appears to have an issue with the RandomX JIT (as detailed in issues/8829).
The simplest solution is to use an official release from getmonero.org/downloads. These are reproducible builds that use specific versions of all dependencies (including which macOS SDK to use). Alternatively build from source with make depends target=x86_64-apple-darwin11 or use an environment variable MONERO_RANDOMX_UMASK=8 when starting.
Comment: Thanks, using the MONERO_RANDOMX_UMASK override worked, though the syncing is now a bit slow. Do you think it'd be substantially faster if I just went ahead and used the older SDK?
Comment: It probably would be since the older release contains a working RandomX JIT which is more efficient (and faster) than interpreting RandomX.
Comment: Confirmed, the downloaded executable was substantially faster
Comment: The issue is the Mac SDK version, not the Monero version. Suggest updating the answer so users don't go downloading and installing earlier Monero versions.
Comment: The problem is solved by using the latest version from getmonero.org. Is there a different solution that doesn't require using an older release?
Feel free to suggest an edit to my answer or create an answer yourself.
Comment: "is solved by using the latest version" "Is there a different solution that doesn't require using an older release": the solution in this case is not to use an older version but use the *latest* binary release.

Consistent Seg Fault at 2850800 blocks


Structural properties of addition and multiplication.

Question: People often speak about multiplicative groups or additive groups referring to the operation that is defined on the set of interest.
My question is:
are there some intrinsic properties of these operations (other than those associated with the group structure) that let one to qualify a operation as a "multiplication" or an   "addition"?.
In other words: is there any structural definition of "addition" or "multiplication"? . If both meet group properties, what else tells one from the other from a structural point of view?
Comment: There's no real meaning behind calling a group additive or multiplicative (with the exception that by tradition nonabelian groups are not written additively). They're just words and associated notation, no formal difference.
Answer: No, people consider an operation to be an addition or a multiplication according to their own intuition about the structure. Sometimes one is more natural to the other, and people choose accordingly.
There are still some kind of general conventions : an addition is always commutative (it's very bad practice to use $+$ to denote a non-commutative operation), and an operation that is some kind of "function composition" (in a vague and large sense) is generally multiplicative.
Comment: But not too vague and large; all group operations are function composition if you squint a bit.


Are Arthur C. Clarke and Arthur A. Clarke the same?

Question: Out of curiosity, I was searching for an English translation of the Disquisitiones Arithmeticae, and I found out that there is indeed one. It was translated in English in 1965 by a certain Arthur A. Clarke. Initially, I was amazed since I thought he was the same science fiction author who wrote the Sentinel, the short story that inspired 2001: A Space Odyssey, but then I noticed that the writer is called Arthur C. Clarke, and I could not find a reference on his Wikipedia page that he did this translation. Then I discovered that C. Clarke did graduate in maths and physics, so my doubt remains. Are the two Clarks the same person? If not, could someone give me some information (field of research, university, etc.) about A. Clarke?
Answer: MathSciNet has
Arthur Albert Clarke, Ph.D. 1964 at Yeshiva University
I think that rules out the Sci Fi writer Arthur Charles Clarke
Arthur A. Clarke's translation of Disquisitiones arithmeticae was published in 1966.  A revision by William C. Waterhouse, Cornelius Greither and A. W. Grootendorst was published in 1986
Comment: The translator was Arthur A. Clarke, S.J., the chairman of the mathematics department at Fordham University. He died 2 August 2009, according to the NYT notice on 4 August 2009.  https://archive.nytimes.com/query.nytimes.com/gst/fullpage-9D01E3DA123AF937A3575BC0A96F9C8B63.html
Comment: Further: His university's obit https://news.fordham.edu/university-news/first-dean-of-fordham-college-at-lincoln-center-dies-at-92/ says he was born 4 June 1917, died 2 August 2009.  Math Genealogy misspells his name, and agrees with UMI that his dissertation was "Algebraic solutions of Waring's conjecture".


Sharepoint Hosted APPS storage

Question: where share point hosted apps will be stored? and is there any difference between APPWEB and HOSTWEB?
Answer: The SharePoint hosted apps are stored in the same site collection as the host web and facilitated by the App Management Service Application. The host web is the SharePoint site in which the app in question will be displayed or installed on. The app web is a small web instance that is created whenever the installation of an app occurs. Each app has it's own app web and is logically unrelated to the host web.
The host web will have a normal URL like http://sharepoint.domain.com
The app web will have a generated url like: http://app-2b9ff0d7b408ce.appdomain.com
Check out this link: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/host-webs-add-in-webs-and-sharepoint-components-in-sharepoint
Comment: I have 1 more question. I have server farm or multiple server farms how to change administrative settings globally in SP 2013?
Comment: If you have a different question, please open a new question and it will get the attention you are looking for. Answering unrelated question in comments is out of scope.

Sharepoint Hosted APPS storage


Word for curiosity that gets one into trouble

Question: Is there a term that describes a person's quality of being curious but getting into trouble because of it? For example, Odysseus in "The Odyssey" wants to see the cyclops so he decides to stay in the cave but because if it his crew almost dies. I am looking for a word that I can use to say: "Because of Odysseus's [insert word] he makes several decisions that nearly lead to the loss of his crew".
Comment: I know of no single word for this.  The phrase 'insatiable curiosity', however, seems to fit the bill.
Answer: Curiosity itself can get one into trouble but it is more likely that a "morbid curiosity" leads to trouble. So you can use "morbid curiosity" in your example.
From wikipedia:

A morbid curiosity exemplifies addictive curiosity. It has as its object death, violence, or any other event that may cause harm physically or emotionally, the addictive emotion being explainable by meta-emotions exercising pressure on the spontaneous curiosity itself.

The metaphor "curiosity killed the cat" can support your subject also.
Comment: +1 for "curiosity killed the cat" (I saw this after I posted that as my answer and have now deleted mine!). But "morbid curiosity" is good too.
Answer: Consider prying, this sense of which is defined by oxforddictionaries.com as

Excessively interested in a person's private affairs; too inquisitive.

Another similar sense might be conveyed by nosiness, though this has an informal feel to it.
Comment: On second thought, I guess "prying" doesn't fit in the blank from the question very well.  "Nosiness" sort of does, though, again, it doesn't sound as dignified.
Answer: Mischievous is the word that you might be thinking of.
Comment: [Mischievous](https://www.merriam-webster.com/dictionary/mischievous) means something like irresponsibly playful. That doesn't seem match the question.


How to enforce uniqueness for the sequence field in a nested MongoDB schema using Mongoose?

Question: I'm working on a project where I have three Mongoose schemas: Article, Module, and Course. The Module schema has an array of articles, and the Course schema has an array of modules, each with a sequence field to determine the order. I want to ensure that the sequence field is unique within its respective array. However, I'm having trouble enforcing uniqueness for the sequence field. This given code doesn't work for this use case.
const articleSchema = new Schema({
    // ... (article schema fields)
});

const moduleSchema = new Schema({
    // ... (module schema fields)
    articles: [{
        article: {
            type: Schema.Types.ObjectId,
            ref: 'Article',
        },
        sequence: {
            type: Number,
            required: true,
            unique: true, // This doesn't seem to be working
        }
    }],
});

const courseSchema = new Schema({
    // ... (course schema fields)
    modules: [{
        module: {
            type: Schema.Types.ObjectId,
            ref: 'Module',
        },
        sequence: {
            type: Number,
            required: true,
            unique: true, // This also doesn't seem to be working
        },
    }],
    // ... (more course schema fields)
});

const Article = mongoose.model('Article', articleSchema);
const Module = model('Module', moduleSchema);
const Course = model('Course', courseSchema);

Comment: Have you checked out [unique index](https://www.mongodb.com/docs/manual/core/index-unique/)?
Comment: @ray still not sure. Please give me the code for better understanding. I am a beginner.
Answer:

const articleSchema = new Schema({
    // ... (article schema fields)
});

const moduleSchema = new Schema({
    // ... (module schema fields)
    articles: [{
        article: {
            type: Schema.Types.ObjectId,
            ref: 'article',
        },
        sequence: {
            type: Number,
            required: true,
        }
    }],
});

moduleSchema.index({ 'articles.sequence': 1 }, { unique: true, sparse: true });

const courseSchema = new Schema({
    // ... (course schema fields)
    modules: [{
        module: {
            type: Schema.Types.ObjectId,
            ref: 'module',
        },
        sequence: {
            type: Number,
            required: true,
        },
    }],
});

courseSchema.index({ 'modules.sequence': 1 }, { unique: true, sparse: true });

const Article = mongoose.model('article', articleSchema);
const Module = model('module', moduleSchema);
const Course = model('course', courseSchema);


Story where man goes to borrow money from odd community of hoarders

Question: I'm trying to find a story that I read around 1970.
It was about a man who went to borrow money from a community of people, deemed undesirable or unusual at least.  These people saved everything; they cut his hair for him and saved the trimmings, etc
It was contained in an "best science fiction" anthology
From the late 60s or early 70s.
The story was called something like "the amazing people of ----- street"
Comment: Welcome to the site! Your story has been identified. Please accept the answer by clicking on the check mark next to it.
Comment: If you liked that one, you should read everything by [R. A. Lafferty](https://www.theguardian.com/books/booksblog/2014/aug/13/ra-lafferty-secret-sci-fi-genius-poised-for-comeback) that you can get your hands on.
Comment: Assuming my answer was the right one, could you click the "accepted" button next to it?
Answer: Could this be "The Skinny People of Leptophlebo Street" by R. A. Lafferty, originally collected in Orbit 16, an anthology of short science fiction stories.
A gentleman named Canute goes to visit a very odd community of moneylenders.

"How is the street kept so clean and swept?" Canute asked.
"Brooms with both astatic and static bristles are the secret," Effie told him. "Organic dust clings to the static bristles, and the non-organic dust is swept clean into gathering vessels by the astatic bristles. Then we pass the brushes over degaussing jets that release the organic particles, and we make soup from them. And the non-organic dust is separated into flammable and inflammable piles."

"They mean the same thing," Canute said.

"Not on Leptophlebo Street they don't," Effie insisted. "So we make briquettes to burn as fuel out of the one sort. And we make bricks and flagstones and face-stones for buildings out of the other sort. So we have our soup and our fuel and our bricks, and we keep the street clean all the time."


How are particles represnted in scalar field theories? And what determines their nodal mode?

Question: In Quantum Field Theory, is a single elementary particle represented like a single normal mode of oscillation or a sum or superposition of more than one normal modes? And what determines the exact mode (like type and number of nodes) of a specific particle? Is it the principle (energy) quantum number, all quantum numbers or something else?
Answer: In QFT, a single elementary particle can be a wave packet which is a sum over the normal modes $k$. An arbitrary single particle state is,
\begin{equation}
|\psi\rangle=\int d^{3}k \ \langle k|\psi\rangle
a^{\dagger}_{k}|0\rangle
\end{equation}
where $|0\rangle$ is the vacuum state and $a^\dagger_{k}$ is the creation operator for a particle in the normal mode $k$. A creation operator for a single particle in state $|\psi\rangle$ is,
\begin{equation}
a^{\dagger}(\psi)=\int d^{3}k \ \langle k|\psi\rangle a^{\dagger}_{k}
\end{equation}
so that $|\psi\rangle=a^{\dagger}(\psi)|0\rangle$.
Comment: Thank you, I've seen these representations and I understand them and some other basic concepts of QFT.That will imply that a particle is (abstractly) always a superposition of normal modes.But I didn't ask the question completely correctly.What determines the exact mode of a specific particle? Is it the principle (energy) quantum number, all quantum numbers or something else?For example here electron wave packets are experimentally imaged like resembling a normal mode with zero or one nodal diameters and nine or ten nodal circles (last four pages): arxiv.org/ftp/arxiv/papers/0708/0708.1060.pdf


file does not exist c:/wamp/www/favicon.ico in apache error_log

Question: There are always the log showing: file does not exist c:/wamp/www/favicon.ico in apache error_log. I used wampserver, why?
Answer: This happens because (almost every) browser searches for a favicon by default. If the accessed page don't inform a valid URL for it, Apache uses the root directory.
You have two choices. You can create a website icon for each of your websites, or you tell Apache not to log that event as an error message.
If you choose the second option, add the following code to each VirtualHost, or at least the ones which don't have a favicon file:
Redirect 404 /favicon.ico
<Location /favicon.ico>
   ErrorDocument 404 "No favicon"
</Location>

Or, you create an empty file with the name "favicon.ico" in the directory root of Apache (for exemple /var/www/ , but no favicon will be shown by the browsers for your site).
Answer: Do you have a reference to the favicon.ico file in your HTML source?
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

Even if you don't, many browsers try to access this file anyway when visiting a new page. Favicon is used when adding the website to favourites/bookmarks. Some browsers (for example Firefox) also display favicon on the website's tab on the top of the screen.
Your best bet would be to simply add an favicon.ico file with a 16x16 icon to the c:/wamp/www/ directory.
Answer: favicon.ico is the image that is showed next to the url in the address bar. Every browser search for it. For example the StackOverflow logo in this page.
Answer: see this http://nfolamp.wordpress.com/2010/06/28/apache-favicon-ico-does-not-exist-yes-its-truly-annoying/ (dead link)
the contents of that link are in the voted answer https://stackoverflow.com/a/11099560/876038
Answer: Try restarting your browser. I thought I had a major problem with this, but as it turns out, mozilla just caches sites favicons. Restarting it fixed the issue.


Should I use a specific patch to upgrade ArcGis Server from 10.2 to 10.2.2

Question: http://support.esri.com/en/downloads/patches-servicepacks/list?productid=66&productVersions=10.2.2&categoryTypes=8 Here I have fouund a list of patches and service packs. First of all whats the difference between patches and Service Packs.
Does any patch of 10.2.2 performs the upgrade, or I have to install all the patches ?
Comment: generally speaking a patch fixes a specific or set of specific issues. a service pack rolls up all patches and bug fixes into one install.  I suggest the service pack
Answer: The 10.2.2 release is a full install, not just a service pack (it need not be applied on top of 10.2 or 10.2.1; it should apply over an existing install, though you generally want to be extra-rigorous about your backups, just in case there are issues).
I'd recommend applying the 10.2.2 release, then all the relevant patches in chronological order (reverse of the order in the link you provided). By my count, 19 patches have been released:

ArcGIS 10.2 - 10.2.2 for Desktop Print Dialog Hang Patch
ArcGIS 10.2.2 for (Desktop/Engine/Server) Oracle Geodatabase Object Schema Update and Editing Patch
ArcGIS 10.2.2 for Desktop Non-textured Multipatch Transparency Patch
ArcGIS 10.2.2 for (Desktop, Engine, Server) Update GeoPackage Support for the OGC Standard Version 1
ArcGIS 10.2.2 Workflow Manager for Desktop Multi Layer Groupings and TOC Refresh Patch
ArcGIS 10.2.2 for (Desktop, Engine, Server) Spatial Reference Consistency Patch
ArcGIS 10.1 SP1 - 10.2.2 for (Desktop, Engine, Server) OpenSSL Update Patch
ArcGIS 10.1 SP1 QIP – 10.2.2 (Desktop, Engine, Server) Tracking Layers Numeric NULL Values Patch
ArcGIS 10.2.2 Data Reviewer Patch 1
ArcGIS 10.2 – 10.2.2 for Desktop Digital Globe GeoEye Metadata/Product Layout Patch
ArcGIS 10.2.2 for (Desktop, Engine, Server) Set Shapefile Default Code Page Patch
ArcGIS 10 SP5 – 10.2.2 for (Desktop, Engine, Server) PDF Web Mercator Auxiliary Sphere Patch
ArcGIS 10.2.1 & 10.2.2 for Desktop Hydrology Tools Ready-to-use-Services Patch
ArcGIS 10.2.2 for (Desktop, Engine, Server) Geodatabase and Feature Service Sync Optimization Patch
ArcGIS 10.2.2 for Desktop Parcel Fabric General Maintenance Patch
ArcGIS 10.2.2 (Desktop, Engine, Server) Geographic or Datum Transformation Patch
ArcGIS 10.1 SP1 QIP, 10.2.1, and 10.2.2 for Server Security (August 2014) Patch
ArcGIS 10.2.2 for Server Patch - View Map and Image Services in the ArcGIS Online Scene Viewer
ArcGIS 'Oracle Critical Patch Update - October 2014' Connection Issue Patch

You can skip those that don't apply to your deployment, though if you change the deployment to need something, you may need to reapply the full cascade.


SFDX auth commands getting frozen

Question: When I try to execute sfdx force:auth:web:login -r https://test.salesforce.com command it starts to run endlessly without any output. Happens both in cmd and VS Code. I've already tried updating the plugin, downgrading to some older versions and reinstalling completely. It was running without any problems until it randomly broke. Anyone had similar problems or can suggest what else should I try?
Comment: let us know if this is windows or mac. i just ran it over here and mine worked. i would make sure your browser is working and log into the sandbox manually. Seems like DX can't launch your browser.
Comment: It is a Win 10 64-bit. My browser is working fine (I'm using Chrome) - I do not have any problems with logging in into sandbox
Answer: I have found the workaround. It was indeed - as pointed in the comment - problem with the browser. I'm still not sure why exactly it is not working with Chrome but switching default to Firefox solved it for me.
Answer: I had the same issue, I fixed it by installing the sfdxcli
https://developer.salesforce.com/tools/sfdxcli#

SFDX auth commands getting frozen


Installing an air gap in a concrete countertop

Question: I am remodeling my kitchen; pretty much all of the work except for installing a granite countertop. I am putting in a dishwasher (kitchen previously did not have one) and I would prefer to install an air gap whether or not the local codes require it. However, of the models I looked at on-line, only one discussed mounting support, and it couldn't be mounted on material thicker than 1.25". The countertop people will drill any holes I need for the faucet, etc., I just need to know how to actually fasten one of these things to a 2" thick surface. Any advice on brands that might be made especially for this, or any tricks for extending the fastenings that come with air gaps?
Answer: To install faucets or air gaps in thick countertops, simply bore a wide hole (2 1/2 - 3 inches) from the bottom of the countertop halfway through or so.  In your case, they'd have to bore a wide hole at least 3/4 inches up from the bottom.  The hole just needs to be wide enough to provide room to secure the nut.
In concrete countertops, the forms are made with holes pre-cast wide at the bottom and narrow at the top.
Comment: What tool would be best used to accomplish this on a plywood underlayment? Some kind of rotary tool? What if there is already a hole there and you just need to recess it a little bit on the bottom? (Hypothetical question) why don't they just make air gaps with an extra inch of threads?
Comment: My question seems to have an answer elsewhere: https://diy.stackexchange.com/q/48957/74858


How to become clever as a Computer Science Graduate?

Question: After studying 4 years in university, I've concluded that computer science is all about taking "clever" decisions. Programming in real world at any product based company is the same, you use your "cleverness" to write code. I find it tiring to solve puzzles but am determined to be a good computer science person, so how do I start to make myself more clever?
Comment: I find it hard to approach this question because I absolutely reject your premise. What in the world do you mean by "cleverness"?
Comment: Please define "clever". What led you to conclude that CS is all about taking clever decisions? The only context I hear "clever" being used regularly is in programming, where it's applied as a criticism of code that uses fancy syntactical tricks when a simple idiom would suffice. In the "real world", we strive for code to _not_ be clever to lower the maintenance cost.
Answer: It's not about cleverness. From the outside, it might look like cleverness, because sometimes people like to hide the process they used to arrive at their answer. This is cultural in mathematics and in some areas of computer science (think about $\epsilon-\delta$ proofs, where the choice of $\delta$ seems totally unmotivated and clever at first, but there's a method to choosing it where you write the proof backwards).
In reality, almost every single time someone does something "clever", they were following their own step-by-step problem solving algorithm. We teach our undergraduate students Polya's method.
I encourage you to study that method and start to see how you've implicitly used it in other times you've solved a problem (including a programming problem). Then, start to be intentional about using this method when faced with new problems. By doing common-sense things like breaking a hard problem into simpler pieces, you can start to solve harder problems than you could before. Eventually this becomes second nature and looks from the outside like "cleverness" but there is a method to it.
Also, as a student, don't be afraid to ask a professor or teaching assistant how they came up with some specific thing to do. And they can walk you through why they thought to try that. Meta-cognitive thinking is something you should nurture while a student. There's a large amount of literature about how to teach students to think metacognitively and see the big picture that's guiding the whole subject, rather than just a series of clever tricks. Look for the big picture!
Answer: If you are programming only for yourself, or doing something like creating games, then cleverness might be a goal. You want to surprise users and there are few consequences for breaking the rules.
But if you are asking about programming in the commercial, product driven, world, then cleverness may be the last thing on the menu. Much more important are fulfilling the requirements of the application, which is specified by others, in a way that is maintainable, extendable, and secure. None of that is clever. It is more of an engineering concern. It is, in fact, the reason that agile software development and design patterns came to be. It is why C++ has evolved into a (largely) safe language if used in the modern way. It is why OO programming, when done well, controls access to fields.
I'd guess that your algorithms course stressed correctness and how to prove it. Some of the algorithms seem clever if you've never seen them before, but they have a long history and a solid basis for known efficiency and correctness.
Don't be misled. Work to become more grounded not more clever.
Answer: As a so-called clever person, I've never once in my life asked myself or anyone else "how to become clever".
Nor do I view computer science as being about "clever decisions".
I received the designation of "clever" even as a child because I pay attention to things that are not generally attended to (at least when controlled for age and for the effect of adult direction), and more proficiency than average in certain areas.
Notice the locality and relativity of these claims. The next kid could be juggling 10 tennis balls whilst balancing on a beach ball, and they'll call me clever if I can do it with 11 tennis balls (even though in any objective sense, the difference in capability is not very significant).
So the average person who has a huge welter of ordinary and quite useful capabilities is always by definition "not clever", no matter what it is they can in fact do.
I also never really lifted a finger to be clever if it didn't please my curiosity. You don't get clever on willpower and goal-setting. I've become clever doing things I already liked doing. I think I'm better at certain things because I enjoy doing them more than average, and that enjoyment drives me to do them more than others would (especially those running on the fumes of willpower alone).
"Computer science" is broadly the academic study of designing/configuring data processing machinery as we know it.
Obviously practising in the field of computing involves clever decisions and not stupid ones, but that is no more particular to computing than any other activity. There's no human activity in which proficiency is defined by making stupid decisions. Chess is about clever decisions. Negotiating a sale is about clever decisions. Driving a car is about clever decisions. Baking a cake is about clever decisions.
If you're not good at computer science, which may be why it seems to require a cleverness you don't think you have, then my advice would be to give it up for something you are actually good at and enjoy doing.


Oldest footage of a complete football match

Question: What is the earliest existing film footage of a football match, shot for the entire duration of the game, not just fragments and highlights ?
Comment: Are you asking about when a game was first fully broadcasted (live)? Or when a game was completely filmed for the first time?
Answer: Regarding oldest footage:
"Blackburn and West Brom feature in oldest footage of a football match dating from 1898"
But there's no mention whether Arthur Cheetham filmed the whole match or just parts of it.
Source: The Daily Mail
Live broadcasting:
"In October 1946, the first live televised football match was broadcast by the BBC from Underhill. Twenty minutes of the game against Wealdstone were televised in the first half and thirty five minutes of the second half before it became too dark."
Source: Wikipedia
During the World Cup 1954 the first international match was broadcasted (Austria - Scotland, with Austria winning 1:0).
The final match between Germany and Hungary was broadcasted as well (Germany winning 3:2), but not much of the footage is still in existence today.
Other than that, it's really hard to find anything about when the first whole match has been recorded on tape. I also doubt that the footage still exists.
Comment: And what is the earliest known surviving complete film footage ?
Comment: @SprotzRobert: That I don't know and I haven't found any sources to this. My best guess would be the WC final of 1958, heh.
Answer: Glentoran vs Cliftonville, 1897 is the earliest recorded match of all time, but it was only a few seconds.
As far as I am aware, the earliest footage of a complete football match is the 1952-53 (May 2, 1953) FA Cup final between Blackpool and Bolton, also known as the "Matthew's final", you can watch the full match on the website Footballia.
I have been trying to find any other full match before 1953, but I have had no luck so far, the best I can find is seconds of recording.
Comment: Hi! Welcome to the site.  Do you have links or other confirmation of the details you supply here?


Android: two activities, one tab

Question: What I want to do is the following:
I have 4 tabs in total, but in 1 tab i want to have multiple screens which the user can change using the menu
I can capture the event of when the user presses the right button, so no help needed there:)
what I can't do is starting the Activity without removing the TabBar!
I found some information about changing the view of the framelayout, but i really want to start another activity in the layout, not just change the view (I want to keep my code clean you see;)
thanks in advance
so in Tab A I want to be able to use Activity A and B
Comment: have u solved this. kindly share the code. i want this also. Thanks in advance
Answer: The only solution I found is still replacing the view, but doing it through ActivityGroup, so the code would still look normally and would be separated in activities. Works great, but there still is needs for hacks like back button press and stuff.
Scrapped this idea, though, since later I wanted more flexible and more stylish tab bar, so I wrote my own. Works like a charm and took some 2 working days to code.

Android: two activities, one tab


Historical reason behind different line ending at different platforms

Question: Why did DOS/Windows and Mac decide to use \r\n and \r for line ending instead of \n? Was it just a result of trying to be "different" from Unix?
And now that Mac OS X is Unix (-like), did Apple switch to \n from \r?
Comment: Waddya wanna bet it has something to do with line printers, and/or typewriters.
Comment: yeah but why do they STILL have different line endings? Very annoying compatibility issue that could be solved very easily.
Comment: MS finally fixes NotePad..... https://blogs.msdn.microsoft.com/commandline/2018/05/08/extended-eol-in-notepad/
Answer: DOS inherited CR-LF line endings (what you're calling \r\n, just making the ascii characters explicit) from CP/M.  CP/M inherited it from the various DEC operating systems which influenced CP/M designer Gary Kildall.
CR-LF was used so that the teletype machines would return the print head to the left margin (CR = carriage return), and then move to the next line (LF = line feed).
The Unix guys handled that in the device driver, and when necessary translated LF to CR-LF on output to devices that needed it.
And as you guessed, Mac OS X now uses LF.
Answer: Really adding to @Mark Harrison...
The people who tell you that Unix is "just outputting the text the programmer specified" whereas DOS is broken are plain wrong. There are also claims that it's stupid for DOS to flag EOF when it sees an EOF character, raising the question of what exactly that EOF character is for.
There is no one true convention for text file line endings - only platform-specific conventions. After all, even CR-LF, CR and LF aren't the only line end conventions to ever be used, and ASCII was never even the one and only character set. The problem is the C standard library and runtime, which didn't abstract away this platform-dependent detail. Other third generation languages (such as Pascal and even Basic) managed it, at least to some degree. Because of this, when C compilers were written for other platforms, runtime library hacks were needed to achieve compatibility with existing source code and books.
In fact, it's Unix and Multics that originally needed string translation for console I/O, since users usually sat at an ASCII terminal that required CR LF line ends. This translation was done in a device driver, though - the goal was to abstract away the device-specifics, assuming that it was better to adopt one convention and stick to it for stored text files.
The C text I/O hack is similar in principle to what CygWin does now, hacking Linux runtimes to work as well as can be expected on Windows. There's a real history of hacking things about to turn them into Unix-alikes - but then there's also Wine, turning Linux into Windows. Oddly enough, you can read some misplaced line-end criticism of Windows in the CygWin FAQ (Internet Archive link added 2013 - the page no longer exists). Maybe it's just their sense of humour, since they are basically doing what they are criticising, but on a much grander scale ;-)
The C++ standard library (whatever platform its implemented on) avoids this issue using iostreams, which abstract away line ends. For output, that suits me fine. For input, I need more control, so I either interpret character-by-character or else use a scanner generator.
[EDIT  It turns out that the struck-out claim above isn't true, and never was. The std::endl literally translates to a \n and a flush. The \n is exactly the same \n you get in C - it tends to get called "new line", but it's actually an ASCII line feed character, which then gets translated by the runtime if necessary. Funny how false assumptions can get so ingrained you never question them - basically, C++ had no choice to do what C did (other than adding more layers on top) for compatibility reasons, and that should always have been obvious.]
The biggest slice of blame from my POV is with C, but C isn't the only project to fail to anticipate its move to other platforms. Blaming Bill Gates is just nuts - all he did was buy and polish a variant of the then popular CP/M. Really, it's just history - the same reason why we don't know what character codes 128 to 255 refer to in most text files. Given the ease of coping with all three line end conventions, it's odd that some developers still insist on that "my platforms convention is the one true way, and I shall force it on you like it or not" attitude.
Also - will the Unicode line separator codepoint U+2028 replace all these conventions in future text files? ;-)
Answer: It's interesting to note the CRLF is pretty much the internet standard. That is, pretty much every standard internet protocol that is line oriented uses CRLF. SMTP, POP, IMAP, NNTP, etc.. The body of email consists of lines terminated by CRLF.
Comment: @Fred:  Just check the RFCs that define the protocols.  For example, RFC 2616, which defines HTTP 1.1, specifies that the line separator for the headers is CR+LF.  (The payload line separator for certain content types may be interpreted more liberally, but even many of those are officially CR+LF.)  https://tools.ietf.org/html/rfc2616#section-2.2
Comment: I'm curious, is it possible to back this claim somehow? It would make it more believable in my view.
Comment: A lot of the original work on "the internet" was done on DEC computers, I know.  But I am surprised by this little fact, since it seems most of those were running UNIX.
Answer: According to Wikipedia: in the beginning, the program had to put in extra CR characters before the LF to slow the program down so the printer had time to keep up - and CP/M and then later Windows used this method.  But Multics's printer driver put in extra characters automatically so the program didn't have to - and Unix developer from that.  But none of that explains why the early Mac didn't do that (they do now that they are based on Unix).
https://en.wikipedia.org/wiki/Newline#History:

The sequence CR+LF was commonly used on many early computer systems that had adopted Teletype machines—typically a Teletype Model 33 ASR—as a console device, because this sequence was required to position those printers at the start of a new line. The separation of newline into two functions concealed the fact that the print head could not return from the far right to the beginning of the next line in time to print the next character. Any character printed after a CR would often print as a smudge in the middle of the page while the print head was still moving the carriage back to the first position. "The solution was to make the newline two characters: CR to move the carriage to column one, and LF to move the paper up."[1] In fact, it was often necessary to send extra characters—extraneous CRs or NULs—which are ignored but give the print head time to move to the left margin. Many early video displays also required multiple character times to scroll the display.
On such systems, applications had to talk directly to the Teletype machine and follow its conventions since the concept of device drivers hiding such hardware details from the application was not yet well developed. Therefore, text was routinely composed to satisfy the needs of Teletype machines. Most minicomputer systems from DEC used this convention. CP/M also used it in order to print on the same terminals that minicomputers used. From there MS-DOS (1981) adopted CP/M's CR+LF in order to be compatible, and this convention was inherited by Microsoft's later Windows operating system.
The Multics operating system began development in 1964 and used LF alone as its newline. Multics used a device driver to translate this character to whatever sequence a printer needed (including extra padding characters), and the single byte was more convenient for programming. What seems like a more obvious[citation needed] choice—CR—was not used, as CR provided the useful function of overprinting one line with another to create boldface and strikethrough effects. Perhaps more importantly, the use of LF alone as a line terminator had already been incorporated into drafts of the eventual ISO/IEC 646 standard. Unix followed the Multics practice, and later Unix-like systems followed Unix. This created conflicts between Windows and Unix-like OSes, whereby files composed on one OS cannot be properly formatted or interpreted by another OS (for example a UNIX shell script written in a Windows text editor like Notepad).


How to transfer file from Nokia E72 to a PC via WiFi

Question: I want to transfer a file to and from from a Nokia E72 to a laptop using WiFi. I am able to connect to WiFi using WLAN Wizard. But I don't know how to transfer a file to my laptop running Windows 7.
Answer: You can utilize a free application called Dukto to transfer files between your PC and smartphone. It's an open source project by Emanuele Colombo and works with Windows, OS X and Linux. You can download the installer for your PC here.
Answer: I had an E71x that I used to use as my primary phone before replacing it last year. Is there a particular reason you want to use WiFi? I used Bluetooth to sync all the files on that phone to my computer (as well as do other things). I was able to browse the files and folders on the phone using ftp over Bluetooth and it worked great. Are you able to do something like that?
My computer didn't have Bluetooth so I got a USB to Bluetooth adapter for about $30 on Amazon. After installing the Nokia Ovi Suite software on my desktop (or laptop, as I used it on both), I was able to do anything I wanted to the phone from my computer, including file transfer and sync.


How does a photon travel the speed of light while it is absorbed in a molecule?

Question: How does a photon travel the speed of light while it is absorbed in a molecule? Since photons always travel the speed of light and continue to exist after they are absorbed in a molecule that they hit, then what are the mechanics of a photon traveling the speed of light while is absorbed in a molecule?
Comment: Who told you that photons *"continue to exist after they are absorbed in a molecule"*? An absorption event marks the end of the photon. Even in scattering you have the destruction of one photon and the creation of another.
Comment: Seems like a multiple duplicate: [What really cause light/photons to appear slower in media?](http://physics.stackexchange.com/questions/11820/what-really-cause-light-photons-to-appear-slower-in-media?rq=1), [What is the mechanism behind the slowdown of light/photons in a transparent medium?](http://physics.stackexchange.com/questions/466/what-is-the-mechanism-behind-the-slowdown-of-light-photons-in-a-transparent-medi?rq=1), [Photons when passing through matter](http://physics.stackexchange.com/questions/254457/photons-when-passing-through-matter)
Comment: One more [How does light speed up after coming out of a glass slab?](http://physics.stackexchange.com/questions/153904/how-does-light-speed-up-after-coming-out-of-a-glass-slab). Emission-absorption is a semi-classical simplification, the QFT picture is a quantum superposition of emission-absorption scenarios, free propagation, excited matter states, etc., all at once.
Comment: If you are talking about raman scattering (inelastic scattering of photons), then go [here](https://en.wikipedia.org/wiki/Raman_scattering); read the second paragraph. Photon may be completely absorbed or partially absorbed depends on which type of scattering it undergoes
Answer: Your question is based upon some questionable assumptions, so it can't be answered directly. Instead we need to clarify exactly what photons are and how they interact.
The popular image of a photon is as a little ball of light, and that light beams are effectively a hail of photons. However this is at best highly misleading as photons are much more complicated than this and the relationship between photons and light beams is complicated. This is explored in the question What is the relation between electromagnetic wave and photon? Indeed you will find physicists who think the photon is not a useful concept at all.
Anyhow, when a light wave interacts with a molecule it is the oscillating electric field associated with the light wave that does the interacting. The oscillating electric field perturbs the molecule and can cause it to transition to a different quantum state. In this transition energy is transferred between the light wave and the molecule, and it is this energy transfer that is the photon. That is the energy transfer takes place in units of the photon energy $h\nu$.
So the photon wasn't present in any useful sense before the interaction, and it isn't present in any useful sense after the interaction. The photon appears briefly during the interaction process.
The light wave travels at a speed $c$ in a vacuum, but in the presence of matter its speed is modified by interactions with the matter. This is discussed in the questions suggested in the comments e.g. What really cause light/photons to appear slower in media?
Answer: When a molecule absorbs a photon, it is an electron on that molecule that absorbs the photon. What happens to the electron depends on the frequency/energy level of the photon. For a low energy photon, a good analogy is that of a fast moving comet being trapped by the gravity of the sun. It is still moving fast, but changing directions, affecting the movement of the sun, and maybe flying off in a different direction. For a photon with a high frequency/energy, it is like what happens when a cue ball hits another ball in a game of pool. The electron is knocked out of orbit.
In both cases, the electron gains momentum and the photon loses energy.
One example of low energy photons is electricity from a radio antenna coil causing electrons to move around a little bit.
An example of high energy photons is how solar panels produce electricity. The high energy photon knocks the electron down into a different region of the silicon. Because the solar cell is a diode, the electron has to take the long way around through the circuit to get back to where it was.
Answer:
How does a photon travel the speed of light while it is absorbed in a molecule?

The photon and the molecule are quantum mechanical entities and their behavior is accurately described using quantum mechanical equations.
The simplest equation is the Schrodinger equation which describes an atom/molecule as electrons at stable energy levels around a positive nucleus.  In this model,  if a photon with the correct energy difference hits the atom  its total energy momentum and angular momentum is transferred to the atom where an electron will go to a higher energy level . It disappears and it does not continue to exist , it is totally absorbed .
In quantum field theory, which is the theory developed to examine all interactions between elementary particles, a photon can scatter with the spill over electric fields around a molecule ( or a lattice), either elastically so that it keeps its energy and momentum in the center of mass system, or inelastically, when a new photon leaves the interaction. Both of these happen at a point in space time, called a "vertex" mathematically, so the changes are instantaneous.

This is a diagram showing an electron scattering off a proton, but a similar one can be drawn for scattering off a field. There is no "while", it is all point interactions.
Answer:
How does a photon travel the speed of light while it is absorbed in a molecule?

By going round and round.

Since photons always travel the speed of light and continue to exist after they are absorbed in a molecule that they hit, then what are the mechanics of a photon traveling the speed of light while is absorbed in a molecule?

As above. The molecule is composed of atoms, and the atoms are composed of electrons, protons, and neutrons. These are all spin ½ particles which can be annihilated:

Image credit CSIRO, see The Big Bang & the Standard Model of the Universe
When they are annihilated, you see photons departing at c, allegedly from a standing start. But all that really happened is that they changed from a closed path to a linear path. See Hans Ohanian's 1984 paper what is spin? He says this: "the means for filling the gap have been at hand since 1939, when Belinfante established that the spin could be regarded as due to a circulating flow of energy". Check out the Poynting vector.


How to calculate Cost Surface Analysis in ArcGIS 10.x

Question: I have about 10 points and I want to run Cost Surface Analysis. I'm trying to find what distance a person can walk in a given amount of time from a certain point (5-10 or 15 minutes). What procedure follow and what data I need. I have DΕM of the region. I use ArcGIS 10.3 and I read from online help the Creating a cost surface raster, but I'm not sure what I have to do.
Comment: do you have spatial analyst ?
Comment: Yes I do have Spatial analyst
Comment: If you have access to the ESRI virtual training campus there is a very easy to understand 3 hour course called Distance analysis in ArcGIS which teaches cost path tools and how to use them. If you have access and the time I would highly recommend this.
Comment: Can you send me as a commend the title of hte course?
Answer: Here is a great video that helped me out for explaining Cost-Path:
https://www.youtube.com/watch?v=d0Eywj4pIu8
As mentioned before, this requires a DEM to create a slope raster using Spatial Analyst Tools -> Surface -> Slope.
However, for what you are looking for (get a detailed perspective on hiking from point A to point B), you can implement Tobler's hiking function which will estimate the time it takes to traverse over slope assuming an initial unaffected walking pace of 5.037 km/hr. The speed/time to traverse over terrain changes based on the slope raster derived from elevation data (DEM).
http://www.mapaspects.org/node/3744
From the above link, go down to  B. ANISOTROPIC TIME ESTIMATE USING PATH DISTANCE and download the appropriate Tobler table for your use (Tobler-away/towards) and input it into your environment variables as mentioned in the step-by-step guide. Eventually, you will end up with another raster that you can use to calculate contours based on your desired time intervals. You can use these to calculate accurate hiking time across the slope raster. This requires less raster calculation than the cost-path process mentioned above but it still requires the cost-back link raster that is explained in the video. Should give you what you want.
Answer: In your case, the best tool is probably the "Path Distance" Tool, which will take your DEM into account to adjust the speed. There is a long description on this page on the option to set the speed. Note that the relationship between speed and slope depends on your travel type. By bike, you go faster downhill than uphill, so this is more like a linear cost. By foot, you walk up and down at approximately the same speed, and you can climb bigger slopes than a bike, so you need to use a symmetric cost.
once you have your path distance raster, you can reclassify to identify the areas of interest. If you have a land cover layer, you can use it as a friction raster o modify the speed (e.g. slower in sand than on a road)
EDIT: 5 to 15 min is a short walk, so there will not be large effect of speed difference (except if you have obstacles or very steep slope). You could simply make buffers of 1.25, 0.83 and 0.415 km (respectively 15, 10 and 5 minutes for a fit walker: 5km/h)
Comment: Hi and thank you for your answer. The scenario is that moving on foot and want to find how far you travelled over 5, 10 and 15 minutes. So you have to somehow calculate the distance in relation to the time and challenge.
Comment: depending on the walker, walking speed range from 3 to 5 km/h. so you can get the time by dividing the cell size by the speed. If there is a "challenge" that hinders normal speed, you can use a cost raster with longer time for more difficult walk. I don't understand the information that your are looking for (problem using the tools or problem finding typical speed values). So you would attract better answers by editing your question.


Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding

Question: I'm not sure if this is a VB.NET error or SQL Server.  But I get the above error with following stack trace:

[SqlException (0x80131904): Timeout
  expired.  The timeout period elapsed
  prior to completion of the operation
  or the server is not responding.]
  System.Data.SqlClient.SqlConnection.OnError(SqlException
  exception, Boolean breakConnection)
  +1950890    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
  exception, Boolean breakConnection)
  +4846875    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
  stateObj) +194
  System.Data.SqlClient.TdsParser.Run(RunBehavior
  runBehavior, SqlCommand cmdHandler,
  SqlDataReader dataStream,
  BulkCopySimpleResultSet
  bulkCopyHandler, TdsParserStateObject
  stateObj) +2392
  System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
  +33    System.Data.SqlClient.SqlDataReader.get_MetaData()
  +83    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader
  ds, RunBehavior runBehavior, String
  resetOptionsString) +297
  System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
  cmdBehavior, RunBehavior runBehavior,
  Boolean returnStream, Boolean async)
  +954    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
  cmdBehavior, RunBehavior runBehavior,
  Boolean returnStream, String method,
  DbAsyncResult result) +162
  System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
  cmdBehavior, RunBehavior runBehavior,
  Boolean returnStream, String method)
  +32    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
  behavior, String method) +141
  System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior
  behavior) +12
  System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior
  behavior) +10
  System.Data.Common.DbDataAdapter.FillInternal(DataSet
  dataset, DataTable[] datatables, Int32
  startRecord, Int32 maxRecords, String
  srcTable, IDbCommand command,
  CommandBehavior behavior) +130
  System.Data.Common.DbDataAdapter.Fill(DataSet
  dataSet, Int32 startRecord, Int32
  maxRecords, String srcTable,
  IDbCommand command, CommandBehavior
  behavior) +287
  System.Data.Common.DbDataAdapter.Fill(DataSet
  dataSet) +94
  GlobalFunctions.GlobalF.GetComplaintTrendingList6(DateTime
  FirstMonth, DateTime LastMonth, Int32
  rowLevel) +489
  ASP.website_complaints_complainttrendinglist6_aspx.Main()
  in
  e:\inetpub\amdmetrics-d.web.abbott.com\wwwroot\Website\Complaints\ComplaintTrendingList6.aspx:94
  ASP.website_complaints_complainttrendinglist6_aspx.Page_Load(Object
  Sender, EventArgs E) in
  e:\inetpub\amdmetrics-d.web.abbott.com\wwwroot\Website\Complaints\ComplaintTrendingList6.aspx:60
  System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr
  fp, Object o, Object t, EventArgs e)
  +14    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object
  sender, EventArgs e) +35
  System.Web.UI.Control.OnLoad(EventArgs
  e) +99
  System.Web.UI.Control.LoadRecursive()
  +50    System.Web.UI.Page.ProcessRequestMain(Boolean
  includeStagesBeforeAsyncPoint, Boolean
  includeStagesAfterAsyncPoint) +627

This is on Microsoft .NET Framework Version:2.0.50727.3620; ASP.NET Version:2.0.50727.3618 and SQL Server 2008.
The line it flags causing this error says:
1: PrintMessageGrid.DataSource = GlobalFunctions.GlobalF.GetComplaintTrendingList6(FirstMonthDate, LastMonthDate, TheLevel)

Even though I can run this stored procedure in Query Analyzer and it returns in 8 seconds.  What could be the cause and fix?
Here's more detail where I declare this function:
Public Shared Function GetComplaintTrendingList6(ByVal FirstMonth As DateTime, ByVal LastMonth As DateTime, ByVal rowLevel As Integer) As DataSet
    Dim DSPageData As New System.Data.DataSet
    Dim param(2) As SqlClient.SqlParameter

    param(0) = New SqlParameter("@FirstMonthDate", SqlDbType.DateTime)
    param(0).Value = FirstMonth
    param(1) = New SqlParameter("@LastMonthDate", SqlDbType.DateTime)
    param(1).Value = LastMonth
    param(2) = New SqlParameter("@TheLevel", SqlDbType.Int)
    param(2).Value = rowLevel

    ''# A Using block will ensure the .Dispose() method is called for these variables, even if an exception is thrown
    ''# This is IMPORTANT - not disposing your connections properly can result in an unrespsonsive database
    Using conn As New SQLConnection(ConfigurationSettings.AppSettings("AMDMetricsDevConnectionString")), _
   cmd As New SQLCommand("ComplaintTrendingList6", conn), _
    da As New SQLDataAdapter(cmd)
        cmd.CommandType = CommandType.StoredProcedure
        cmd.Parameters.AddRange(param)

        da.Fill(DSPageData)
    End Using

    Return DSPageData
End Function

The strange thing is that if I make this small change in my stored proc, it passes, but doesn't give me the data I want:
No error, but this version doesn't give me what I want:
SELECT E.PRODUCT_GROUP, a.QXP_SHORT_DESC, COUNT(DISTINCT A.QXP_EXCEPTION_NO), A.QXP_REPORT_DATE, DATEADD(M, DATEDIFF(M, 0, A.QXP_REPORT_DATE), 0) AS STARTDATE
FROM ALL_COMPLAINTS A
LEFT OUTER JOIN SMARTSOLVE.V_QXP_ISSUE_REF D ON A.QXP_ID = D.IRF_QXP_ID
INNER JOIN CT_ProductFailures b ON b.old_modes = a.qxp_short_desc
LEFT OUTER JOIN [MANUAL].PRODUCTS E ON A.EPA_PRD_CODE = E.LIST_NUMBER
LEFT JOIN SMARTSOLVE.V_CXP_CUSTOMER_PXP C ON A.QXP_ID = C.QXP_ID
INNER JOIN @SelectedLevels F ON A.[LEVEL] = F.LevelId
WHERE   --[LEVEL] > 0 AND
(A.QXP_SHORT_DESC <> 'Design Control')
and A.QXP_REPORT_DATE >= @OneYearAgo AND A.QXP_REPORT_DATE <= @LastMonthDate
AND (C.QXP_EXCEPTION_TYPE <> 'Non-Diagnostic' OR C.QXP_EXCEPTION_TYPE IS NULL)
GROUP BY E.PRODUCT_GROUP, A.QXP_REPORT_DATE,  A.QXP_SHORT_DESC

Error-causing stored proc:
INSERT #PVAL_NUM
SELECT E.PRODUCT_GROUP, b.new_modes 'QXP_SHORT_DESC', COUNT(DISTINCT A.QXP_EXCEPTION_NO), A.QXP_REPORT_DATE, DATEADD(M, DATEDIFF(M, 0, A.QXP_REPORT_DATE), 0) AS STARTDATE
FROM ALL_COMPLAINTS A
LEFT OUTER JOIN SMARTSOLVE.V_QXP_ISSUE_REF D ON A.QXP_ID = D.IRF_QXP_ID
INNER JOIN CT_ProductFailures b ON b.old_modes = a.qxp_short_desc
LEFT OUTER JOIN [MANUAL].PRODUCTS E ON A.EPA_PRD_CODE = E.LIST_NUMBER
LEFT JOIN SMARTSOLVE.V_CXP_CUSTOMER_PXP C ON A.QXP_ID = C.QXP_ID
INNER JOIN @SelectedLevels F ON A.[LEVEL] = F.LevelId
WHERE   --[LEVEL] > 0 AND
(A.QXP_SHORT_DESC <> 'Design Control')
and A.QXP_REPORT_DATE >= @OneYearAgo AND A.QXP_REPORT_DATE <= @LastMonthDate
AND (C.QXP_EXCEPTION_TYPE <> 'Non-Diagnostic' OR C.QXP_EXCEPTION_TYPE IS NULL)
GROUP BY E.PRODUCT_GROUP, A.QXP_REPORT_DATE, b.new_modes

Answer: You need to increase the command timeout on the select command of the dataadapter.
Below is the code to increase the command timeout for dataadapter.
adapter.SelectCommand.CommandTimeout = 0;

SQL Connection timeout is different from timeout set for the Command that is executed.
It is defined as follows.
From MSDN

Gets the time to wait while trying to establish a connection before
  terminating the attempt and generating an error.

On setting the connection timeout.. from MSDN

You can set the amount of time a connection waits to time out by using
  the ConnectTimeout or Connection Timeout keywords in the connection
  string. A value of 0 indicates no limit, and should be avoided in a
  ConnectionString because an attempt to connect waits indefinitely.

Default value for all timeouts is 30 secs.
Answer: I believe that means the database operation took too long and it gave up.
Try adding a Connect Timeout in the web.config
<add key="DBConnection" value="server=LocalHost;uid=sa;pwd=;database=DataBaseName;Connect Timeout=200; pooling='true'; Max Pool Size=200"/>

Comment: Rob, if this stored proc only took 8 seconds to run in QA, do u think it would time out with default timeout settings?
Answer: What you get with the Query Analyzer (or SSMS, these days) and what you application gets can be very different things, mostly due to parameter sniffing.
I suggest reading this article by Erland Sommarskog for a details.
Answer:
"..database operation took too long and it gave up."

This is correct.  This happens when there's a conflict with your connection to the server.
To temporarily resolve this..
"Repair your LAN connection"
You can do this by right-clicking on your connection and clicking "REPAIR"
To permanently resolve this..
There shouldn't be a combination of static and dynamic ip addresses in your workgroup.  If you want to set a static group, do not include dynamic connections - vice versa.
After that, there shouldn't be an error displaying "Timeout Expired" anymore.
cheers!


Last stage before bottling. Film appeared around top edge on glass and a few bubbles on surface

Question: My batch of wine has been stabilized, degassed, and clarified. It is in the last stage before bottling and a film has appeared on the top at the edge on the glass. Also, there are a few bubbles on the surface of the wine. It smells fine and the filmy deposit looks like a yeast overgrowth rather than bacteria. Is my wine ruined or should I bottle as usual?
Comment: Always good to add a photo, with a question like this
Answer: A photo really would be best to judge your issue!
If you've observed regular safe procedures then it is very likely what has happened is that you've got a harmless yeast contamination, in which case you can remove the film and bottle.
Without further information I'd simply taste it and if it taste okay then it is likely just fine. Most really bad things also affect the flavor so in this case it is probably your best bet.


Efficient synchronization of the SQLite db -- automatic chunking vs. hints from the web service?

Question: Summary: Are there any well know techniques for chunking the data for synchronization? The chunk is considered a block of data that is transmitted separately.
This may be a rather broad question. When suggested, I will start the more specialized topic.
I am going to design/write the code for synchronizing Android tablet database (SQLite) with the central database accessed via a web service. The mechanism should reflect the following facts:

It will be used for the range of applications. The applications are to be rather simple. Anyway, they should work mostly off-line.
The quantity of data can be from small to huge (up to the technical limits of the tablet).
The web service implementation may be a customer-dependent (i.e. the application must not require to rewrite the web service; say, there may be a historical reasons to keep SOAP and not to force REST).
In some cases, the specific new web service can be created for the application (using the same technology at the customer site).

The core of the question is how to minimize the size of the data moved during synchronization. The question is not on how to implement asynchronous download. (I am cosidering implementation techniques presented in Developing Android REST client applications by Virgil Dobjanschi.)
So far, I have found the following basic ways (not in a specific order):

Brute force for a small amount of data, i.e. receive/send everything, resolve the differences at the target side (on tablet when downloading, on remote server when uploading). Here (say) the whole database table can be seen as the maximal possible chunk of data.
Using the modification date (timestamp) for the records of the data, and synchronising only the newer records based on the remembered dates from the last synchronization. This is fine as is for the added and modified records; however, some aditional mechanism must be used for the deleted records. Here a single record can be considered a minimal possible chunk of data.

The above is for synchronization of a single chunk of data. The more realistic situation requires chunking of more records. Here I consider the chunk to be a block of data that can be transmitted separately. When the transmission fails (i.e. being off-line for various reasons), only the failed and the non-transfered chunks must be synchronized.
What is clear to me is that the chunk should have certain size (to form a data block say about 10 kB).
To reduce the communication cost, the constructed chunk package should remain the same until some of the record of the chunk changes, is added, or is removed. The chunk should be constructed as the same independently on whether it is constructed at the central server side, or at the tablet device.
The other chunks should not be affected by the chunk that contains the changed data. This way, say SHA digests could be calculated for each of the chunk on both sides, and it could be easily found what chunks should be synchronized.
Are there any standard techniques, papers, examples on how to determine the chunks?
Thanks
Answer: In our Rethync SDK framework (open-source) we went the following route: the state information of each object is an opaque field (one can use a timestamp or hash of the data or some unique markers - that's left for developers to decide). Synchronization core compares the value of this field with the saved state and then decides whether the object needs to be uploaded, downloaded, deleted etc.
This approach requires that the state is saved after synchronization (the framework lets you save the state) and used as a basis for detection of changes during the next synchronization.
I welcome you to check Rethync cause it does exactly what you are implementing now.


how can we leverage artifactory in salesforce platform

Question: In typical java environment, after code quality test, we package code and push it to artifactory as snapshot, and then bring it to desired environment (dev/test/pre-prod) and deploy same. As I'm new to this SF platform, I'm curious to know and utilize artifactory in CI/CD pipeline but not sure at what stage of build process we can leverage this tool when we are into salesforce org base development model. Can inputs from this community is highly appreciable.
Answer: Salesforce development does not produce externalizable artifacts other than source code. You can, of course, use any applicable tool you wish to managed releases of your source code, but there's no packaging or compilation process you can apply off-platform.
You may choose to practice the Package Development Model to produce on-platform packages that can be installed in different Salesforce orgs, but those packages exist purely on the platform and cannot be stored externally. They are not analogous in many ways to packages in Java or other stacks. Note however that many Salesforce customers do not practice package-based development and never package their code; this is referred to as the Org Development Model.
The artifacts typically produced by a package development process are source code stored in version control, which of course you may associated with tags and releases in a system like GitHub, and the Ids of package versions that may be installed in Salesforce orgs.
Org development hopefully, in a best-practices context, is done in source control, and a well-managed development lifecycle may use tags, releases, or other artifacts to track specific deployments, but that's all dictated by the process of the org and again doesn't involve any compilation or packaging of the code as such.
Comment: Any derived asset can be "managed" by (for example) pushing it to the repository or metadata service such as Artifactory. A change set is one example of a derived asset, it can even be thought of as "built" (assembly of an artifact is part of a build process). Whether any of this is a good idea or doable depends on CI/CD impl.
Comment: @david reed: Thanks for your answer. As you pointed about tags, release etc for "org development model" in above comment, I like to check few things with you here, What is the best approach to set the release version in this org model (for example 1.1.2 etc ) ? and how do I determined it ? How can I track the components relate to each release ? and where do I keep record of this changing components for each release (artifactory, bitbucket, confluence etc )
Comment: There are no standard answers to those questions, @dinesh, and the right ones will vary based on the specific business (and compliance) requirements in your environment. Personally, I'd probably tag, in Git, each revision that is deployed to prod with a date-based version stamp and call it good. GitHub or your host of choice can then easily generate diffs of changed components between releases. But again, it's all down to your specific requirements for change control and auditing.


Are there Countable $\omega$- models of ZFC?

Question: By the $\text{L-S}_\downarrow$ theorem we know that there must exist a countable model of ZFC. Suppose that there is an $\omega$ model of ZFC, then would $\text{ L-S}_\downarrow$ theorem entail that there must exist an $\omega$ model of ZFC that is countable? Or all countable models of ZFC must have non standard naturals?
Answer: Well, by the LS theorem, we know that if there is any model of ZFC then there is a countable model. In fact, it says there is a countable elementary submodel of the original model. By the same token, if there is a well-founded model of ZFC then LS implies it has a countable elementary submodel, which is necessarily well-founded since it is a submodel of a well-founded model. And well-founded models are $\omega$-models: the Mostowski collapse gives the relevant isomorphism.
Note however that the existence of a well-founded model is a stronger assumption than the existence of a model (but it's not that much stronger an assumption, nowhere near the strength of inaccessible cardinals). Actually, the usual argument for this ties to your question. The minimal transitive model of ZFC is $L_\alpha$ for the smallest $\alpha$ that is the height of a transitive model. In light of the discussion above, it's easy to see that it is a countable $\omega$-model of ZFC. According to this model, there are no transitive / well-founded models of ZFC for reasons you might suspect, however since it is an $\omega$-model, it agrees with the universe about arithmetic, and hence that Con(ZFC) holds, and hence that there are models of ZFC.
Comment: Elaborating on the last paragraph, note that there is also a huge difference between $\omega$-models and transitive models. For example, there are $\omega$-models which are low for hyperjump, whereas any transitive model has to compute basically every real you can imagine.


Is anything coloured "infra-red"?

Question: All our day-to-day objects are things we can see, and thus we can conclude that their colour lies in the visual spectrum. Is there matter that does not have a colour within the visual spectrum? What am I not understanding correctly?
Comment: "and thus we can conclude that their colour lies in the visual spectrum" -- not if they are black in the visible spectrum, which means they don't reflect any appreciable amounts of light on the visible spectrum. Likewise for transparent things, as in Ruslan's answer.
Answer: You surely know that glass is colorless in visible spectrum. But it does absorb in IR and UV parts of spectrum. Here's a sample spectrum of borosilicate glass 3.3, universally called Pyrex glass:

source
If our eyes could see light with wavelengths around $3\,\mu\text m$, we'd actually see this glass sample as coloured, but, as you can see, the whole visible range of $400\,\text{nm}-700\,\text{nm}$ is almost fully transmitted ($92\%$ transparency), and this is all we can see, so we say it's transparent.
Answer:
All our day-to-day objects are things we can see, and thus we can conclude that their colour lies in the visual spectrum.

Because we see only in the visible spectrum, an object's colour is a consequence of how it interacts with that region of the spectrum.  All colour lies in the visible spectrum.  This is just what colour is.

Is there matter that does not have a colour within the visual spectrum?

Matter does interact with other regions of the spectrum, but those regions are not interpreted by our eyes and are not considered to be "coloured".  We can use equipment that takes infrared photographs and maps those wavelengths to others that we can see.  This allows us to see differences in that region that were previously invisible.
Other creatures that could see in the infrared region might well describe them as having different colours.  Humans wouldn't do so.  All we can do is say they have differing IR spectra.
Answer: It may be possible for the Human eye to see a little way into the infra-red by replacing Vitamin A in the diet with A2.
Answer: The frequency distribution of radiation emitted by a body is determined by its temperature in accordance with Planck's law (http://en.wikipedia.org/wiki/Planck's_law).
e.g. http://upload.wikimedia.org/math/2/8/1/2812991818a5f62e981118a582e433bd.png.
Any object at a finite temperature will emit some radiation in the infra-red region of the spectrum. If we detect that infra-red radiation e.g. with an infra-red camera which converts the infra red radiation detected to visible light on the screen we can see" the object using its infra-red radiation. Unfortunately our eyes do not work in the infra-red region of the spectrum, so we cannot see infra-red emitting objects directly with our eyes.
Answer: It interesting that some flowers do have invisible patterns to us. These patterns can be seen only in ultraviolet frequencies that bees can see. I don't know if there is an equivalent case for infrared in biology.

Is anything coloured "infra-red"?


Will this photodiode circuit filter this frequency?

Question: I have the following circuit with a photodiode and an LM358P where I intend to blink an LED at around 20kHz. I want to work on it. I have made a calculation through 1/(2piRC), and got something around 33khz. Is this correct? Will this circuit work with a 20kHz frequency ?
Comment: Just try it. Then try it with 47 or 68 pF at C1 and see which works better.
Comment: What is the photodiode capacitance at the expected bias?
Comment: @SpehroPefhany sorry the late answer, if i check correctly it is 18pF, so i had to sum with the 100pF when doing the calculations correctly ?
Comment: @ThePhoton that wouldn't reduce the frequency ?
Answer:
got something around 33khz. Is this correct? Will this circuit work
with a 20kHz frequency ?

It's nearer 34 kHz but yes this will do the job adequately with some rounding of the output signal.
However, the output signal will clip at around 3 volts typically with an LM358 and, that op-amp will introduce some extra low pass filtering due to its small bandwidth and slew rate limitations on the output: -
Answer: It can work if your LED generates enough right wavelength light to the diode. I suspect that other lights disturb the function substantially. To avoid it you should use a circuit which doesn't amplify DC and the flicker of mains AC operated lights. For good sensitivity you should have a filter which removes unwanted signals. It should be placed in front of the actual amp if your LED is weak compared to ambient light. 47kOhm resistor is quite small, but that can well work in strong light or with sensitive diode.
BTW your capacitor causes lowpass filtering which doesn't help at all against low frequency nor continuous disturbing lights.


Overlaying data on an image in matlab

Question: I have two plots I want to overlay on top of each other as shown in the link below:

The inputs are the two images on the left and the output is the image on the right. Here's the code I used:
reference = imread('ref_foam.png');
figure, imshow(reference);
hold on;
h = imshow(data,[]);
hold off
colormap jet;
alphamap = zeros(size(reference,1),size(reference,2));
for i = 0:size(data,1)-1
    for j = 0:size(data,2)-1
        if(~(data(i+1,j+1) == 0))
             alphamap(i+1,j+1) = 0.75;
        end
    end
end
set(h, 'AlphaData', alphamap);

Anytime there's a zero in the data array, it sets that transparency to zero or else it will set the transparency to 0.75.
Now, my questions are: How can I get the colormap to apply to only the data array? In this example it works but if I convert "reference" to a grayscale, the colormap applies to that as well. The input for the colormap is an axes handle, is there anyway to input the image's handle (h) so that it only applies to the top (data) array? Also, I'd like to implement a colorbar as well. Is there anyway to apply the colorbar only to the data array? Thanks.
Answer: You probably want to use the subimage command - it lets you create images on the same figure with different colormaps.
Once create and modified as in your script, overlay the images by setting their axes positions on top of each other.

Overlaying data on an image in matlab


How to construct the matrix of a kernel?

Question: In category theory the monomorphism from the kernel of a morphism $A$ to the domain of $A$ is called $\operatorname{ker} A$. In linear algebra, suppose the matrix $\mathbb A$ represent the transformation $A$. How to determine a matrix $\mathbb K$ corresponding to $\operatorname{ker} A$, with $\mathbb K\times\mathbb A=0$?
$\require{AMScd}$
\begin{CD}
    \operatorname{Ker} A @>\operatorname{ker} A>> V @>A>> W
\end{CD}
Answer: The map $\operatorname{ker} A$ is essentially the identity map $\operatorname{Id}:V\to V$ restricted to the subspace $\operatorname{Ker} A\subseteq V$.
If you want to represent it by a matrix, you need bases for the domain and the codomain. As a restriction of the identity map, its matrix is going to be $$\pmatrix{I_{\dim \ker A}\\0}$$ for the most natural choices of bases. Note that the $0$ submatrix here has dimensions $(\dim V-\dim \ker A)\times (\dim \ker A)$.

I'll give more details as required in the comments. First, in the usual way matrix multiplication works, the equation is not $\Bbb{K\cdot A}=0$ but rather $\Bbb{A\cdot K}=0$. Then, if the basis of $V$ is fixed (call it $\mathcal B$) and so is the matrix $\Bbb A$, then to find such a matrix $\Bbb K$ people usually solve the linear system where each row of $\Bbb A$ is an equation. Once you have a system of $k=\dim \ker A$ linearly independent solutions, let's call them $e_1,\ldots, e_k$, of which you computed the coordinates $e_{ij}$ in your original basis $\mathcal B$, then $(e_{ij})$ are the entries of the desired matrix $\Bbb K$, in the bases $e_1,\ldots , e_k$ of $\ker A$ and $\mathcal B$ of $V$.
Comment: But if you want to keep the given matrix for $A$ fixed, in most cases
you cannot expect the matrix for $\ker A$ to be of this nice form.
That is why we actually solve linear equations.
Comment: @MarcOlschok Sure, but nothing was made precise in the OP. Of course everything depends on your bases.
Comment: Well, the OP started with a matrix $\mathbb{A}$ for the map $A$ and then asked for a matrix $\mathbb{K}$ such that $ \mathbb{K} \times \mathbb{A} = 0$.
Comment: @MarcOlschok Fair enough. I added more details from that perspective.


GE GSH25JSRFSS refrigerator water dispenser not working

Question: I have a GE GSH25JSRFSS.  The water dispenser isn't working but ice maker still works.  As the solenoid going to the water dispenser read 0 ohms, I replaced the part, first testing the resistance on the new part which was fine.  Still no water through the dispenser after the replacement.  I took the new solenoid off and tested it again and this time it read 0 ohms.  My best guess is that something is shorting it out.  Any idea what it might be or what my next steps should be?
Comment: Check the input signal to the solenoid.  If it's providing a voltage higher than rated, that could damage the coil and cause a short circuit.
Comment: Thank you jwh20.  The solenoid was rated for 20W. and I tested the amps and volts.
20W = .174A x 115V.  All was fine.
Answer: I replaced the controller board (which was easy to do) and still no water.  I tested the ohms on the old and new solenoid and now they are reading around 307 ohms.  I have no explanation for that.  Very strange.
I started thinking maybe there is a clog in the line.  In the middle of the water dispenser line I was able to find a connector (at the front bottom left of the refrigerator) which allowed me to separate the line which I did.  I pressed the water dispenser handle and water came out at the separation. I put the line back together.
After further research I found out that it was possible for the water to freeze within the line.  I took a weed eater line and pushed it through the line where the water comes out and it stopped at 6 inches.  I turned off the power on the freezer side, removed all the food from the freezer and left it's door open for a couple of hours.  The next time I tested the water dispenser water was coming through.  Issue resolved.
Comment: So you found ice in the line?  You may have an issue with your defrost and/or blend door from the freezer cabinet causing the temp in the fridge cabinet to drop too low (or maybe you just have the fridge cabinet set too cold).
Comment: Excellent detective work! Thanks for coming back to share your answer with the world, I'm sure this will help someone else in the future. Please also come back in about 48 hours to click the check mark next to your answer so others know that this does have a solution.


name for a word that someone is known for saying?

Question: what is the name for a word that someone is known for saying?  I tried looking for information on this but came up empty. I thought it was a word that ended in nym but I'm not sure.
Answer: I think "catchphrase" is the most commonly used word.

Catchphrase - A well-known sentence or phrase, especially one
  that is associated with a particular famous person.

Other suggestions:  "hallmark", "signature [word/phrase]"

Hallmark - A distinctive feature

I don't know a -nym word, unless it's a neologism.
Answer: One term that fits the definition of "a word that someone is known for saying" is pet phrase. In ThoughtCo.'s Glossary of grammatical and rhetorical terms pet phrase is defined as follows:

Pet phrase is an informal term for an expression frequently used by an individual in speech and/or writing.
A pet phrase may be widely known (a cliché, for instance) or peculiar to the individual who employs it.

The ThoughtCo. page includes authentic examples of pet phrase in various contexts. For example:

"Whenever his conscience pricked him too keenly he would endeavor to hearten himself with his pet phrase, 'All in a lifetime.' Thinking over things quite alone in his easy-chair, he would sometimes rise up with these words on his lips, and smile sheepishly as he did so. Conscience was not by any means dead in him." (Theodore Dreiser, Jennie Gerhardt, 1911)

and

Using Pet Phrases in Writing
"Repeat a distinctive thought or phrase of dialogue in the story. This connects an earlier part of the story to a later one without having to rely on an overt transitional device. Television shows frequently overuse this technique, giving one character a pet phrase that he repeats ad nauseam. One way to vary the device is to give it a different meaning each time it's used. On Seinfeld, all the principal characters would use the same phrase, often with a different meaning, all in the same scene, creating a device all its own." (James V. Smith, Jr., The Writer's Little Helper: Everything You Need to Know to Write Better and Get Published. Writer's Digest Books, 2012)

Source: https://www.thoughtco.com/pet-phrase-1691501


Being tax efficient with dividend stocks

Question: I've been considering selling off more of my (growth) stocks and placing the capital in dividend stocks. However, I realize Uncle Sam will tax me on any dividends I earn throughout the year. Is holding these stocks in a tax free account, such as an an IRA, the only way to avoid taxes? Will having the dividends automatically re-invested (like DRIP from TD Ameritrade) still trigger taxes? I dont want to hold the stocks longterm (~ 2- 3 years), as I already have a mutual fund.
Comment: Dividend re-investment does not avoid taxation of the dividends. Do you know about [Qualified Dividends](http://en.wikipedia.org/wiki/Qualified_dividend) that are taxed at the (lower) long-term capital gains tax rate instead of as ordinary income?
Comment: A contradiction in terms.
Comment: I'm not sure what you're referring to, quanty.
Comment: Qualified dividends are not very hard to achieve.  Most small investors getting 1099-DIVs from a broker will have only qualified dividends (reported on box 1b).  Pub 17, ch 8 and the 1099-DIV instructions have the details.  But note that in technical tax terms, even qualified dividends are still considered "ordinary income," though they are taxed at CG rates.
Answer:
Having dividends automatically reinvested (i.e. DRIPs) will cause a tax liability for the value of the dividends.
Qualified dividends (i.e. specific holding period requirements) are currently taxed at a rate lower than ordinary income tax.
Yes, for normal people the way to avoid/defer paying taxes is by using a retirement account (e.g. Roth IRA/IRA/401k). There are of course plenty of legal constructs to manipulate the tax implications of any transaction.


Future Method Static

Question: I am new to Salesforce and hence a lot of silly questions. What is the rational behind defining future methods as Static? I mean has these methods been not static what harm would have they caused?
Comment: Future method by definition is static so that variables with this method is associated to the class and not the instance and you can access them without instantiating the class. This is something defined as a rule by Salesforce.
Answer: Future methods are "light" batch classes. Basically, salesforce.com took a look at everything "wrong" with batches, and stripped them out to provide a lean, mean interface for asynchronous calls. They have to be static because the underlying system is optimized to work as efficiently as possible.
Batches need at least three asynchronous cycles to do everything: start, execute, and finish. At each step, the object graph has to be deserialized before the function can be called, and this leads to longer initialization times. Even worse, if you use Database.Stateful, you'll also incur extra serialization at the end of each function call, taking up more execution time. It's simply more wasteful of system resources than it could be.
Future methods are the exact opposite of batches, designed to be simple. They don't serialize object graphs (only primitives and collections of primitives are allowed), they don't return a Job ID, and they use only one execution cycle instead of three. As such, since they don't store object graphs, there's no way a future method could be anything other than static. There's simply nowhere to put the data. It is meant to be a lightweight asynchronous interface that wouldn't bog down the system's resources as much.
For example, that's why you're allowed 50 future methods per transaction, while batches can only be filled up 100 system-wide calls at any given time (with flex queue, which leaves up to 95 "on hold"). Because they're so much smaller, you can call a great many more of them than you can batches in the same amount of time. If there was no requirement to have them be static, this would increase execution time and harm performance.
Answer: A @future (being async) doesn't have access to the original instance of the class, as that is removed from memory when the processing context has finished. What this means is that you can't have a non static function for the sole reason that the instance of the class no longer exists.
For example:
<code>public class TestClass {
    public static void staticFunction() {
        //...
    }

    public void nonStaticFunction() {
        //...
    }
}

//This won't work:
TestClass.nonStaticfunction(); //object TestClass doesn't exist

//These will:
TestClass.staticFunction();    //static, so it doesn't need an instance of the class

TestClass tc = new TestClass();
tc.nonStaticFunction();        //have an object now, so it will work
</code>
Future call doesn't create an instance of an object, so it can only access static functions.

Future Method Static