How to write data into excel using selenium?

Question: I am using keyword driven framework to create the script in selenium.Any one please provide me script how to write the data into excel sheet with proper column names.
Suppose once the customer is created then it will create one customer id so i want to save this customer id in output.xls file with mobile number for each customer registration one by one,if i run for 100 test data records it should save 100 customers customer id with mobile number.Any one please help me in this once.
Comment: Hi Rajesh.  There are actually many questions and answers on this site explaining it.  Please keep in mind though, that Selenium can't do this, it's only a framework meant for accessing a browser.  You will need to do this through your Java code.
Comment: Rajesh, If you got satisfied answer, Accept it. So this question will no longer be active state.
Answer: @Lyndon, Completely agree. @Rajesh, Its not the area of Selenium. Its open source framework for web-automation and now they have extension of it for mobile platform called as Appium.
Not possible using Selenium!
Answer: Selenium doesn't provide any functionality to deal with Excel documents, however assuming you're using Java you can read and write Excel files using Apache POI library
Reference code:
<code>Workbook wb = new HSSFWorkbook();
CreationHelper createHelper = wb.getCreationHelper();
Sheet sheet = wb.createSheet("Sheet1");

Row row = sheet.createRow(0);
Cell cell = row.createCell(0);
cell.setCellValue(createHelper.createRichTextString("Hello world"));

FileOutputStream fileOut = new FileOutputStream("workbook.xls");
wb.write(fileOut);
fileOut.close();
</code>
Useful material:

Busy Developers' Guide to HSSF and XSSF Features - some Excel code samples
How to Extract Data From Files With JMeter - covers reading data from Excel (as well as all other file formats supported by Apache Tika)


Best format for registration form?

Question: I am working on a registration form. I am trying to find the friendliest way to organize the content. I would appreciate if you could tell me:
1. Which layout you find better
2. If double checking the password is essential
3. Any comments or suggestions are welcomed and appreciated too :)
Comment: Images are broken for me.
Answer: I would suggest b, as it goes straight from top to bottom and has labels to the left, which in my opinion are easier to read in this case, and make the whole form more compact.
I would remove the need to repeat password - it will not protect User from forgetting the pass, and passwords are entered quite carefully, so typos are rare. Should it happen though, they will be able to use a password reset link.
Should they be not crucial for registration I would also try to remove some fields that are not crucial.
Answer: I liked A better. Reason because it is easier to scan (top to bottom) than top to bottom and left to right on B . Also, you can adjust the width of the text fields to give variety. Like for example,  the width of the the password section a little shorter than the rest and the address bar bigger as it will load more info than the rest. Another suggestion is if you can minimize the number of fields to be answered, so that users won't feel too overwhelmed. The faster they can register the better. You can also add a button "connect to facebook or twitter" so you can speed the registration more. I suggest giving examples on placeholders instead of repeating the title of the field for more clarity. Cancel buttons should be not too prominent if you like to attract more successful registrations.
Answer: It is depend on the requirement. If this is going to be a responsive layout,it is good to have option b. for desktop and option a. for smaller device screens. As per my opinion, in an smaller devices, option b. will not give you a better layout with long text label and the long text box width.

Best format for registration form?


How do I add citric acid to my hard candy without it burning?

Question: Every time I try a recipe and add the flavoring and citric, within seconds the citric burns and gives the candy a horrible taste. How or when should I add it so that this won't happen. I'm using a powdered form of the citric acid.
Comment: At what point are you adding it? Can you give us an example of a recipe you're using?
Comment: Maybe the citric acid does not actually burn but play havoc with some other ingredient? Many chemicals that you'd describe as "mildly aggressive" at room temperature are "klingon in a moshpit" aggressive at 160°C :)
Comment: I think you might need to let the mixture cool a little more before adding the citric acid: https://cheftalk.com/threads/citric-acid-in-hard-candy-makes-it-burn.80275/. I think you can even add the citric acid when folding the candy.
Comment: Are you sure youre using citric acid and not cream of tartar?
Answer: Colors and flavors, including acid, are added after the candy is taken off the heat.
The syrup is still blisteringly hot (literally) but I've never had powdered acid burn in it off the stove.
If your acid is actually burning in the hot syrup then I would recommend finding a new source.


Stacked Booster Candy Crush

Question: As you beat levels in Candy Crush you stack boosters.  Is there a limit?  For instance, I often replay level 1 (over and over) up to 8 times to stack boosters and then use them on the 400 Level rounds. I can't figure out if there is a limit (like if I play level 1 ten times in a row, am I wasting my time?  Did I stop stacking boosters at the 8th play?)
Answer: I found that after you get all the boosters, they start giving an additional booster for like 10 minutes. Continue winning and they'll add another item for 10 minutes and so on.

Stacked Booster Candy Crush


What are the tax ramifications of an Australian citizen purchasing mortgage notes secured by California real estate?

Question: I an an Australian citizen, and I am interested in purchasing mortgage notes secured by California real estate. The payments are tendered monthly. What are the tax ramifications in the US? Is there a higher tax rate in Australia on money earned out of the country?
Comment: I would recommend a lot of due diligence on this kind of investment. Did you know that when a borrower defaults on a first mortgage in California that only the home is collateral for the loan, and the borrowers' earnings or other assets need not be used to repay the loan? And there is all manner of weirdness afoot in this particular market right now, as well.  There's at least one city thinking that they can acquire *mortgages* through condemnation or 'eminent domain' -- not the physical property, but the loans, possibly because the banks are not cooperating in loan modifications or other rsns
Comment: Australian tax law says that all sources of income are taxable for Australian residents. Therefore, it is your residency status, not your citizenry status, that is relevant. It is possible for your combined income from **all** sources to cause you to pay higher rates of tax on the portion that is above the threshold of the lower (tax rate) bracket. You may also be subject to US taxes but there is a tax treaty between the US and Australia that means you shouldn't be taxed twice. You may need to claim back such duplicated taxes.
Answer: US-Australian tax treaty limits the tax the US can levy on interest payments to Australian residents at 10%. However, that is the "worst" situation. There are several exempted situations which your specific example may fall into where you wouldn't need to deal with the US taxes at all. I suggest contacting a tax accountant proficient in that treaty and the Australian tax law. You will still be obviously paying taxes in Australia.


why is it always said that a CAD must be financed by borrowing from foreign countries

Question: a current account deficit (CAD) means you have money leaking out of your country and going to ROW (rest of world).  i see here (https://www.imf.org/external/region/tlm/rr/pdf/fpp5.pdf) that it can be 'funded' via a number of ways.  but why is borrowing locally not one of the ways?
i am guessing maybe its something to do with that if you borrow locally, then yes money is created , but thats only Inside Money, whereas the money leaking out was Outside Money = HPM = Bank Reserves + Notes&Coins?
Answer:
A current account deficit is when a country imports more goods, services, and capital than it exports. The current account measures trade plus transfers of capital.

https://www.thebalance.com/current-account-deficit-definition-components-and-causes-3305831
When a country imports goods, it has to pay for them. That means it moves money from the importing goods. When it exports goods, money moves into the country. If imports are more than exports, then the net effect of the imports and exports is for money to go out of the country. There are three basic places this money can be coming from: external debt, printing money (which in a way is debt), or drawing down cash reserves.
Internal borrowing can't account for the deficit, because each dollar of internally borrowing is, by definition, matched with a dollar of internal lending.
Comment: a 4th place i believe the money can come from is from foreign investment in local assets , eg foreigners buying property , or shares?    Can you elaborate on your last sentence , i am not sure what you mean, eg are you talking about new issuance of government bonds , or loans from banks?  and what does it matter., Also do u think my reasoning in my OP is correct ?
Answer: The current account deficit is an effect, not a cause. The cause is cause of a current account deficit is more foreign borrowing than foreign lending -- that imbalance must be accounted for somewhere, and that place is the CAD.
Comment: man that totally makes no sense!  CAD is defined as exports minus imports, not what you wrote!
Answer: I think you're referring to slide 19 in that presentation, which seems self-explanatory to me

Financing a CA deficit:
– Equity investment into the country, E
– Borrowing (accumulation of foreign debt, D)
– Drawing down foreign assets, FA (bank deposits abroad, or reserves of monetary authorities)
To the extent
a CA deficit is not financed by equity
investment or a drawdown of foreign assets, external
debt is increasing.

So there are two ways to avoid accumulating foreign debt outlined in there.
Since that presentation was given in Myanmar (and is mostly about that country), the context is one of developing countries, so printing your their currency to pay for their CA deficit (which is US dollar denominated in that presentation) isn't an option in that context. Of course, if you are the US, that idea might pop in someone's head...
For (someone in) Myanmar to borrow US dollars from an internal Myanmar source in order to pay for [excess] imports, how does that internal source get a hold of US dollars in the first place? It's ultimately [i.e. ignoring more Myanmar intermediaries] through one of the there sources outlined in that slide.
Comment: please make no assumption at all about the country with the CAD or the currency of their debt!  that slide was just an example, perhaps i should not have included it.   i dont understand precisely what debt you r talking about
Answer: ok i think i have figured out the answer to my question!  the answer is indeed that borrowing locally, ie the private sector borrowing from itself, cannot possibly help in funding the CAD because the private sectors borrowings from itself always net out to ZERO  , ie private sector's indebtedness to itself is ZERO always!  this is because if A borrows from B 100, then A's debt to B is 100, and B's credit to A is 100, ie B's debt to A is -100 , so total of the debt of A and B is 100+-100 = ZERO.  The key here is to think in terms of total net debt of the private sector to itself, rather than think of total gross debts (which in my example are 100 as for total gross debt, you do not net off the credit).
So while the CAD may cause a redistribution of private debt to itself between various sectors of itself, eg between firms and household , poor and rich , or an increase in gross debts within itself,  it has no affect on total private debt to itself.
And in particular , if the CAD is bigger than the budget deficit , then money is leaking out of private sector so private sector is dissaving , so private sectors holdings of foreign assets (assets in gov sector or foreign sector, eg holdings of money , treasuries , and foreign equities, foreign properties, foreign assets) must fall and private sectors debts owed to foreign countries rises, and also, foreigners holdings of your countries assets may increase.


Tips and resources for nightime shots with a mirrorless camera?

Question: I have a mirrorless digital camera (Samsung NX1000, 20-50mm lens) with which I'm proficient in all manual settings.  I'm on vacation in a month on an island in the Atlantic that is known for low levels of light pollution.  I'm contemplating taking my tripod and doing some long exposures at night.  Is this a worthwhile effort or do I truly need a different lens?  I know I'm not going to get a detail image of the face of the moon but maybe catch the milky way.  Any good resources for beginner night photography for my setup?
Comment: Have you looked at the general questions on the site around low light and astro photography? That you're shooting smaller sensor isn't really going to change any of the basics.
Comment: Where do these general questions exist?
Comment: Use the tag system (see link at top) and the search.
Comment: JoanneC: the Samsung NX cameras use APS-C sensors, they're not micro four-thirds, so the sensor's the same size as a crop dSLR would use.
Comment: @inkista - I shoot with a D800, APS-C is a smaller sensor. :)
Comment: JoanneC: [grin]. Yes, this is very true.
Answer: There are lots of examples of photos of the Milky Way taken with 18-55 kit lenses on APS-C dSLRs, so I don't see why using your 20-50mm on an APS-C mirrorless like the Samsung NX1000 should be an issue.  Astrophotography is more about long exposure technique.
Where you might be more limited than with a dSLR is that from the specs it looks like the NX1000's bulb mode maxes out at 4 minutes.  But 4 minutes is much longer than you would need if you were to follow the Rule of 600 to avoid star trails, and you can always stack images.
See also How do I capture the milky way?
and the [astrophotography] tag.


