Do I get another chance to recruit any characters?

Question: During my play through of Fire Emblem: Awakening I came across a character that was a recruit able but she ended up being taken out through some unfortunate circumstances. In case it is relevant it was Tharja during a sequence in Chapter 9. Is there any way for me to recruit this (or any missed character) through some other means? Or if I miss the opportunity is it impossible for me to get that character through normal means?
Answer: Sadly, those characters only give you one chance to recruit them.  If you don't have the correct person talk to them, then you can't recruit them.
Note that this is true even in Casual mode; Casual only flags your characters as unable to die.  Until you recruit them, you can definitely kill them, so be careful if you're trying to get everybody.
One thing to do at the beginning of each mission is to run through every enemy; a recruitable characters will have a name and a unique portrait, and not be the boss.  Bosses cannot be recruited except through story means, so there's no need to be careful with them.
When you find a character you can recruit, tap their name; it will often give you a hint as to who needs to talk to them to recruit them.  Usually it's Chrom, but it might be someone else.
Awakening also has a neat feature where if the person who can talk to them is within movement range, they'll have a "Talk!" icon above their head when you try to move that person.  That's new to Fire Emblem; previous versions meant you had to move a person beside the recruitee, and see if a Talk option was available.  If not, cancel, and choose the next character.  That still works in Awakening, but they make it easy on you with the icon.
Comment: The nice thing about Awakening is that you never have that situation where you don't have the right unit to recruit a new character with, because Chrom is always the correct unit to talk with and you're forced to bring him in every mission.
Answer: No. There is no way to recruit characters you missed at a later time.


Some SSH user authentications fail amid a large flurry of such authentications

Question: I am working with a cluster of 20 hosts, all running CentOS 7.3.
I am attempting to create an automated test to check that:

Our expected network connectivity is in place
Our SSH Single Sign On (SSO) solution is working

The expected network connectivity is very simple: It's a single, flat subnet. Every host should be able to reach every other host.
Our SSH SSO solution (FreeIPA) uses Kerberos to authenticate users, and it uses SSH public keys to authenticate hosts. A user's Kerberos Ticket Granting Ticket (TGT) is set to forward to any host that user connects to using SSH.
The test is very simple:
Have every host try to use SSH to execute hostname as a remote command on every other host.
To do this, I use a utility named pdsh.
In a nutshell, this utility uses SSH to execute a remote command on a set of hosts. It does so in parallel by spawning a thread for each host and in each of those threads, executing the command ssh  .
My use of this command is as follows. On a machine that is not one of the 20 cluster hosts, I execute this command:
pdsh -g all 'pdsh -g all "hostname"'

-g all specifies that the remote command should be run on all of the cluster hosts. As stated, I have 20 cluster hosts.
The command to be executed on every remote host is:
pdsh -g all "hostname"

So, as stated above, every host tries to execute the command "hostname" on every other host as a remote command via SSH.
So, this results in 20 invocations (one per cluster host) of:
ssh 'pdsh -g all "hostname"'

In turn, this results in 20 * 20 = 400 invocations of:
ssh <hostname> hostname

So, I've got a total of 20 + 400 = 420 SSH authentications occurring within a very short period of time.
The problem I'm seeing is a small handful of authentication failures. The hosts on which the failure occur are arbitrary. There's no rhyme or reason. A failure looks like this:
host-5: host-3: Permission denied, please try again.
host-5: host-3: Permission denied, please try again.
host-5: host-3: Received disconnect from UNKNOWN: 2: Too many authentication failures for myuser
host-5: pdsh@host-5: host-3: ssh exited with exit code 255

I have the following configured in /etc/ssh/sshd_config to allow for many to-be-authenticated sessions to exist simultaneously:
MaxStartups 500:30:600

Note that this is way overkill--it accounts for the number of authentications going on across the cluster, but it really only need account for the number of authentications occurring on a given host. So, I think the problem lies elsewhere.
So, in summary, I've got a large number of SSH user authentications occurring via Kerberos across a cluster of 20 hosts in a very short period of time. Random failures of user authentication are occurring.
Why might such user authentication failures occur?
Comment: Did you find a solution to this problem?
Comment: Never did, and have moved off of the project.
Answer: If your re-opening SSH sessions to the same hosts I'd recommend to use control master connections. Basically an authenticated session is held by client and server avoiding repeating authentication.
See also: ssh_config(5) -- ControlMaster


Can you know when Power Button is pressed?

Question: I would like to know if I can make an app running on background that detects when power button is pressed and runs a app action that can ignore power button actions. Thanks
Comment: Do you hate your users?
Comment: If I press the power button and it doesn't do what the power button does, my first instinct is to track down the person responsible and set them on fire.
Comment: I actually love them
Comment: Only prevent power button to shutdown and you can still shut it down if you, for example, put the correct pin
Comment: Sounds like your objective is already served by whatever iOS has for public-use terminals.  Tho preventing people from turning off public terminals is something of low consequence, generally.
Answer: A stock (i.e. not jailbroken) iOS device's apps cannot interrupt the power button.
You can do some actions when the app is exited using applicationDidEnterBackground. If you need to prevent users from exiting an application for something like a kiosk, you can turn on Guided Access mode.
Comment: @PedroGomes The best security for lost/stolen phones is findMyIPhone - You can set the option that gets the phone to update it's last known location before it is turned off/goes flat and this also enables activation lock so the stolen phone is useless without the corresponding iCloud account password
Comment: So not possible unless jailbroken? This is for security reasons only, and would prevent stolen iPhones from shutting down and then they could be found. But thanks for your answer, appreciate it!
Comment: @PedroGomes No, not possible. You may wish to use it for security reasons, but you can imagine that such a feature could be nastily abused by a malicious app developer who slipped a time bomb into their app.
Comment: True story, i always thought of it that way but i was never a iphone user so i could be missing out some funcionalities. Thanks again


Change windows IP configuration with public IP addresses

Question: In our office we have two internet connections. one for main use and one for backup. this backup connection equipped with WImax connection and cisco 800 series router.this is always ready to plug to the firewall. but i want to use this connection to connect one pc not the network. but this router IP is not local ip  how can i directly connect this router to my pc ? i tried to add router ip address as a default gateway but it's not working
Comment: We don't know enough about your network and PC setup to help you. There is no way for us to know how your office admin set it up. Therefore, you should ask the admin how to help you.
Comment: I do agree with CharlieRB.  It sound like you know enough to be a problem to the systems admin.  Like perhaps your company controls web access, but you know there is a spare router in the server room and you got a cable and a key.  Be careful, you could break something really bad.
Answer: Each router has two IP addresses.  Internal and External.  The IP 220.127.116.11 is not within the authorized internal range, so I must assume this is the External IP.  This is NOT the IP address you want to configure as the gateway.  You need to configure the INTERNAL IP of the router, which you do not mention.
Try to be complete in your problem description and your answers can be more precise.  Also, sometimes doing the research to put together a good question, you will find your own answer.
If the primary gateway has an internal IP of 192.168.0.1 you will see it when you do the commanb:

ipconfig /all

You can try using DHCP to pick up IP and gateway from the second Router.  You may need to turn DHCP  on.  But doing so can really harm the primary network if you somehow get connected.
It would help if you describe your situation perhaps "I don't have access to the router configuration" is the case?
The "secondary router" may not be a router, but a gateway, in which case, your ability to connect will be determined by the ISP.  They may provide DHCP, they may provide written parameters for you to set up your network (usually a router/firewall).  Be careful connecting directly to the Internet with a workstation.  You could get a nasty infection.  Remember, always use protection.
Comment: What did your Systems Administrator say when you asked her?


Please guide what should i do

Question: Am new in bitcoin world and didn't started it yet...
A man from USA saying to create blockchain wallet n top up then share ur email n wallet address not login not password to connect my wallet to a s9 machine for mining i 'll keep my money with me in my wallet he will create a node address to connect s9 ...I want know is it safe should I do it and if it's scam what is the real way to do it another question is mining profitable ?
Answer:
connect my wallet to a s9 machine for mining ... is it safe

No. You will lose all your money. He will use your fear of losing your money to trick you into giving him more money (e.g. private-key release fees) and more money and more money until you have nothing left to give. Then he will tell you to borrow more money from your family, from the bank, from loan sharks ...

if it's scam

It is a scam

what is the real way to do it

