In an alternating current, do electrons flow from the source to the device?

Question: If electrons in an alternating current periodically reverse their direction, do they really flow? Won't they always come back to the same position?
Comment: Why is this a problem?
Comment: The question is based on my incorrect understanding of electric current. If electric current is flow of electric charge which is carried by free moving electrons, then I can understand DC. When I read the defintion of AC as movement of electic charge that periodically changes direction (like back & forth) along the line of flow, then how is there is a movement of charge. Answers given by others below clarify this. Thank You
Answer: Although the question is not clear, my guess is that you are confused with the flow of current and mean position of electrons.
In case of DC, we have a continuous flow of charge from one point to another point in the conductor, any electron completes a cycle of circuit.
In case of AC, there is no net displacement of charge and this may lead one in thinking that there should be no flow of current as mean position of charge carriers (electrons) is same.
However current is the charge passing through a cross-sectional area per second taken in the conductor, and it is not affected by the mean position of electrons (which may remain same).
Take any cross section of a conductor and charge is continuously passing through it. It is nothing but current (even though mean position of electrons is same in case of AC).
Comment: @noob: If this was your confusion, the answers below don't really adress it--- the electrons are not the things that move when electricity moves. The thing that is moving is "electric and magnetic fields", or more precisely voltage. The voltage runs across the wires back and forth at the speed of light, and the changing voltage is what does stuff at the other end.
Comment: Thanks for the explanation. Every simple diagram or animation of AC shows the flow constantly changing back and forth and this confused me. Please provide any basic reference book that describes this best.  Thank You.
Comment: @RonMaimon "The voltage runs across the wires back and forth at ***a fraction of*** the speed of light"
Comment: Electrons do move
Answer: In electromagnetism, and therefore in any image  of how nature works, there are two frameworks.
1) The classical  where we have fields, currents, waves, voltages, etc.
2) The quantum mechanical, where we have electrons, protons, ions, photons, etc.
The question mixes the two frameworks and inevitably paradoxical questions arise.
The two frameworks are connected, but one has to be aware that there are two different ways to view matter, the second, quantum mechanical, more fundamental, from which the classical fields are built up.
One can make a classical form of the electric current as the number of electrons, time, velocity, etc, and with the appropriate constants the system works and is consistent. But this classical picture breaks down when one tries to localize electrons.
Electrons in an electron gun in a vacuum tube form a current and the classical current picture coincides with the quantum mechanical. But in solids the microscopic configuration is much more complicated.
In metals, the electrons are quantum mechanically occupying a level, a conduction band, where they have a collective behavior that gives the combined classical current, but individual electrons do not have a "position" from which to move. They follow closely (continuous) spaced energy levels which they occupy with zillion other identical electrons, the notion of position is irrelevant.
In crystals, like transistors and semiconductors, electrons migrate from energy level to energy level of the crystal according to the energy supplied, and the energy levels available, but again one electron is indistinguishable from another in a collective field (as the link above should demonstrate to you). The current behavior is a collective one and the position of individual electrons do not enter it in a one-to-one correspondence way. Only a collective current can be defined and "position of an electron" is not available in that definition; unless one sets up a very detailed experiment in order to probe the quantum nature of the phenomenon. We then will be speaking of individual electrons, not currents, though they can be formally defined.
All in all, for general purposes, the classical framework is sufficient.
Comment: Thank You. Your reply is profound. I don't have an oppurtunity to take a course. But I started to self study with the resouces on the net. The following link also explains the subject in  a easy to understand manner. "http://www.irregularwebcomic.net/1420.html"
Comment: Thanks for taking the time to write this detailed explanation. I think my understanding has improved. I will have to reinforce my learning by reading more on this subject. Please provide names of reference books on this. Thank You.
Comment: The following page "http://www.eskimo.com/~billb/miscon/eleca.html" also has easy to grasp explanation.
Comment: In the line of my answer, the links highlighted have references at the end. You are asking for a course in electromagnetism and solid state physics :). The link you give in the comment above also clarifies this. I think if you can understand that classical electricity is built up in a prescribed but complicated manner by the underlying quantum behavior of the particles involved, you cannot go wrong.
Answer:
In an alternating current, do electrons flow from the source to the
  device?

Let's go back to DC for a second.
A battery has two ends.
A light bulb has two contacts.
The battery won't light the light bulb unless you make a closed circuit, so yes, electrons flow from the source to the device, and they also flow back.
What makes the light bulb light is the fact that electrons are flowing through it.
It doesn't care which direction they flow.
You can reverse the battery and the bulb will still light.
That's all AC is - a DC source that's continually being reversed.
It lights the bulb one way, and then it lights it the other way.
P.S. Think of riding a bike with toe clips. You do work on the down stroke, and you do work on the up stroke.
You produce lots of power, but your feet stay attached to you.
P.P.S. The reason AC is even used, rather than DC, is with AC you can easily make transformers to change the voltage.
(A transformer is like gears on your bicycle.)
That way you can transmit huge amounts of power long distances on fairly slender wires, and then transform it down again to be relatively safe for consumers to use.
(Thomas Edison and George Westinghouse had a huge battle over this, and Westinghouse won. Years later, Edison remarked to Westinghouse's son "By the way, your old man was right".)
Comment: Excellent answer, after years of confusion I finally understood it. Thanks!
Comment: "What makes the light bulb light is the fact that electrons are flowing through it. " gets to the root of the problem (for what confused me anyway).
Answer: I think Ron's comment is very fitting and I want to add a simple fluid analogy.
Your AC source is indeed creating an oscillation in the position of the electrons over time. This has several advantages from an engineering standpoint as you can use generators, electric motors and transformers easily with an oscillating current.
The fluid analogy would be a pump that consists of a piston moving left and right which creates an oscillation in the movement of water molecules. Now you add a ratchet to this this circuit and you can use the oscillating water molecules to provide mechanical work.
Answer: Here is simple analogy.  Find a pole and put 10 meter long piece of fabric around it.  Go 5 m away from the pole.  Start pulling left and right end of the fabric.  As you are pulling fabric it is rubbing pole, the friction between fabric and the pole heats pole.  Fabric does not go anyway, it just moves left and right and still it makes work.
In the same way electrons don't go anyway, they are moving left and right and by "rubbing" against material, they heat it, or they make other useful kinds of work.
Answer: The best best analogy to explain this is the pipe/tube filled with balls.

Imagine a tube with a diameter big enough to only accept a single golf ball.
Now, fill a 1m tube end-to-end with golf balls.
The golf balls are your "charge".  This will be a collection of electrons.
Get a "source" of electron charge i.e. little box of golf balls.
Create a "ground" or "sink" to collect charge i.e. little collector box for the golf balls.
Hold the "collector" under the tube at one end.
Take a ball from the "source" box and push it into the tube.
Almost instantaneously a golf ball will be pushed from the opposite end into the collector.

This demonstrates the principle of electron drift.  It is certainly not at "the speed of light", possibly closer to the speed of sound!  However, the net effect is almost instantaneous as described.  The ball entering from the "source" side transfers its energy to the next ball; and that to the next, and so on, till the ball nearest the collector is pushed out.  This happens instantly as the ball is pushed in!
This happens if there exists a "source" of charge and a "collector" of charge i.e. ground / mass of earth etc.  Using the tube of balls analogy, it does not matter where you position the "source", so long as the other end has the "collector" to catch the balls.  Swapping (alternating) the position of these still results in a ball being displaced from the tube and another replacing it.
At no time does the tube become depleted of balls.  Similarly, a wire will not become depleted of electrons i.e. no net change.  This illustrates the concept of current flow in alternating directions while answering your question regarding the net effect within the conductor.


Changing startup file location

Question: Is it possibile to change the location of the startup.blend file to my documents for example, in Windows? Thank you. I found useful to have an unique location like all the other software templates, especially in workgroup projects
Comment: I'm not going to mark this as a duplicate because it is subtely different, though there is some useful information [on this question](https://blender.stackexchange.com/questions/23338/where-is-the-startup-file-stored).
Answer: I don't think it is possible to change the path of the startup.blend file, however there are ways you can work around it. As with all things, there is the regular way and then the blender way.
First, the blender way, basically the startup file is not cast in stone. The idea is that you can open any .blend file and save it to startup using Ctrl + U.  So when you next open blender you get a fresh copy of that file.
This might seem like a strange way to do it, but you may spend weeks modelling, then texturing and you may have different needs from your startup file for a given week or month.  So as you mentioned, keep some templates somewhere and just use the hotkey to clone this to your startup.
If you want to do this so you can backup your startup file, you can create a shortcut to your startup.blend and preferences.blend files in a more accessible directory.  On windows you'll find it in your AppData folder (it's hidden by default), this is beyond the scope of this site, but you should be able to locate it with some googling.

Changing startup file location


Facial recognition architecture

Question: Image recognition uses deep learning, and in particular CNNs to train on and recognise faces. Usually, this entails training on lots of data.
However, recently, we have seen face recognition being deployed everywhere, and being used for passport control, for example, and some airlines have deployed in lieu of boarding pass scanners. How is this accomplished? How can they achieve such accuracy without having hundreds of pictures of everyone? How can, for example, governments, with a quick scan of my face, recognise me and identify my name and identity without having any picture of me besides the ones available from my official ids? There is a link here which, however, does not really explain it technically. Is it done using neural nets? What is their architecture. Are there papers describing it (technically) anywhere?
Comment: good question... I think one shot learning plays an important role
Comment: I am afraid that not revealing how it's done is a big security feature. Also we don't have any performance measure. I suspect they are not that well performing... -most of the work could even be done by a human remotly without us knowing-  They may even just mostly work by prevention, like a fake camera would prevent robberies, even without anyone looking at the pictures.
Answer: Have a look at a few networks:
-Siamese Network
-One-Shot Learning Model
Once going through these models you will understand how they can very well with very limited amounts of data.

Facial recognition architecture


Defining linux command in python script and able to run the command from script