Pre-conditioner on seep through stain?

Question: I'm staining a table and some stain got through between the boards of the table when I did the other side. Should I pre-condition over the stain that seeped through?  Sand down that stain a bit first and then pre-condition?  Just not pre-condition?  I should note that as soon as we saw that stain (while the stain on the other side was drying) we wiped it off immediately - so it shouldn't have set it much.  Thanks in advance!
Comment: This is obviously a fairly 'rustic' table so some irregularity should be all right in the finished piece, but an important question that hasn't been asked yet is is this the top or the underside? If it's the underside it doesn't matter at all what it looks like, you could even leave it exactly as-is for all the difference it will really make.
Comment: Yes this was the top.  And yeah it's a rustic table, I'm basically copying a few different designs I found on the web and merging the ideas together. Closing thing I could relate it to is this: http://www.ana-white.com/sites/default/files/4e6e2f09eddc6c01c40027d3.jpg though the legs design is different and they are painted white and the table stain is different (black/brown). (if you cared anyways haha).
Comment: Did this end up turning out ok?
Answer: If you are staining both sides, the best course of action would be to sand down to bare wood. Otherwise, the old stain will show through the new stain (if you use the same stain again, those will be darker areas).
Comment: @ElementZero If your sander with 60-grit paper fitted didn't do much to remove this you need to use a different type of sander. Let me guess: ROS? Random-orbit sanders are finish sanders, not intended to remove much wood. There are anyway better options for removing a fair amount of wood from a surface than sanding, including planing of course, but a well-prepped scraper is much better than sanding in many cases.
Comment: Yeah I tried that put even though I only let that stain be there for a few seconds it seems like it's already stained pretty deep.  I hit it with a 60 grit sandpaper for a couple minutes and don't look like I'm getting anywhere.  What about if I just did conditioner over the whole thing and then let the stain sit for less time over those areas that were already stained?
Comment: The safest bet would be to test on some scrap wood - put a small amount of stain, wipe it as quickly as you wiped the stain that seeped to the other side, leaving a small blotch like you have on your piece. Then apply another full coat of stain and see how it looks. I wouldn't do experiments on your finished project
Comment: Yeah it's a ROS.  I actually bit the bullet and spent like an hour with the 60-grit and sanded the table down some more today - got like 80-90% of the stain off but couldn't get all of it off cause it just seemed too deep and I didn't want to make like a divet in the table.  Went ahead and pre-conditioned all of it and stained it - it's looking good, I'll know in the morning for sure :)

Pre-conditioner on seep through stain?


Fourier Spectra : Significance of the Negative Amplitude

Question: For example, for an aperiodic gate pulse, the Fourier Transforms for the continuous time case is a sinc function, while the discrete time case gives a sine over sine periodic kind of a function. In either of these cases, we get a spectra that goes below the frequency axis, i.e., acquires a "negative amplitude" (namesake) on many occasions in its excursions. I realize that the spectra gives a measure of "how much" a frequency component is present. But how this negative amplitude satisfies this criteria is what I am missing. Is it kinda like.. "How much less that frequency component is present"..? I know I might not be making any sense. Please help. Thanks!!
Answer: Note that in general the Fourier transform of a function is a complex-valued function, so in general it is not only positive or negative.
Roughly speaking, the magnitude of the Fourier transform says something about the presence of certain frequencies components in a signal, regardless of the phase (or sign, in the real-valued case). The phase determines the temporal alignment of the different frequency components. So a real-valued negative value of the Fourier transform just implies a 180 degrees phase shift of the respective components.


How to run DirectX10 on non-compatible hardware?

Question: I'm going to be away for a little bit, bringing my netbook with me to do some basic DirectX10 stuff.
How can I run DX10 on DX9.0c hardware?
Answer: Windows Advanced Rasterization Platform (WARP)

WARP is a high speed, fully conformant software rasterizer. It is a component of the DirectX graphics technology that was introduced by the DirectX 11 runtime. The DirectX 11 runtime is installed on Windows 7, Windows Server 2008 R2, and Windows Vista with the [KB971644] update.
To use WARP
Direct3D 10, 10.1, and 11 components can use an additional driver type that you can specify when you create the device (for example, when you call the D3D11CreateDevice function). This driver type is D3D10_DRIVER_TYPE_WARP or D3D_DRIVER_TYPE_WARP. When you specify this driver type, the runtime creates a WARP device and does not initialize a hardware device.
Because WARP uses the same software interface to Direct3D as the reference rasterizer does, any Direct3D 10 or 10.1 application that can support running with the reference rasterizer can be tested by using WARP. To use WARP, rename D3d10warp.dll to D3d10ref.dll and place it in the same folder as the sample or application. Next, when you switch to ref, you will see WARP rendering.

I copied all of that from the article, but looks like the most relevant and useful part. You probably should read the entire article though.
I was pretty sure that doing this was impossible when I read your question. A little digging and I was surprised.
Comment: what about DX9.0c tho.....
Comment: @Sauron: You said you're doing DirectX 10 anyway. Did you actually read the linked documentation? One of the paragraphs reads *Enabling Rendering When Direct3D 10 Hardware is Not Available*
Comment: Ohhh I thought it was talking about DX10->11 with it, nm. my bad.
Answer: Direct3D no longer ships with a software rasterizer. You could, however, check out WARP. http://msdn.microsoft.com/en-us/library/gg615082.aspx
Answer: WARP is good but you're going to find it quite slow on a netbook.  My experience is that even on a quite beefy i7 it struggles to hit 60 fps with relatively simple scenes, and also is incredibly CPU-intensive - more black marks against it for netbook use.
If you want to use the D3D10 API I'm going to make an alternative suggestion.  Don't.  Use D3D11 instead and use feature levels to gain support for downlevel hardware.  Just specify D3D_FEATURE_LEVEL_9_3 in your D3D11CreateDeviceAndSwapChain call, stick within the documented restrictions, and you'll run.


Problems managing collision filtering

Question: I have my character fixture and body(is a tank), so when I press the screen it throws a rocket(which also has a body and a fixture) that the player can controlll touching the screen. My game also has coins, which are dropped from boxes, when I destroy them, I don't want the rocket to collide with the tank, because the player can guide it anywhere(even to the tank), and it only get destroyed when touching an enemy. The problem here is that the rocket can touch a coin and move it, but it wouldn not happen. I've read that this can be solved using collision filtering, but I didn't understand very much this concept. I want the tank to collide with the coins, but not with the rocket, which should not collide with the coins.
Comment: I don't work with libgdx but I understand your problem.In unity when you want filter collisions you can use trigger,this is mean you can true trigger when collision happened for example:when tank collide with rocket false collision. http://www.aurelienribon.com/blog/2011/07/box2d-tutorial-collision-filtering/  ----------- in unity there is ignore collision http://docs.unity3d.com/ScriptReference/Physics2D.IgnoreCollision.html
Answer: You can use the filter on the FixtureDefinitions to define what type of objects can collide with what.
You define a category bit-pattern, this describes what the fixture is. Then you define a set of categories that the fixture collides with.
For example;
class PhysicsConstants {
  // Categories
  public static final int CAT_SHIP   = 1;
  public static final int CAT_ROCKET = 2;
  public static final int CAT_COIN   = 4;

  // Collision masks
  public static final int MASK_SHIP = CAT_COIN; // This means a ship only collides with coins
  public static final int MASK_ROCKET = CAT_ROCKET | CAT_COIN; // Rockets collides with other rocket and coins, but not with ships
}

And then when you create your Body and its FixtureDef you set the bits on the filter;
public FixtureDef createRocketFixture(Shape shape) {
  FixtureDef fd = new FixtureDef();
  fd.shape = shape;
  fd.friction = 1.0f; // or whatever
  fd.density = 1.0f;  // or whatever

  fd.filter.categoryBits = PhysicsConstants.CAT_ROCKET; // I am a rocket fixture!
  fd.filter.maskBits = PhysicsConstants.MASK_ROCKET; // This describes what I can collide with
}