Spend a long time (at least an hour a day for a couple of weeks) researching Bitcoin and mining. Don't proceed until you understand private-keys, public-keys, seed-phrases, recovery, different types of wallet, watch-only wallets, principles of mining and so on.
Read the answers to all these questions to innoculate yourself against scammers
Then buy a hardware wallet or download a good stand-alone wallet.
Buy a small amount of Bitcoin from a well-known exchange
Practice recovery of your wallet as if your hardware-wallet or computer is stolen. Don't proceed until you have proven you can recover full control of your bitcoin only using the recovery phrase without touching your existing wallet hardware or computer or  mobile-phone.
Write down instructions for your family to recover your money if anything happens to you. Make them follow your written instructions without any help from you and see if they really can. If necessary create a new wallet with new keys and transfer all your Bitcoin to the new wallet. Update your saved recovery phrase etc.
Never share your wallet-password, recovery phrase or private-key with anyone (unless they are someone you'd be happy for them to walk away with everything you own tomorrow). Never let anyone else log in or remotely access your computer or your wallet to help you, even if they seem to be the most honest person in the world, especially if they suggest you can secure your wallet afterwards by changing a password.
After becoming comfortable buying and using bitcoin for several months, re-think about mining, if you have a few thousand dollars you can afford to lose totally, you are probably ready to consider whether the process is for you.

is mining profitable ?

Not unless you already have several thousand dollars to invest in ASIC mining equipment and a good source of cheap electricity in a building with very good air-conditioning and where noise does not matter. This isn't suitable for people new to Bitcoin. You must be prepared to lose that money without hardship.
Answer:
A man from USA saying to create blockchain wallet n top up then share ur email n wallet address not login not password to connect my wallet to a s9 machine for mining i 'll keep my money with me in my wallet he will create a node address to connect s9

To be clear: this is absolute nonsense, what he is describing has NOTHING to do with how mining actually works. He is just trying to scam you by gaining access to your wallet.
I suggest taking a look at this question: I am new to Bitcoin, how can I get started?

Please guide what should i do


Shakespeare chose Hoist, why not be more grammatically correct with foist?

Question: Shakespeare used the term Hoisted in Hamlet with the line "hoisted on his own petard" and there are many responses already to why he did so, most make a good arguments for the proper use. Foist is defined as to impose an unwelcome or unnecessary person or thing on. Seems to me, that being blown up by your own device would be a somewhat unwelcome event! If a character is working events to bring about the demise of a malefactor, foist just seems most appropriate. What say ye?
Comment: Shakespeare is always right.
Answer: hoist by/with (one's) own petard TFD

To be injured, ruined, or defeated by one's own action, device, or
  plot that was intended to harm another; to have fallen victim to one's
  own trap or schemes. (Note: "hoist" in this instance is the simple past-tense of the archaic form of the verb, "hoise.") I tried to get
  my boss fired by planting drugs on him, but I was hoist by my own
  petard when the police caught me with them beforehand.

SEE:  wikidiff.com for a detailed explanation. To hoist is correct for self imposed actions. to foist is better when imposed upon someone or something. And yes, Shakespeare is always right!


Does the current in adjustable voltage regulators changes?

Question: I'm looking for voltage regulator which gives an output voltage of 3.5V and output current of 3A. I found one adjustable voltage regulator MIC69301/2/3 which says, it gives 3A output current and support currents of 1A, 1.5A, 3A, 5A with an input voltage range of 1.65V - 5.5V.
Does it mean that giving any current value as input at specified voltage to the voltage regulator, give the fixed output current of 3A and desired output voltage based on the voltage divider circuit at the output.
Does the voltage divider circuit has no affect on the output current?
Comment: You can't control both current and voltage at the same time. That's not how physics works. So, if it's a voltage regulator, it will control the voltage. It will draw as much current as it needs from the input, and it will offer, up to its maximum current, as much current as whatever you connect to its output draws.
Comment: Only effect on current is self heating from  v drop* I
Answer: This shows a common misconception about regulators. You can't control the current, and voltage at the same time, and this is why:
Think about your regulator like a water valve. The water flow is current, and the pressure is voltage. You can buy a regulator that controls current, or voltage; but either way it's just a "valve" and the most it can do is go all the way open, or all the way closed.
Switching regulators are more complicated, but we won't get into that now. Suffice to say, you can't control output current and voltage with those either.
So back to the "valve". From this analogy, you can see there's a few things your regulator simply cannot do.

If there's not enough pressure or flow available at the input, the regulator will open up as far as it can, but the target flow or pressure will not be reached. It'll just pass through whatever's available (with some losses due to the valve itself).
The pressure, and flow at the output are related directly to each other. If you force x gpm of liquid to flow, then the "push back" will by y psi. Your regulator can't do anything about that. It can try to control the flow into the output, or the pressure; but if it's controlling one, the other is being forced to a corresponding value.

Side note: A voltage regulator will also have a current rating. This doesn't mean it controls the current, it just means that if more than that current flows trough it, it will be damaged. You have to make sure that doesn't happen.
Comment: Although it has to be said that voltage regulators usually *do* control the current, i.e. they have a built-in current-limiting circuit, and they have a thermal shutdown circuit, and thus they don't normally get damaged by a short circuit on the output.
Answer:
Does it mean that giving any current value as input at specified voltage to the voltage regulator, give the fixed output current of 3A and desired output voltage based on the voltage divider circuit at the output.

No. The regulator will try to keep the output voltage constant at 3.5V, but the output current depends on the load.
The regulator specifies a maximum drop-out voltage of 0.5V, so you have to supply at least 4V at the input.
Remember that you also have to consider the power consumption. Lets assume that you supply the regulator from Vin = 5V:
With Poutmax = 3.5V * 3A = 10.5W
you would require a source that can supply at least
I = 10.5W / 5V = 2.1A
assuming 100% efficiency to get the max rated output power. In reality you would probably require at least 10-20% more.
Comment: Whether the APC pin of MIC69301/2/3 should be given Analog or DC supply?
Comment: Thanks for your time. Can I know what is the use of flag pin. If it is not that to be concerned can I keep it as unconnected ?
Comment: @Mounika: The "error flag" pin is an open collector output. You can leave it unconnected if you do not intend to use it. Otherwise connect a pull-up to Vout, "low" indicates a fault condition.


Sort list by content type

Question: We have a list grouped by content type:

Now we want to sort our groups by the order of our list content types. Is this possible?
The possibility of sort from a-z would also be enough.
Answer: I am aware that you can group by content type via SharePoint Designer by substituting the name of an existing grouping field in a programmatic fashion (More information may be found on this site).
I am less clear as to whether doing this makes the new 'content type' field reusable for sorting purposes.
Another means of going about actual sorting is mentioned on this second website.
Basically this involves either:

Turning on metadata navigation in the library, or
Using search refinement

Sort list by content type


Usage of "the cubalow" - Has anyone heard the phrase?

Question: When I was a child in the 1950s I remember my mother calling the domestic hot water tank 'the cubalow', sounding like 'queuebelow'.  Has anyone else heard this word being used?
Comment: Relevant: [etymology of ***cubby*** / ***cubbyhole***](http://www.etymonline.com/index.php?term=cubbyhole&allowed_in_frame=0). I really have to imagine *cubalow* is etymologically related to *cubbyhole*; possibly the water heater was cloistered in a small, dedicated closet or shed.
Comment: Was it the tank only or the hot water heater/furnace as well?  A **cube** was a furnace shaft and **alow** (in Yorkshire) meant 'ablaze, on fire'. Kilns were said to be 'alow'.
Comment: Are you sure the word was not 'cupola'?
Comment: Sounds like queuebelow, so don't think it could be cupola or a corruption of it.
Comment: @PeterDunning My dictionary defines a *cupola furnace* as *a cylindrical furnace for refining metals, with openings at the bottom for blowing in air and originally with a dome leading to a chimney above*. Do you really think your mum had such a device in the house? I tend to the idea of *cube alow* as more likely.
Comment: This [2005 (US) National Park Service report mentions "cubalow"](https://www.nps.gov/parkhistory/online_books/caha/bilss_hsr.pdf) on p. I.B.6 (sequentially, p. 36), and describes its use in a c. 1900 report as probably referring to "*the observation deck that straddled the roof of the 1876 Type station*". A quick search of the Dictionary of American Regional English ([DARE](http://dare.wisc.edu/search/node/cubalow)) didn't turn up any hits, because colloquialisms are more often spoken than they are written, leading to varied and inconsistent spellings when they are.
Comment: Where was your mother from?
Comment: It's entirely a new one on me. I have been around, in Britain, since the mid-1940s. It sounds like a brand name to me. But any attempts to Google it are drowned out with references to Cuba.
Comment: Mother from East Yorkshire, though her maternal  grandmother came from the Shetland Isles.
Comment: Is there any reason why you spelled it *cubalow*? You said it sounded like *queuebelow*. Did you ever see it written down?
Comment: No, I never did see it written down.  And never thought to ask my mother how to spell it, she's 96 and fit as a fiddle, I'll ask her when I see her later this week.  Cubbyhole, yes that could be right, immersion heaters are usually enclosed to make what I have always thought are called airing cupboards.
Comment: In the OED, under *cubby* there is an interesting reference to Orkney and Shetland, where it is said to refer to a straw basket. *1887   D. Donaldson Jamieson's Sc. Dict. Suppl.   Cubbie, a small cassie or basket, often made of heather.* I don't know what possible relevance that could have, but it was just that you said some of your mother's  ancestors were Shetlanders.
Comment: It's certainly not common usage in the US.
Comment: With the word being used in Yorkshire, the merging of cube and alow to create cubalow does seem a logical explanation.
Comment: Sorry, just heard 'cupola' on a website, sounds very much like my cubalow. And with the mention of a furnace there is clearly a 'heating' connection, thanks.  Similar to the cube and alow, so I think this/these could be the answer.
Comment: @PeterDunning The OED confirms *alow* as Irish and Northern English *In or into flames; ablaze, aflame. Freq. in to set alow. Also fig.* I can't find any reference to *cube* as a furnace shaft, however.
Comment: PeterDunning Did you ever find check with your mother? ['cupola' (at least in AmE)](https://www.merriam-webster.com/dictionary/cupola) sure sounds a lot like what 'queue-below' would. And the MW definition that @WS2 gave is tantalizingly in the same mechanical area as a hot water tank. But I could also see 'cubbyhole' working if she were referring to an enclosure for the tank. And though 'cube alow' sounds farfetched to me, in BrE it may very well be a common enough phrase. It all depends on what is really being referred to, the tank itself, some part of the tank, the location of the tank.
Comment: I can find [no evidence of 'cube alow'](https://books.google.com/ngrams/graph?content=cube+alow&year_start=1800&year_end=2000&corpus=15&smoothing=3&share=) at google ngrams. On the other hand, it seems [some water heaters have rooftop vents as cupolas](http://forum.heatinghelp.com/discussion/126632/80-vent-terminations-in-cupolas). But it would be weird to call the thing in the basement what is usually the name for the thing on the roof.
Comment: I've heard it maybe 3 times in 67 years.  Taken it to be a portmanteau of "cubbyhole" and "bungalow".
Answer: I found several instances of this word being used, but always as a small structure that is part of a building, not a hot water tank. Do you think that's possible?
The Yorkshire Post has an article about a Yorkshire dialect dictionary, and the author of the dictionary says this: " "In terms of accent, Tykes may all share some similarities, but the words are often peculiar to specific area. I had one woman write to me suggesting the word 'cubalow', it's a lovely word for a low cupboard in the kitchen and she thought it might have had it roots in cubby hole. I couldn't find anyone else who used it, and she did admit that it may have been specific to her own house. I love the thought of families making up their own language." He retells the same story for the BBC.
On Facebook, a US company that makes metal buildings shows a picture of a barn they made with a "3x3 [foot] cubalow".
A website that gathers information important to Ontario, Canada, tells a story about fire towers that have cubalows: "After the big fires the government contracted wooden fire towers to be built on the higher areas." " The first lookout on Green's Mountain was a one storey shack with a 7' square windowed cubalow (i.e., cupola) for a 2nd storey.
In 1821, a town in northeastern United States added a porch to their meeting-house instead of a cubalow.
You can find these articles by googling "cubalow" -cuba (that is, your word inside double-quote marks, and then a minus sign next to the word 'cuba').
Comment: Thank you very much everyone, and it looks as though the article from the Yorkshire Post is very helpful Katherine.  I had expected very little interest in my question, I thank you all again.
Comment: It's a really nice word, I think i'm going to look for an excuse to start using it in our house.
Answer: The Scholar's Companion has a lovely list of 'Improprieties Heard in Conversation', which includes

Cupelo, for cupola

This afterword to a poetry book gives

Cupelo – cupola, a furnace

  and
   This French book about… stuff, seems to back up the 'furnace' association and also gives a spelling of 'cubilot' which I can imagine  giving rise to the 'cubilow/cubalow' spelling of the OP.

Interglot gives 'cupola furnace' as the direct translation from the French of 'cubilot'and Google Translate confirms a pronunciation of approximately 'queue-below'.
My speculation therefore is this:

It is not many generations ago that Hot Water cylinders were an unknown thing in UK houses. My Grandparents in Lancashire certainly didn't have them in their youth.
Smaller Cupola furnaces look quite a lot like hot water cylinders
People who were familiar with cupola furnaces in their industry transferred the name to hot water cylinders.

So the next question is: what foundry industries in Yorkshire (or Shetland) might have been using the French word for cupola furnace?
or... (Once you get googling on a subject you find all sorts) it is just straightforward French usage for the fire box used to heat water. I found this image  which is captioned

la lessiveuse à bouillir sur son cubilot The washing machine to
boil on its cupola

The website this comes from appears to be about the history of a laundry.
So the real questions appears to be, how did Yorkshire women come to be using French laundry terms?
Answer: My mother, from Hull, East Yorkshire, always referred to the cupboard housing the hot water cylinder as the 'cubelow', pronounced queue-below. She didn't know why and couldn't spell it either.
Answer: My mother also used the word cubalow when talking about the ' airing cupboard' which is where the hot water cylinder was housed.  We also lived in East Yorkshire in a village near Hull.  I was a child in the 1940s.
Answer: I live in Beverley but came from Hull. I am 77 years old and my mother also used the word cubalow to refer to a hot water storage cylinder.
No clue where the word came from, though. My mother was born in Hull too, so there's no influence from other parts of the UK.
Comment: I *thought* I had heard it at least once before: I lived in Beverley and worked in Hull from the late 60s to the mid-80s. It must have been from that time. I wonder if it were a trade-name.
Answer: Instances of cubelow appear in geographically distant parts of Australia in 1875, 1890, and 1900. From Robert Bruce (of Wallelberdina, South Australia), "The Flies: A Puff for Professor Holloway)," in The Dingoes, and Other Tales (1875):

On them [sores on one's hands] the small flies revel fierce, / And with proboscis probe and pierce, / Digging small trenches all around, / Like engineers in hostile ground; / Causing each place to smart and swell, / And you to wish all flies in ——— / well , A baker's oven at red glow, / A lime-kiln or a cubelow.

From an auction notice in in the [Sydney, New South Wales] Evening News (March 5, 1890):

TO-MORROW, THURSDAY, March 67, at 11 a.m. sharp, To IRONFOUNDERS, DEALERS, ENGINEERS, MACHINISTS, and Others. Important and Unreserved Sale of MACHINERY and CASTINGS, comprising—Castings, Patterns in brass, lead, and wood, Drilling Machines, Grindstones, Boilers, Anvils, Vices, Smith's Tools, Cubelow Funnels. Avery's Weighing Machine. Patent Block and Tackle, with Girder. Also a quantity of Scrap Iron, Shafting and Pulleys, &c. Iron Safe, Letter Press, &c, &c.

And from an auction notice in the [Perth, Western Australia] West Australian (May 30, 1900):

To IRONFOUNDERS and OTHERS. SALE of CONTENTS of FOUNDRY, Corner of South Terrace and Suffolk Street. G. C. WAGHORN will Sell as above, under instructions from the owner, THIS DAY (Wednesday), at 2 o'clock sharp, a large quantity of Foundry Utensils, comprising—ENGINE AND BOILER, Fan and Cubelow, ton and a half Fringe Patterns, 3 tons Boxes for Castings, 2 tons Cast Iron (various), 6 sets Verandah Columns (complete), Patterns for Smelting Works (slag pots, etc.), 1 ton Verandah Column boxes (all new), 1 Lead Kettle and Mould Complete, a Variety of Wheel Moulds and other articles too numerous to mention; Tools, various kinds, for Foundry.

Matches for cupelo in the sense of "furnace" go back considerably farther in Australia, and fairly early in and the United States as well. For example, from "New Zealand: Wellington," in the [Melbourne, Victoria] Argus (April 3, 1858):

On Monday, tho 1st ult, the foundry recently erected by Mr. W. Mason, on Wellington terrace, commenced operations. Several castings were made, with perfect success. The present cupelo is capable of smelting from 10 to 12 cwt. of metal. The brass furnace will be in operation in about a week.

From an auction notice in the [Melbourne, Victoria] Argus (February 19, 1872):

KNIPE, GEORGE have received instructions from the proprietors, Ainley, Roberts, and Cochrane, 1 Little Lonsdale street  street east (in consequence of dissolution of partnership), to SELL by PUBLIC AUCTION, The whole of their plant and stock in trade, consisting of smiths' tools lathe, moulding boxes, cupelo moulding sand, benches, vyces, fitters' and fireproof safe makers' tools, steam-engine and boiler, fan, shears, and all the usual appliances for a general trade.

And from "Chickasaw Ironworks," in the Memphis [Tennessee] Daily Appeal (May 25, 1879):

An Appeal reporter, while wandering up-town yesterday, dropped into the Chickasaw iron-works, 93 Second street, and witnessed the process of casting. The red-hot, seething metal from the cupelo, carried in pots to the flasks and poured in amid sparks, smoke and flame, was a picture fit for the pencil of Rembrandt. The swarthy workmen, stripped and begrimmed with smoke and dirt, moved noiselessly but carefully around as the heated metal was carried about and poured into flasks or moulds.

These instances strongly support Spagirl's argument that cubalow or cubelow originated as cupelo (for foundry furnace) but was re-rendered as heard pronounced by various speakers (in Australia, at any rate). The hypothesis that a similar process of mishearing is responsible for cubalow in the sense of "water heater" or "water-heater enclosure" in Yorkshire remains to be proved and documented, but it would hardly be shocking if true.
Answer: Researching the term threw up the same answers as previous.  One other reference not yet alluded to is to be found at Page 3 Advertisements Column 4,Auckland Star, Volume XXXVIII, Issue 196  August 17th 1907.
The advertisement is aimed at Blacksmiths and is selling sundry items including 'cabalow'.  No description  is given more than this.
https://paperspast.natlib.govt.nz/newspapers/AS190708184.108.40.206
Comment: I could only get your link to work by removing 'beta.'
Answer: My Mother and Grandmother used the term cubalow when referring to the airing cupboard
Both were from Kingston-upon-Hull so I guess its origin is in East Yorkshire as others have indicated.
Comment: Welcome to English Language & Usage SE! Could you please improve your answer a bit by adding the time period you are referring to (your mother and grandmother)?
Answer: My mother used this for the airing cupoard/hot water tank - I was born in 1970's . "Cubelow" was supposed spelling.  East Yorkshire, Beverley near Hull. My parents didn't use much local vernacular, I thought this word was something she'd got from her Scandinavian heritage, but obviously not!
Answer: 'Cubalow' is also in Chelp and Chunter: How to Talk Tyke,

noun, (spoken in East Yorkshire): an airing cupboard [from an attempt to write down the word cubbyhole, I would guess]


max-height / max-width doesn't function in firefox and ie

Question: Im trying to create a gallery for my website, so i use max-height/width to resize the photo, and it doesnt work in firefox and ie. I also tried overflow: hidden, and didnt fix it.
You can view the problem (in firefox and ie) on my website -- http://guyzyl.org/highlights.html --, click on any photo to see the problem. Thanks in advance!
Comment: another way would be to calculate new sizes for the images. btw... there is an error in the js - a single s ;)
Answer: The problem is that you're assigning the wrong values to those properties. You're setting the width, for example, to "100%".  That percentage refers to the width of the container element, whose width is that of the whole window. The photo, which is offset on the left by that huge arrow thing, therefore spills off the screen to the right.
You should just use Firebug to play with the property values to come up with something appropriate. You should consider using a percentage to size the arrow control too.
Answer: <code>vertical-align: top;
</code>
on your image seems to help, however you should take the advice from @Pointy as what he said is correct.
Answer: Setting height with percentages is problematic. try using a pixel there, and also be aware that images are acting differntly when setting width and height than other block element.
I would use a max-height with pixel and set max-width with percents..
Comment: and also set vertical-align:top; @luca +1
Comment: I would like the image to resize based on the browser size, so that wouldn't work


How can I save my web access login on the iPod Touch?

Question: Whenever I try to use the internet on my iPod Touch the Log In screen slides up displaying the log in page for the internet service I'm utilizing (like you'd typically get at hotels, airports, etc). How can I save my login so I don't have to log in every time I wake my device?
Answer: This is included by Apple in the latest iOS. You want to list that network as Auto-Login in the preferences for that network.
When you are in range, you first have to go to the Wi-Fi Networks sheet in Settings.app, Press the white > with the blue circle and set your preferences for each network:

Auto-Login controls whether the log in credentials are saved, so turn that on. You don't need to enable auto-join, but it will reduce the taps to re-join this saved network if the device sleeps or is really out of range.
Turning on Auto-Login makes the device attempt to load www.apple.com and watches as you enter the wifi credentials needed for whatever web site is used to join the wifi network. Many open public sites are automated so don't worry if it sets itself up without prompting you at this point.
Answer: LastPass features a built-in browser that will automatically fill your login information for each of your saved LastPass sites.
Comment: This doesn't look like it will work. The log in screen pop-ups automatically for web, e-mail, app store, etc. So I'm assuming it wouldn't be redirected to the LastPass browser. And I'm guessing the screen uses Safari which LastPass doesn't work with. Can anyone confirm this?
Comment: LastPass doesn't integrate with the wifi settings. It looks to be what I use 1Password for - storing various web site log in credentials and having a mini browser embedded to automate the entering of that web password. It would be of limited use in storing the password for a web based authentication method for joining wifi but doesn't truly answer your stated question.


Does Ettercap exploit the Hole196 vulnerability?

Question: If not, how is an ARP attack possible on a WPA2 secured network?
Answer: ARP poisoning is basically when you declare your MAC address is responsible for an IP address, I think usually the router. So you receive all the victims packets in a "man in the middle" type attack. I read that WPA2 encryption happens at a layer below that of packet routing.
Google is your friend, there was already  a post regarding this on here: Is WPA2 WiFi protected against ARP poisoning and sniffing?
Also read this: http://community.arubanetworks.com/t5/Community-Tribal-Knowledge-Base/Analysis-of-quot-Hole-196-quot-WPA2-Attack/ta-p/25382 it explains why exploiting the Hole 196 vulnerability is not required to ARP spoof on a WPA/WPA2 protected network.


Calling a Stored Procedure dynamically using Groovy SQL

Question: I've a grails application service where I'm trying to call a stored procedure dynamically.
Here is a sample snipper of what I'm trying to do:
myService.callProcedure (procedureName, inputParams)

My stored procedure takes input and out params. How I can call a procedure on the fly without registering output parameters and then get all the output parameters as a ResultSet or something.
e.g:
def results = sql.firstRow("call $procedureName(?, ?, ?, ? .....)", inputParams)
where I would expect 'results' to have all out parameters returned by the procedure.
Is it possible?
Thanks,
Alam Sher
Answer: http://groovy.codehaus.org/Database+features
Scroll Down to the Stored Procedure Support


Is there a difference between merges in svn compared to git or mercurial?

Question: From my understanding SVN is 'Easy to branch. Difficult to merge'. Why is that? Is there a difference how they merge?
Answer: Please see my Stack Overflow answer for a very concrete situation where Mercurial (and Git) merges without problems and where Subversion presents you with a bogus conflict. The situation is a simple refactoring done on a branch where you rename some files.
With regard to tdammers answer, then there is a number of misunderstandings there:

Subversion, Mercurial, and Git all track repository-wide snapshots of the project. Calling them versions, revisions, or changesets makes no difference. They are all logically atomic snapshots of a set of files.
The size of your commits makes no difference when it comes to merging. All three systems merge with the standard three-way merge algorithm and the inputs to that algorithm are

greatest common ancestor version
version on one branch
version on other branch

It doesn't matter how the two branch versions were created. You can have used 1000 small commits since the ancestor version, or you can have used 1 commit. All that matters is the final version of the files. (Yes, this is surprising! Yes, lots of DVCS guides get this horribly wrong.)

He also raises some good points about the differences:

Subversion has some "voodoo" where you can merge from /trunk into, say, /branches/foo. Mercurial and Git does not use this model — branches are instead modeled directly in the history. The history therefore becomes a directed acyclic graph instead of being linear. This a much simpler model than the one used by Subversion and this cuts away a number of corner cases.
You can easily delay a merge or even let someone else handle it. If hg merge gives you a ton of conflicts, then you can ask your coworker to hg pull from you and then he has the exact same state. So he can hg merge and maybe he's better at resolving conflicts than you are.
This is very difficult with Subversion where you're required to update before you can commit. You cannot just ignore the changes on the server and keep committing on your own anonymous branch. In general, Subversion forces you to play around with a dirty working copy when you svn update. This is kind of risky since you haven't stored your changes anywhere safe. Git and Mercurial lets you commit first, and then update and merge as necessary.

The real reason Git and Mercurial are better at merging than Subversion is a matter of implementation. There are rename conflicts that Subversion simply cannot handle even thought it's clear what the correct answer is. Mercurial and Git handles those easily. But there's no reason why Subversion couldn't handle those as well — being centralized is certainly not the reason.
Comment: great answer! I'd upvote twice if I could. :) I'd also add that SVN book you refer to in SO answer [plainly admits](http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.branchmerge.advanced.finalword) that **"Subversion's merge-tracking feature has an extremely complex internal implementation..."** - this alone is a pretty good indication that feature is unreliable
Comment: ... and even with that extremely complex implementation can't figure out the common ancestor correctly in any but simple cases.
Comment: About delayed merges - don't get it - with SVN my coworker can update to/checkout trunk, and then merge from my branch into it.
Comment: @GillBates: I'm talking about a situation where you haven't started a branch for your work — when you're working on `trunk` in SVN. With a DVCS you can commit without sharing, but in SVN your `svn commit` will directly affect others who work on the same branch. Even if the two of us work on a branch in SVN, I cannot commit my work without having to immediately merge with your work. That makes commits somewhat scary — which is a scary property for a version control system! :-)
Answer: The core problem lies in the way these systems represent a versioned directory structure.
Subversion's basic concept around which the whole system revolves is that of a version (or, in svn lingo, "revision"): a snapshot of a file at a certain point. As long as the history is perfectly linear, all is fine, but if you need to merge changes from two independent lines of development, svn has to compare the current versions of both, and then do a three-way comparison between the last shared version and the two head versions. Lines that appear changed in one of the heads, but not the other, can easily be resolved; lines that deviate exactly the same way in both heads are harder, but usually doable; lines that deviate in different ways are what makes svn say "I can't figure this out, human, please resolve this for me."
By contrast, git and mercurial track changesets rather than versions. The entire repository is a tree of changesets, each one depending on a parent, where a parent changeset can have any number of children, and the tree root represent an empty directory. In other words, git/hg says "first I had nothing, then this patch was applied, then that patch, etc.". When you need to merge two lines of development, git/hg not only knows what each head currently looks like, and what the last common version looked like, it also knows how the transition happened, allowing for much smarter merging.
Another thing that makes merging easier in a DVCS is an indirect consequence of separating the concepts of commit and push, and of allowing all sorts of cross-merges between any two clones of the same repository at any time. With svn, people tend to commit large changesets with often unrelated changes, because a commit is also an update on the central repository which affects all other team members; if you commit a broken version, everyone is going to be angry with you. Since most setups involve a networked svn server, committing also involves pumping data over the network, which means committing introduces a considerable delay to the workflow (especially when your working copy is outdated and you have to pull first). With git and mercurial, the commit happens locally, and because both are very efficient at handling local filesystems, it usually finishes instantly. As a result, people (once they get used to it) commit small incremental changes, and then when it works, push a dozen or so commits in one go. Then when merge time comes around, the SCM has much more detailed information to go by, and can do a better job resolving conflicts safely and automatically.
And then there's the nice details that make things even easier:

You can have multiple heads and still commit on either; unlike subversion, you don't need to combine pull, update and merge before committing again - the multiple heads just stay that way until you choose to merge
Directories are not treated specially; instead, the path is just considered one large filename, and all your directories have to be at the same revision at all times. This means you can't do the subversion voodoo where a project's subfolders are at different revisions, but it also means the working copy is less likely to become a huge unmanageable broken mess, and more interestingly, a move isn't represented as a delete-and-add (which would break entirely in svn if it weren't for the retrofit metadata), but simply as a rename; if you move a file, its entire history is preserved; merging can even apply changes to the moved file that were made to a non-moved version of the same file after the move, in another branch
Most of the time, you actually don't even need to branch: instead, you just clone the entire repository. Cloning is cheap, especially if it's done on the same filesystem, and if you decide you want to get rid of the clone, you just delete the directory it lives in and that's that. You don't even need to use hg or git for that.
There are few (if any) restrictions on what you can merge. You can have six clones of the same repository, and merge (or rather, push or pull; an explicit merge is often not required) from A to B, then C to B, then B to D, then C to D, B back to A, D to E, at any time and as often as you like.
You can test a merge by cloning one of the repositories you want to merge, and then pulling into that from the other. If it does what you want, you can push back to the real target, if it doesn't, you throw away the clone and start afresh.
Comment: Now we're getting quite technical :-) Both Subversion and Mercurial track **copies**, not renames. Both systems track `rename a b` as `copy a b; remove a` and both do it in one atomic commit. The difference in merge behavior stems from different handling of corner cases and from Subversion allowing more merges than Mercurial and Git. Finally, Git **detects** renames at merge and log time — we're thinking of adding this in Mercurial too.
Comment: I have to mention some corrections and adds to answer: 1. SVN revisions are **global per-repository**, revision represent all files in repo in some moment 2. Merge technology are *basically* common in SVN and DVCS - if file in merge files *only changed the same way*, merge will produce the same amount of conflicts for SVN and DVCS - all SCMs still operate on string-level, not a logical block 3. Large commits in SVN isn't result of architectural weakness, but because users often are lazy idiots - they ignore basic patterns. Branch|merge works in SVN, if /dev/brain and /dev/hands work
Comment: Part 2: Smart merge in DVCS **mostly** happens because, contrary to Subversion, they track and handle moves|renames of files and SVN doesn't do it at all, thus - any operation, which process file, changed on one side and renamed on second, will fail. Branching with branches and with cloning are just different strategies of branching with the same rights to live, which to use "...depends from..."
Comment: @LazyBadger: Au contraire. Subversion *does* track moves/renames, which causes spurious conflicts partly because it's handling of renames in merge is simply buggy and partly because there are corner cases which are difficult or impossible to handle correctly. The later is why git (and mercurial copied it) by design does *not* track renames and guesses them when merging. Which works fine if the contents is still similar enough to be merged (which is when you need it) and does not do silly things otherwise.
Comment: @JanHudec - sorry, SVN handle not moves|renames at **atomic one action** (DVCS way - "rename"), but as "delete+...", thus - produce tree conflicts, where it doesn't happen in DVCS (*true rename*). Mercurial *track renames explicitly* (`hg mv` or `hg addremove --similarity...`), while Git uses heuristic, but both **handle renames**. I can get tree conflict even **with 1 string difference** in merged files! You have to re-learn some Subversion aspects, sorry.
Comment: @LazyBadger: I specifically avoided the term "handles" because that can mean anything. And for "track", git does not (ok, I didn't know that mercurial does).


Warning in eclipse for code formatting

Question: Is there an option for Eclipse to issue a warning when code formatting does not match the current settings?
Also, how to can I find the best standards for formatting Java code?
Answer: I'm not sure that it'll show a warning.  However, Eclipse can automatically format your code for you.  You can select all using Ctrl+A, then hit Ctrl+Shift+F to auto-format your code.
Also, to see the Java conventions, you can go to Window, Preferences, Java, Code Style, Formatter.  Then, under Active Profile, select "Java Conventions," which I think is the same as "Eclipse (built-in)".  You can see a short example of what properly-formatted code should look like.
You can also see the document in its full gory detail at: http://www.oracle.com/technetwork/java/codeconv-138413.html
Answer: Something like Checkstyle should suit your needs - you can configure the rules if required.
Answer: You can also setup eclipse to automatically format your code when saving files:
Window > Preferences > Java > Editor > Save Actions
Check Perform the selected actions on save, then check Format source code and choose to format all lines, or edited lines
Answer: View: "Window" -> "Show View" -> "Problems"
Configuration: "Preferences" -> "Java" -> "Compiler" -> "Errors/Warnings"
Answer: You might take a look at the HTML Tidy Plug-in. Normally, Eclipse only displays compiler warnings and errors, and the compiler couldn't care less about style. However, you can set certain style warnings under  Windows -> Preferences -> Java -> Compiler -> Errors/Warnings.
As far as guidelines go, there's this fairly comprehensive one published many years ago by Sun.
Answer: http://geosoft.no/development/javastyle.html#Layout%20of%20the%20Recommendations
Comment: pro - a fairly complete and readble convention. con - mixes formatting and nameing conventions and includes java language spec (like location of package and import statement). And some recommendations are controversial (postfix for class members names)

Warning in eclipse for code formatting


When updating to iPhone OS 3.0, will older apps be compatible?

Question: I am currently working with a device that has iPhone OS 2.2.1.
And as You all know that the OS 3.0 update is available for download.
I have downloaded the update and also read many comments on it.
I have developed all my apps on OS 2.2.1.
Just to confirm, if I install 3.0 on my device will the apps be compatible.
If not then can I roll back to 2.2.1? If rolling back is possible then how can I roll back?
Answer: Are your Apps for sale in the App Store? Or are they private apps? Apple won't approve any that aren't 3.0 compatible now, but I'm pretty sure all 2.2.1 apps work on 3.0.
With the iPhone simulator, you can test for different versions. With the device, there is no easy way to roll back to 2.2.1.
Answer: To answer your question about downgrading, I did exactly this process yesterday, downgrading my iPod Touch 2G from the 3.0 GM firmware, down to 2.2.1.
First of all, you need to get hold of the 2.2.1 Firmware. There are links list on http://www.blogsdna.com/2264/iphone-firmware-221-and-ipod-touch-firmware-221-released.htm
If you download the zip file and there is a .zip filename suffix, simply remove the '.zip' portion from the filename. Do not unzip the file. The ipsw file uses zip to encapsulate the various files associated with a firmware upgrade.
Next, you need to connect your device to your Mac, and place it in DFU mode. This involves holding down the home and power buttons until the device powers off, and then lifting your finger off the power button, but keeping it on the home button for a few seconds, and then releasing. This is a little tricky, so have a look at the various articles written on the topic. It took me a couple of times to get it right.
Once you've put the device in DFU mode, you can use Xcode's Organizer window to load the 2.2.1 firmware onto the device. Go to the Software Versions menu, and select Other Version.... Then browse to your downloaded 2.2.1 firmware file, and click Open, and then click Restore [device].
Answer: Maybe you can downgrade with the pwnage tool.. but I'm not sure.. anyway you can try to downgrade to 2.1 and see what happens..


How is Pseudomonas aeruginosa diagnosed?

Question: I know that P. aeruginosa is cultured on an agar plate, but which media or assays make it distinct from other Gram-negative bacteria?
Comment: Welcome to SE BIology. Please take the time to take the Tour and find out about this site. After that, the Help on asking questions should be your next call.  You need to show that you have done some research for yourself first before posting here. Tell us where you have searched an dwhat you have or have not found.
Answer: Well, the answer is actually a Wikipedia search away. But from the 7th edition of the book Microbiología Médica and Todar's Online book of Bacteriology:

Nutriotional needs. Simple. Part of why Pseudomonas spp. grows everywhere is that it can metabolize a wide array of carbon and nitrogen-containing compounds. Blood agar and McConkey are enough for its growth.
Colonies. They generally show a mucoid appearence and are flat.
Respiration. Practically an obligate aerobe. Usually oxidizes glucose, but it is capable of anaerobic respiration as well, using nitrates or arginine as electron donors. The cytochrome oxidase assay is positive, unlike Enterobacteriaceae and Stenotrophomonas.
Pigmentation. P. aeruginosa synthesizes pyoverdin (fluorescent and green) and pyocyanin (blue and water-soluble). Pyocyanin is produced when the presence of iron in the media is low, however, and not all strains synthesize it.
Temperature. Its optimal temperature is 37ºC, but its survival range is quite wide, from as low as 4ºC to as high as 42ºC.
Antibiotic resistance. And to many antibiotics. The presence of beta-lactamases makes P. aeruginosa withstand penicillin, carbapenems and cephalosporins.
Odor. Cultures emit a pleasant aroma that most associate with grapes or soap.

Wikipedia does show a nice battery of tests that identify P. aeruginosa, but if I were you I would compare them to other sources.

Positive: oxidase, citrate, motility, gelatin hydrolysis, acid production (from glucose and mannitol), nitrate reduction, lipase, pigmentation (green or blue), catalase and beta-hemolysis.
Negative: Gram staining, indole production, methyl red staining, Voges-Proskaeur (?), hydrogen sulfide production, urea hydrolysis, phenylalanine deaminase, lysine decarboxylase, acid production (from lactose, maltose and sucrose) and DNAse.


SSH socks proxy reverse connection Connection denied

Question: So I wrote a java app that connects to a server in a reverse way (-R) and creates a ssh server where it is executed so the server can execute commands in the client that executed my app. That part work perfectly. The problem is that I want to create a SOCKS proxy in the server and tunnelize the traffic through the client.
The command I am using is:
ssh -vvv -f -D 0.0.0.0:8080 localhost -p 11707 -N
I am receiving this error:
debug1: Connection to port 8080 forwarding to socks port 0 requested.
debug2: fd 5 setting TCP_NODELAY
debug2: fd 5 setting O_NONBLOCK
debug3: fd 5 is O_NONBLOCK
debug1: channel 1: new [dynamic-tcpip]
debug2: channel 1: pre_dynamic: have 0
debug2: channel 1: pre_dynamic: have 4
debug2: channel 1: decode socks5
debug2: channel 1: socks5 auth done
debug2: channel 1: pre_dynamic: need more
debug2: channel 1: pre_dynamic: have 0
debug2: channel 1: pre_dynamic: have 25
debug2: channel 1: decode socks5
debug2: channel 1: socks5 post auth
debug2: channel 1: dynamic request: socks5 host www.cualesmiip.com port 80 command 1
channel 1: open failed: administratively prohibited: Connection denied
debug2: channel 1: zombie
debug2: channel 1: garbage collecting
debug1: channel 1: free: direct-tcpip: listening port 8080 for www.cualesmiip.com port 80, connect from 184.108.40.206 port 50879, nchannels 2
debug3: channel 1: status: The following connections are open:

I have AllowTcpForwarding set to yes in the ssh server that is receiving the connections.
Where can be the error??
Thank you
Answer: Set the GatewayPorts option to yes within the sshd_config.
GatewayPorts yes
Comment: I don't think `GatewayPorts` in `sshd_config` has any influence on the behavior of `-D`.


Can I download all pictures on a page?

Question: Is there a way I can run a script with a certain web page as the argument that will download all the images from there?
Comment: Have you looked at Automator? There is an Get Image URL from webpage plug in already written. Be careful with overly broad questions (as well as flooding the site with too many questions and no answers - the site works best when you give back as well as just ask - even if the asks are all good).
Answer: wget -nd -r -l1 -p -np -A jpg,jpeg,png,svg,gif -e robots=off http://www.apple.com/itunes/

-nd (no directories) downloads all files to the current directory
-r -l1 (recursive level 1) downloads linked pages and resources on the first page
-p (page requisites) also includes resources on linked pages
-np (no parent) doesn't follow links to parent directories
-A (accept) only downloads or keeps files with the specified extensions
-e robots=off ignores robots.txt and doesn't download a robots.txt to the current directory

If the images are on a different host or subdomain, you have to add -H to span hosts:
wget -nd -H -p -A jpg,jpeg,png,gif -e robots=off http://example.tumblr.com/page/{1..2}

You can also use curl:
cd ~/Desktop/; IFS=$'\n'; for u in $(curl -Ls http://example.tumblr.com/page/{1..2} | sed -En 's/.*src="([^"]+\.(jpe?g|png))".*/\1/p' | sort -u); do curl -s "$u" -O; done
-L follows location headers (redirects). -O outputs files to the current directory with the same names.
Comment: where is it downloading to? only the main page shows up in the working directory ... are the linked files being saved somewhere else?
Answer: You can use an Automator workflow to download images embedded in a web page, or images linked from a web page. A good starting point for a workflow is:

Get Current Webpage from Safari
Get Image URLs from Webpage
Download URLs

You can change the workflow to use a list of web pages to fetch from.
Automator is included with Mac OS X in the Applications > Utilities folder.
Comment: Copy all image urls? `Lynx -dump` could work in downloading but a lot of parsing -- no easier method? -1 unless the second point clarified -- it can be a lot of work...
Comment: @hhh the second section, get image URLs, is performed by the Automator action displayed in the screen shot. There is no significant work for the user.
Comment: +1 hey this is cool, why cannot I change my downvote to upvote? I did not know this is so easy! Thanks for sharing :)
Answer: Here is a hacky solution (but it works). Hope someone can find a better one.

In Terminal, use wget --page-requisites http://example.com/. This will download the webpage at example.com and all of the resources linked from it (such as images, stylesheets, and scripts). More info on --page-requisites. Note: You can add many URLs separated by spaces to download lots of them at once. If many are from the same server, you should use something like wget --wait=2 to avoid slurping down files too fast.
Open the folder you downloaded those files to and use Spotlight to separate the images from the other files. I'm going to assume you have Mountain Lion. Type "Image" into the search field and select Kinds > Image.
Comment: @hhh I compiled it from source, but you can also use Homebrew or MacPorts. (I think it used to come with OS X?)
Comment: It only downloaded the HTML code of it, not any of the images. It appears to be the same as if I had done "Save As..." in my web browser.
Comment: Either the site is using JavaScript to load in the content, or they block `wget` by user agent.

In the second case, you can try using `wget -U "enter your web browser's user-agent here"` to pretend you are an actual web browser.
Comment: @JShoe I just tested the -U flag with Safari's user agent, and it works.
Comment: I was using Chrome, and trying to download from imgur. Also, what is a user-agent?
Comment: @JShoe The User-agent is what a browser or client like wget uses to identify itself to a server. [This website](http://httpbin.org/user-agent) will show you the user-agent string that your browser sent to its server. That is what I used with wget -U.
Comment: Okay, so I successfully ran the updated command, but it still only downloaded the HTML code.
Comment: let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/7134/discussion-between-kevin-chen-and-jshoe)
Comment: You could use `Lynx -dump` and parse all image-urls there or perhaps some scraper, trying to find better solution although this is nice -- could you explain how you got GNU coreutils in OS X?
Answer: If you know the pattern in the url, you could use the *ix solution with Curl: Use curl to download images from website using wildcard?
Answer: Check out the Automator Space on MyAppleSpace
http://www.myapplespace.com/pages/view/14664/automator-script-library
Comment: This isn't unnecessary as Automator already has this.
Comment: ...and link-only answers are discouraged and the accepted answer already shows how to do it in Automator.

Can I download all pictures on a page?


Not getting 240V from circuit panel

Question: Lightning struck my home last year and blew everything connected to bus bar A on the circuit panel; computer, furnace, one socket, and routers. Recently my electric range and hot water heater stopped working. After frustrated troubleshooting, I replaced every circuit breaker, including the main 100 amp (SIEMENS MBK100A 100-Amp, identical to old one), which did not resolve the issue. I removed every breaker except the main, and bus bar A was showing 20V, B 120V (120V going in on both cables). I switched the hot cables, and bus bar A was showing 120V, B 20V. Any advice on what the issue could be?
Comment: Might need the power company to check their wires/devices also.  Might have problem between the pole and house(their stuff)
Comment: Where is the very first disconnect or breaker past the meter? Do you have access to the meter?
Comment: Apologies for late reply. There is a circuit breaker outside where I can cut the circuit from the meter to the panel.
Comment: The meter has a lock and seal. The outside breaker is about a foot from the meter which is on a cable that runs to the panel.
Comment: You need to take voltage readings on the wires going to the first breaker after the meter and work your way down from there.
Answer: The moral of the story is "Measure stuff".
If you had measured the 3 voltages between hots and neutral on the utility side of that panel's main breaker, just like this guy does here... you could have effortlessly proved out the entire panel, and would not have had to replace anything.
Once you found the voltages were faulty there, the next step would be to pop the covers off that outdoor disconnect switch/breaker, the one you can't de-energize, and check them there.
You certainly know the troubleshooting tree, if voltages are bad on that disconnect's output yet good on its input, then that disconnect is faulty.  If they're bad on both input and output then problem lies between here and the utility transformer, the only things left are:

disconnect to meter pan, meter pan proper, and meter pan to weatherhead, these things being your responsibility, but unlikely to be the culprit.

the meter itself, crimps to your service entrance wires, service drop to the pole, and all pole top gear.  All the power company's responsibility. 98% of the time, the problem is the service drop, since it's been whipping in the wind for 30 years.  They fix this for free.

I realize the lighting increases the chances of it being something else, but it doesn't raise it anywhere near 100%.
So the other moral may be "don't assume it's the same problem".  I had that this year, was so wrapped up in a bearing problem on my car, I forgot to check the tire.
Re-torque everything properly.
The problem with pulling apart feeders and large breakers is now you have to re-torque those connections.  The original installer used a torque wrench.
That is particularly important on the "main breaker", and you need to look at the panel labeling, figure the torque required there and for the main breaker-to-lugs attachment, and get a torque wrench of appropriate size and use it.   Very important!
The need to properly torque large lugs has been known for a long time.  What was more recently discovered is this matters on small connections too.  That is why Code now requires you set proper torques on everything with a torque spec, meaning most devices and certainly everything inside a breaker panel.  So you'll also need a torque screwdriver, or one of those "mini" 1-120 inch-pound torque wrenches with a bit holder and appropriate bits, to set all the small screws.
Answer: Most likely damage to your neutral circuit somewhere. Lightning striking your home directly can take many paths and damage them all.
Comment: No, it's probably a lost leg. Lost neutral would still give 240V across legs, and wouldn't give 120V between one leg and neutral.

Not getting 240V from circuit panel


Where in a smartphone with Android are deleted and cleaned the files that are visible when testing with "root integrity check"?

Question: Where in a smartphone with Android are deleted and cleaned the files that are visible when testing with "root integrity check" ?? Clearing the cache and user settings do not help, obviously something else needs to be deleted in memory ?? Where do I delete the files I see from in root integrity check? How does this work?
Comment: What "root integrity check" are you talking about?
Answer: Android System Recovery "root integrity check" will check your read-only system partition for modifications. If anything is reported, flash memory is either corrupt or something (or someone) had root access and modified stock ROM intentionally. Your device is therefore compromised/corrupted.
Flash stock ROM from fastboot. In case you want to modify/delete reported files, read back system.img from SP Flash Tool and loop-mount ext4 partition image on linux PC


Windows 10 sometimes crashes and restarts, other issues as well

Question: I have recently installed free version of Windows 10 and since then I feel my machine has many problems.  Sometimes it crashes and restarts, and so some other times mozilla Firefox stops responding, and some times Office doesn't recognise key.  Any solutions please?
Comment: Have you run a virus checker? It may not be related to win10.
Comment: If your problem is from Windows updating from a previous version and your Windows 10 has properly activated itself then one thing you can do is do a clean install from a bootable USB disk. That will have the benefit of cleaning out programs and reinstalling drivers that have not transferred cleanly. http://www.howtogeek.com/224342/how-to-clean-install-windows-10/
Answer: I had constant problems with Windows 10 when I first installed it - firefox and chrome stopped responding, crashes, restarts, issues with the mouse, etc.
These problems ALL stopped when I changed the expensive wireless Logitech keyboard and Mouse Combo (I cannot remember the modem number, sorry) for a cheap wired keyboard and mouse.  It seems there was a conflict between the logitech drivers and the new Windows 10 OS.  This is why firefox and other browsers seemed to stop responding - they were simply not receiving input from the mouse/keyboard.
It seems some 3rd party drivers have not been properly configured/updated for use with Windows 10.  Hopefully the problem driver is of a component that can be removed from the computer.
I would advise removing all peripherals from the computer, restarting and seeing if the problem remains.  If the problem disappears then you can find the offending peripheral by a process of trial and error.
Otherwise, you may need to reinstall the OS.  You can download it freely, along with the Installation Media Creation Tool from the Microsoft website - you will not need an activation code as this is stored by Microsoft, as long as you are using Genuine Windows.
Answer: Since you upgraded to Windows 10 recently, your devices' drivers may not be compatible with new system compeletely, try update drivers from manufacturer official website, notice system version.
For your Mozilla Firefox issue, I think you can download a new installation package to reinstall it.
Also, you could collect event log to see what happened when your machine crash, go to Event Viewer to see the detail.
In fact, in-place upgrade usually leads to some trouble, I prefer to use media creation tool to install Windows 10, which can give us a clean system, check the following link for more information.
Get Windows 10
https://www.microsoft.com/en-au/software-download/windows10
Regards


Is it possible to run Magerun DB dump command from a deployer.php file?

Question: Using the "jalogut/magento2-deployer-plus" I am unable to do a DB backup using the Magerun command. It throws an error where it shows the app/etc/env.php is not accessible. Even though i am pretty sure the control is reaching the project root from the deployer file.
Answer: I found where the issue was and that the control of the server has to be moved to magento root to execute the magerun command properly. So i had to cd into the root and then execute the command. The snippet is as follows:
<code>    //Daily Db backup and deletion
task('db-backup', function () {
    run('if [ ! -d "{{deploy_path}}/db_backup" ]; then mkdir {{deploy_path}}/db_backup; fi');
    run('cd {{deploy_path}}/public_html && n98-magerun2 db:dump --compression="gzip" -f > {{deploy_path}}/db_backup/backup_$(date +%Y-%m-%d).sql.gz');
    run('find {{deploy_path}}/db_backup -type f -name "backup_*.sql.gz" -mtime +14 -delete');
});
</code>
Answer: Yes, it is possible to run the magerun db:dump command from a deployer.php file.
To do this, you can use the runLocally method provided by Deployer to run a local command on your machine. Here's an example code snippet that shows how to do it:
<code>// Load the Deployer recipes
require 'recipe/common.php';

// Define a task to run the Magerun db:dump command
task('magento:backup', function () {
    // Run the Magerun db:dump command locally
    runLocally('magerun db:dump --add-time --compression="gzip"');
});

// Define a deployment task that depends on the backup task
task('deploy', [
    'magento:backup',
    // other deployment tasks here
]);

</code>
In this example, we define a magento:backup task that runs the magerun db:dump command using the runLocally method. We then define a deploy task that depends on the magento:backup task, so that the backup is performed before the deployment.
Note that you may need to modify the command arguments to suit your specific needs. Also, make sure that the magerun command is available on your local machine and that the path to the command is included in your system's PATH environment variable
Comment: Thank you, in a way the runLocally was helpful  in moving me in the right direction.


Can we create an application with its own Web.config and Forms Authentication section inside another application using Forms Authentication?

Question: I have an application that uses Forms Authentication to authenticate one type of user. There is a section in this application that needs to be authenticated for another type of user using a different table in the database. The problem happens if the second type of user's session times out, she is taken to the login page defined in the Forms Authentication section of the main Web.Config instead of the login page for the second type of user. I am looking for solutions to this problem. One idea is to create an application in IIS for the section and create a Web.Config for the folder and add another Forms Authentication section. In my experiments, it seems this doesn't work. Am I missing something obvious? Any insights?
Answer: IIRC, the authentication works per folder.  So you should be able to do it if all of the pages that require the 2nd type of authentication live in a specific sub-folder with it's own config.
Not 100% sure on this, though, so if someone more knowledgeable can contradict me I'll just delete the response.
Answer: You may need to double check me on the syntax, but the top level web.config can have any number of tags.
<location>...</location>

Inside you can specify separate config parameters for whatever folder/file you want.  Look here for a reference.
EDIT:  Apoligies, I neglected to format the code properly
Comment: But, you can't have authentication inside of a location tag - see http://msdn.microsoft.com/en-us/library/532aee0e.aspx under configurable locations.
Comment: Guess I'm a little rusty with my web development.  I could have sworn it would work.  My apologies.
Answer: You cannot have an <authentication> section inside of a <location> tag, so you must have the subfolder set up as an IIS (and ASP.NET) application of it's own. So, you should be able to run the subsection on it's own.
I think 500.19 is the "can't read or parse web.config" error - does it have details? You may need to turn on remote errors (or check Event Viewer) to see them. If you're still having issues, post a snippet of web.config.
As an aside - I've never been a fan of nested apps, and would probably prefer having your normal Login.aspx page handle it either with as a MemberOf or perhaps redirecting to a SpecialUserLogin.aspx or something. Nested apps are a PITA to setup and test, IME (for instance - I don't think you can even get it working under Cassini - though you can do 2 separate projects for it, and combine when you deploy).
Answer: Yes you can. The Web.config files have a tree-like inheriting arhitecture with override capabilities. Meaning you can modify the settings inside a sub-folder by placing a web.config file there and specifying different configuration settings.
Answer: The way I understand this problem, you have two solutions and the first is to look at Roles and the whole Provider Model would be a great place to start. Otherwise, the best bet would be to separate the application into two parts, breaking out the second user type area and then including it back into the main project via a Virtual Directory. Just remember that Virtual Directories inherit their permissions from the parent directories web.config, so you will need to use the <Location>tags to remove authentication for the virtual directory and then within the virtual directories web.config define your new forms authentication. This works well if you need Windows Authentication (NTLM) under Forms Authentication.


Make a simple timer in Java

Question: I can't seem to figure out how to make a simple timer in java. All I need it to do is just display time, really. So just a start method, and it keeps counting up like 0:00, 0:01, 0:02, etc. I've seen some other similar forum posts on this, but all the code is kind of complicated for my level of understanding; I'm kind of new to java. But it shouldnt be that hard to make a timer that just performs such a basic function? If anyone could help it would be greatly appreciated :)
Comment: A timer with a display would involve threading.  If you're new to Java, and perhaps programming in general, I recommend learning simpler stuff first before diving into threading.
Comment: Such a timer does not necessarily involve threading.  If you already have an event loop, that same existing loop can be used.  If the program is a command line teletype style program, then the foreground (main) thread could work sufficiently.  And, if you have a GUI program, you need only assure that the screen gets refreshed more often than the user looks at, and that might be done using a GUI timer capability.  You should not assume that threading is needed.
Answer: This is not difficult.  However, I would caution you that I have seen some very confused answers on stack overflow, in some cases shockingly poor coding habits, so be very careful.  First let me answer the question.
If seem that the biggest mistake that programmers make in implementing a timer, is thinking that they need something to keep track of the current time.  That is, they write some sort of loop that increments a variable every second or some such silly thing.  You do not need to write code to keep track of the time.  The function System.currentTimeMillis() will do that for you, and it does it quite accurately.
Timer code will involve two aspects which many programmers mix up:

calculation of the time
refresh of the display

All you need to do to calculate the time to display, is to record the time that the timer started:
long startTime = System.currentTimeMillis();

Later, when you want to display the amount of time, you just subtract this from the current time.
long elapsedTime = System.currentTimeMillis() - startTime;
long elapsedSeconds = elapsedTime / 1000;
long secondsDisplay = elapsedSeconds % 60;
long elapsedMinutes = elapsedSeconds / 60;
//put here code to format and display the values

The biggest mistake that programmers make is to think they need a variable to hold the current time and then to write code to increment that variable every second, e.g. something called "elapsedSeconds" which they maintain.  The problem is that you can schedule code to be called every second, but there is no guarantee of exactly when that code will be called.  If the system is busy, that code might be called quite a bit later than the second.  If the system is extremely busy (for example page fetching from a faulty disk) it could actually be several seconds late.  Code that uses the Thread.sleep(1000) function to loop every second will find that the error builds up over time.  If sleep returns 300ms late one time, that error is compounded into your calculation of what time it is.  This is all completely unnecessary because the OS has a function to tell you the current time.
The above calculation will be accurate whether you run this code every second, 100 times a second, or once every 3.572 seconds.  The point is that currentTimeMillis() is the accurate representation of the time regardless of when this code is called -- and that is an important consideration because thread and timer events are not guaranteed to be accurate at a specific time.
The second aspect of a timer is refresh of the display.  This will depend upon the technology you are using to display with.  In a GUI environment you need to schedule paint events.  You would like these paint events to come right after the time that the display is expected to change.  However, it is tricky.  You can request a paint event, but there may be hundreds of other paint events queued up to be handled before yours.
One lazy way to do this is to schedule 10 paint events per second.  Because the calculation of the time does not depend on the code being called at a particular point in time, and because it does not matter if you re-paint the screen with the same time, this approach more or less guarantees that the displayed time will show the right time within about 1/10 of a second.  This seems a bit of a waste, because 9 times out of 10 you are painting what is already on the screen.
If you are writing a program with animation of some sort (like a game) which is refreshing the screen 30 times a second, then you need do nothing.  Just incorporate the timer display call into your regular screen refresh.
If paint events are expensive, or if you are writing a program that does terminal-style output, you can optimize the scheduling of events by calculating the amount of time remaining until the display will change:
long elapsedTime = System.currentTimeMillis() - startTime;
long timeTillNextDisplayChange = 1000 - (elapsedTime % 1000);

The variable timeTillNextDisplayChange holds the number of milliseconds you need to wait until the seconds part of the timer will change.  You can then schedule a paint event to occur at that time, possibly calling Thread.sleep(timeTillNextDisplayChange) and after the sleep do the output.  If your code is running in a browser, you can use this technique to update the page DOM at the right time.
Note, that there is nothing in this calculation of the display refresh that effects the accuracy of the timer itself.  The thread might return from sleep 10ms late, or even 500ms late, and the accuracy of the timer will not be effected.  On every pass we calculate the time to wait from the currentTimeMillis, so being called late on one occasion will not cause later displays to be late.
That is the key to an accurate timer.  Do not expect the OS to call your routine or send the paint event exactly when you ask it to.  Usually, of course, with modern machines, the OS is remarkably responsive and accurate.  This happens in test situations where you are not running much else, and the timer seems to work.  But, in production, under rare stress situation, you do not want your timer "drifting" because the system is busy.
Answer: You can either use Timer class from java.util or another way, which is more complicated, is with Threads. Timer also has thread action, but it's pretty easy to understand to use it.
Answer: For creating a simple timer as you explained as per your need , it is very easy to write a code for that. I have written the below code for your reference. If you wish you can enhance it.
import java.util.concurrent.TimeUnit;
public class PerfectTimer {
public static void main(String[] args) throws InterruptedException
{
    boolean x=true;
    long displayMinutes=0;
    long starttime=System.currentTimeMillis();
    System.out.println("Timer:");
    while(x)
    {
        TimeUnit.SECONDS.sleep(1);
        long timepassed=System.currentTimeMillis()-starttime;
        long secondspassed=timepassed/1000;
        if(secondspassed==60)
        {
            secondspassed=0;
            starttime=System.currentTimeMillis();
        }
        if((secondspassed%60)==0)
        displayMinutes++;

    System.out.println(displayMinutes+"::"+secondspassed);
    }

}

}
Answer: if you want to update something in the main thread (like UI components)
better to use Handler
        Handler h = new Handler();
        h.postDelayed(new Runnable() {
            @Override
            public void run() {
                //do something
            }
        }, 20);

20 - the delay In MS to do something.
and run it in a loop.
Answer: I have created a Timer that has everything you might need in it.
I even documented it!
And I also compiled it for faster usage.
Here's an example:
//...
  //For demo only!
  public static void main(String[]a){
    Timer timer=new Timer();
    timer.setWatcher(new Timer.TimerWatcher(){
      public void hasStopped(boolean stopped){
        System.out.print(stopped+"     | ");
      }
      public void timeElapsed(long nano, long millis, long seconds){
        System.out.print(nano+", ");
        System.out.print(millis+", ");
        System.out.print(seconds+" | ");
      }
      public void timeLeft(long timeLeft){
        System.out.print(timeLeft+"\r");
      }
    });
    //Block the thread for 5 seconds!
    timer.stopAfter(5, Timer.seconds); //You can replace this with Integer.MAX_VALUE.
    //So that our watcher won't go to waste.
    System.out.println();
  }
//...

This is not for promotion, made this to help people not waste their time in coding classes themselves!

Make a simple timer in Java


Is studying astronomy haram?

Question: I wanted to know is studying astronomy haram? And by astronomy I mean studying of planets, stars and galaxies and how they are made and what things are there in it and etc. I am not believing in any kind of shirk or astrology like stars decide what happens here etc. I don't believe in those, will it still be haram?
Comment: Astro**nomy** is not Astro**logy**. Why would it be haram? See [Is X halal? (reference question)](https://islam.stackexchange.com/questions/36838/is-x-halal-reference-question)
Comment: There is nothing wrong in studying astronomy and in your question it's mentioned that astrology is not your concern, so  I don't see any real question here unless you provide further details as to why you think astronomy is Haram.
Answer: Consider this:

In Western astronomy, most of the accepted star names are Arabic, a few are Greek and some are of unknown origin. Typically only bright stars have names.
— List of Arabic star names - Wikipedia

During Europe's "dark ages", it was Muslim scholars and scientists that continued the development of mathematics and sciences such as astronomy.
The word "astronomy" means to name the stars, and most of those names are Arabic (or Anglicized forms thereof).
Similarly, the English word "Chemistry" comes from "Alchemy", which is a corruption of the Arabic "al-kīmiyāʾ" (ﺎﻠﻜﻴﻤﻳﺍﺀ).
It too came from a Greek word, but it demonstrates that modern science largely came to us via the Muslim world.
Answer: Astronomy - the study of space is not haram. Islam encourages man to observe and study nature.
Astrology - using the movement of the stars to "predict" the future is haram

Is studying astronomy haram?


How to manage multiple clients with slightly different business rules?

Question: We have written a software package for a particular niche industry.  This package has been pretty successful, to the extent that we have signed up several different clients in the industry, who use us as a hosted solution provider, and many others are knocking on our doors.  If we achieve the kind of success that we're aiming for, we will have literally hundreds of clients, each with their own web site hosted on our servers.
Trouble is, each client comes in with their own little customizations and tweaks that they need for their own local circumstances and conditions, often (but not always) based on local state or even county legislation or bureaucracy.  So while probably 90-95% of the system is the same across all clients, we're going to have to build and support these little customizations.
Moreover, the system is still very much a work in progress.  There are enhancements and bug fixes happening continually on the core system that need to be applied across all clients.
We are writing code in .NET (ASP, C#), MS-SQL 2005 is our DB server, and we're using SourceGear Vault as our source control system.  I have worked with branching in Vault before, and it's great if you only need to keep 2 or 3 branches synchronized - but we're looking at maintaining hundreds of branches, which is just unthinkable.
My question is: How do you recommend we manage all this?
I expect answers will be addressing things like object architecture, web server architecture, source control management, developer teams etc.  I have a few ideas of my own, but I have no real experience in managing something like this, and I'd really appreciate hearing from people who have done this sort of thing before.
Thanks!
Answer: I would recommend against maintaining separate code branches per customer.  This is a nightmare to maintain working code against your Core.
I do recommend you do implement the Strategy Pattern and cover your "customer customizations" with automated tests (e.g. Unit & Functional) whenever you are changing your Core.
UPDATE:
I recommend that before you get too many customers, you need to establish a system of creating and updating each of their websites.  How involved you get is going to be balanced by your current revenue stream of course, but you should have an end in mind.
For example, when you just signed up Customer X (hopefully all via the web), their website will be created in XX minutes and send the customer an email stating it's ready.
You definitely want to setup a Continuous Integration (CI) environment.  TeamCity is a great tool, and free.
With this in place, you'll be able to check your updates in a staging environment and can then apply those patches across your production instances.
Bottom Line: Once you get over a handful of customers, you need to start thinking about automating your operations and your deployment as yet another application to itself.
UPDATE: This post highlights the negative effects of branching per customer.
Comment: +answer credit - a lot of good answers on this question, but I think yours is the most useful and concise.  Thanks!
Answer: Our software has very similar requirements and I've picked up a few things over the years.
First of all, such customizations will cost you both in the short and long-term. If you have control over it, place some checks and balances such that sales & marketing do not over-zealously sell customizations.
I agree with the other posters that say NOT to use source control to manage this. It should be built into the project architecture wherever possible. When I first began working for my current employer, source control was being used for this and it quickly became a nightmare.
We use a separate database for each client, mainly because for many of our clients, the law or the client themselves require it due to privacy concerns, etc...
I would say that the business logic differences have probably been the least difficult part of the experience for us (your mileage may vary depending on the nature of the customizations required). For us, most variations in business logic can be broken down into a set of configuration values which we store in an xml file that is modified upon deployment (if machine specific) or stored in a client-specific folder and kept in source control (explained below). The business logic obtains these values at runtime and adjusts its execution appropriately. You can use this in concert with various strategy and factory patterns as well -- config fields can contain names of strategies etc... . Also, unit testing can be used to verify that you haven't broken things for other clients when you make changes. Currently, adding most new clients to the system involves simply mixing/matching the appropriate config values (as far as business logic is concerned).
More of a problem for us is managing the content of the site itself including the pages/style sheets/text strings/images, all of which our clients often want customized. The current approach that I've taken for this is to create a folder tree for each client that mirrors the main site - this tree is rooted at a folder named "custom" that is located in the main site folder and deployed with the site. Content placed in the client-specific set of folders either overrides or merges with the default content (depending on file type). At runtime the correct file is chosen based on the current context (user, language, etc...). The site can be made to serve multiple clients this way. Efficiency may also be a concern - you can use caching, etc... to make it faster (I use a custom VirtualPathProvider). The largest problem we run into is the burden of visually testing all of these pages when we need to make changes. Basically, to be 100% sure you haven't broken something in a client's custom setup when you have changed a shared stylesheet, image, etc... you would have to visually inspect every single page after any significant design change. I've developed some "feel" over time as to what changes can be comfortably made without breaking things, but it's still not a foolproof system by any means.
In my case I also have no control other than offering my opinion over which visual/code customizations are sold so MANY more of them than I would like have been sold and implemented.
Answer: This is not something that you want to solve with source control management, but within the architecture of your application.
I would come up with some sort of plugin like architecture. Which plugins to use for which website would then become a configuration issue and not a source control issue.
This allows you to use branches, etc. for the stuff that they are intended for: parallel development of code between (or maybe even over) releases. Each plugin becomes a seperate project (or subproject) within your source code system. This also allows you to combine all plugins and your main application into one visual studio solution to help with dependency analisys etc.
Loosely coupling the various components in your application is the best way to go.
Answer: As mention before, source control does not sound like a good solution for your problem. To me it sounds that is better yo have a single code base using a multi-tenant architecture. This way you get a lot of benefits in terms of managing your application, load on the service, scalability, etc.
Our product using this approach and what we have is some (a lot) of core functionality that is the same for all clients, custom modules that are used by one or more clients and at the core a the "customization" is a simple workflow engine that uses different workflows for different clients, so each clients gets the core functionality, its own workflow(s) and some extended set of modules that are either client specific or generalized for more that one client.
Here's something to get you started on multi-tenancy architecture:
Multi-Tenant Data Architecture
SaaS database tenancy patterns
Comment: Link is broken!
Comment: Updated with related links... seems the original article is not available anymore.
Answer: Without more info, such as types of client specific customization, one can only guess how deep or superficial the changes are.  Some simple/standard approaches to consider:

If you can keep a central config specifying the uniqueness from client to client
If you can centralize the business rules to one class or group of classes
If you can store the business rules in the database and pull out based on client
If the business rules can all be DB/SQL based (each client having their own DB

Overall hard coding differences based on client name/id is very problematic, keeping different code bases per client is costly (think of the complete testing/retesting time required for the 90% that doesn't change)...I think more info is required to properly answer (give some specifics)
Answer: Layer the application.  One of those layers contains customizations and should be able to be pulled out at any time without affect on the rest of the system.  Application- and DB-level "triggers" (quoted because they may or many not employ actual DB triggers) that call customer-specific code or are parametrized with customer keys) are very helpful.
Core should never be customized, but you must layer it in somewhere, even if it is simplistic web filtering.
Answer: What we have is a a core datbase that has the functionality that all clients get. Then each client has a separate database that contains the customizations for that client. This is expensive in terms of maintenance. The other problem is that when two clients ask for a simliar functionality, it is often done differnetly by the two separate teams. There is currently little done to share custiomizations between clients and make common ones become part of the core application. Each client has their own application portal, so we don't have the worry about a change to one client affecting some other client.
Right now we are looking at changing to a process using a rules engine, but there is some concern that the perfomance won't be there for the number of records we need to be able to process. However, in your circumstances, this might be a viable alternative.
Answer: I've used some applications that offered the following customizations:

Web pages were configurable - we could drag fields out of view, position them where we wanted with our own name for the field label.
Add our own views or stored procedures and use them in: data grids (along with an update proc) and reports. Each client would need their own database.
Custom mapping of Excel files to import data into system.
Add our own calculated fields.
Ability to run custom scripts on forms during various events.
Identify our own custom fields.

If you clients are larger companies, you're almost going to need your own SDK, API's, etc.