Question: I need to write a python script, for example I need to run the command "systemctl is-enabled autofs" and if the output the command is "Failed to get unit file state for autofs.service: No such file or directory" then the script should print "no service installed" and if the output is "enabled" then the script should run "systemctl --now disable autofs". I have tried using os and subprocess module but could not make it. Any help would be appreciated.
Comment: What's wrong with subprocess module? It can send command and read output via Popen.
Answer: From the subprocess Python documentation:

subprocess.check_output(args, *, stdin=None, stderr=None, shell=False,
universal_newlines=False) Run command with arguments and return its
output as a byte string.
If the return code was non-zero it raises a CalledProcessError. The
CalledProcessError object will have the return code in the returncode
attribute and any output in the output attribute.

You can check the output of your initial command. Based on that, you either print no service installed or run systemctl --now disable autofs.
import subprocess

try:
    subprocess.check_output(["systemctl", "is-enabled", "autofs"], stderr=subprocess.DEVNULL)
except subprocess.CalledProcessError as e:
    print('no service installed')
else:
    subprocess.run(["systemctl --now disable autofs"])


How do we get the balance of a test account in SmartPy?

Question: I am transferring some tez to an account and i want to assert balance of account before and after the transfer. How do i get the balance of test account in SmartPy.
Answer: There is no way to get the balance of test accounts.
You can replace the test account by a contract with an entrypoint named default. You can set the contract's initial value and compare its balance as it is a contract.
import smartpy as sp

class MyContract(sp.Contract):
    @sp.entry_point
    def send_tez(self, destination, amount):
        sp.send(destination, amount)

class Receiver(sp.Contract):
    @sp.entry_point
    def default(self):
        pass

@sp.add_test(name = "Test")
def test():
    sc = sp.test_scenario()
    c1 = MyContract()
    c1.set_initial_balance(sp.tez(42))
    sc += c1
    c2 = Receiver()
    c2.set_initial_balance(sp.tez(0))
    sc += c2
    c1.send_tez(destination=c2.address, amount=sp.tez(10))
    sc.show(c2.balance)

Answer: You can do so using sp.verify and .balance
import smartpy as sp

class MyContract(sp.Contract):
    def __init__(self, **kargs):
        self.init(**kargs)

@sp.add_test(name = "First test")
def test():
    sc = sp.test_scenario()
    c1 = MyContract()
    sc += c1
    # and its balance
    sc.verify(c1.balance == sp.tez(0))

Comment: This is for the balance of the contract. I am looking for how to get balance of a test address. Any way to do that? Thanks!
Answer: It is not possible to get the balance of an implicit account from the execution context of a smart contract in general, so I don't think SmartPy would include such a feature.
It doesn't really make sense to compare balances because, when you transfer tez at the end of the execution of the contract, the balance of the implicit account will only be updated AFTER the contract finished executing (because of the order of execution of the operations). The contract has to finish executing first before any side effects are saved in the blockchain, including tez transfers or even updates of its own storage!
Comment: I think the question was in the test scenario, not in the contract's code.


Buying Monero Privately in Toronto Canada

Question: I would like to buy Monero PRIVATELY in Toronto Canada. I am new to Monero and would love to buy it privately without having to give up my personal info to an exchange to buy it.  Can you please let me know of a place I can go to to buy it privately?
Answer: Popular places to buy without KYC are Bisq and LocalMonero.
Answer: I think you might be stuck with buying Bitcoin (anonymously at a Bitcoin ATM) and changing it for XMR at a site that doesn't require id verification for trading cryptocurrencies, such as coinex.com.
Comment: ...and as it turns out with some digging, there are ATMs in Toronto that will sell you XMR for cash. You pay a premium, as you do at a Bitcoin ATM, but it works.


Calculating the number of ways to generate each number in $\left\{ n,\ldots,6n\right\} $ by throwing $n$ dice

Question: Question
The convolution $a*b=\left(c_{0},c_{1},\ldots,c_{n+m-2}\right)$ of two vectors $\left(a_{0},\ldots,a_{n-1}\right)$ and $\left(b_{0},\ldots,b_{m-1}\right)$ is defined as follows:
$$
\left(a*b\right)_{i}=c_{i}=\sum_{j=0}^{i}a_{j}b_{i-j}
$$
Given that by using the $FFT$ algorithm the convolution can be calculated in $O\left(n\log n\right)$, suggest an algorithm that calculates the number of ways to generate each number in $\left\{ n,\ldots,6n\right\} $ by throwing $n$ dice in $O\left(n\log n\right)$.

My Take
I tought on defining the following vectors:
$$
V_{A}\left[i\right]=V_{B}\left[i\right]=\begin{cases}
1 & \text{i is a possible result for n dice throws}\\
0 & \text{else}
\end{cases}
$$
For example, if n = 2 then:
$$
V_{A}=V_{B}=\left[\underbrace{0}_{1},\underbrace{1}_{2},\underbrace{1}_{3},\underbrace{1}_{4},\underbrace{1}_{5},\underbrace{1}_{6},\underbrace{1}_{7},\underbrace{1}_{8},\underbrace{1}_{9},\underbrace{1}_{10},\underbrace{1}_{11},\underbrace{1}_{12}\right]
$$
So the convolution would be:
$$
c_{i}=\sum_{j=0}^{i}V_{A}\left[j\right]V_{B}\left[i-j\right]
$$
when $c_{i}$ contains the possible ways to get $i$ as the sum of $n$ throws.
For example:
$$
c_{2}=\underbrace{V_{A}\left[0\right]V_{B}\left[2\right]}_{0}+\underbrace{V_{A}\left[1\right]V_{B}\left[1\right]}_{1}+\underbrace{V_{A}\left[1\right]V_{B}\left[0\right]}_{0}=1
$$
So there is only one way to get 2 as the sum of two dice throws.
Well, I think it works for $n=2$ but it gets complicated for $n>2$, and I don't think it works in $O\left(n\log n\right)$ anymore.
When $n=3$ I will define:
$$
V_{A}=V_{B}=\left[\underbrace{0}_{1},\underbrace{0}_{2},\underbrace{1}_{3},\underbrace{1}_{4},\underbrace{1}_{5},\underbrace{1}_{6},\underbrace{1}_{7},\ldots,\underbrace{1}_{23},\underbrace{1}_{24}\right]
$$
So for example:
$$
c_{8}=\underbrace{V_{A}\left[0\right]V_{B}\left[8\right]}_{0}+\ldots+\underbrace{V_{A}\left[3\right]V_{B}\left[5\right]}_{1}+\underbrace{V_{A}\left[4\right]V_{B}\left[4\right]}_{1}+\underbrace{V_{A}\left[5\right]V_{B}\left[3\right]}_{1}+\ldots+\underbrace{V_{A}\left[8\right]V_{B}\left[0\right]}_{0}=3
$$
That is incorrect, because in this case I need to find the number of possible ways to get 3,4 and 5.
This is where I got stuck.
I don't know if my idea is good and if it's possible to use it and stay at $O\left(n\log n\right)$. I think it gets recursive and complicated.
Comment: There is a closed formula for the number of different ways to generate a number $k$ from $n$ dice throws (each die has $6$ sides). What is stopping you from directly calculating this formula?
Comment: @nirshahar These are not the terms of the question so I guess they did not expect me to use a closed formula
Answer: FFT allows you to multiply two degree $d$ polynomials in $O(d\log d)$.
In your case, you want to compute $(x+x^2+x^3+x^4+x^5+x^6)^n$. Using repeated squaring and FFT, you can compute this in $O(n\log n)$. The coefficient of $x^k$ gives you the number of ways to obtain $k$ by throwing $n$ dice.


How come we can't put a bounty in meta?

Question: I was wondering why someone could not put a bounty on their question here on meta. Is this by design or has the community decided that it is a bad idea? Because, at SO you can put a bounty on a meta question. I think it would be a good idea to have the ability to put a bounty on a meta question because that way the question, if it is important to the OP or the OP believes that the question warrants some discussion then can be brought more to light. For example my question about why bounties cannot be increased while a bounty is in progress.
Answer: The answer to this is that there is no reputation system on this Meta site to award bounties, and therefore considered by-design.
Bounties are only meaningful in an environment where reputation is available to be gained and distributed (through voting, but also bounties). Here on Meta, it does not exist. In fact, your "reputation" on meta is equivalent to your reputation on the Main site (with a mild delay in during a reputation-frenzy).
On the left is a view on Meta, while the right shows the Main site reputation:

Note that on Meta, reputation is substituted for "votes" (that does not have a hyperlink). It does not really give a tangible answer to the question "How cool am I?". Badges, on the other hand, is perhaps the only measure of comparable awesomeness, with some distinction in their availability (see Badges on Meta vs Main). Somewhat interesting to note is the availability of Mortarboard - a reputation-related badge - already obtained by some members of TeX.SE:

Meta.SO is entirely different, having its own reputation system in tandem with SO, and therefore allows bounties (and reputation loss from down-votes).
Comment: How come you are so perfect all the times with a text book type answers on meta and main site. need to learn a lot.
Comment: @texenthusiast: Thanks, I appreciate the feedback! I won't try to tone it down next time. `:)`
Comment: Do you think we need [rep on meta something in lines of doncherry](http://meta.tex.stackexchange.com/a/1495/15717) to encourage the main stream people here to share the load and also any ideas how to encourage voting ?
Comment: @texenthusiast: A difficult question to answer. I consider voting to be the counterpart to contributing because I see both sides of that investment. But not everyone sees it that way. Perhaps [przemoc's answer](http://meta.tex.stackexchange.com/a/1479/5764) sums it up: People are more interested in solving things than they might be discussing things around solving things. Perhaps selfish in some way since the investment seems very short-term or personally-motivated. But that, I would guess, is very natural... almost primal.

How come we can't put a bounty in meta?


Will Snitches attack each other?

Question: I have recently acquired a Prisoner that is both a Snitch and Deadly. Therefore I am hesitant to cast him as Protective Custody. Will he attack my other PC Prisoners?
Comment: I had up to eight snitches, ex law-enforcement and ex prison-guards together in my protective custody wing and they got along really well with each other. But maybe I was just lucky.
Answer: The "deadly" trait (a prisoner can kill in one hit) only comes into play when a prisoner gets into a fight. It does not increase the chance of a prisoner getting into a fight. They will fit in nicely in your Protective Custody wing.
A more problematic combination of reputations is "Gangmember" and "Snitch", or "Volatile" and "Snitch". Gangmembers are known to start fights with other gangmembers. Volatile prisoners start fights without a real reason. Since their is rarely trouble in Protective Custody, and therefore usually less guards are needed there, this can have worse consequences.

Will Snitches attack each other?


Which was the first sky citadel?

Question: I remember that I have read somewhere that there was one citadel that was marked as the first one but I do not remember where I have read that. I checked some wiki entries and the book Dwarves of Golarion but I cannot find it anymore. Can anyone help me here?
Answer: I found no records of which sky citadel was built first. But I believe you are thinking about Koldukar, known today as Urgir, the First Home of the orcs. It was originally one of the ten Sky Citadels, located in the area now known as the Hold of Belkzen.
But, though not stated so on any of the books I searched, Highhelm could be declared the first, as it was being built as the dwarves dug their way out to the surface. However, though that is said about Highhelm, nothing prevents the others from being built similarly, as the records mention that when the Quest for Sky ended, the dwarves build ten fortresses on the surface, but exact dates are not given.
For reference, I checked the Inner Sea World Guide, Inner Sea Races, Dwarves of Golarion, Belkzen Hold of the Orc Hordes, and the wiki.
There are a few Pathfinder Society modules that could contain more information about it (which I, sadly, don't own to check):

Season 4, Glories of the Past part 1: Halls of Dwarven Lore has information about Janderhoff.
Season 4, Glories of the Past part 3: Secrets Stones Keep explores an unknown area of Koldukar (Urgir) for archeological information.
Season 5, Vengeance at Sundered Crag ends near the entrance of Jormurdun;
Season 6, Legacy of the Stonelords has some exploration of Jormurdun.
Comment: Yeah, I did similar research and can't find anything defined as the first.

Which was the first sky citadel?


What is a cost basis and how does it help make investment decisions?

Question: Two part question...what is a cost basis and how can it be used to help make investment decisions? I hear cost basis thrown around a lot and I'm not sure
what it means.
Answer: Cost basis is simply a calculation of what you paid for an investment at the time of purchase. It is generally used to determine how much profit you have (or would) make if you sold that investment at the current value. It is mostly used to calculate how much you owe in taxes on your investment profits.
Answer: Suppose you bought a house for $300k. Then you put in $20k of furniture and $50k of renovations. By the time you're ready to sell, the CPI has gone up by 5%. And maybe the house itself has deteriorated somewhat by then.
The question is: what selling price represents 'breakeven' to you? Maybe the carpets don't count, the new garage does, and CPI isn't reflective of house price movements. Picking your buy-price of $300k is probably too simplistic.
Answering that question gives you the "cost basis". You can then use that number to determine what profit would be reasonable, or what loss you'd be willing to wear, when you look at offers to buy your house.


Difference between 'happened to be' and 'happens to have been'

Question: What's the difference?

He happened to be at that wedding.
He happens to have been at that wedding.

I know that different forms of the infinitive are used, but what's the difference in meaning?
Answer: The difference here is the same difference as normal between simple past and present perfect.
(This structure isn't technically present perfect as "happen to" is never used in true present perfect: "He has happened to be at the wedding". But it is functionally equivalent to present perfect)
The simple past here, as usual, simply relates something that happened in the past.
The present perfect, as usual, relates something that happened or started in the past, and has some connection to the present -- hence present perfect.
So to this example, while both include the meaning that he was at the wedding by happenstance, the present perfect also includes the nuance that this fact has some connection to the present. For instance, if the speaker got a job offer from him because they happened to see him at that wedding, the speaker is focused on the present result of a past event, which is textbook present perfect.
Comment: Thank you, but what you call the present perfect is not a tense it's an infinitive. It's the perfect infinitive.
Comment: @user1425 You're right, it's not technically the standard present perfect structure, but in all other ways it is present perfect. I've improved the second paragraph to make it clear.
Answer: The idiomatic construction X happens [to verb] essentially means X [verbs] - with the implication that speaker is saying something relatively unlikely that the audience didn't expect (X might not [verb]).
The difference between OP's examples is simply a matter of when something "unexpected / unplanned" either took place OR became known....

1: John happened to be there
... implies that at the time of the wedding it was "unplanned" / relatively unexpected that he would be there.

2: John happens to have been there
... implies that at time of speaking it is "unknown" / relatively unexpected that people should learn that he was there.

Note that the second version should only be used with caution. The implication is often that speaker is disagreeing / arguing with someone. Specifically, someone who isn't aware that John was at the wedding, and who is basing false beliefs on the assumption that John wasn't there. For example...

A - "My brother John isn't much of a family man. As I expected, he didn't go to our cousin's wedding last week"
B - "He happens to have been there. You just didn't see him because you spent all your time outside the reception hall smoking cigarettes!"

This comment from @PRL75 explains better than me exactly why OP's second version in particular should be used with caution (where the "surprise" relates to speaker disabusing addressee's misconceptions rather than the event itself having been unexpected in the past.

It is (almost?) invariably used to inform someone of something they were unaware of, and would influence their opinion. e.g....
"Why on earth would you think he could repair your TV?"
"He happens to be a very competent electrician"
Comment: I think you've explained it much better than I did. I was trying to get across the idea that you express more eloquently , starting "Note that the second ...".
Comment: ty - but because I have enough rep to see "deleted" answers, I should point out that *you* explained that "reason for exercising caution" better than *me* in a comment. I trust you won't mind me including part of your comment in my answer text (comments are potentially ephemeral, and it's a point well worth making).


Solving treeview long information form user experience

Question:
Hello everyone,
I am facing this issue while working on a long form consisting of large number of metadata fields within headers. Would appreciate any suggestions. Thanks !
Comment: Hi. Welcome. It's unclear what the problem is and what question you'd like us to answer. Could you edit your question to describe the problem and why you feel your own alternatives have failed?
Comment: The question seems to be about form nesting but it isn't really answerable the way you've put it. Can you try to be more specific?
Answer: So you have a lot of data that represents a single object.  That's not an uncommon starting place.
As you build out the first couple fields, putting them all in the same context makes sense, but as the complexity of your data structure grows in size, you'll likely need more than one context to properly display and edit all the information for a particular object.
Here's an example of how to structure deeply nested and complex sets of information from IIS, each into different areas of information

The temptation to put everything on a single page so you have a single dashboard that knows everything often ignores the process of doing BA / UX work on different workflows and screens.  Users prefer simplicity and clear delineations as to what group of data they are interacting with at each moment in time.
Even if power users want a high level view of everything, they can't physically look at >1 page of scrollable content at one moment in time. Providing everything at once can fall into the anti-pattern of Data Rich, Information Poor (DRIP) AKA - when everyone's super, no one is
Comment: Thanks Kyle alot, your right breaking it into some chunks of information and grouping it.


Can GPL licensed code be close sourced later by the author?

Question: Suppose someone writes some code, and publishes it as open source under the GPL. Later they decide to close source their application and put it for sale. Is that in violation of the GPL? All code in the closed source app was written by the said author. Since he "owns" the code, I would think he can choose to re-license it however he wishes. Is that right?
Comment: Closest FAQ I found was this, which seems to support the answers: http://www.gnu.org/licenses/gpl-faq.html#ReleaseUnderGPLAndNF
Comment: You've got a bunch of good answers already, but the one thing I'll add is that of course, if the author decides to go closed source, the old code is still out there under the GPL, but if he continues to progress the closed source version, the old GPL version will soon start to look quite outdated and lame compared to the "for sale" version.
Comment: Did you check the FAQ?
Comment: Lol at the "*To release a non-free program is always ethically tainted*, but legally there is no obstacle to your doing this. If you are the copyright holder for the code, you can release it under various different non-exclusive licenses at various times." :)
Comment: Example application available under both GPL and proprietary licenses: [Ghostscript](http://en.wikipedia.org/wiki/Ghostscript).  Skip to _History_.
Comment: see also: [Can you change a license once you pick one?](http://programmers.stackexchange.com/questions/55326/can-you-change-a-license-once-you-pick-one)
Answer: Yes, if they wrote it, they own the copyright (unless they have assigned that copyright to someone else, of course, like their employer). The GPL confers extra rights to non-copyright-holders over and above what copyright law gives them.
The copyright owner is never technically in violation of the GPL since they have all the rights they need under copyright law.
What they can't do is to pull back the code already released under GPL, that would be covered by estoppel (basically: if someone does something based on a promise you made, you can't later withdraw that promise - it's an equitable thing).
But they can re-licence their code as much as they want, selling it commercially or even not releasing later versions at all.

Keep in mind I am not a lawyer (though I deal with them quite a bit), I am certainly not your lawyer, and this advice is worth every cent you paid for it (which is zero).
Comment: Estoppel: http://en.wikipedia.org/wiki/Estoppel
Comment: @Pacerier The copyright holders are the only parties **not** bound to continue redistribution by the GPL.  This re-licensing happens occasionally, and the copyright holders generally change the version number or the package name to clarify exactly where the licensing change occurred in the timeline.
Comment: How could someone relicense his code commercially if he has previously **already** put it in the free domain? Aren't licenses either you choose `A` or `B`, but not both? (The OP is talking about his old code that has already been GPL-ed, [not new ones](http://blog.jasonantman.com/2008/01/im-sorry-but-i-dont-like-this-contract-anymore/)).
Comment: @RossPatterson, Hmm, I think there's some real confusion here. So if we release a code as GPL, and we decided we don't want to GPL it anymore, Is the only way we could do to create a new version based on the old one? Are we actually allowed to un-GPL the old code that has already been GPL-ed?
Answer: If you own the code and you have GPL'd it, you can't take it back.  The best you can do is grant yourself (or someone else) the right to develop the code further under a closed model.
There was a semi-famous case of a few years back, with some software I actually use called pchdtvr.  The guy who wrote it was a pretty good guy, but he tried to revoke the GPL from his code and basically got flamed right off the net. (Angry people basically forced him to shut down his domain, and he disappeared.) You could search for the package or search for his email, email@example.com.
So, closing your code and putting it up for sale is no problem.  Trying to stop people from giving away your GPL'd code?  Big problem.
Comment: "Flamed right off the net" doesn't sound like a legal procedure
Comment: `pchdtvr` - a good reason why techs should *never* be allowed to name their products :-)
Answer: You could try reading the GPL. Version 3 is at http://www.gnu.org/copyleft/gpl.html
The short answer is "NO". The grant of license is in perpetuity. The GPLv3 makes this explicit; earlier versions did not. Legal issues aside, once you've published your source code on the InterTubes with a license saying "go to town", there's the practical issue: how are you going take it back?

2. Basic Permissions.
All rights granted under this License are granted for the term of copyright
  on the Program, and are irrevocable provided the stated conditions are met.
  This License explicitly affirms your unlimited permission to run the unmodified
  Program. The output from running a covered work is covered by this License only
  if the output, given its content, constitutes a covered work. This License
  acknowledges your rights of fair use or other equivalent, as provided by
  copyright law.

Note: I'm no lawyer. I don't even play one on TV. This advice is worth every penny you paid for it. You need to consult an attorney who knows something about copyright law if the answer to this question is actually important.
Comment: He can't UN-GPL the released code BUT the author does still own the copyright and can additionally use and license the code however he wants.
Comment: -1? really...for **quoting** the GPL's own terms?
Comment: This probably got downvotes because it fails to separate the two issues of 1) attempting to revoke the GPL and 2) offering a new proprietary version *alongside* a GPL-licensed version. The first case is not possible (as you correctly point out) but the second is fully possible, and your blanket "NO" makes it sound as though it is impossible. Your answer seems indisputably correct insofar as it addresses the question, but it doesn't fully address the question (and tacitly implies an incorrect conclusion for the portion left unaddressed).
Comment: No, he can't withdraw the offer either. If he could withdraw the offer, that would prevent any further distribution of the code by new recipients which would defeat the entire purpose of the GPL. GPL section 6 makes this explicit. "Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions.  You may not impose any further restrictions on the recipients' exercise of the rights granted herein."
Comment: "The GPL" is both a contract and an offer for such a contract. The "irrevocable" applies to the contract, not the offer. There are probably laws in your jurisdiction that deal with the withdrawal of offers.
Comment: "You could try reading the GPL". Author, please don't bother with sites like stack overflow.
Answer: Yes.  The author can change their licensing terms at any time for any reason.
What happens to previous revisions of the code that were already distributed to others under the GPL is more of a gray area, however.  The author can indicate that they no longer want their previous versions distributed, but they cannot legally require others to comply with this request.  And in practical terms, once something is out there on the Internet, there's no reigning it back in regardless.
Comment: There's nothing gray about previously distributed code.  @NicolasCarey has the correct answer.
Comment: All the answers here basically say the same thing, but if anyone has _the_ correct answer it's @paxdiablo.  Regardless of what the GPL says or does not say, pulling back code that has been released under _any_ open-source license is legally questionable and practically impossible.  Even if the license explicitly reserves the right to do so.  Once the code is out there, it's out there.  That's a gray area, if you ask me.
Comment: Yeah, I upvoted paxdiablo too.


Is it possible to do part of my PhD remotely?

Question: I have following situation. No good quality phd is available in my country (field: computer Science). On the other hand leaving my country for too long is also a little bit difficult for me mainly for family situation. My question is: is it not possible that I negotiate somehow with possible supervisors etc. that I do some part of my Phd remotely? Or say I visit the University for 6 month, then next 6 month I will spend in my country, etc. Or similar arrangements. I know sometimes they call such programs also Sandwich phd programs. Field is computer science so I don't need to be there in some "lab" all the time. Do you know if this is possible? And where/how can I find such programs? Who do I have to "negotiate" it with and how?
Comment: @user300234 This will make your search more difficult. In the universities that I am familiar with, regulations would make it pretty much impossible to pay somebody who cannot be physically present regularly. It wouldn't even be about the amount - *any* salary would be an administrative issue.
Comment: Also worth reading: [Finding a research group where I can work remotely](http://academia.stackexchange.com/questions/8529/finding-a-research-group-where-i-can-work-remotely).
Comment: Are you expecting to also get funding (that is, a stipend or a salary) for the time where you are not physically present? If this is the case, I am somewhat doubtful that you will find a university which is down with that.
Comment: @xLeitix:ideally yes, but I could also agree on a reduced stipend-e.g., halved.
Comment: @xLeitix: That doesn't sound too good. In the worst case I could think about tolerating that(no pay). But let's hope for better option
Answer: Let me give you a different perspective to your question.

No good quality phd is available in my country

It is good that you aim high. But you must see things through the PHD admissions' perspective. Good universities and good PHD programs have a lot more candidates than PHD positions. Why should they choose you over the other candidates? Is your undergraduate research work that good? Are your grades excellent? Is your university reputable (probably not). If the answer to these questions is no, then the main issue is that you would not get accepted to these programs anyway, regardless of your plan to do it remotely or not.
Also do you have a MSc degree? In many countries in Europe you need a MSc degree before doing a PHD and in USA you need to pass some courses before conducting the actual PHD research. This simply (in either case) cannot be done remotely
Also from your comments I understand that you also want to have funding during your PHD (you would also agree to a reduced funding). In other words, you want someone to hire you (and pay you) to do research, coming from an unknown university, remotely, without actually having a first hand experience of how you can perform at this level, coming directly from an undergraduate university and with no industrial real-world work experience. This is too big a bet for any advisor and university to undertake, unless you have already proven yourself as an extremely talented individual. In that case, exceptions may be possible but still a remotely done PHD is still a major gamble for the advisor and the univesity. Without funding the stakes are smaller but as @xLeitix said remote PHDs do not always work that good. But I think expecting funding for a remote PHD is highly unrealistic.
The only solution I can think of, is for you to work a couple of years on site for a PHD (if you get accepted to a good PHD program) and after proving your
worth there (with some good publications) during the second-half / dissertation writing portion of your PHD you can ask / convince your advisor to work part-time / remotely from your home country.
Comment: Let's see what advice you can give now? Indeed my undergrad might be not "famous", but I have MSC from reputable University. Also one year research experience. And couple of years working outside Uni sadly (some years organizational stuff, 1-2 years programming).
Comment: @user300234 If you want to ask a different question, please do.
Comment: :dear alexandros you didn't elaborate considering my above comment
Answer: Yes, this can be done, but this has to be discussed with the school and program in advance. At previous work places, I've seen PhD students on site who were working "remotely" essentially full-time. Usually, for this to work, you need to have a "local" supervisor who is known to the PhD advisor who will be able to oversee your work.
One other important note: you will most likely be required to spend at least a certain portion of your time at the degree-granting institution, as most schools have some sort of "residency" requirement.
Comment: I would add that it is much easier to do "part of" your PhD remotely if that part is a continguous chunk rather than 6-month gaps here and there.  I've known many people who worked on their dissertations while living far away from the university they got their PhD from, but they did it in, say, the last year or two of the program, when they didn't have anything to do but write the dissertation.  It's easier to be at school for 3 years and then move away for 2 than to move back and forth every 6 months.
Comment: @aesmail:thanks for your answer aesmail. Although I doubt a bit about local advisor since I don't think there are people working (active researchers) in that field in my country.
Comment: As one data point, this (sans the local advisor) is essentially the setup we have with a student from south east Asia. It isn't going overly well, to be honest.


Raven DB Replication Setup Issue

Question: Can any one help me in setting up Raven DB Replication? Tried a lot of
ways a lot of time but no success.
Here is the story:
1) I downloaded the raven bundle. Make a copy of it. Run
Raven.Server.Exe from both of the folders. Both instances run
successfully on individual port. Then I created a document with name
as "Raven/Replication/Destinations"  and document as
{
 "Destinations": [{"Url":"http://vishal-pc:8081"}],
 "Id": "Raven/Replication/Destinations"
}
But it's not working. Please some one put some light no How can I
setup replication.
One more thing I want to mention here is, I was able to run the
replication by running "start raven.ps1" from samples/
Raven.Sample.Replication from bundle.Both instances are already has
the Raven/Replication/Destinations" document like below (no url in
destination node):
{
 "Destinations": [],
 "Id": "Raven/Replication/Destinations"
}
Then I updated one instance with url of another instance. After
updating document was like below:
{
 "Destinations": ["Url":"http://vishal-pc:8081"],
 "Id": "Raven/Replication/Destinations"
}
and replication works fantastically.
I am not able to figure out what is the difference here. Why It's not
able to replication When I run two instances separately and why it is
working fine by running "start raven.ps1".
Please please please some one put some light here.
Note : I am using web interface to make changes in document.
Thanks
Vishal
Answer: Look in the folder of the Raven.Server.exe file you are executing. Make sure you have a subdirectory called Plugins and that it contains the replication bundle DLL.
This blog post walks you through that process pretty well.