Comment: Can I do this using `groupIndex`?
Comment: @Asaltaviejas It depends on what should be able to collide with what. If two group indexes are different the implementation falls back on the category and mask bits anyway. In my opinion it is easier to just use the masks and categories.

Problems managing collision filtering


If teacher punishing student is also supposed bad karma?

Question: Either school teacher or Buddhist teacher in monastery, if they would punish their students is also supposed bad karma even if it cause of bad behavior of students?
Answer: Buddha did not do any violence. The suttas say:

it is true, Kesi, that it's not proper for a Tathagata to take life. But if a tamable person doesn't submit either to a mild training or to a harsh training or to a mild & harsh training, then the Tathagata doesn't regard him as being worth speaking to or admonishing.
Comment: This should be the correct answer. @Dhammadhatu has read the full content of that sutta and answered the question, while the accepted answer is given just by reading the part of the sutta, and assuming 'kill him' means the death of that person. This is what has been happening to the real Dhamma for long time....
Comment: Hi Isuru It is up to people to get the full story without relying on a half story.
Comment: obviously your post was wrong. i suggest to make your non-dhamma posts on DW, where people are kind enough to not "kill" you and have extended discussion with you; attempting to patiently guide you to the True Dhamma. this forum, BSE, is for high quality answers, which is why i have over 30,000 merit points. with metta
Comment: @SarathW Hi, It seems like your intention was to get readers to read the full content and understand what you imply by the part of the answer. But as I mentioned it's misguiding. So I thought of adding a comment for readers who would mis guide this would think twice and get to the full answer. And I suggest updating that bit in the answer would stop misguiding the readers, as that is the accepted answer..!
With metta..!
Comment: Thanks your answer is more clear you have quoted right lines from sutta while @SarathW answer did confused me.
Answer: It depends on how you punish. Buddha also punished.
=============
"If a tamable person doesn't submit either to a mild training or to a harsh training or to a mild & harsh training, then I kill him, Kesi."
https://www.accesstoinsight.org/tipitaka/an/an04/an04.111.than.html
Comment: Kill means Buddha ignored the student
Comment: @Isuru I don't think anyone misinterprets this -- the "killing" is obviously a metaphor isn't it, not literal -- the literal meaning is, "don't regard him as being worth speaking to or admonishing"
Comment: Thanks I had to ask if Buddha ever punished someone else.
Comment: I'm not sure I'd call that "punishment". I think that "punishment" is intended to change someone's behaviour, for example, "you committed a crime so I punish you now, if you commit another crime I will punish you again, because I want you to stop committing crimes in order to avoid being punished" -- which that "killing" isn't.
Comment: This answer is completely wrong and misguiding. Buddha may have punished, but that's only to show the path to Nirvana, but buddha never made someone killed, because according to buddha human life is very rare thing to be. This answer is not correct. This is an example to misinterpretations of dhamma meaning in cannon.
Comment: @Isuru Also I'm not sure that what SarathW here calls punishment is "to show the path to Nirvana" -- instead the so-called "killing" might be because, if that student doesn't "submit to [any kinds of] training", then they just can't be trained.
Comment: @ChrisW: I totally understand what you meant. But all due respect, it seems like you haven't mine. I'm not trying regard anyone (you meant by `him`) to the misinterpretations. But trying to explain that this is the nature of the world, people understand with the context they are in or with the understanding they do have. And that's not the Dhamma. So we must be very careful when following someone's answers or comments on dhamma, and also when answering a questions too...
Answer:
If teacher punishing student is also supposed bad karma?

It depends on thoughts Chethanaham bikkawe kamman wadami (question on this can be found here). And only teacher knows what kind of thoughts were on his mind at that time.

Either school teacher or Buddhist teacher in monastery, if they would
  punish their students is also supposed bad karma even if it cause of
  bad behavior of students?

As said above, it doesn't matter from the student's side, it matters from teacher's side, because he owns his karma as a return to his own actions.
Answer: We donot know karma  and it's fruit.
We aren't buddha.
So this question is not right .
If I give any answer for this question.
I will give wrong answer beacuse I do not know  karma..
I gave  answer  from memory.
Book memory .
Buddha memory..
Memory can not give right answer.
My experience not book answer .
If I punish any student..if I feel guilt for punishment.
 This is Not right.