Raven DB Replication Setup Issue


Cannot merge or slide accidentally opened windows

Question: I realise that you should be able to grab and slide view layers to close them. I have done this successfully in the past. However, as a NOOB, I managed to get into a complete mess with shader windows that, when I tried to slide away, just opened window after window. I do realise it will be because I got the grab and slide wrong. However, they are not now in any position to slide over each other and I also cannot merge them for similar reasons. They are lying one on top of the other and grab does not achieve anything. Is there another way of closing these?
Comment: Hello, if you are using one of the latest versions, you can right click on the separating line between two editor windows and choose "join areas" then slide the cursor to close one of them. You can also start fresh with a new workspace by clicking on the "+" on top of the main window
Answer: Managed to find a way with a lot of trial and error. The grab and slide worked eventually after selecting different combinations of windows. Cheers


Parceling a Violin from Japan to Bangladesh

Question: I'm a student and saved some money with part time jobs for a violin. I want a friend of mine to parcel a violin purchased in Japan to Bangladesh. Will he need to pay taxes to send me that violin?
Answer: There is a 10% VAT in Japan, ask your friend to get the shop to arrange a tax rebates for foreign purchase. Then you need to pay the customs duty when import into Bangladesh, it can be arranged by the shipping company.
However, after looking into the Bangladesh import tax table, Violin is under the following code