This is my anger.
Angry man can't kind speech.
This is voilence both inner voilence and outer voilence for students.
Answer: Once a general asked buddha shouldnt criminals be punished
The Buddha replied: "He who deserves punishment must be punished, and he who is worthy of favor must be favored. Yet at the same time he teaches to do no injury to any living being but to be full of love and kindness. These injunctions are not contradictory, for whosoever must be punished for the crimes which he has committed, suffers his injury not through the ill-will of the judge but on account of his evil-doing. His own acts have brought upon him the injury that the executer of the law inflicts. When a magistrate punishes, let him not harbor hatred in his breast, yet a murderer, when put do death, should consider that this is the fruit of his own act. As soon as he will understand that the punishment will purify his soul, he will no longer lament his fate but rejoice at it."
Comment: Where is this quote from? It seems to be from [The Gospel of Buddha](https://en.wikipedia.org/wiki/The_Gospel_of_Buddha), which is quite an unreliable source/author, isn't it?


Is it possible to maintain meta keyword for each page?

Question: I know that there is one place where we can actually maintain our keyword in Joomla Global Configuration-> Metadata Settings -> Site Meta Keywords, but is more like a place to dump all keyword of our website. Is it possible for us to maintain our keyword by each page? Will there be any effect on SEO?
Answer: Yes you can. Joomla! provides a mechanism that starts from the general to the particular, the metadata management is a clear example, let me explain you how this works:

The small modular part here is the article. If you go to each one, inside you have this option in the tab called "Publishing", this replace the data in the menu item.
If you go to your menu items, inside you can see a tab called "Metadata", from here you can replace the data in the Global Configuration.
If you don't add anything for articles or menu items, then the data in Global Configuration is the default data.

There is a limit for those, this depends on the search engine. Use as a starting point something like:

Meta Description: max 160 characters.
Meta Keywords: around 10 terms.

And related to whether it affects, I think yes, but for good, because you'll have a more diverse amount of data.
Hope this helps!
Answer: Effect would be normal SEO effect for metadata on a web page, nothing special above that.
Every menu item has a metadata tab, and every content item has a place for metadata on the Publishing tab. You can use those for page-specific keys. IIRC, the menu item one overrides the content item one, but I'll leave testing that to you.


Create a SharePoint 2013 subsite from another subsite

Question: I have a subsite, users want another subsite similar to the first one but name will be different. Publishing is enabled so saving the first site as a template is not an option.
Answer: If you have access to powershell, then you can follow the below steps.

You need to export the exisitng Subsite using
export-spweb -identity "url of subsite"  -path "location where .cmp file stored"
Now create new Subsite using this( catch is dont use the template in it.)
New-SPWeb http://somesite/subweb1
Now Run the Import command to import it on new subsite.
import-spweb -identity "url of subsite"  -path "location where .cmp file stored"
Answer: Actually you can save Publishing site as template and in case you are not planning to move the template to another site collection then it should work fine.
To achieve that:

Open original site in SharePoint Designer
In the Site Options set the SaveSiteAsTemplateEnabled option to true
Then go to <original site url>/_layouts/15/savetmpl.aspx and save it
as regular template


What is the difference between natural selection and adaptation?

Question: From what I've read it seems that the only actual difference is that creationists use adaptation and people who believe in evolution use natural selection. But otherwise, from my understanding, the two terms are synonymous. Is that correct?
Comment: No offense but I would love to down vote @InstructedA 's comment. (A) There are plenty of religious believes but (1) it is not our job on a science website to make a review of such beliefs and (2) your view of creationist believes is unclear and IMO wrong in the same time. (B) While believing in god (theist) or not (atheist) is correlated in accepting the theory of evolution, one can accept the theory of evolution and be theist or refuse to accept the theory of evolution and be atheist as one domain is about science while the other depends on an ideology.
Comment: Always for @InstructedA  (C) It is very obvious from your comment that your understanding of evolutionary processes is very limited. (D) Point "B" above is a discussion of philosophy and not biology. Point "A" above is a matter of religious studies and not biology. These topics are interesting, please open a post at the convenient location to discuss such topics.
Comment: I've been teaching evolutionary biology for more than 20 years, and I don't believe in evolution (and I never will). As Tertulian once said, one believes in absurd things. Science is a matter or knowledge, not believing.
Comment: The down vote is not a punishment but a help for other's to recognize good from bad info. Scientists don't believe in "absolute facts" whatever that means. Natural science does not "prove facts" anyway but only offer series of evidences congruent with a hypothesis. Anyway, this is not a place to discuss that. You might want to have a watch a short introduction to philosophy of knowledge and philosophy of science. I am not going to answer further comment in this inappropriate place.
Comment: I am glad that it is not a punishment, as I see and recognize massive amount of inconsistencies in the theory of evolution the way it is being presented. When I was young I was like you, but then the 'church' presented me with a much better theory. Things are so consistent. I have always hoped that the 'scientists' can provide their alternative remedy, but all I got was 'you are stupid, you are empty'.
Comment: Natural selection is a mechanism that is used for adaptation. With only selection and no generation of variation the adaptation is highly limited.
Answer: Natural Selection
Natural selection is the differential in survival and/or reproductive success among different individuals. As such, natural selection also refers to the process by which genotypes associated with greater fitness increase in frequency in the population through time.
More information on wikipedia > Natural Selection
Adaptation
An adaptation (or an adaptive trait) is a trait with a functional role that evolved (and is maintained) by means of natural selection.
More information on wikipedia > adaptation
Usage
Both the terms adaptation and natural selection are extensively used in science (and none of them come from the creationist religious belief). Their definitions are related as one is causing the other but these terms are not synonyms.
Further information
As the question is very introductory in the field of evolutionary biology, you might want to have a look at an introductory course to evolutionary biology. Evolution 101 (a.k.a. Understanding Evolution) by UC Berkeley is short, concise and very accessible even for those that have little a priori knowledge in biology.
Side Note
You said "believe in evolution". It is of course a common phrasing from the creationist ideology. Evolution is a theory (a theory is very different from a hypothesis see this answer for more information) and therefore, the phrasing "to believe in evolution" sounds quite wrong as it wrongfully suggests evolution is a thing on which we could legitimately have different opinion about its existence.
Comment: Great answer. To make things worse, in my language (and I reckon than in English too), the students use *adaptation* both as a noun and as a verb (to adapt), confounding it not only with "selection" but also with "evolution".


Arduino Object Oriented Programming

Question: Can anyone send me a link tutorial about Arduino Object Oriented Programming? I want to learn Arduino, I am just a beginner.
Comment: A little information that is missing from the answers: OOP has a small overhead because of a some boiler plate and object instantiation. This overhead is so marginal on desktops, servers and even mobile devices that we usually don't even mention it. On the arduino however, with it's severe restrictions on memory and computing power and where every byte may count, this overhead can become noticeable. Depending on your use case, this might be something to consider.
Comment: Agreed with @Douwe - the Arduino is not the place to lean OOP because it is not an environment where OOP can really leverage its power.  OOP is a design strategy that came out of a need to simplify and abstract complex programs.  The arduino is so small and so simple that programs never really get that complex to begin with.  A desktop or mobile environment is a much better place to learn OOP because everything you're using in that environment are already objects - there's a whole framework to learn from.  On the arduino there's nothing except what you build.
Answer: "Arduino" is just plain old C++ with (in some cases) bits removed and some helper functions and classes.
For the smaller (lower powered AVR for example) there is no full STL in the C++ library, and some functions are of a reduced complexity (such as no floating point support in the printf family of functions by default).
For OOP you don't need to know anything "Arduino" - it's just C++. Any C++ OOP tutorial will teach you what you need to know for Arduino OOP.
Comment: Thank you, I will look into it
Answer: Have you programmed OOP before? For alot of projects you can get away with not knowing it.
I'll also point out that if you are just a beginner, I don't recommend starting off with OOP. Stick to simpler scripts (Trust me, OOP is a pain sometimes).
If you still INSIST on starting your arduino knowledge with OOP, look up "C++ classes" or "C++ OOP" as the default language that the arduino IDE uses is just a modified version of "C++"
Comment: Yes, I already done oop in different language like c#, I just want to familiarize the arduino c++ syntax.
Answer: http://paulmurraycbr.github.io/ArduinoTheOOWay.html really helped me understand what was happening. i had some previous oop expierence with java, but i still have a hard time using multiple files vs writing more methods in one file
Answer: I used OOP with C++ on an Arduino Due in an open source project.
Since I did not find any tutorila for the same the example might be helpful for You.
https://github.com/eschlot/Box-Joint-Jig-Control
W.r.t. the usability of OOP in embedded systems for scenarios like the above one there are plenty of good reasons to use OOP. A good example is the menu structure and the display control in the project.
Nevertheless from my experience it is important to understand the effects of automatic object creation and tentative memory reorganization to the behavior of real time systems. This is much less predictable with C++ then with plain C and can be a reason to not use OOP in any real time system.

Arduino Object Oriented Programming


Getting Prose to Flow

Question: I've heard some advice on writing, which says that writers should read their drafts aloud, in order to hear any flaws in the sound of their writing. But after I've done this, how should I change my draft? As many books suggest, writing should not only use strong verbs but also use words economically. But what if my strong, economical prose doesn't flow? What then should I change in my draft? The choice of words, the order of words, the part of speech?
Comment: I think you've edited your question enough ;)
Comment: Thank you. I can do a lot better with writing though. I think. Also, I don't want to read my drafts aloud. It's good advice but I can hear what I read in my head.
Comment: Sometimes it hard to make my writing flow. Other times it's easier. As for why this is, I don't know.
Comment: But I'm not going to continue writing short sentences all the time as I'm doing now.
Answer: The order of words tends to have grammatical restrictions that don't allow for you to change this. Everything else however, especially for a first draft, can/should be changed.
The idea behind reading aloud is that by hearings one's words read out loud, one notices what sounds good and what doesn't. For me, it takes a few days before I can see these "errors" in my writing, so make sure to give it some time, before returning to writing. Here a few, more or less, objective guidelines:

Every consecutive sentence should be of different length. This keeps the writing interesting and engaging, and excites the reader because they won't know what comes next.

Replacing simple words with more complex ones is good, but don't overdo it; Often, the simplest words are best. If the complex word does not serve any other purpose than to tick off the requirement, replace it with a simpler one. Else, choose the right complex word (e.g. I ran/walked/stampeded/speeded/wandered/trudged to school). Also make sure that you don't use the same complex verbs twice in a paragraph, unless it makes more sense when it's the same (I used the word "simple" multiple times to underline the duality of complex vs simple words)

That being said, when you have a sentence starting with a conjunctive, do not allow the next few sentences start with one as well.

Unless several paragraphs have passed, do not use the same conjunctives (while, although, yet, and, etc.). I am guilty of this myself, and it's tough to go around this sometimes.

Use few adverbs (astonishingly, guiltily, happily), and instead say what a character does/scenery is, that makes it astonishing, or guilty or happy. Again, tough, but in my experience, most of my edits are because of this rule.

Another way to improve flow is for every sentence to be followed by a sentence that describes what the reader is interested in next. I know you may want to hear an example for this, so I would, for example, dedicate this sentence to giving you one.

I haven't read your manuscript, so I cannot give you more feedback. But these guidelines take me very far in improving my writing.
Comment: The "complex words" rule should only be applied when you can make your writing more _specific_ – which you almost always can. The primary aim is to convey as much as possible, not to show off your vocabulary. An unnecessarily elongated sequence of graphemes merely irritates the reader.
Comment: Final guideline: feel free to break any of those guidelines if there's a purpose behind it. The things you should avoid, such as repetition, can also be powerful tools when used with intent.
Comment: @wizzwizz4, I'd replace the "replace simple words for complex words" with "replace unconcise words for more concise words". No reader is ever helped by more complex words than needed, and personally, I would put such a book down quite fast... Complexity in character and plot? Yay! Complexity in words and sentences? Nay!
Comment: @Erk Absolutely. Concision is vital; synonyms exist for a reason.
Answer: Anything that makes it sound better.
This is never easy and can really only be learned by practice, and playing it by ear.  Altering word choices is one technique.  Another is altering the word order and sometimes the part of speech, but you have to remember to keep the sense of the passage.  Still sometimes if you write

They danced all night and were tired the next day

it will work better if you write

Dancing all night left them tired the next day.
Comment: There's a line in the fontforge design manual about trusting your judgement "You are fully qualified to correct for these illusions".  It is the same when reading back a piece of prose.  You are fully qualified to judge if it flows or not.  Because you can read for yourself the effect of the prose, and the effect of changing it, you can make the changes for yourself if you are able to trust your own impressions.
Answer: Problems detected when reading a text aloud often fall into two categories (see below for some other ways to detect problems):
It could be a problem with grammar or spelling or missing words.
And the solution is easy; you fix the grammar, the spelling, the missing words. Programs like Word or Grammarly may help with that. If books on grammar aren't available...
Or, it could be that the "melody" of the text doesn't work or it just "sounds" wrong.
Basically, you fix that by changing the text until it does work.
Maybe cutting sentences apart? Merging them into one? Throwing them out completely? Or parts of them? Or adding an extra subordinate clause? Or move things around?
Was it a passive sentence? Fix that. Is it a problem with narrative or POV voice? Rewrite it with the right voice?
Or as you mention, replace adjectives and adverbs with nouns and verbs. Adding an odd adjective or adverb might also do the trick.
Or you replace words. Sometimes repeated words make the text stronger, sometimes they make it weaker.
What to do with a text when it doesn't work in this particular way cuts to the core of being a writer, and I only know of two ways to get better at it: practice and reading fiction.
Practice involves both practicing fixing broken texts, but of course, also practicing writing texts. When you've written and fixed enough texts (be it emails, short stories, blog posts, or novels) the "right flow" kind of get's stuck in your fingers. At least, that's how it feels to me... although, your eyes and ears may also have something to say about it.
Reading a lot of fiction will sooner or later get you to the point where you can look at a passage and go, "that's not how I would have done it, I'd ..." And that's when reading becomes writing...

Sidebar: Apart from that, you might want to choose your role models (who you read) based on what you want to achieve. If a readership is on your wish list, choosing authors that are being read, sold, and purchased by publishers today is paramount.
Classics from English class in school are, unfortunately only read because they are classics. Something profound is happening to people's reading habits today. You could blame film, TV, the Internet, or technology in general. Globalization? Things are changing. To stay relevant, we need to change with them.

The best comparison I can give is learning to swim. You need to learn it the right way (good instructions/teachers) or you'll learn to swim like a dog and you need practice. And then suddenly it becomes a reflex.
I think reading non-fictional books on writing might help, but I've read about half a meter of them, and (by my choice or the authors') very few of them would go into the specifics needed to know what to do, on the sentence-level, with a text that doesn't work. I don't think language books might either, but I've read less of those...

Sidebar: My tip for picking what non-fiction to read is to look at the author's fiction publication. They should at least have published more fiction than "how to write" non-fiction. They should have practiced actually writing fiction.