9202.10.00   String Musical Instruments Played With A Bow 60.31%
brief Duty breakdown : Custom duty 25%, VAT 15%, Advance Income Tax 5%, Regulatory Duty 3% , advance trade VAT 5%

I think you should talk to the local musician on how they get their instruments than doing it yourself.  Since this doesn't look like a viable idea for a student.
p/s: Looking at the tax schedule, I bet custom works is a "lucrative job" in Bangladesh.
Comment: Thanks for the elaborative answer in a disciplined manner. I will look for local musicians about this.


What's the difference between flemming's left hand rule and the right hand rule of magnetism?

Question: In flemming's left hand rule, thumb represents the direction of motion/ magnetic force, index is magnetic field and middle finger is current while in right hand rule of magnetism, thumb represents magnetic force, index is direction of current and middle finger is magnetic field. Why is the role for index and middle finger reversed in, what it seems like, the same conditions.
What am I not understanding here?
Answer: These rules come straightforwardly from the Lorentz force equation:
$$\vec F=q\left(\vec v\times\vec B\right)$$
where $\vec F$ is along the of motion/magnetic force, $q\vec v$ is along the direction of current (or opposite, depending on sigh of q) and $\vec B$ is along the magnetic field.
From this we can see that $\vec F$ will be along the direction perpendicular to both current and field in such a way that when we curl our right hand from the direction of $\vec v$ to that of $\vec B$, our thumb points in the direction of $\vec F$.
However, if we do the same with our left hand, our left thumb will point in the direction opposite to that of the right thumb! This is because the left hand is not exactly the same as the right hand but a reflection of the right hand. To see why this is important, consider your hand and reflection of your hand in a mirror. What this means is that for both hands, up/down is up/down, left/right is left/right, but in/out is out/in! And this is exactly why our force (thumb) was pointing in the wrong direction.
The left and right-hand rules in physics have the same fingers representing the same things. The left-hand is used because a × b = - b × a. As the charge of an electron is negative the right-hand rule would point in the opposite direction.
Comment: So basically, flemming's left hand rule and right hand palm rule are variations for finding out the same thing(s)?
Answer: Fleming's two rules are very similar, but they must not be confused.
When a current causes motion (like in a d.c. motor), Fleming's left hand rule applies.
When motion causes current (like in a generator), Fleming's right hand rule applies.
Since these two phenomena are the exact opposite from each other, it makes sense that direction of current would be opposite from each other.
Answer: To add to Dhruv Kapu's answer, if the rules were not opposite then we could easily make electrically-driven perpetual motion machines.


Short story published in Asimov's in the 90's

Question: I cannot recall the title or the author; the premise was that, in an heavily over-populated world, scientists developed a new herd animal which was easily bred, matured quickly, and 100% of the creature was edible, high in protein and low in fat. As near as I can recall, the animal had several different genetic strains, including cow, pig, and dog. SPOILER ALERT - the twist near the end involves the animals developing high intelligence, the power of speech, and reasoning capability, raising the moral dilemma about creating and slaughtering one conscious species to feed another. Any idea?
Answer: This must be Mike Resnick's "Old MacDonald had a farm", published in September 2001 issue of Asimov's.
Matching from @mimi-joyce description:

a new herd animal which was easily bred, matured quickly, and 100% of the creature was edible, high in protein and low in fat.

"Caesar MacDonald's masterpiece was the Butterball, a meat animal that matured at six months of age and could reproduce at eight months, with a four-week gestation period. It weighed four hundred pounds at maturity, and every portion of its body could be consumed by Earth's starving masses, even the bones. "

the animals developing high intelligence, the power of speech, and reasoning capability, raising the moral dilemma about creating and slaughtering one conscious species to feed another.

  "Don't be that sure," said Julie, who had joined us while I was
  talking to Cotter. She had an odd expression on her face, like someone
  who's just undergone a religious experience and wishes she hadn't.
  "Mine looked at me with those soft brown eyes and asked me, very
  gently and very shyly, not to eat it." I thought Cotter would shit in
  his expensive suit. "That's impossible!" "The hell it is!" she shot
  back. "They are not sentient," he said stubbornly. "They are mimics.
  They do not think. They do not know what they are saying." He stared
  at her. "Are you sure he didn't say 'feed'? It sounds a lot like
  'eat.' You've got to be mistaken." It made sense. I hoped he was
  right. " 'Don't feed me?' " repeated Julie. "The only un-hungry
  Butterball on the farm?" "Some of them speak better than others. He
  could have been clearing his throat, or trying to say something that
  came out wrong. I've even come across one that stutters." It occurred
  to me that Cotter was trying as hard to convince himself as he was to
  convince her. "We've tested them a hundred different ways. They're not
  sentient. They're not!"