When I do run into trouble it could take anything from seconds to days for a solution to appear.
Sometimes things need to be mulled over. Sometimes more research, plotting, character building, worldbuilding, etc, can help in search of the answer. Sometimes it's just to distract me from the problem long enough to have an answer appear. I couldn't tell you which is which.
Other ways to check your text for "bugs"
This doesn't answer OP's question, but I feel it is of some importance still:
When it comes to reading out loud, especially from a paper copy of the text, two things happen; you see the text differently on paper, and you hear the text.
Sometimes just seeing the text on paper will tell you you're missing words or have other problems with the text. (I've tried with PDF:s and it seems to work similarly... however, I can't attest to what I can't see, so I guess I need to get myself a new printer soon...)
When it comes to reading aloud the flow or musicality (or lack thereof) becomes apparent. Or the text "sounds" wrong. (If you have enough experience).
Try reading aloud for a real or imagined listener, and you'll also become self-aware about some choices of words and structure and discover that they may not work.
Or record yourself reading the book and then listen to it. It's generally one or several of creepy/annoying/concerning so you keep a lookout for when you get more of that and that's a possible problem passage... (and no, not all texts can become audiobooks, so this may not work at all with your text...)

Getting Prose to Flow


What's the point of being squad leader?

Question: Sometimes I'll notice in a game that I'm the squad leader. What advantages do I get from being squad leader though? I've never seen a way to mark objectives or anything like that
Comment: possible duplicate of [What is the significance of the star next to your name in the squad list?](http://gaming.stackexchange.com/questions/33631/what-is-the-significance-of-the-star-next-to-your-name-in-the-squad-list)
Comment: http://gaming.stackexchange.com/q/33631/5628 The link to the "significance of the star" question.
Answer: As the squad leader, you can set objectives by sighting in a target and pressing the 'back' button (left of the guide button). (You receive additional points when those orders are executed.)
The easiest example would be in a game of Conquest. Point yourself at a capture point on hit the Select button. (Xbox) You can also set WayPoints, and at some point the Squad Leader can call in artillery strikes. I'm sure there are additional commands, and other methods based on the platform that you are playing on.
Comment: This answer only partially answers the question - I think OP wants to know *how* to '...mark objectives or anything like that'. And without even a meaningful manual, I'm as equally mystified myself.
Comment: Some servers only allow squadmates to spawn on the squad leader, but the squad leader can spawn on anyone else
Comment: @SSumner in hardcore mode you can only spawn on the squad leader, although this is also a standalone server setting that can be toggled on or off -- you're most likely to see it working on a hardcore server.

What's the point of being squad leader?


What were Martin Luther's main disagreements with the Catholic Church?

Question: What were Martin Luther's main disagreements with the Catholic Church? Were these beliefs of Luther's and his disagreements with the Catholic Church the origin of the Lutheran Church?
Comment: I know where you can read at least 95 of them.
Comment: Of course this is a wide-ranging question, but there can certainly be a good answer: 1) a very brief overview and 2) references to more complete answers for further reading.
Comment: @compman: That's a lot better, but the second part of the question is still so broad that I can't see it being easily answered here. You should stick to just the first part or a second part that is more closely related and a smaller scope like the edit I just suggested.
Comment: I've asked a [related question](http://christianity.stackexchange.com/q/7306/914) about the current disposition of Luther's disagreements with Pope Leo X.
Answer: The Fundamental Change
So the question is: How did Luther change from a Catholic theologian to a Protstant theologian? Or to highlight more the historical aspect: How did he change from a late-scholastic to a reformer? Or a last variation: How did the early Luther change to the "old Luther"?
This leads us to a certain happening, to a conversion-like radical change in his life. What I'm talking about is the so called tower experience of Luther.
The Luther before this experience is the Luther of the monastery-struggles. With increasing progress he can not find inner peace – neither by the sacramental means of grace nor by monastic pastoral care. In light of the coming angry justice of God, that he was taught, he despairs.
Now Luther insists on trying to understand what that righteousness is. According to the doctrine of the Catholic Church at that time, this righteousness must be understood as a philosophical, formal and active righteousness. This means: God is righteous and punishes the sinner and unrighteous. Luther not only despairs, but even hates this doctrine.
In that situation, the above-mentioned tower experience can take place, since Luther discovers, that Romans 1:17, doesn't only say

For therein is the righteousness of God revealed

But rather has to be read in its context:

For therein is the righteousness of God revealed from faith to faith: as it is written, The just shall live by faith.

This makes Luther understand: The righteousness of God is this righteousness, which lets the just live by faith through God's gift. According to that Luther builds his understanding of righteousness inspired by Paul: it's passive and makes the sinner righteous by faith and not by any good work.
This is, what changes Luther from a Catholic theologian to a Protestant theologian.
From that point on, the Lutheran doctrine starts to grow.
Against Sale of Indulgence
He starts critisizing the sale of indulgences since they imply that righteousness can be reached by a good human work. According to Luther it can only by reached by faith in God, who makes the sinner righteous.
Against the Communion as a Sacrifice
For Luther the communion is a promise of God and not a sacrifice, like the Papacy has taught, as he says in his book The Misuse of the Mass (1521):

Sacrifice and promise are more apart from each other than east and west, rise and decline. A sacrifice is a work, that we give God, whereas the promise is God's word, which gives us God's grace and mercy. It is inconceivable how Gods promise could become a human sacrifice. [...] They give, but Christ promises the people.
  (WA 8, 512, 12 and 28)

And much more …

Against the Papacy
Against the free will (See one of his main works "De servo arbitrio")

A final word …
Luther was misused by some European principalities in the 16th century to shrink the popes and the Kaiser's influence. Against Luther's will it came to a schism, building of the Lutheran church and other confessions of Protestantism.
Comment: It is worth re-iterating Caleb's comment above as well; that Luther never set out to start a new church, which is why Lutheranism and Catholicism are compatible on many things.
Comment: @Farseeker I'm not sure about that. In his "Morphologie des Luthertums" (Morphology of Lutheranism) Werner Elert points out, that Luther's reform of the curch was like their destruction and *total abolution*. He threw the CIC into fire ...
Comment: Sweet summary, Karl.
Comment: @Farseeker Forget what I said. It looks like you're right :)
Comment: @Farseeker: My comments above didn't take into account the whole span of time. He very certainly effected the start of a new church so (although I still argue he opposed it at first and didn't think that's the way it should have gone down) it's hard to argue about what ended up happening. Lutheranism and Catholicism are only compatible is so far as each has some measure of success in their pursuit of truth and following the one true savior not through any heroic motives of a man :)
Comment: I made a few minor edits.  Please review them and make sure I didn't mess up your meaning at all.
Comment: The link to the tower experience has disappeared. I will see what I can find. Here's the wayback link: https://web.archive.org/web/20121210212403/http://www.orlutheran.com/html/tower.html
Answer: The main disagreements between Luther's understanding of Christianity and the Roman Catholic church's teachings concerned the way in which we're counted righteous in God's sight, whether we have free will in our unregenerate state to respond affirmatively to God, and whether the Scriptures alone are the final authority to determine Christian doctrines. Luther held that the Christian church is dependent on Scripture as the Word of God, and that the papacy was based on a faulty understanding of various Scripture verses. Secondly he held on the basis of Scripture that conversion isn't something we can contribute to but is wholly the work of the Holy Spirit who enlightens with the saving knowledge of Christ who He will. And thirdly the way in which we become righteous in God's sight isn't through our own personal endeavours but is through God accounting us righteous because of our faith in Christ, who atoned for our sins.
In one of Luther's sermons he describes the situation that existed before he became acquainted with the truth which explains the darkness which people were living under prior to the Reformation:

….the miserable pope has contributed a great deal with his doctrines, ordinances, and laws, causing pious hearts to be greatly terrified by proclaiming that it is necessary to pray, fast, hear masses, make pilgrimages, and that it is a mortal sin if they fail to do this. Terrorized like this, nobody could know when enough is enough, because true comfort, forgiveness of sins through Christ, had disappeared completely. As a result people ran to St. James and tormented themselves with pilgrimages, fastings, and other works, to the point in my estimation that there could not have been a greater misery on earth. I myself have seen many who were unable to bear such deep anguish, on account of which they fell into despair through intense fear and terror, and were seized with horror before God's dreadful judgment. For by his preaching the pope had nearly succeeded in scaring us to death of Christ; we considered him to be a stern judge. I, too, had been one of those who expected Christ to be nothing more than a severe master, and as a result I called on the Virgin Mary to stand by me and be my advocate before this judge. Others did the same thing because that was all they knew. We all said, The judge is coming, the judge is coming; I have been a bad boy, help, dear Virgin Mary, otherwise there is neither comfort nor help nor counsel for my poor soul. That's how we babbled, and people did not know what else to do. For they had lost Christ, the true and only Saviour. (Pages 46,47, Vol V, Complete Sermons of Martin Luther, Baker Book House, 2007)

The Lutheran church came into existence because it proved impossible to reform the papist church. The latter continued to insist that it was truly Catholic and that Luther, and those who agreed with him, were heretics (instead of being in reality the true Catholics), so there was no other option but for Luther to separate from the church controlled by the popes. This then led to the formation of the Lutheran church (i.e. not to be confused with present day Lutheran churches which have diverged from Luther's teachings to a greater or lesser extent). Luther explained in his Table Talk why he separated from the popes:

The chief cause that I fell out with the pope was this: the pope boasted that he was the head of the church, and condemned all that would not be under his power and authority; for he said, although Christ be the Head of the church, yet, notwithstanding, there must be a corporal head of the church upon earth. With this I could have been content, had he but taught the Gospel pure and clear, and not introduced human inventions and lies in its stead. Further, he took upon him power, rule, and authority over the Christian church, and over the Holy Scriptures, the Word of God; no man must presume to expound the Scriptures, but only he, and according to his ridiculous conceits; so that he made himself lord over the church, proclaiming her at the same time a powerful mother, and empress over the Scriptures, to which we must yield and be obedient; this was not to be endured. They who, against God's Word, boast of the church's authority, are mere idiots. The pope attributes more power to the church, which is begotten and born, than to the Word, which has begotten, conceived, and borne the church. We, through God's grace, are not heretics, but schismatics, causing, indeed, separation and division, wherein we are not to blame, but our adversaries, who gave occasion thereto, because they remain not by God's Word alone, which we have, hear, and follow. CCCCLIII, Table Talk, translated by William Hazlitt.


How much energy could we save if we all got up at sunrise

Question: Just had a thought: How much energy could be saved if everyone got up at sunrise? Perhaps it would have a counteractive effect somehow but my thought is that if you're up less during hours that it's dark you wouldn't need to have your lights on during those hours.
Comment: Maybe it would make more difference if we all went to bed at sunset!
Comment: Much of renewable energy (hydropower, wind power) is generated without paying attention to the time of day, so sustainability-wise any Watt that you can use in the early morning so that you don't have to use it during peak time is a way to reduce the load on peak time electricity, which is often generated with fossil fuels. (This only applies to areas, where the electricity grid contains _some_ "renewable electricity".)
Comment: Yeah, how many people these days get up long before sunrise?
Comment: How many people would use significantly less lighting if they get up at sunrise? I don't get a lot of light in my home's north-facing windows, so I use the lights even when I get up well after sunrise. Not that lighting is a big consumer of electricity, my lights are mostly 11W LED's, so if have 5 lamps on for 4 hours a day to make up for getting up before sunrise, that's 20KWh/year, about .8% of my total household power usage.
Comment: Difficult to say as it so much depend on the activities an individual performs. Maybe we even experience a rebound effect of people getting up earlier but sleeping less and spending the time on consumption of energy and materials (food, goods, services)?
Comment: Also conside all the people who leave outdoor lights on all night, even though no one is using the lighted spaces.  E.g. landscape lighting, empty parking lots, 'security' lighting (which IMHO only makes sure your burglar can see where he's going), and so on.
Answer: The best analogy for this is the use of daylight savings time, where in effect people wake up one hour early than they usually do.
A study by the US Department of Transport in 1975 (see page 4 of the website),

showed that Daylight Saving Time trims the entire country's electricity usage by a small but significant amount, about one percent each day, because less electricity is used for lighting and appliances.
Although a 1976 report by the National Bureau of Standards disputed the 1975 U.S. Department of Transportation study, and found that DST-related energy savings were insignificant.

A more recent report, referenced by the California Energy Commission states,
The study concluded that both Winter Daylight Saving Time and Summer-season Double Daylight SavingTime (DDST) would probably save marginal amounts of electricity - around 3,400 megawatt-hours (MWh) a day in winter (one-half of one percent of winter electricity use - 0.5%) and around 1,500 MWh a day during the summer season (one-fifth of one percent of summer-season use - 0.20%).
So the energy savings would be small.

Edit: Additional data on potential energy usage & savings from Daylight Savings
Thanks for @Stempie for the additional data.
According to the Initiative Neue Marktwirtschaft  (Initiative New Market Economy) [German language], by way of example, in 2010 Germany used 600 - 650 TWh of electricity.
An average nuclear plant produces about 1.4 - 1.5 GW, which is 11 TWh/year.
An over average bituminous coal plant produces about 1.7 - 2 GW, 12 - 14 TWh/year.
So this means, 0.5% of the total German energy consumption in 2010 was about 3 TWh  was slightly more than a quarter the output of either a large coal plant or a nuclear plant.
Comment: If you would add the math from my answer, I'd delete mine and would call youes "perfect answer" ;-)


PCA-like analysis for dataset that has both categorical and continuous variables

Question: I have a dataset containing a categorical variable and multiple continuous variables. The categorical variables are coded as discrete integers, whereas the continuous variables are just a range of floats. I believe that the variance in my dataset can be almost entirely described by the single categorical variable and one of the many continuous variables. To justify this, I would be interested in using PCA, but I'm not sure the best approach to use when I am considering categorical data. Any suggestions?
Comment: PCA requires you to be able to define meaningful distances between categories.
Answer: I'm not aware of any the dimensionality reduction algorithms (like PCA) that can work with categorical values.
However, an approach that could help you with that is to make a one-hot encoding of your categorical variables (if the number of possible values is manageable. Otherwise, try to pick only the most frequent values and assign the rest to a single variable).
If you are using Pandas DataFrames, get_dummies can be helpful.
Answer: How many values can the categorical value take?
Maybe make a column for each possible value and have 1 if the column name matches the categorical value, 0 otherwise.
I think that will show up in PCA.
Answer: There are several discussions on this in the stats SE. As a starting point: https://stats.stackexchange.com/q/5774/232706


What Software Is Used For Autonomy Software Simulation?

Question: I don't have a physical robot but I would like to test the performance of my C++ code for odometry, SLAM, and path planning. Are there any good simulation software where I can test my algorithm implementation?
Answer: There are quite a lot options for this, each with different features, strengths and weaknesses. A few examples:

Gazebo (as mentioned by edwinem): very well known in the robotics community, some would say it's a little bit dated
Microsoft Airsim (also mentioned by edwinem): originally developed for autonomous drones and autonomous driving, uses the unreal engine for high image quality (experimental support for Unity)
NVIDIA Isaac SDK: a "newcomer" with a lot of manpower from NVIDIA in the background where the focus is more on indoor applications, also has the ability to work with ROS. It uses the Unity engine for high quality image rendering (Unreal support was planned, but doesn't seem to get pursued at the moment)
webots: general purpose simulator with quite a few robot models included, has C++ and Python APIs and is known to work with ROS
robotbenchmark: builds on webots and allows you to develop your skills in different challenges presented on the website (note: the robot is programmed in Python, not C++)
Answer: If you want to test everything together then you need to setup a simulator like Gazebo(integrates well with ROS which I assume you are using). Other options could be Airsim, or some custom simulator. These options though and are more involved in required setup on your part.
Testing separately:
SLAM is pretty easy to test. Just download some dataset such as KITTI, or Euroc, and test your algorithm on their data.
For path planning I would take a look at what OMPL integrates into, and setup your code in the same way.


How do i disable the ctrl+click on an Apple Mouse

Question: I'm finding it hard playing my games because of the ctrl+click that apple made for 1 button mouses. Can anybody help me because it's not doing what i want it do, it just does a right-click.
Answer: If your mouse really has two buttons, like the Mighty Mouse or Magic Mouse, just configure it as a two-button mouse under System Settings -> Mouse. Then, CTRL-Left click should be sent as such to applications.


Function of Minor sixth chords

Question: What are the precise harmonic functions of the Minor sixth chord? I remember that I read somewhere that they play often the role of the I degree in a chord progression (like the often used 6/9 chord) but why this? If this is correct when I find that D-6 in picture I should say that I'm in the tonality of D minor and not F major.. basically that one cannot be a sixth of F cause on the sixth degree of a major scale I should find a min7 chord right? Thank you and sorry for the dumb question, I'm studying jazz and still have so much to learn!
Answer: Dm6, as you have written, comprises D F A B. The fact that there's a B♮ in there isn't that important. That note features in the scale of D melodic minor (D E F G A B C♯), so it could be expected in Dm - or the relative F major too.
As far as its function is concerned, it gets used as V/V, containing notes similar to G9(no root). It's also closely related to vi in key F, no surprise there!
F69 contains F A C D G, so isn't really a comparable chord.

Function of Minor sixth chords


What are the keyboard shortcuts (binds) when playing commander?

Question: One of the most important things to being efficient in an RTS is learning the key-binds.  However, I don't see a list of key-binds in Natural Selection 2.  What are they?  Does it differ for alien/marines?
Answer: The commander hotkeys are laid out in a grid system based on their position in the UI. The top row (of tabs) are assigned QWER. The two rows of icons below the tabs use ASDF and ZXCV.
Space will take you to the location of the last alert (i.e. structures under attack, marine requesting ammo, etc).
You can select a group of buildings or units and press Ctrl+1-Ctrl+5 to save the group, and 1-5 to reselect that group later.
Comment: @BlueRaja-DannyPflughoeft I'm trawling through the game's source code to see what I can find...
Comment: I know there are binds other than those, though.  What are they all?


Why did the Marauders not find the room of requirement?

Question: The Marauders found every secret passage out and into Hogwarts and every shortcut, hidden passage, and hidden room in Hogwarts, how did they miss the Room of Requirement?
Answer: It's possible they did.
It's possible they never had need for the Room of Requirement. The one time that I can think of that they might have needed the Room of Requirement is when Lupin needed a spot to hide his Werewolf problem, but Dumbledore figured that out for him.

"But then Dumbledore became headmaster, and he was sympathetic. He said that as long as we took certain precautions, there was no reason I shouldn't come to school..." Lupin sighed, and looked directly at Harry. "I told you, months ago, that the Whomping Willow was planted the year I came to Hogwarts. The truth is it was planted because I came to Hogwarts. This house" - Lupin looked miserably around the room - "the tunnel that leads to it - they were built for my use. Once a month, I was smuggled out of the castle, into this place, to transform. The tree was placed at the tunnel mouth to stop anyone coming across me while i was dangerous."- Harry Potter and the Prisoner of Azkaban, Chapter 18 (Moony, Wormtail, Padfoot, And Prongs)

Another possible explanation is that they did know about it but couldn't put it on the map because it is unplottable, and the room has rules.

The beauty of the Room of Requirement was that it adjusted to nuances. Even the Marauder's Map couldn't tell you who was inside it.- Everything you need to know about the Room of Requirement - Pottermore

To me this quote means that even if the Marauders did know about it it was protected magically against being put on their map.
Comment: my memory is grey after falling through the veil...
Comment: Sorry about that...
Comment: Somehow I have trouble imagining Bellatrix being sorry for Padfoot.
Comment: Wouldn't you know, Padfoot? :P
Comment: It is not necessarily true that the Marauders could add things to the map (which was probably a part of the Hogwarts security system that they were able to hack and gain access to).
Answer: Purely speculative in-universe explanation: They never needed it.
Purely speculative out-of-universe explanation: The room was not conceived until after Prisoner of Azkaban was sent to the publisher.
Comment: @DavidThornley That was in The Goblet of Fire: "The first mention Harry Potter heard of this room was in 1994, when Albus Dumbledore told Igor Karkaroff of his discovery of a room full of chamber pots when he needed to go to the toilet" http://harrypotter.wikia.com/wiki/Room_of_Requirement
Comment: IIRC, Dumbledore mentioned earlier in the series finding a room full of chamberpots on his way to the toilet, and being unable to find it afterwards.  That sounds an awful lot like the Room of Requirement.
Comment: I guess this establishes that the Marauders never needed a potty break while they were sneaking around the castle.
Answer: It would not be especially troublesome if the Marauders had never found the Room of Requirement. If you don't know about it, the only way to find it is pretty much sheer dumb luck. To quote the original description of how to access it, from Chapter Eighteen of Order of the Phoenix:

"Dobby said to walk past this bit of wall three times, concentrating
  hard on what we need."

Apparently, then, there are three conditions to accessing the Room of Requirement:

You must be in front of the wall.
You must concentrate on what you need.
You must walk past it three times.

The odds of these three things converging together by accident would seem to be pretty small. While it does seem that a few people (e.g. Dumbledore and Filch) may in fact have stumbled upon it by accident, there doesn't seem to be any reason to think that this would be likely to happen to any given person – even someone who spends a lot of time exploring the castle. In fact, Voldemort assumed that he was the only one who had ever discovered it. From Chapter Twenty-Seven of Deathly Hallows:

As for the school: He alone knew where in Hogwarts he had stowed the Horcrux, because he alone had plumbed the deepest secrets of that place...

Additionally, it is perhaps arguable that even if all three conditions are met, the room will not necessarily show itself. Dobby says:

Sometimes it is there, and sometimes it is not, but when it appears,
  it is always equipped for the seeker's needs.

Depending on how you understand the first four words of this quote, it might mean that even when you do properly seek it, it will only be there sometimes.
Either way, it is entirely reasonable, even expected, that even though they "found every secret passage out and into Hogwarts and every shortcut, hidden passage, and hidden room in Hogwarts" they would not have found the Room of Requirement.
Comment: @Jenayah Dobby mentions it: *And Dobby knows Mr. Filch has found extra cleaning materials there when he has run short, sir, and –"* Unclear, though, if it was accidental or not.
Comment: Out of curiosity, how do we know Filch found it? I remember Dumbledore and the toilet thing, but Filch?
Comment: Okep, thanks for the info :)
Comment: @Jenayah No problem. I was originally going to include the quote in the post, but I thought it would needlessly distract from the point (as it is kind of a side point).


Sharepoint 2010 moving site collection to different database error

Question: I am trying to move a site collection from one content database to another content database.  First I used the following PowerShell command:
New-SPContentDatabase -Name New_DB -WebApplication http://portal/

I confirmed that this did in fact create the DB in the SQL Server.
I then used the following command:
Move-SPSite http://portal/sites/hr -DestinationDatabase New_DB

This generates an error stating that the "Operation is not valid due to the current state of the object"
Can anyone help point me in the right direction with this?
Thanks
Answer: Try disabling all the Sharepoint services before moving the database.


Through which processes became words in classical Chinese that tautological?

Question: There are a lot of different words for many concepts in classical Chinese,
for instance for the personal pronouns. Due to which circumstances could this happen?
Answer: Synonyms arise when two different topolects or languages are mixed, perhaps as a result of warfare or a political union, but also because of technical innovation, cultural exchange and so on. This happens constantly in all languages.
As for pronouns in classical Chinese, they correspond to a highly hierarchical social order. You would often need to refer to yourself in third person to show respect and to be in line with the Confucian ideal of humility. Even the emperor could refer to himself as 寡人, third person for one of a few select.
Then again, if the emperor calls himself 朕 (I), then everyone below him would have to refer to the self using a lesser term, in hierchical order. 在下 is the one beneath the emperor, 我 is the worthless body, 奴才 is the slave, etc.
Comment: yes. in many cases they are not strict synonyms though because they differ in tone and therefore in meaning.

also note that the membrane between the classical language and the spoken language across thousands of years is highly porous- informal genres like poetry and classical blog (筆記) being particularly interesting transmission vectors for the absorption of vernacular (often but not always multi-character) terms into Classical Chinese which can then be used ahistorically along with many other terms. For example, 阿堵物.
Answer: manners: regard others and show self-abasement
e.g. (incompleted)
Answer: There is a thing called 面子 in our Chinese culture. We talk about ourselves in one form of pronouns to show others that "I am humble/modest." or "I respect you a lot." Example: 在下、末将 = I.
But if we got home, when we talk to our family, we are less restricted and we want to show our rights and power to our sons and daughters, so we use another form of pronouns.Example: 老夫、吾 = I.
I hope these will help you.


What is the primary role of a winger?

Question: Is the winger supposed to stay wide? Does he have a special function apart from piercing through the wing?
Does he have to track back?
Answer: In the modern game there are two kind of wingers: wing-backs and attacking wingers
The difference between a wing-back and a full-back is that the former has more attacking duties, mostly because there are no wide midfielders or wide attackers in the team.
Usually a 5-defenders formation contains wing-backs, where you have 3 center backs, so the two side defenders can roam almost freely on the wings and help the attack. Having 3 central defenders protects the defence on counters in the absence of the side defenders.
4-men-defences can also have wing-backs: just look at Marcelo (Real Madrid) or Dani Alves (Barcelona), they help a lot in the attack and usually are part of the attacking construction. But in their cases the team needs to be able to cover their defensive spots. Usually a midfielder can conver in case of a counter.
The wing-back's job in attack is to make runs, receive the ball wide of the pitch, cut it back or cross it to the froward(s).
An attacking winger (or wide forward) is an offensive player who usually receives the ball close to the side line, dribbels, cuts inside or crosses the ball. They are usually very fast and have great ball skills. Usually they play in a 4-3-3 or 4-2-3-1 formation in attack, but often the formation changes to 4-5-1 or 4-4-2 when defending and the wingers become right and/or left defensive midfielders. Example: Gareth Bale (Real Madrid) is the right forward on attack and becomes the right midfielder on defense.
While wingers mostly play close to the side line, it's not usual for them to cut into the middle, especially in attack. Wide forwards often cut inside to shoot with their inside foot, like Arjen Robben (Bayern), or to stretch the defense.
Answer: In soccer (football), a winger is an attacking midfielder in a wide position. Wingers are usually players of great pace or dribbling ability so as to provide cut-backs or crosses from which strikers can score. Their main function is to support attack from the wings. Wingers do lots of high-speed running from defence to attack.

What is the primary role of a winger?


14-2 Tap Branched From 12-2 Feed on 20amp Circuit...What To Do?

Question: I have a switch by my front door that supplied power to a receptacle.  I want to wire that switch to an existing ceiling fan/light combo in the same room.  I've already made the outlet constantly hot.  The switch currently controls nothing.  I inspected the wiring situation in the attic to see how the fan was getting power and what my options were for running 14-3 from the fan to the switch.  Here is what I found.
The person who installed the fan tapped into a 12-2 wire that feeds a dining room outlet with 14-2 cable to the fan.  This outlet is on a 20amp circuit, which also supplies another dining room outlet and 3 kitchen backsplash outlets.  The splice was just out in the open in my attic.  I fixed that by containing the entire splice in a properly grounded metal box mounted to a ceiling joist, but now I'm wondering if I should replace the tap wire that runs to the fan with 12-2, since it is on a 20amp circuit and then run 12-3 from the fan to the switch.  Would there be any issues with the fan unit wiring not being 12g wire on this circuit?  I haven't had any issues with the fan wired this way in the 10 years I've lived in this house, but now that I've seen how this is wired, I want to make sure it's all up to code.  The person who wired the fan didn't even contain those connections in a fixture box.  They are also just out in the open in the attic.  I'll have to install a proper ceiling fan mounting box.
Thanks for any help.
Josh
Answer: You should re-feed this fan from a lighting circuit or other 15A circuit.
A ceiling fan CANNOT be supplied from a kitchen or DR receptacle circuit. Whoever did this was clueless with regard to codes and proper wiring.


Bitbucket with ssh : git push OK but git clone KO. HTTPS works fine

Question: My company has a bitbucket server hosting git repos.
On my machine, https works fine and I can clone/pull/push repos whenever I have R/W access.
I added ssh credentials to bitbucket to use ssh (easier use once set up).
Using the ssh address, I'm able to pull and push my repo using ssh but I can't clone the same repo to get a second local copy (Permission denied).
Moreover, whenever I clone the exact same repo using https (it works), change the remote to ssh, then try to push using ssh, I get the same Permission denied error.
I don't know how the first local repo instance was cloned, nor why it's able to pull/push whereas the second instance can't.
I used git config -l to check whether both repos had different config, but they don't (once the https-cloned repo has the ssh remote set up). Both have the same config but different behaviour...
Any ideas ?
Answer: If you have a company hosted BitBucket, I would suggest that you went to the team who is responsible for help. There could be any number of things they have changed which could cause this.


Is blender the right tool for my simulated 3D environment?

Question: I want to create a (non-realistic) 3D representation of a true nautical environment (e.g. a harbor). I get a real-time stream of data for each ship in the harbor, containing position, size, speed, direction etc. over a tcp/ip interface. (For each vessel, I get an update every 3 seconds. Potentially there are hundreds of ships in the harbor.) Each ship can be represented e.g. by a simple box with the right dimensions floating in a blue plane representing the water. Then I want to put a number of virtual cameras in this virtual harbor, and output a video stream (h.264 over tcp/ip multicast) for each virtual camera at e.g. 10fps. These cameras are at a fixed position, but I need to be able to change pan/tilt/zoom from an external (tcp/ip) interface. All this needs to be done in real-time... Would Blend be the right tool to accomplish something like this? What would be a good approach to make something like this? Or do you have suggestions for other tooling that may be more suitable?
Comment: I would say yes, blender most certainly can do that. (It shouldn't be that hard, everything in blender is scriptable.) Is it the best, software to do it, I do not know, because I don't know what else is out there.
Answer: Blender is capable of doing what you describe.
One major hurdle with this system is going to be the viewing client. If you need to output a stream over the network, your simulation will need to render to python socket. Probably most easily done in BGE. possible.  Then you'll also need an adaptor to make that a usable video stream. (If you were trying to open it in VLC or iTunes type app)
Another option might be to build your clients with BGE also, then you could use a Multiplayer framework to let people login to the running simulation.


Did Not receive a recall notice for sticky dashboard. Will Toyota still fix it?

Question: Did not receive a recall notice for sticky dashboard on my 2010 Toyota Camry. It was in husband`s name at that time. Will they still fix it?
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Comment: I had a "notice to repair" from Mazda for my ~30 year old, Jap-import 1990 Familia.  Dealer fixed it for free, just had to book the time.
Answer: If there is an actual recall for your vehicle, it will be against the VIN in the Toyota computers. If you take your vehicle into a Toyota dealership, they will run your VIN to see if the recall exists against it and will fix it for you if it comes up. It really doesn't matter if you received a notice or not. It doesn't matter if you were the owner of the vehicle when the recall came out (or if it wasn't in your name), Toyota (or any manufacturer for that matter) will honor the recall if it hasn't been completed on the vehicle already.
NOTE: If you take it in and they say it needs the recall, they may need to order parts or whatever. Don't expect them to fix it "Johnny On The Spot", as they may not be able to do it right away. They will honor it, though.
Comment: +1. I had a faulty Takata driver's airbag in my 2011 Toyota Yaris. They did not bother contacting me, and when I took my car for the next service, they told me about the recall. So, not all recalls will mean the manufacturer will contact the owner.
Comment: @juhist there are very few recalls that the manufacturers have been forced to proactively search and find ALL vehicles to effect a change - usually on safety grounds. Most are done on an ad hoc basis as vehicles come into a registered dealer / service shop.


Zhiyun Weebill Lab with Tokina 11-20mm?

Question: Have anyone used the Zhiyun Weebill Lab gimbal with a crop sensor DSLR and the Tokina 11-20mm lens? Would it balance without a problem? Would it balance with an ND filter screwed on?
Comment: Voting to close as off topic - though I think a broader, *how do I know my gimbal will work* type question would be pretty awesome.
Answer: Spec says it holds 3kg. Put your camera+lens+ND filter on your kitchen scale and check. My EOS70D and my heaviest lens (a 120-400mm) total 2.5kg, so your is likely well below this. The gimbal seems to come with a sliding plate, so the longitudinal position of the CG shouldn't be an issue either.

Zhiyun Weebill Lab with Tokina 11-20mm?


Why was "Why are religious people..." migrated?

Question: Why was https://cogsci.stackexchange.com/questions/13611/why-are-religious-people-seemly-unable-to-hypothesise-about-a-universe-without-g migrated?  It seems like a clearly philosophical question.
Answer: At the simplest level, the OP requested migration -- or at least that's how I took the interaction via comments to go.
On a more complex level, I'll explain why I asked the OP in the first place. I take it that the relationship between philosophy, the OP's observation, and motives/limitations surrounding logical thought are manifold, and clearly not all questions about the relationships between these things are philosophical.
Here's what I think anyway about some of these relationships:

Philosophy can look at the idea of motivation within the domain of practical philosophy (which in this case may or may not mean ethics).
Philosophy can provide answers on the generic question of blind spots in our reasoning or on the idea that emotions can cloud judgment (or the opposite).
Philosophy can also look at ideas of how religious belief impacts epistemology.

There's definitely more that could be added to the above list.
But at least on reading the OP's questions and assumptions, I didn't take the question to be about the above list per se. (I'm not infallible as anyone who has been around for more than a week will attest ).
Instead, I took it to be built around a personal experience in search of a different sort of explanation along the following lines:

In the OPs experience, religious people are incapable of considering even in a thought experiment the non-existence of God.
The OP believes the cause has something to do with them being religious.
The OP describes this as an emotional barrier: "it seems as though atheism is so uncomfortable to them" "Why is it so difficult for them to discuss atheist principles when I have no trouble discussing their religion with them?" (I take the following also to be in that category: "they seem unable to do so, because to them it doesn't make sense that God doesn't exist, or whatever else is said in their religious texts.")

From the above, I took it to be have a strong potential for being a question about psychological barriers rather than a request for a philosophical explanation of any specific problem in philosophy. As such, I asked the OP whether that might be closer to what they were looking for (at least that's my intention in the comment where I asked).
The OP then asked about migration though I'm not sure if that's just because I prompted it or not. So I migrated it.
Comment: It's true the question could have gone both ways, but I would have instead guided the querant towards clarifying the philosophical aspect of the question, since he chose initially to post it here.  It's also worth noting that no-one has addressed it over there...
Comment: Regarding the question being able to go both ways, I think we need some pretty clear guidelines for questions like that one or else it most definitely turns into something that's not philosophy -- as has happened time and again here.
Answer: For what it's worth, I would disagree with the premise of the question. There are lots of examples of religious people considering a universe without God. It doesn't seem really a "cognitive science" question, it's a question about theology that is written in a condescending or ill-informed manner.
Comment: I wasn't offended by the question, but I would have liked a chance to respond to it --I feel I have legitimate philosophical reasons for not giving serious consideration to a universe without God.  I didn't feel the OP's real question was if religious people have different brains.
Comment: But in some cases there are Religious people who "cannot" conceive of a universe without a deity, so it was addressed to that situation. Even if condescending and ill-informed, an answer can still be given. What the asker does with the answer is up to them. I can only choose to answer, or keep silent. Silence does not advance the state of knowledge, although answering often does not either.
Answer: I just now followed the link because the question was familiar, and I see that I wrote a comment explaining why it is a Psychological question. Perhaps it also has Philosophical aspects, but my take on it was as I said, ego requiring support for its ideas. For some ideas, there is nothing like a deity to validate them. (That's right, there is nothing like a deity) (always a comedian...)


How do I get more chocolate bars?

Question: I've ran out of chocolate bars and didn't realize I could enchant my giant spoon and knight's armor. Is there any way to get more reliably?
Answer: According to the Candy Box 2 wiki, you can only get 13 chocolate bars total:

You can buy 1 at the shop.
You get 1 for throwing 1630 candies on the ground
You get 3 for answering the squirrel's questions
You find 1 in the cave
You find 3 beneath the tree, after finding the map (rocks) in the cave
You find 4 in the hole

Without resorting to any sort of cheat/glitch, if you've used your 13 chocolate bars then you're out of luck.

However, there is currently a glitch involving the text-save/load feature that allows you to earn more:

Go to Save, click Get Current Game as Text and copy the text
Start the game over (refresh the page), and get enough candies to get the Save feature again
Paste the text into the bottom text box and click Load
You can now re-earn the chocolate associated with the cave.  That means you'll find one more chocolate in the cave and, once you find the cave-rocks again, three more beneath the tree.

You can repeat this to gain as many chocolates as you want.

You could also edit your save file.
Follow the steps above to copy your game-state as text, then find the section with the text number gameChocolateBarsCurrent=0.  Change the 0 to whatever value you want, then load the game.

Finally, once you beat the game, you can use the computer to give yourself more chocolate.
Comment: The text-save/load glitch doesn't appear to work anymore.
Answer: I found one in the caves, so they might be there randomly.
Comment: I also found one in the caves, but only one, which leads me to believe that it doesn't appear randomly.
Comment: @PietervanNiekerk I found 2 in the cave. So, yeah, I guess it's random.
Answer: You can get some from the hidden treasure under the tree near the coast:

But you need to find strange stones in the cave first, which shows that part of the map to click on.
source: 5pike
Comment: I haven't been able to click there. How do I get to that hidden treasure?
Comment: -1 This is just an arbitrary 3 of the 10 chocolates you can earn.  They do not restock themselves - once you've found them, you can't find them again *(without resorting to a glitch, see my answer)*.  So, this does not answer the question.
Answer: If you text save, reload, and go back to the cave entrance you can get the one you find in there and the ones in the trees again too!
Answer: If you want to cheat yourself anything, you can save as text and then edit the text however you want, then load it. I don't recommend this if you want to finish the game legit though...

How do I get more chocolate bars?


Mass email Opportunities with Email template

Question: I have some custom fields on the Opportunity page layout; one captures the contact name and one is for the contact email. These are formula fields that query the contact roles related list. Once the fields are populated, I want to create a list view with Opportunities that have closed in the past 30 days and send out a mass email to them; don't want to automate this as I want to have the flexibility to deselect a few opportunities based on our discretion. How would I configure a custom button to send a mass email to those contacts at the respective contact email address and have the ability to select an email template which has fields mapped to the Opportunity record?
Answer: Here is how I would do it. Have a custom setting to store the email template ID or email template name on it. Whenever you need to change the template, you can change it.
Create a list button, and a Visualforce page. Let the controller behind the Visualforce pick the email template from the custom setting, the email address from the opportunity and fire the email.
Here is an example: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_sosc_custom_button.htm