A link to the full text, via The Internet Archive: Old MacDonald Had a Farm by Mike Resnick
Comment: Perfect, thank you, now I can go read more of his work!
Answer: This sounds like a mix of Isaac Asimov stories:
A Statue for Father is a short story where a man becomes known for bringing dinosaur eggs to the future, which turn into a vast source of extremely delicious food for a growing population; the twist is, he's not remembered for inventing time travel but for inventing dynachicken.  This sounds like your food source, but dino's don't become intelligent, so maybe not.
I remember there was another short story I read in a collection (pretty sure it's Asimov) where an alien race comes to Earth to apologize;  for centuries they had hunted humans for food, and it was very difficult for them to accept humans as intelligent creatures.  The humans they interact with make them feel miserable about it, to the aliens decide to teach humans a lesson;  as they leave they modify pigs to become intelligent, putting humans in the same spot the aliens find themselves in.  But I can't find the title of this one to save my life.
Does that sound close to what you're looking for?


Tracker.Current.Session.Interaction.IP is returning the IP of my site (localhost) rather than the client IP

Question: I'm trying to use geolocation data in my code, and I found that the reason it isn't working is because the IP address in Tracker.Current.Session.Interaction.IP is returning as 127.0.0.1 (localhost, the site's IP address) instead of the IP of the client IP address. Using 8.2, and I'm not on a load balancer, I'm currently using a single instance on my local machine.
Answer: So you're accessing your own local instance of Sitecore from the same machine where the instance is deployed. That's why you're getting 127.0.0.1 as the IP, cause it's your local IP.
If you want to test GEO IP locally you should set the Analytics.ForwardedRequestHttpHeader setting:
<setting name="Analytics.ForwardedRequestHttpHeader" value="X-Forwarded-For" />

And add this header to your request using either some browser plugin for modificiation of the headers or tools like PostMan and set the value of the header to your chosen IP address that you want to test your Geo IP service with.
Comment: Have you added header to your request? E.g. if you use chrome for testing you can use this extension: https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj?hl=en . Then you need to set that header value to some valid IP address which will be then used to resolve geo ip data
Comment: I made that change, but what do I do now? I updated Analytics.ForwardedRequestHttpHeader in Sitecore.Analytics.Tracking.config, but I'm still seeing 127.0.0.1 in both Request.UserHostAddress and Tracker.Current.Session.Interaction.IP, and I checked the Request Headers and it does not have x-forwarded-for in the keys


Loding file on recovery mod

Question: I really need to know how to load .zip files on the recovery TWRP. Because I did a system wipe without previously do a flash of the new ROM. There's a way to put the ROM on the phone even without any system on it? Thanks.
Comment: Look into adb sideload.
Answer: Loading and flashing a ROM from within TWRP can be done with a few easy steps.

Select a ROM and download it to a place on your computer with a simple path such as a folder on your desktop.
Open into TWRP and plug your device into your computer.
Open the terminal with administrative rights and verify your device is visible with the command adb devices if your device is present it will show up.
Next throw the command adb push path_of_the.zip /sdcard/ that should put the ROM.zip in your sdcard.
Within TWRP click the install button and navigate to where the ROM.zip file is. In this case it's in the /sdcard and click it then slide the bar

Loding file on recovery mod


Windows 8 installed Ubuntu 12.10 boots straight to Windows 8

Question: I installed Ubuntu 12.10 on my new Windows 8 Dell Inspirin and would like to set up a Dual Boot.  However, when I restarted, it just went straight to Windows 8 without giving me a Grub screen with options to start Ubuntu.  I haven't had luck with EasyBCD or the BootRepair utility.
Any idea how I can get a Dual Boot working?
Answer: New computers which come with Windows 8 use UEFI, a try to replace the old BIOS firmware. You can read about this on Ubuntu wiki, but I'll paste you some things you can try to do.

Create a LiveDVD or LiveUSB of Ubuntu-Secure-Remix 64bit or of Ubuntu (>=12.10) 64bit. The former is more convenient, as it already includes Boot-Repair, which is used in step 4.
Boot your PC using the LiveDVD or LiveUSB and choose "Try Ubuntu". Remark: if you get a Secure boot or signature error, disable SecureBoot as described here, then retry to boot the disk. You may also need to disable QuickBoot in the same menu.
Install Ubuntu from the Live CD/DVD or Live USB in the usual manner, then reboot the PC.
If the PC does not load Ubuntu (but instead loads Windows, for example, as in Bug #1050940), or if the Windows entry in the GRUB 2 menu does not boot Windows (see Bug #1024383), boot your PC using the Live CD/DVD or Live USB and choose "Try Ubuntu" once again. When the live session has loaded, run Boot-Repair (see link for details). When Boot-Repair loads, click on the "Recommended repair" button, and write on a paper the URL (paste.ubuntu.com/XXXXXX/) that will appear.
This should fix most boot problems. If this does not fix your boot problems, please follow this procedure. If still not good, please create a new thread in this forum, describing your problem and indicating the URL you wrote in the previous step.
Answer: I had pretty much the same problem and the solution was to

disable the secure boot option in the UEFI; then
Open Ubuntu by interruptiong the boot up (hopefully for the last time)
run Boot-Repair (which you've already got) using the "Recommended Repair" option as already explained above.

See more details here
I found that if you don't disable the secure boot option GRUB does not run on boot up and the machine loads Win8 by default.
Good luck :-)
Answer: I hope you have followed this procedure to install Ubuntu.
If yes..You can do a Grub rescue by following this link.
Answer: For those encountering the same issue, the first thing to try might be simply to change the boot priority order in the BIOS.
I had the same problem with an Acer Aspire V3 with W8, after I installed Ubuntu 16.04. After powering on the computer I pressed F2 to get the boot menu (it might be something else, F12 or esc on other computers), then selected the tab 'boot', then moved up Ubuntu in the list by selecting it and pressing F6.
But of course other cases might not be so easy to fix ...


Did imam Maalik really say: "No one was born in Islam more harmful than AbuHanifa."?

Question: Somebody on twitter quoted this and said it is found in
[ Tarikh Baghdad - Khatib ]
But I couldn't find it because I can't read arabic
also is the quote authentically narrated from Maalik?
thanks
Comment: There are many statements showing the dispute and accusations between ahl al-Hadith (al-Athar) and ahl ar-Ra'y some of these are rather authentic others not. As these are hardly related to fiqh or Shari'a none would waste much efforts in checking their authenticity more than superficially.
Answer: First of all, you should know that the standards in books of Tareekh (history or biography) are much lower than in hadith compilations.
One could safely say that a report that doesn't reach the level of da'if in a hadith compilation is more than acceptable in a history book. And Tareekh Baghdaad, even if it includes useful hadith narrations -because al-Khateeb al-Baghdady is a great hadith scholar and hafidh- of all levels of authenticity when it moves on reports about people after the time of the prophet () is a book on history.
The report in Tareekh Baghdad
Having this said we can move to the report you seemingly are referring to in Tareekh Baghdad كتاب تاريخ بغداد (here):
 In the following I'll translate from Arabic language, as these translations are of my own rake them carefully.

أخبرنا ابن الفضل، قال: أخبرنا عبد الله بن جعفر بن درستويه، قال: حدثنا يعقوب بن سفيان، قال: حدثني الحسن بن الصباح، قال: حدثنا إسحاق بن إبراهيم الحنيني، قال: قال مالك: ما ولد في الإسلام مولود أضر على أهل الإسلام من أبي حنيفة،
We were informed by ibn Fadl who said we were informed by 'Abdullah ibn Ja'afar ibn Durustawayh, who said: we were informed by Ya'aqoob ibn Sufyan, who said; I was informed by al-Hassan ibn as-Sabah, who said we were informed by Ishaaq ibn Ibraheem al-Haniny who said. Malik said:" No newborn was born in Islam more harmful for the people of Islam than abu Hanifah".

Al-Khateeb al-Bgahdadi certainly has narrated this via trustworthy scholars. However, the student of imam Malik who reported this statement (Ishaaq ibn Ibraheem) is regarded as da'if (weak) by the majority of scholars and he is the major weakness here.
However similar statements were also reported by Sufyan a-Thawry as stated later (source):

سمعت سفيان الثوري، يقول: ما ولد في الإسلام مولود أشأم على أهل الإسلام منه

Note that al-Khateeb al-Baghdadi mentioned this in the chapter of negative reports about abu Hanifa:

ذكر ما حكي عنه من مستشنعات الألفاظ والأفعال (source)
Mentioning of the exaggerated words and acts which were narrated about him (abu Hanifa)

Note that all the people who made such statements are rather people known to be followers of the Athari school and even known as Hafidh or Amir al-Mu'mineen fi al-Hadith among the ummah.
One may add that Athari scholars may have regarded people using analogy (qiyas etc.) instead of weak ahadith equal to qur'anists who reject the sunnah at all. And that's why they regarded these people as harmful or bad because they feared them to be the cause for ignoring the sunnah of the prophet().
So it should be clear that this can be counted among the exaggerated statements describing abu Hanifa with negative attributes.
This was mentioned after other sub-chapters on the reports about:

his position about going against a leader. (source in Arabic)
on the creation of the qur'an. (source in Arabic)
...

The competition between ahl al-Athar (hadith) and ahl ar-Ra'y
In fact among the 13 sub-chapters starting with his biography only four of them including the above three and one about the statements of scholars about his use of "Ray" can be regarded as a collection of negative reports and similarly, you may find some reports in the corresponding chapters including biographies on any other imam.
Note that some of these statements might be regarded as a good fit for positive and negative statements depending on the context one sets or interprets them.
For example, among the defamation, some early Hanafi's used to propagate is the false claim that imam Malik regarded mut'a marriage as legal.
And it is widely known that imam al-Bukhari held a very negative attitude on Hanafi scholars and didn't mention them by name in his books including his sahih (he referred to them by "some", "some people" and "others"). In fact, you won't find any scholar who has only been praised and not defamed at all. Imam a-Shafi'i both praised abu Hanfiah in his poems and by saying that the ummah is in debt to abu Hanifa in the topic of fiqh, while he defamed him elsewhere.
From today's perspective, we may call most of these kinds of statements and reports as "fake news". They were made with the intent to warn one's followers from an "evil person" or from joining the opposite school of thought.
All this only reflects the "competition" and opposed positions of scholars of al-Athar rely in first place on hadith and statements of the sahabah and those of Ra'y who due to a lack of hadith knowledge or simply because they had a higher standard in accepting a hadith narration (tawatur vs. ahaad) used analogy instead of relaying to a hadith they regarded as weak.
In fact, a temporary scholar concluded that when it comes to using Ra'y abu Hanifa is closer to sunnah than Malik.
From approximately the 6th or 7th Hijri centuries on historians avoided sharing such fake news and quoted them (rather) expressing their doubts about their truth, as most madhhabs were established and accepted by the ummah.
Comment: Ibn Abdul barr said the praise for Abu hanifah exceeded his criticism
Answer: I searched the online library and found such a thing. In the history of Baghdad, he quotes Malik ibn Anas: The sedition of Abu Hanifa, the harm to this nation is more than the sedition of Iblis. Or I heard Malik (the head of the Malikis) say: In Islam, no more sinister child has been born than Abu Hanifa.
I found these in the book History of Baghdad for al-Khatib al-Baghdadi, vol. 13, p. 396, and he wrote this.
https://www.adyannet.com/fa/news/14040
http://www.masaha.org/book/view/2742-%D8%AA%D8%A7%D8%B1%D9%8A%D8%AE-%D8%A8%D8%BA%D8%AF%D8%A7%D8%AF

Did imam Maalik really say: “No one was born in Islam more harmful than AbuHanifa."?


IIS7 Anonymous Access

Question: I've setup a website in IIS7 that gets its content from a fileshare using the UNC as the home directory, this site is running across 3 web servers. Now I would like the iusr anonymous account to have full control over this share. Should I create a domain account and change authentication to use that account on all the servers? What's the difference between application pool identity and specific user account? I would assume I would set it to use a specific user account with the one I created in the domain.
Answer: A general rule for all my web applications is to create a service account and have that application run under that service account.  I would suggest you do the same for your situation.
Create the service account in the domain that you need.  Then have your application impersonate as that account.  Then if the account needs any permissions to folders, databases, etc., you can just give permissions to that account.
Comment: Do I change the service account under Authentication? Should i be concerned about not using the Application pool identity?
Comment: @Rome - What kind of application is it?  ASP.NET 2.0, 4.0, other?  You don't need to be concerned about not using the application pool identity unless you have configured something around that identity (e.g. database access or file system access).

IIS7 Anonymous Access


Any good methods to evaluate a design before any code is implemented?

Question: Are there any heuristic methods out there used to figure out if there are flaws in a design? Or is it pretty much a subjective skill that comes with experience? Often I see engineers go for the first design that comes to their head and then adjust according to the results, this gets the job done, but it's time consuming. I'd like to know what the gurus at SO think.
Answer: Personally, I often use Alloy to gain more confidence in my designs - here's an article on it (and other tools of its kind) that describes it pretty well. Not all people believe in this stuff and it's certainly not for everyone, but it has helped me each time I touched it and even when I don't use it knowing how it would analyze my stuff helps.
Part of design is indeed some subjective skill I think. I always try to reduce the concepts in a design to a minimum. I prefer to write a simple, minimal core and put one (or two) layers on top that map concepts to the underlying layer. Sometimes there's more than one minimum set. Whether the right choice was made is usually not clear until people walk up with new requirements that you didn't think of in the original design. Then I like to think back whether it would have been easier or more difficult to add if I'd chosen the other minimum set. Recent projects indicate that I slowly get a good feeling for this :).
So yes, I guess experience matters. I don't think you can get really good at design until you've made quite a few mistakes.
I really like the suggestion with the presentation of the design. I had often thought about this in the past. I think you really need a good understanding of the design if you want to present it to others (at least, in a way so that everybody understands what you're about to do).
Answer: We normally do a review, that the person making the design must present it to other architects, and they get to try and poke holes in the design.
A fun way to do it, which also teaches the team how the system is supposed to work, is to:

Divide the system into layers / modules
Each person on the team is assigned a module (hat with a name)
Then try and do things (use cases), say login a message (piece of paper) with the username and password is given to john (the UI) which gives it to James (the business layer) ....

You cannot do this for everything, it would take too long. But if something is overly complicated it should show up here, or if someone gets a message an says "I do not know what to do with this" it is an indication that something is missing.
On the technical side, if it is technology that we have not used before, we will build a proof of concept of a thin vertical of the system. This also serves as an example to the coders of how to program the system.
Answer: Use cases are your friend. They help you figure out where all the data needs to live, and what messages need to be passed between modules. If you see too much data is being passed, it may be time to redraw the boundaries of your modules.
Prototyping is also helpful. It's coding but it's usually throwaway. This is another good way to catch the gotchas that you missed. These tend to be more technical issues that you've overlooked in your model... threading issues, IO issues, data structure choices.
Comment: To evaluate a design I'd rather go with the name "tracer bullet" insstead of prototype as a lot of people think "UI-prototype" and a UI-Prototype will rather not evaluate your application design.
Answer: I'd say no, no real methods, it's something that comes with experience.
The problem with early peer review is you end up optimizing the wrong problem.
You optimize for a problem as far as you understand it, and then the business comes along and changes the requirements on you.  You end up wasting that expensive review resource.
Answer: This guy does a great job explaining why you don't spend forever "trying to get it right" the first time.. starting at 1:30 or so
Answer: We create prototype and collect feedback from users.  You can create prototype with paper & pencil, or with prototyping tool.
There are many prototyping tools in the market, ForeUI is our favorite, it can export the prototype to DHTML so that everyone can review it.


What is the benefit of turning off Gain Exp?

Question: In the menus, under Tactics > Config > Difficulty, there is a setting for "Gain EXP" which I can turn Off or leave On. Since all my characters are at Level 99, there doesn't seem to be any point in gaining experience. Is there any benefit to turning off experience gain, such as additional JP or GP gain?
Comment: I doubt there is any. This is not the first JRPG to have this option either. It's just to provide an extra layer of challenge - to ensure you don't overlevel. But since you are at max level, this option becomes meaningless (this is all assumption based on past experience)>
Answer: I had to use it when I was low on money, but already too high on XP for the game to be fun. Or when I was farming JP.
Sure, some people love to curbstomp bosses, but when you don t have any of the Eggs, just remade all your party for new job and need a lot of money, it s useful to turn of XP, farm JP and money, and when you have all the capacity you want and enought money to buy new shiny equipement, turn it back on and have a fair fight against the boss.
This become obsolete when you have Eggs or (as you and I now) are lvl.99.


What should I be looking for in a used iPod touch?

Question: I am considering buying a used iPod touch. I really don't know too much about buying used iPod touches. What should I watch out for when I am looking at used iPod touches? (If it makes any difference, I am going with Craigslist rather than Ebay)
Comment: Return period and ability to know the seller / get in contact if you take it in to the store for a checkup once it arrives. Also see what the repair costs are if it does need a repair after you buy it. Not all sellers are bad, but do your homework on the social end / worst case so you'll know if you want to buy locally or can risk another sale.
Answer:
First thing to look for is whether the unit has suffered water
damage. All Apple devices have two moisture sensors. One in the
headphone jack and the other in the cable connector port. They will
colour pink or red on water contact:

The next thing is the physical condition of the unit. Scratches,
scuffs, or other physical signs of trauma. This one is rather
intuitive, but what people don't often look for is 3rd party repair using shoddy parts. Look for bulges in the seal around the screen or scratches on the screws (which are signs the unit as been opened). A keen eye can find these discrepancies, and if you do, steer clear. Knock off, aftermarket displays (or so-called OEM replacements) don't have the same capacitative capabilities that the original units do.
Check the battery next, make sure it charges and shows the correct
charge/not charging icon. If the unit responds when a cable is
connected and disconnected, then there likely won't be any damage to
either the internals, the battery, or the connector.

At the end of the day, trust your gut. If it even smells like too good of a deal, walk away. Ideally, it would be great to find a unit that is still under warranty and then extend that warranty with Apple Care. Another avenue would be to look to Apple's website for refurbished products. They all come with the same warranty as all new Apple products. Honestly, this would be the way I would go about it. You will get a "like" new product at anywhere up to a 30% discount. Like this 64 GB iPod Touch.
Comment: Yes, I heard of that scam. A few people got hit. What's the say? "A fool and their money..." ;)
Comment: Thanks so much! I've thought about getting a refurbished one, but I can get a used one for much cheaper. :-)
Comment: No problem. Apple devices really hold their value and for the most part, people will likely be selling them because they've upgraded. I'm sure most of the units you will look at will be mechanically sound. And good call to avoid eBay. I've received far more knock-offs than genuine products through that service, even despite the ads assuring me they were "100% genuine."
Comment: Well, I definitely won't be buying anything from a parking lot, let alone Ebay. [Here's](http://news.cnet.com/8301-17852_3-20099564-71/woman-pays-$180-for-wooden-ipad-its-fake/) what I'm talking about.


What is the most efficient way of storing complex, self-referencing tree structures in an SQL database?

Question: I'm aware of and have used two methods in the past for basic tree structures: adjacency lists and nested sets. I understand several pros and cons to these approaches - e.g., that adjacency lists are quick to update but slow to query, that nested sets are the opposite (slow to update, quick to query).
However, I require the ability to store more complex tree-like structures. The best way to describe this is using human family relationships. My first thought was that each element could have both a "ancestors" tree and a "descendants" tree. However, there will be significant redudancy in this approach as, using the example below, both Cameron and Kelly will share all of Bob's ancestor tree (and updates will be even more time consuming, as an insertion to the tree will actually have to insert into multiple trees). My second thought was to include tree references. E.g., say that Alice has her own ancestor tree. Both the (4,5) element coming from Cameron's ancestor tree, and the (2,3) element coming from Kelly's ancestor tree would simply reference Alice's ancestor tree. This second approach requires less data storage, would experience faster updates (only an update to a single tree vs. multiple trees) and would retain the speed advantages of querying a large tree structure (although the SQL to query such a self-referencing nested set is rather complicated). However, a drawback to the second approach is that the data becomes "fragmented" (much like inodes on a hard drive).
 A = Alice
 B = Bob
 C = Cameron
 J = John
 K = Kelly

+------------------------------------------+

  +-----------+            +-------------+
  |(2) Bob (3)|            |(4) Alice (5)|
  +-----+-----+            +------+------+
        |                         |
        |                         |
        |                         |
        |                         |
        |    +---------------+    |
        +----+(1) Cameron (6)+----+
             +---------------+

  +-------------+            +------------+
  |(2) Alice (3)|            |(4) John (5)|
  +-----+-------+            +-------+----+
        |                            |
        |                            |
        |                            |
        |                            |
        |      +-------------+       |
        +------+(1) Kelly (6)+-------+
               +-------------+

+------------------------------------------+

           +-------------+
           |(1) Alice (6)+----------+
           +-+-----------+          |
             |                      |
             |                      |
             |                      |
   +---------+-----+        +-------+-----+
   |(2) Cameron (3)|        |(4) Kelly (5)|
   +---------------+        +-------------+

For the second approach, I am visualising multiple nested sets stacked in front of one another, with certain nodes "drawing a line" along the z-index to a node on another plane.
Note that the above is just an example - I'm not actually storing human relationships, but I am storing complex tree like data. There are many reasons to store such complex hierarchical structures, so I'll let you imagination run wild!
The question: What is the most efficient way performance wise (updates and selects) of storing complex, self-referencing tree structures in an SQL database? I'm specifically referring to PostgreSQL, but if you have alternatives (even to SQL itself), I'm open to hearing that as well.
Comment: Have you considered a Graph database, like Neo4J?
Comment: possible duplicate of [What are the Options for Storing Hierarchical Data in a Relational Database?](http://stackoverflow.com/questions/4048151/what-are-the-options-for-storing-hierarchical-data-in-a-relational-database)
Comment: Are you using a DBMS that supports recursive queries (so essentially anything but MySQL?)
Comment: Updated question to reference PostgreSQL as the database in use.
Answer: In Oracle this can be achieve by using start with .. connect by. Also known as Hierarchical Queries.
for example:
select *
 from <table_name>
 start with <parent_column_name> is null
 connect by prior <child_column_name> = <parent_column_name>;


Require file in google cloud storage from google cloud function

Question: Is it possible to require directly file in storage from google cloud function with the same project_id? without creating the HTTP request
Answer: Cloud functions can respond directly to change notifications coming from Google Cloud Storage. You can check all the relevant documentation here and an HTTP trigger is not needed.
If what is required is to do some operations with a file (object) stored in Google Cloud Storage using Cloud Functions please refer to the Cloud Storage Client Libraries section. Find an example here using the Python Client for Google Cloud Storage.


Are the transitions between the different brain frequencies states easy to see on an EEG?

Question: Are the transitions between the different brain frequencies states: Gamma to Beta, Beta to Alpha, Theta to Delta, etc. easy to distinguish on an EEG? How quickly can the brain transition between any of these states?
Answer: Delta/theta/alpha/beta/gamma are not different states and so there are no changes "between" them. These are terms used to label different bands of the frequency spectrum. Every EEG has energy in all of these bands. Brain state can change/be measured by the relative changes in different bands (either relative to each other, or in absolute power change over time), but there is always some energy in every band.
Here are some example spectra from different brain states (stages of sleep and anesthesia states) across different brain regions:

(from Banks, M. I., Krause, B. M., Endemann, C. M., Campbell, D. I., Kovach, C. K., Dyken, M. E., ... & Nourski, K. V. (2020). Cortical functional connectivity indexes arousal state during sleep and anesthesia. NeuroImage, 211, 116627. Disclosure: I am an author on this paper)
WS and WA refer to "wake" in the sleep and anesthesia experiments respectively; N1, N2, and REM are stages of sleep. S refers to sedated under anesthesia - subjects can still respond to commands, and U refers to unresponsive under anesthesia. These are actually not from EEG but from electrocorticography where the electrodes are placed directly on the brain, sometimes called iEEG, but there are a lot of similarities with EEG.
You can see that in all brain states, there is energy across all the frequency bands (identified with Greek letters), but there are changes with state. For example, delta has more power during N2 sleep across the brain. A trained eye could also easily pick this up in the time-domain EEG signal, but it's much easier to convert to the frequency domain like in this figure.
You'll notice that the energy decreases with increasing frequency. This is normal, and is typical of natural frequency spectra with certain properties, see Pink Noise; it's rare to ever have less power in the delta band than any other band, for example. You will also see that for the most part the spectra are gradually changing: there are few peaks in the spectrum, and it can be a bit misleading to refer to energy in a specific band or to compare between bands when there is no peak there. Some exceptions are that there is typically a peak in the alpha band for humans, especially with eyes closed. Hippocampus tends to generate rhythms in the theta band, and rodents have very large hippocampus relative to the rest of cortex, so you'll often see a theta peak in rodents especially during locomotion.
Lastly, these EEG differences are probably not the best way to discriminate between different brain states. There are lots of other measures that seem to do better. In the rest of the paper that I've taken this figure from, my colleagues and I use a specific measure called the weighted phase lag index which does a much better job at discriminating between putative conscious and unconscious states.


how do I load a single page in a sub theme?

Question: I am creating a page in a Drupal website of mine so that I can use it for a custom iframe in a Facebook app. The reason for this is that Facebook uses 520 instead of 960, and I was wondering if there is a way to create a separate sub theme that would be used for a single page on my Drupal site.
Answer: Take a look at the ThemeKey module.  From the project page:

ThemeKey allows you to define simple or sophisticated theme-switching
  rules which allow automatic selection of a theme depending on current
  path, taxonomy terms, language, node-type, and many, many other
  properties.
Answer: Why an entire new theme? You can have body classes or page templates based on node id or content type. I would use the nid to have a different page template with different markup or you can have something like:
.node-56 #container{width:520px}

or
.node-type #container{width:520px}

Look at: http://drupal.org/node/1089656 for template suggestions
Answer: There is a global variable $custom_theme. Set it in a module or template.php:
function masqtheme_init() {
  // url is facebook url, or referrer ...
  // if (strpos($_GET['q'], 'facebook') !== 0)
   global $custom_theme;
   $custom_theme = 'mycouncil';
  }
}

drupal api theme
This works in drupal-6 and drupal-7. In drupal-7 if playing with global variables has bad side-effects or feels dirty use:
hook_custom_theme()

instead. This returns the name of the theme for a specific page call. Mobile sites without mobileswitch are another case where we have used this.
Printing facebook canvas is a similar problem to displaying in a modal or print version of the site. The same result can be achieved by using a specific template e.g. page--facebook--news.tpl.php. Implement hook_theme() and hook_node_view(). You copy the existing page.tpl.php and remove the 'furniture' that you don't want.


Getting internet browsing history from shell

Question: is it possible to use the shell or generate a shell script to find out the browsing history from the browsers installed on the system? thank you
Comment: For which browser?
Answer: Example for Firefox:
The history can be found in a database table in places.sqlite in SQLite format 3:
$ file ~/.mozilla/firefox/rsbxl7fx.default/places.sqlite
~/.mozilla/firefox/rsbxl7fx.default/places.sqlite: SQLite 3.x database, user version 26

rsbxl7fx.default
Depending on your profile

To view the history you need to install sqlite3:
sudo apt-get install sqlite3

Start sqlite3 with
sqlite3 ~/.mozilla/firefox/rsbxl7fx.default/places.sqlite

and list eg. all tables:
sqlite> .tables
moz_anno_attributes  moz_favicons         moz_items_annos
moz_annos            moz_historyvisits    moz_keywords
moz_bookmarks        moz_hosts            moz_places
moz_bookmarks_roots  moz_inputhistory

Or the history with:
sqlite> SELECT datetime(a.visit_date/1000000,'unixepoch') AS visit_date, b.url FROM moz_historyvisits AS a JOIN moz_places AS b ON a.place_id=b.id WHERE 1 ORDER BY a.visit_date ASC;

Example for Chrome:
The History is a binary file in SQLite format 3:
$ file ~/.config/google-chrome-beta/Default/History
.config/google-chrome-beta/Default/History: SQLite 3.x database

google-chrome-beta
Depending on your version of Chrome
Default
Depending on your profile

To query the database, Chrome must be completely closed. Or you have to  create a copy of the file and use that copy.
To view the history you need to install sqlite3:
sudo apt-get install sqlite3

Start sqlite3 with
sqlite3 ~/.config/google-chrome-beta/Default/History

and list eg. all tables:
sqlite> .tables
downloads             meta                  urls
downloads_url_chains  segment_usage         visit_source
keyword_search_terms  segments              visits

or to see all URLs:
sqlite> SELECT * FROM urls WHERE 1;

For all examples; alternatively, a GUI may be used:

sqlitebrowser
sudo apt-get install sqlitebrowser

and start with:
sqlitebrowser ~/.config/google-chrome-beta/Default/History
sqlitebrowser ~/.mozilla/firefox/rsbxl7fx.default/places.sqlite

sqliteman
sudo apt-get install sqliteman

and start with:
sqliteman ~/.config/google-chrome-beta/Default/History
sqliteman ~/.mozilla/firefox/rsbxl7fx.default/places.sqlite

Comment: @LjinKazama Were you satisfied with my answer? Then give me an upvote (∧). If I could solve your problem, then it would be nice if you'd mark my answer (✓). http://askubuntu.com/help/someone-answers ;)
Comment: Just to help anyone out, when you view the database in either of these you will want to view the << moz_places >> table (version 38.8 ~ debian 8 'Jessy').
Answer: As far as firefox goes, there is .mozilla/firefox/********.default/ directory , where ****** is some number unique to your install. For me that is qgided18.default . According to https://askubuntu.com/a/412890/295286 places.sqlite file is the one that contains browsing history. You can use cat to view files, but it will be gibberish mixed with text. For actually reading it, use A.B.'s suggestion on installing sqlitebrowser
Answer: browser-history - external history of web browsers, such as netscape
The service must be added to startup scripts, and you may view the traffic recorded so far by viewing ~/.browser-history/history-log.html. However, this will not give you previous history.
Comment: @A.B. Its not useless, he meant the file location of the history file in the filesystem (I edited it)


Index was outside the bounds of the array

Question: Friends
I have got an error which tells "Index was outside the bounds of the array"  I dont know y it was happening since after completeting the for loop  and entering the loop fresh again it was showing the variable value when exited from the loop before.
        int[,] arrScr = new int[lstTest.Count, cnt2 + 3];
        string[,] arrName = new string[lstTest.Count, cnt2 + 3];
        int p;

        for (i = 0; i < lstTest.Count; i++)
        {
            using (DataTableReader dtr3 = ds.Tables["scord_mark_table" + (i + 1).ToString()].CreateDataReader())
            {
                p = 0;
                while (dtr3.Read())
                {
                    arrName[i, 2 + p] = dtr3[15].ToString();
                    for (int k = 2; k < 12; k++)
                    {
                        arrScr[i, 2 + p] += Convert.ToInt32(dtr3[k].ToString());
                    }
                    p++;
                }
            }

Comment: It seems very odd that you should have an exception showing on that statement anyway. Can you please show us your complete code (as text rather than as an image)?
Comment: I'm sure the part hidden by the exception message has something to do with it :P
Comment: Its just plain count-index mismatch. ensure you have enough items inside the array. Do some conditional logic before you access array
Comment: Green , sorry to ask you does arrName matter to the problem.
Comment: nope I was thinking that arrName is behind that exception before you post the code :)
Comment: John, sorry it was because dtr3[12] was returning null. But I dont know why the error flag was set on for loop instead of the the actual problem  statement above.
Answer: Change k <= 12 to  k < 12.
If this is not the cause of your problem you should rewrite k <= 12 to  k < 13 as that is the convention most coders are used to read and write.
Comment: But thats not whats causing this error. Its just that somewhere index to some array doesn't match with the actual count. Even if k = 13 wont enter inside for loop.
Answer: What is in dtr3[12]?  does it return null?
What is the value of cnt2?
Answer: This means that your array does not contain as many elements as you are trying to access.
Answer: It's going to exit from the loop as k = 13 because the last valid value of k is 12, then it went through the loop, executed k++ (making it 13). At which point it fails the condition because 13 > 12 and that's when it actually exits.
Comment: But thats not whats causing this error. Its just that somewhere index to some array doesn't match with the actual count


What are the scratch marks on the undersides of my tomato fruits?

Question: I am seeing scratch like marks on bottoms of my tomatoes.
 What is causing this? Possibly chipmunks?
I have tried eight solutions with no results.
Comment: Please add some photographs of the damage. Also, what does "eight solution" mean? A Google search doesn't show anything related to gardening. Thanks!
Comment: @NiallC. I understand "eight solutions with no results" like: he/she was trying differents methods to avoid the scratches but they continue appearing. +1 for pictures.
Answer: You are likely seeing either stretch marks from the fruits swelling, which is normal, or flower scars on the underside, which are very apparent on large tomatoes as thin, brown lines which criss-cross or star on the bottom of the fruit.
Neither of these drastically affects fruit quality, and are untreatable. Almost all large tomatoes have these marks.
Answer: Can you better describe the scratch marks?  Do they go through the skin into the fruit or are they just surface, cosmetic damage only?  Are they two parallel gouges or scratches, or multiple lines of scratches? How large are the scratches? If you are seeing two parallel gouge-type scratches that go into the fruit, you are almost assuredly looking at rodent damage.  It could be anything from voles, to chipmunks or squirrels, or woodchucks, or field mice or rats, depending on what you have wild there and how big the scratches are.
Birds will also attack ripening tomatoes, but the damage they do is usually more along the lines of making holes in the fruit, rather than just creating scratches.
If the damage is cosmetic only, confined to the bottom of the fruits and does not penetrate to the inside, then you are probably looking at the stretch marks mentioned in the other post.  Some varieties of tomatoes are more prone to those than others are as they mature, especially in the summer when the heat makes the skins tougher.  When it rains or the garden is watered, the fruit will soak up the extra moisture, but because the skin is tough, it will cause minor cracks and marks due to a lack of elasticity to hold the expansion of the "meat" of the fruit inside.  Sometimes the fruit will even crack open for the same reason.
Pictures would definitely help all of us do a better job of guessing what you are dealing with.