Is it possible to figure out whether two addresses are in the same wallet?

Question: I'm wondering, if I sent some bitcoins from one of my own addresses to another address in my wallet, will it be possible for someone to figure out that both addresses are in the same wallet? Or can I claim the other address is not my own and no one can find out?
Comment: I noticed that there is nothing on that page about figuring out that certain addresses are in the same wallet, despite the fact that there has been specific research on that topic.  Perhaps this question could be rephrased to more specifically address that topic?  Or if we want it all to go on that other one, maybe someone (KoKo or anyone else) could start a bounty on that question for an answer detailing this point.  Personally I favour rephrasing this question since it is an important topic and really much more specific than "how anonymous are transactions".  Any feedback on this KoKo?
Comment: possible duplicate of [How anonymous are Bitcoin transactions?](http://bitcoin.stackexchange.com/questions/52/how-anonymous-are-bitcoin-transactions)
Answer: It is possible to tell that two addresses are in the same wallet if they both appear as an input of a transaction. This indicates that one person owns both of them as they can spend both of them.
It is also quite likely that when you are sending a transaction that has one neat input (say, 1BTC), and one not so neat (say, 0.59721364BTC), that the latter is most likely a change left over from a transaction you sent to someone and is being sent to another address you own from the same wallet. This claim could be possibly deniable, but should be true in most cases.
Comment: Re first paragraph: Having both addresses as inputs of a transaction is evidence, but not definite proof, that they are owned by the same person. There are many use cases when different people may want to each supply an input.
Comment: @MeniRosenfeld Well, I personally can't think of many. Same thing could be achieved by multisig addresses and just sending the person the money from a transaction you want to spend together.
Comment: No. Once you send to the multisig address you're at the mercy of the other party. The whole point with multi-input is to make atomic swaps where neither party can deny the other - e.g., mixing transactions and swapping colored coins.
Comment: @MeniRosenfeld They could use 2-out-of-2 multisig address. But I get your point.
Comment: I'm not sure you do. To use a 2-of-2 multisig address they'd first need to send to this address. Once coins are in the multisig address, if the other party loses their key, you lose the coins. The other party can also extort you taking the coins hostage.
Comment: Shouldn't it be "neat **out**put" instead of "neat input"?
Answer: No, it is not possible to determine definitively if two addresses are in the same wallet. The protocol does not have the concept of the wallet. The wallet is a concept within the client.
That is to say, that the client presents the concept of a wallet as a collection of addresses. The only relation between addresses that the protocol knows about is senders and receivers, or, really, inputs and outputs.
It may be possible through a thorough analysis of taint to determine within a reasonable amount of certainty that several addresses are related to each other in a wallet.
Answer: There is no way to prove in the protocol that two address belong in the same wallet when you send from address A to address B in your wallet. Of course, if you are using some kind of online wallet they do know, but I'm assuming you are using a full one.
However, there can be clues that combined can be quite definitive.
1. Clues when you send the transaction
However, depending on the amount in address A, sending all funds to B with no change could be a clue that both belong to the same person. This is not a problem if you are sending a round amount like 1 BTC, but if you are sending 0.82421871 BTC and there is no change it is weird unless you are sending all your funds to donate or pay for something without a fixed price. It is the same if you send from A a round amount to another address and B gets a very weird amount.
2. Clues after the original transaction

Spending from both addresses in the same transaction. This is no proof because there are ways to build a transaction with inputs from two wallets, but it is extremely rare.
Sending funds between the two addresses frequently, specially if you do it both ways (from A to B and from B to A). This could happen with two parties that work a lot together, but it is a clue of some relation.
Sending from both addresses at the same time, even if it is to different addresses (you send two transactions, one from A and another from B, that get to the same block long after you did the original one). It can be a coincidence, but it is one more signal.

3. IP address clue
This is extremely unlikely, but if you connect to a rogue node that records your IP address when you send from A to B and then you connect to that same rogue node (or another one acting in coordination) when you send from B to somewhere else, it would have the same IP address associated to both addresses. You could avoid this by using Tor or changing your IP address in some other way.
Answer: It depends.  Bitcoin is traceable but pseudonymous.
So there would be a path from your first address to your second address.  There's no way to prove that the second address is in your wallet at that point.  But when you spend from that second address, any party that knows the second address is yours would know that the second address came from funds from the first address.
In other words, simply moving funds from one address to another address is not an effective measure for protecting your privacy regarding your financial transactions.
Answer: If you had the xpub you could see all the addresses derived from a particular seed, and as such determine if two addresses are linked in the manner you described. However it's extremely rare that any entity other than the actual wallet (in some cases) would be able to see this "extended public key" as it is very much a bit of private data.
Answer: Each address (corresponding to a public key) in your wallet has a corresponding private key. All private keys in the wallet are generated based on a single seed / passphrase. This why you are able to reconstitute your wallet on a new clean device. So a "wallet" is not strictly a client-side concept. Anyone with the phassphrase + pwd basically has access to all your private keys. Since nobody except the owners know about the passphrase there is no way for someone to mathematically prove that two addresses came out of the same wallet.
However, like others have mentioned, I/O and UTXO can provide some clues about the association between two addresses.
Comment: an public key is an public key and an address is an address
Comment: @Mercedes they are essentially the same thing where the address is a short and convenient version of the public key. simply address = RIPEMD160 (SHA256(PK))
Answer: If you compare two addresses, it is impossible to determine if they were derived from the same public key.


Programming an Arduino using Python, rather than C/C++

Question: I am not very skilled with the C Language and I was wondering if there is a way in which python could be used to program an Arduino. This would most likely require a different IDE in order to be able to debug the scripts them self.
Comment: There are couple alternatives for programming Arduino, one of them is [BitLash](http://bitlash.net/) and there is a [basic interpreter](http://hackaday.com/2012/05/01/arduino-basic-interpreter-using-lcd-keyboard-and-sd/). There are couple options when you search the Internet, but learning C/C++ will pay off in the end.
Comment: related, more general question: ["Arduino programming options other than C++"](http://arduino.stackexchange.com/questions/141/programming-options-other-than-c)
Comment: Thanks, I am actually getting a bit better at C, just not as good as I am with Python.
Comment: Is a raspberry PI an option?
Answer: It's going to be extremely difficult to get any kind of Python script running directly on the Arduino. The reason is that it's an interpreted language, so you would need the interpreter on-board in addition to the plain text script. There's probably not going to be enough memory for all of that.
Your best bet would probably be finding a way to compile a Python script to native machine code (which is how C/C++ works). I believe there are projects around to do something like that for other platforms, but (as far as I know) none which does it successfully for Arduino yet.
You might find some more useful information on this question at Stack Overflow: Is there a way to "compile" Python code onto an Arduino (Uno).
Answer: Yes, it is (somewhat) possible to program the Arduino using Python. One such project on Github is the Python Arduino Prototyping API v2. It provides very basic functionality such as digital I/O and analog I/O.
This can be used for very simple projects.

*This project is a bit of a hack at "programming" the board using the serial connection. It passes the commands over the serial connection to a sketch running on the board which then "executes" the Python command.
Comment: Well, that pretty crappy. It would be easier to use a Raspberry Pi.
Comment: So the board has to be plugged into a computer in order to actually run the code?
Comment: @JVarhol Oddly, yes.
Answer: There is a project which brings a Python virtual machine to micro-controllers, including the Arduino Mega.
Here's a quote from the Ardunio Mega README, which gives a feel for what this could be like (though, I've not tested this!):

The following is an example session using ipm::
<code>ipm> import avr, sys
ipm> avr.ddrA(0xff)
ipm> avr.portA(0)       # Pins 22-29 all at 0 V
ipm> avr.portA(0xa5)
ipm> sys.heap()
(2622, 7424)
</code>
Answer: I have used pyserial with great success in controlling the pins on the arduino.  Your workstation (laptop, etc) runs a python script that then communicates in real time to the arduino.
It's not quite the same as running the script directly on the arduino but I was doing quite a bit more than I thought the arduino could handle (some music analysis, hitting a REST api, etc).
Answer: Another option to consider is the Arduino Yun. In addition to the AVR chip which most Arduinos have, it also includes a MIPS chip running Linux. Since it's linux, you can easily run python code, and any pure-python package can be easily installed.
However, all the interesting input/output capability is on the AVR chip, not on the MIPS chip. Projects such as Autobahn and LininoIO solve this problem by running a special program on the AVR chip which performs I/O operations under instruction from the MIPS chip.
Answer: Yes,its possible with the recent new ArduinoPro H7 which has abilities to upload a written programme in Python and JavaScript and its a dual core,32bit.
Comment: Java Script? really? did you try it?
Answer: We know this is an open issue in Arduino programming and in the embedded world in general.
There are various solutions available on the market like MicroPython but most of them are dedicated to specific boards and don't allow to keep the system real-time.
We are working on a solution!
VIPER is a Python Virtual Machine for Arduino DUE and all ARM 32 bit architectures that runs on top of a real-time operating system.
This means that you can develop Python scripts that can be exexuted by Arduino DUE, UDOO, Spark (all boards) and also on the new ST nucleo boards.
Moreover if you need high performances and you re skilled in C you can develop real-time modules for VIPER that can be called and managed by the Python scripts.
You can see VIPER in action here http://bit.ly/kickviper
Comment: It's not an open issue. python is a horrible indentation language.
Answer: Yes. Python can be used to program an Arduino, simply by importing pyfirmata, which can interface the arduino with Python.
Comment: True. But that isn't what the OP is asking for.
Comment: I disagree. Using firmata is _effectively_ "programming an Arduino" using python. In fact I was surprised to see nobody else suggested it. From a beginner's point of view it's pretty much the same. I'm thinking of using it to help teach my son programming as python is a bit easier than C.
Answer: You could learn from C (AVR) how sensors work but it needs much more time.
Arduino IDE Code and Python Code for Arduino use C Code functions to make things simple.
Python and Arduino IDE if use Firmata they use serial communication and you think you code self.
Answer: You gotta use pyfirmata because that's the only way to make your son a PRO engineer who makes robots. Also, python can do more advanced stuff so use pyfirmata.


Is there a way to see all iPhone App Store purchases?

Question: I'm wondering whether there is a way to see all iPhone App Store purchases in a similar fashion that is available on Mac App Store in Purchased section.
Answer: I don't think there is a way to view just iPhone App purchases.
You can view your whole iTunes purchase history. You can see your iPhone app purchases there.
Open iTunes -> Store menu -> View My Account -> Sign in -> Go to Purchase History
Update: This seem to include all your purchases using your Apple ID (iOS App Store, Mac App Store, and iTunes Store)
Answer: This is now possible since iOS 4.3.3 by going into the iPhone App Store > Updates > Purchased.  It provides a list of your iPhone app purchases and allows redownloading from the iCloud.
Also you can visit reportaproblem.apple.com and all recent purchases will be shown.
Comment: If you have **Family Sharing** enabled, given that your family members shared their app purchases with you, you can also download their apps
Comment: @Syclone, How to sort by date?
Answer: On iOS, go to Settings > [your name] > iTunes & App Store.
Answer: Not true...
None of these links are possible, nor if they when they do seem to be relevant show history of purchases. I do have doubts that Apple Store have charged me few times for an application I have paid for over and over again. So when it comes to check what have purchased there is no way possible, except on the phone and they are not in logical order, which makes hard to pinpoint which have I bought recently that I have gotten charged for it few times. Sometimes it shows that I have purchased something but the some don't show I have paid for them, although I did already. Surprisingly enough sometimes an application will show a price on it, I will install and it will say that I paid for it before, but other times more often it doesn't say that, and it makes me pay for it few times. Now I have been trying to look up the history purchase and no where in hell is it clearly apparent that I can achieve that mission.


ERD tool that generates MySQL schema

Question: I'm looking for a tool that will allow me to draw an ERD and will generate the SQL that  creates the corresponding MySQL schema. Additional requirements are:

Runs on windows
Zero cost

Bonus points if it runs on Ubuntu too, but this isn't a 'must-have'.
Thanks,
Don
Comment: MySQL workbench will run on windows and Ubuntu. I'm running it on Maverick now. =D
Comment: @Don you cannot ask for tools on SO
Comment: @ZainShah120 it would appear that I can
Comment: @Don hahaha unless you are real DON on SO.. Please read the term and conditions on SO, questions asking for tools without showing any special effort for searching are not acceptable, better luck in future
Answer: MySQL Workbench
Answer: http://www.fabforce.net/dbdesigner4/
<code>DBDesigner 4 - Features
</code>
DBDesigner 4 provides powerful features to create a visual model of any database.
Starting from a reverse engineering engine to automatically retrieve a model from existing databases, extensive modeling tools and editors to a syncronisation function which will apply model changes automatically to the underlying database - it is all part of DBDesigner 4.
Design Mode vs. Query Mode
DBDesigner 4 supports two switchable userinterfaces. The Design Mode is used to create and maintain the visual databases model. The Query Mode is used to work with table data and build complex SQL query statements for the use in PHP, Kylix or another programming language.
Plugins and Open Source
The models created in DBDesigner 4 are stored in XML. They can be modified by third party plugins which are direcly launched from within DBDesigner 4 and other third party products.
Because DBDesigner 4 is an Open Source project it is easy for programmes to develop new plugins or expand DBDesigner 4 to adapt specific needs.
List of features
<code>* Available on Linux / MS Windows
* User Interfaced based on industry standard layouting software
      o Canvas navigation similar to Adobe Illustrator® and Photoshop®
      o Palettes (docked / floating) including "Bird Eyes view"
      o Available objects include tables, realtions, labels, regions, images
      o Extensive Drag'n'drop support
      o Extensive Popup-Menu support
      o Advanced Editors
      o UNLIMITED Undo-/Redo- functions
      o Copy-/Cut-/Paste clipboard functions (XML, DDL)
      o Align functions

* Design Mode / Query Mode
* Reverse engineering MySQL, Oracle, MSSQL and any ODBC databases
* Userdefined schema-generation
* Model-To-Database syncronisation
* Index support
* Automatic foreign key placement
* Weak entity support
* Standard Inserts storing and sync
* Full documentation capabilities
* Advanced model printing
* Output as image
* All MySQL datatypes with all options
* User defined datatypes
* Database storage, ability to save model within database
* Network-/Multiuser access through database storage
* Version control*
* SQL Query Builder
* SQL Command History
* SQL Command storage within model
* Plugin interface
</code>

ERD tool that generates MySQL schema


What foods should I avoid when backpacking?

Question: Are there any foods that should be off-limits when backpacking because they have a negative impact on performance or well-being? I am thinking that candy-bars and very greasy foods might be candidates?
Comment: Popsicles and Ice Cream. Big mistake.
Comment: If you only care about the health aspects I think the answers to this question will apply to you, even though the titles are quite different: http://outdoors.stackexchange.com/questions/192/is-a-varied-diet-necessary-while-backpacking
Comment: Maybe related: http://outdoors.stackexchange.com/questions/11476/possible-diet-to-avoid-delay-defecation
Comment: Norwegians would always pack some [polar bread](http://www.thebreadkitchen.com/recipes/polar-bread/) They stay well tasting surprisingly long, are highly nutritient, pack efficiently and you score extra credits with outdoorsy people if you are seen munching on them ;-)
Answer: I try to avoid the following:

Carrying water (i.e., food that has lots of water in it).  The exception is fresh fruits and vegetables, which are worth the weight in my opinion.
Pre-made dehydrated backpacking crap.  Overpriced and unappetizing.

The key thing is that being in the backcountry shouldn't really change how you think about eating.  You cook food like you make at home.  Don't expect that if you aren't a good cook at home you'll suddenly be a master backcountry chef.  So, practice good cooking at home.
My bible on cooking and eating outside is the NOLS Backcountry Cookery Book.  Just buy it.  But the key ideas are:

Bring nuts and dried fruit (trail mix) for quick, fatty calories that you need to keep going during the day.
Bring tea, coffee, etc. to make hot drinks in the night and morning.
Bring dried grains (the book has a nice formula for deciding how much) for the staples.
Bring a bunch of interesting and interchangable things to help jazz up the grains.  Your trail mix is the first one.  Others are: tomato paste, salt, pepper, fresh veggies, garam masala, etc.
CHEESE.
Baking mix and some margarine ("Earth Balance" has a nice flavor) are good to have.  You can make pancakes, biscuits, savory fry breads, etc. that fulfill cravings.
Know the edible plants (and animals, like fish) in your area.  REALLY KNOW THEM if you are going to eat...and enjoy.
Answer: It depends on the kind of hike. But some of my 50 cents:

If you don't want to take tools to cook, use food that comes self-supportive.
If you don't have water, don't eat food that needs a lot of water (or dehydrating)
If space is important, use freeze-dried food.
If space is important, don't use food with lots of empty space in it, like normal bread, candy bars which are crunchy etc.
If the hike is longer than some days or in hot weather, don't use food that degenerates fast (like meat).

Some of my favorite food is:

Warm food: complete meals (well, minimal complete) in a metal case ... to be used on a mini cooker without the necessity of other tools (except a fork to eat)
Biscuits which are concentrated, with cheese or ham (latter only in case of not hot weather/short hikes)
In case of a short hike, I take an apple/banana (banana also good for short energy)
Answer: Avoid foods that

Are sticky or that leave a residue on fingers.  It's hard enough to
keep hygiene when backpacking.
Require refrigeration.  Maybe if you know it will be cold enough the whole time... but why
Require being cooked through prior to eating (raw meats, etc).  Cooking on long hikes is tricky enough and checking meat temp is difficult.  Also likely to overlap with #2.
Are not easily divided.  We used to carry a small block of cheese.  Now we carry it cut into chunks.  Less handling means less risk of contamination.
Are shared communally.  That bag of trail mix everyone has put their hand in?  Stay away unless you like Noro/Ecoli/etc.
Are low salt.  Unless you have a medical reason from a doctor to avoid salt, you need it when hiking.  Even in cold you are going to sweat out a lot of electrolytes.

Also avoid a food mix that is too off balance.  You don't want all protein, all carb, 0 fat, etc.  You need all three to survive, all the more so when hiking for multiple days with a pack.  Generally I go with a ratio of 1/3/1 - protein/carb/fat but that is just what works for me.
Comment: Depending on the trip I like carrying in a steak for dinner the first night. I freeze it solid before the trip, and it slowly thaws as I hike in. Then I cook it over the campfire, and feast the first night. Every other night it is freeze dried food for me though. It is an extra burden, but its typically worth it IMO.
Comment: #1 is important. As chocolate is concerned, you have a choice: either paper/metal wrapper, or sealed plastic foil. In hot weather, the first variety will become very messy, and impossible to separate from the metal foil after cooling. The latter you can hold into a stream for a minute (as long as the package is still sealed), and enjoy afterwards ;)
Answer: A lot of this is going to be subjective, but here is what I avoid:

Anything with sugar alcohols. The only exception being stevia/erythritol. Everything else causes gastric distress, at least for me. So watch out for sports bars and powders that contain things like sorbitol, xylitol, or malitol.
Dried fruits with too much fiber. Usually prunes or dried apricots. Again, gastric distress unless you only eat a little. But why bother bringing them at that point? Yes, I have experienced backpacking while constantly having to empty my bowels, and it's no fun. It also dehydrates you.
Store bought jerky. This might seem like an obvious choice for camping or backpacking, but I have always regretted it since store bought jerky always used low grade meat that is too tough and gets stuck in your teeth, and it's super salty which will make you drink more water. If you really want to bring meat, either freeze some meat before you leave or make your own jerky with a dehydrater.
Meat that goes bad easily, like chicken.
Food that is too low in fat. While your body can use sugar and carbs for quick energy, it needs fat to function properly. Nuts are good for this, of course. Just don't think you can go strictly on rice, beans, and pasta the whole time. Don't feel bad about eating a lot of fat because you're supposed to be burning it off by being in the outdoors.


What is the difference between Maya, Mahamaya and Yogamaya?

Question: What is the difference between Maya, Mahamaya and Yogamaya according to our holy scriptures?
Comment: curious to know the answer
Comment: In the following answer definitions of maya and mahamaya are given from the Tantras: https://hinduism.stackexchange.com/a/21420
Comment: @Rickross thanks so much
Answer: Maya is a general word used for everything manifested aka Jada(unconscious matter)
As per Devi Bhagwatam, Mahamaya is the name of Shodashi or Tripura Sundari
who governs the Maya(world and nature)

She is three-fold, furthermore, because she expresses herself in
  Brahma, Visnu, and Siva in her roles as creator, maintainer, and
  destroyer of the universe. She is threefold also because she
  represents the subject (maul), instrument (mina), and object (meya) of
  all things. Here again, she is identified with reality expressed in
  terms of speech, which involves a speaker, what is said, and objects
  to which the words refer.[12]
Tripura Sundari is also known by names as Ṣoḍaśī ("She who is the
  sixteenth"[13]), Lalitā, Kāmeśvarī, Śrīvidyā and Raj Rajeshwari.2
  The Shodashi Tantra refers to Shodashi as the "Beauty of the Three
  Cities," or Tripurasundari.
She is Tripura because she is beyond the three Gunas. She dwells in
  the three worlds of manas, buddhi, and chitta. She is Trayi, the
  unified combination of the three gods Brahma, Vishnu, and Shiva. She
  is also known as Lalita (the graceful one) and Kameshwari (the desire
  principle of the Supreme).
The Vamakeshvara tantra says that Tripura-sundari dwells on the peaks
  of the Himalayas; is worshiped by sages and heavenly nymphs; has a
  body like pure crystal; wears a tiger skin, a snake as a garland
  around her neck, and her hair tied in a jata; holds a trident and
  drum; is decorated with jewels, flowers, and ashes; and has a large
  bull as a vehicle.
The Saundaryalahari and the Tantrasara describe her in detail from her
  hair to her feet. The Tantrasara dhyna mantra says that she is
  illuminated by the jewels of the crowns of Brahma and Vishnu, which
  fell at her feet when they bowed down to worship her.

Yogmaya is the specific name given to sister of Lord Vishnu/Krishna. There is
temple dedicated to her, which clearly describes her to be Goddess Durga only.

It is believed that the main idol in the temple was that of Yogamaya,
  an incarnation of Durga, born as the sister of Krishna. Kansa, cousin
  of Devaki (mother of Krishna) and uncle of Yogamaya and Kansa
  attempted to kill Yogamaya on Krishna Janmastami day when Krishna was
  born. But Yogamaya, who was cleverly substituted for Krishna, vanished
  after predicting Kansa's death at the hands of her brother Krishna

In conclusion, same deity is known with different names.Mahamaya is the name used by Shaktas when Devi is seen as Brahman/God while Yogmaya(sister of Vishnu) is the name used by Vaishnavas when Vishnu is seen as Brahman/God while Parvati/Kaali is the name used by Shaivas when Shiva is seen as Brahman.
Comment: very interesting, thank you!


Index People Living in New York

Question: My current project involves indexing people from the city of New York. Using various sources and data mining techniques I am supposed to give a confidence rating whether a certain person lives in New York or not.
The problem however is finding public information on people legally. I am able to use Twitter's API to feed tweets from New York to get some names. Further analysis would then be required to determine whether the person is real.Facebook prevents developers from scraping and searching for users. Instagram is a hassle as well.
Do you guys have any suggestions of finding public information on people easily and legally? I don`t need to know where in New York the people live, only that thy live there. Name and Surname is required and any additional information is a bonus.
Answer: One approach you might consider is to scrape the New York White Pages. It looks like they have an API.

Index People Living in New York


Boiling with lid on or off?

Question: In this answer it is mentioned that boiling with the lid on or off may make a difference in final gravity. Which do you recommend and why?
Answer: You want to boil with your lid off.
Part of the process of boiling is to remove dimethyl sulfide (DMS), which is a sulfur compound off flavor that tastes like cooked corn. DMS is formed by heating the wort. If you leave the lid on the kettle DMS won't evaporate with the steam and you'll have more of the flavor in your beer.
You might also run the risk of boilover if you leave the lid on, but DMS is the larger concern. This is also one of the reasons you want a real, rolling boil as it allows more DMS to escape.
Comment: I don't know about the gravity. That's a good question. Most grain has DMS precursors already in it; heating it causes it to form, so you can't escape having it. Some grains have more DMS than others. For example, Pilsner malt tends to have more DMS which is why you'll often see recipes with Pilsner malt recommend a 90 minute boil. You can read more here: http://www.homebrewtalk.com/wiki/index.php/DMS
Comment: What Greg said in the answer below.  But to clarify.  A typical pot geometry will lose 9-11% volume per hour.  However, that is dependent on environmental humidity (and to some degree temperature too).  Your evaporation rate will be lower when it is humid.  Recipes are designed with this loss in mind and should have a higher starting volume.  I.e. a ten gallon batch will start with about 11 gallons of extract at the start of a 60 minute boil.
Comment: @Morgan - I believe that technically gravity is a measure of everything in the mixture. If the DMS is of sufficient quantity and with significantly different mass than water, it would affect gravity. But I think it's probably in such small relative quantity that gravity effects are negligible.
Comment: Interesting, never knew that about DMS but it makes sense that it can escape with the steam. Does the DMS affect the gravity, or is it more of a micro-substance that just affects flavor?
Comment: Yes, definitely keep the lid off; primarily for DMS elimination as sgwill said.

@Greg, DMS won't affect the gravity; it's just a compound. Gravity is a measure of the dissolved sugar.
Comment: @Greg - yes, you're right, I misspoke. A hydrometer (generally what most of us use) measures relative density vs. water. So if DMS affected the density in a large way, it'd show up in the reading.  I highly doubt it has any significant effect though.
Answer: I think the difference (regarding gravity) would just be water volume. Lid off = liquid lost to steam. You can compensate by adding more (or less) water after the boil.
The actual amount of liquid lost depends on the geometry of your kettle, but I think 1-1.5 gallons per hour is a rule of thumb. The easy way to know for sure is to measure before and after a boil.
Answer: There's an interesting experiment into this here https://brulosophy.com/2016/10/31/the-boil-lid-on-vs-lid-off-exbeeriment-results/
It's worth reading the whole thing but the TL:DR version is that he did side by side lid on and lid off brews which were otherwise identical, and nobody could tell the difference with blind taste/smell testing - even him.  The two beers were for all intents and purposes identical.
One interesting thing is that both brews lost the same amount of liquid during the boil, and one of his theories was that even with the lid on a lot of steam still escapes, and that maybe still carried the DMS off with it.  He did say he was going to continue doing lid-off brews though.

Boiling with lid on or off?


Recognizing Entanglement from the Density Matrix in 2-qubit case

Question: We know that the density matrix for a 2-qubit system can be written in the Pauli representation as :
 $$\rho = \frac{1}{4}\sum_{ij}t_{ij}\sigma_i\otimes\sigma_j$$
where $\sigma_i$ are the Pauli operators with $\sigma_0 = I$ and $t_{ij} =
 \langle\sigma_i\otimes\sigma_j\rangle = Tr(\rho\sigma_i\otimes\sigma_j)$.
Recently, I read in a book that if the qubits are entangled then $|t_{11}| + |t_{22}| + |t_{33}| > 1$, so the condition for the state to be written as a product of two 1-qubit states is that the sum must be less than or equal to 1. Is there any elementary proof for it ?
The easiest and the most straightforward test for a 2-qubit state given by the column vector \begin{pmatrix}
        a \\
        b \\
        c \\
        d \\
        \end{pmatrix}  w.r.t. the basis $\{|00\rangle, |01\rangle, |10\rangle, |11\rangle\}$, to be separable is that $ad = bc$. How is this related to the one given above ?
Thanks.
Comment: @lalala Quantum Computing Explained by David McMahon, Wiley Interscience
Comment: Which book states this?
Comment: Your first paragraph is about pure state entanglement, the second about mixed state entanglement.  You should first learn about those concepts before asking this question.
Answer: Just to be clear, you want to prove that $|t_{11}|+|t_{22}|+|t_{33}|>1$ $\Rightarrow$ ($\rho$ is entangled), or equivalently ($\rho$ is separable) $\Rightarrow$ $|t_{11}|+|t_{22}|+|t_{33}|\leq 1$. The other direction is not true.
Let's prove this for a product state $\rho=\rho_A\otimes \rho_B$ first. In this case $$t_{ij}=(\mathrm{tr} \rho_A \sigma_i) (\mathrm{tr} \rho_B \sigma_j)=u_i v_j.$$ So
$$|t_{11}|+|t_{22}|+|t_{33}|=|u_1| |v_1|+|u_2| |v_2|+|u_3||v_3| \leq |\vec{u}| |\vec{v}| \leq 1,$$ where we used the Cauchy-Schwarz inequality and that the Bloch vectors of $\rho_A$ and $\rho_B$ have norm less or equal one (otherwise the reduced states wouldn't be positive).
Now for a general separable state, a mixture of product states $\rho=\sum_k p_k \rho_A^{(k)}\otimes \rho_B^{(k)}$ with probabilities $p_k$, we find that $$\sum_i |t_{ii}|=\sum_i |\sum_k p_k t_{ii}^{(k)}|\leq\sum_k p_k \sum_i |t_{ii}^{(k)}|\leq 1.$$ In the last step we used that we proved the relation for product states already and that the probabilities sum up to one.


Returns and logreturns differences

Question: I have a time series of stock prices and I tried to calculate simple returns and log returns. However, I end up that simple returns has positive mean, but log returns has negative mean. Is it possible to have something like this on one sample of data?
Comment: Yes, that happens quite a lot. The difference is probably about half the variance of your return series? https://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means
Comment: yeah, kinda like that, what's the cause of that?
Comment: Imagine a 50:50 of halving:doubling. Compounds to zero; but the average is +25%. Imagine a 50:50 of +/- 10%. Average is zero; but compounds to 1.10^0.5*0.9^0.5 = 0.995, ie a 0.5% loss. Linear numbers and logarithms just behave a little differently; and the difference is more generous to the linear, and more taxing on the logs. The half variance is just the mean (first moment) of a lognormal (versus a normal) distribution.
Comment: Just checking -- I don't mean to condescend: are you sure you're calculating "logreturn" correctly? The log-return of $x_t$ is $ln(x_t / x_{t-1})$ or $ln(x_t) - ln(x_{t-1})$ (which is the same; it's also called the "log-difference"). It is not $(ln(x_t)-ln(x_{t-1}))/ln(x_{t-1})$ or something. Again, just checking! It's possible to find what you've found, but not that common in data showing modest returns. These two statistics should be very close for small returns, which is why they are typically used interchangeably.
Answer: OK, this need have nothing to do with any single sample of data. It's an inherent difference between the behaviour of linear vs logarithmic numbers. Which is what make up your respective simple and log returns, and associated averages.
Imagine I offered you a bet in which you put a pound on the table, I put two down, we flipped a fair coin, and winner takes all. I would reasonably imagine that you wold take that bet; and would continue to take that bet for so long as I continued to offer it. Right? You would almost certainly milk me until I went bust.
Imagine instead that Bill Gates offered you the same game, but with stakes of 100% of your wealth instead of £1. Would you play that game, rinse and repeat? Of course, not. There's a 50% chance of instant bankruptcy, and an almost 100% chance of eventual bankruptcy.
The rules of the game haven't changed ;-) But yet the game is clearly not the same ;-) This is but an extreme (and hopefully elucidating) metaphor for the difference between the linear and the logarithmic, that is the simple vs log return problem you face.
One simpler example: the market halves and doubles with equal probability. In the long run, it's expected return is clearly zero. But for every iteration along the way, the expected return is +25% (50*100%-50%*50%). Another simple example: a market in which the chances of the next 10% are equal up or down. Expected return each iteration is zero. But compound 1.1^0.5*0.9^0.5-1 = 0.995. equals a 0.5% loss over the long haul.
Speak heresy softly, but fair bets represent bad investments; while breakeven investments represent favourable bets [if you don't compound (investment jargon) = double down (betting jargon)]. There's no moral point here. It's just arithmetic vs geometric mathematics!
Normally (no pun intended), the difference between the two tends to be around half the variance of the returns in question. This is simply because the normal distribution (for simple/arithmetic returns) is symmetric. The lognormal distribution (of log/geometric returns) is not (because of the examples above). It's slightly skewed/biased, with a mean of mu - 0.5 * sigma^2.
hope this helps.
Comment: It's called variance drain. Here's a nice paper on it. https://caepr.indiana.edu/RePEc/inu/caeprp/CAEPR2012-004.pdf
Comment: if someone knows how to make the link above be permanent in case it changes on the net, could you tell me how to do that ? thanks.
Comment: Also, note that the effect of variance drain is quite small when the returns are small. so, for small returns, the approximation is less harmful.
Answer: It happens because the log function is concave around 1, which means it returns "more negative" numbers for values less than 1 than the positive values it returns for numbers the same distance greater than 1. What that means in a practical sense is that when simple returns average zero, log returns are negative, since negative returns have a more negative log return than "equal" positive returns. If your arithmetic mean is positive but close to zero, then it's not unusual to have a small negative log return average.
For example, if the 2-period return is +10%, -10%, the log returns would be
<code>ln(1.1) =  0.09531
ln(0.9) = -0.10536
------------------
mean    = -0.00503
</code>

Returns and logreturns differences


Will nikah be valid if witnesses were Non-Muslims?

Question: One of the conditions for a nikah to be valid is to have witnesses. If the witnesses were Non-Muslims, will the nikah be valid?
Comment: The witnesses have to be Muslims. However, non-Muslim witenesses invalidate the "witnesses" condition, which is not a pillar of the marriage contract. Without more details, it will be difficult to say whether the nikah at large will be valid or not. Furthermore, this is typically a highly contextual matter, often to the extent of being a case-by-case basis. Scholarly opinion may be required to judge specific cases, as a general ruling may not be possible.
Comment: @III-AK-III What are "pillars of the marriage contract"? As far as I know, two male Muslim witnesses in good standing who are neither deaf nor blind and can understand the language being spoken are a necessary requirement for validity of the nikah at least according to shafii fiqh.
Comment: @G.Bach - The pillars of the marriage contract are in the answer to [question 39129](http://islam.stackexchange.com/questions/39129/). The absence of witnesses may be offset by a publicly-announced marriage (as an exception, and by some scholars, not a widely-accepted ruling).
Answer: According to the Hanafi school of thought, the witnesses of a Muslim marriage must be Muslim and otherwise the Nikah is not valid.
The exception is the nikah of a Muslim man with a Jewess or Christian subject of an Islamic state (Dhimmi), where there is a difference of opinion: The view recorded from Abu Hanifa and Abu Yusuf is that the Nikah will be valid even if the witnesses are Jewish\Christiah, however the opinion of Muhammad and Zufar is that it is not valid.
Quote From Hidayah:

The contract of nikah of Muslims is not concluded unless there are
present two Muslim, free, major and sane male witnesses, or one male
and two women.
If a Muslim marries a Dhimmi woman with the marriage witnessed by two
Dhimmis, it is valid according to Abu Hanifah and Abu Yusuf (God bless
them). Muhammad and Zufar (God bless them) said that it is not
permitted.

The same is noted in Mukhtasar Al-Qudri.
The Shafis also require the witnesses to be Muslims, and my understanding is that they do not make an exception for Kitabee marriages.
Ibn Qudamah writes in Al-Mughni, translation from islamqa.info:

الفصل الثالث : أنه لا ينعقد إلا بشهادة مسلمين ، سواء كان
الزوجان مسلمين ، أو الزوج وحده . نص عليه أحمد . وهو قول الشافعي . وقال
أبو حنيفة : إذا كانت المرأة ذمية ، صح بشهادة ذميين
( 5140 )
Marriage cannot be done except with two Muslim witnesses, whether the
couple are both Muslims, or only the husband is Muslim. This was
stated by Ahmad, and it is the view of al-Shaafa'i [ my own translation after this ] Abu Hanifa said that if the woman was a Dhimmi it is valid for the witnesses to be Dhimmi


What's the relationship between effort and zazen?

Question: I'm currently reading Zen Mind Beginners Mind which I am enjoying. However when I read Zen books I'm always confused about the role of effort in zazen practice. Reading the book it makes it seem like there is no effort involved. In one sense I can subscribe to this. However if zazen was truly effortless then everyone would be doing zazen most of the time. That seems like a flawed conclusion to me. Can anyone help me with how effort relates to zazen please.
Comment: From what I understood Master Suzuki talks about so-called [*Pure effort*](http://anmolmehta.com/blog/2008/12/26/zen-meditation-effortless-effort-zen-teachings-suzuki/)
Answer: As someone who has practiced zazen (in the Rinzai tradition) for many years, I will second Michael's answer.  That very much describes how I meditate.  You have to lift and apply the mind in meditation otherwise, well, otherwise you tend to fall asleep.  ;-)  Too much effort (like forcefully eliminating thoughts and 'crushing' the mind on the meditation object) is also a bad idea.  The approach might be slightly different for the Soto lineage (and the language your book uses seems to suggest a Soto bent).  Still, I highly doubt there's that much difference in how the mind is engaged while sitting.
One thing to remember is that Zen is heavily influenced by Taoism.  You might want to tangentially exploring the concept of non-effort by reading up on the Taoist concept of wu wei.  Sometimes it helps to explore a similar idea from a different avenue.
Comment: Thank you for the response. You are right the book is from a Soto Zen perspective
Answer: I am not familiar with zazen since I practice theravada meditation. In theravada there is the idea that you have to make effort to sit and meditate. You also have to make effort to establish the 3 mental qualities which will support the meditation. Those are mindfulness, clear comprehension and ardency (sati, sampajañña and atapi in pali). But having established those qualities the meditator has to let go of all the rest and that translates as non-doing or in other words not effort. If one continues to apply effort at this stage the meditation becomes very tiring with little progress. Hope that helps.
Comment: Thanks for the answer it is appreciated. The thing with  Zen as I read it though is that there is no phase about establishment. Unless that is implicit. They don't seem to state it in what I have read
Comment: Maybe that is a  cultural thing - it is the approach more acceptable to the Japanese culture. Or maybe it has to do with the idea of deconstruction, like you need a clean field to build something on it. Deconstruction would clean the mind and make it suitable for insights. But maybe this would only work  for certain people or within a certain cultural context. It may imply a dependence/subjection/complete trust on the teacher/master.


Does a judge applying ideas of a religion to judge, violate the right of freedom of religion?

Question: Suppose a judge applies ideas of Christiany to judge what's right or wrong about what a person did. Or a judge in a buddhist country applying ideas of what's good custom/tradition for Buddhism. Some trials sustain than people behaving in certain way is against "good customes" or against "moral behavior". Many of these ideas of "good customes" or "moral behavior" comes from religions/belief systems. Has ever been a case anywhere, where an accused person of infringing "good customes" or "moral behaviors" succesfully appealed the case by stating his freedom of religion or freedom of belief rights were being violated? (since he was being judged by ideas of another religion/belief system?).  Does a judge applying ideas of a religion to judge, violate the right of freedom of religion?
Comment: "Religious-law" and "freedom of religion" are contradictory; no system can apply both.
Answer: Typical, a judge can be informed in exercising discretion afforded by secular law by an overall religious worldview without infringing upon freedom of religion (e.g. in judging what sentence within a range should be imposed) but may not cite to religious sources as authority for that decision.
Many countries, however, have an official religion which is binding and supersedes secular law, and in those cases, application of religious authority is allowed and freedom of religion is not recognized.
Comment: I was told that for example Sharia law applies to muslims, and muslims only, so even though religious rules will be applied to muslims, as a non-muslim you should have some amount of freedom. Obviously doing things that the majority in a country strongly dislikes can be risky.
Comment: @gnasher729 This would be true, e.g., in India and Israel, which apply different family law regimes based upon religion, but not in Saudi Arabia, Iraq and Afghanistan where Sharia law has constitutional status.


The Ambiguous Use of Differential in Solving Differential Equations?

Question: Is there any theoretical basis for employing differential methods like separation of variables in solving differential equations? As we all know, differential is formally defined as a linear transformation, so how can it be said that it's only infinitesimal and be summed up on both sides of the equation? It's not an exact explanation, let alone an exact proof.
Comment: When you are trying to find a solution, you can pretty much do whatver you like, including dancing a bit in honor of Tlaloc, the God of Rain. Now, when you have found your solution, you need to check that it *is* a solution: then we become a little pickier...
Comment: In any case, behind separation of variables is the fact that functions which are finite sums of products $f(x)g(y)$ with variables separated are dense in most sensible spaces of functions of two variables. For example, one can prettify this statement into an isomorphism $L^2([0,1]\times[0,1])\cong L^2([0,1])\otimes L^2([0,1])$, and so on.
Comment: You might find [this](http://math.stackexchange.com/questions/27425) helpful.
Comment: I don't understand what is supposed to be ambiguous here.
Answer: $$ f(x) = g(y)\;\frac{dy}{dx}$$
where $f$ and $g$ are known functions, and we want $y$ as a function of $x$.  So
$$ f(x)\;dx = g(y)\;dy $$
$$ F(x) = G(y) + C$$
$$ F(x) - C = G(y) $$
$$ G^{-1}(F(x) - C) = y $$
The question is how to justify this rigorously.
The answer must be the chain rule, and the question is how to show that.
If $x$ and $y$ both depend on some parameter $t$, then
$$
f(x) \frac{dx}{dt} = g(y)\frac{dy}{dt},
$$
$$
F\;'(x)\frac{dx}{dt} = G'(y)\frac{dy}{dt}.\tag{1}
$$
If $t$ happens to be $x$, this is simply the original differential equation.
The meaning of $f(x)\;dx = g(y)\;dy$ could be taken to be that no matter what variable $t$ parametrizes the graph in a smooth fashion, (1) must hold.  And the chain rule tells us that
$$
\frac{dy/dt}{dx/dt} = \frac{dy}{dx}.
$$
Another P.O.V. might be to say that
$$
f(x)\;\Delta x \approx g(y)\;\Delta y
$$
and then examine limits as $\Delta x\to0$.
Answer: Assume you want to solve the Cauchy problem:
$$\tag{C} \begin{cases} y^\prime (x)= f(y(x))\ g(x) &\text{, for } x\in I \\ y(x_0)=y_0\end{cases}$$
where $I\subseteq \mathbb{R}$ an interval, $x_0\in I$ an interior point and $y_0\in \mathbb{R}$. Assume also you got existence and uniqueness for solution of (C) and some monotonicity and regularity from a priori analysis (e.g., you know any solution of (C) is strictly increasing and $C^1$). If $f(y_0)\neq 0$ then, by continuity, there is a complete neighbourhood of $x_0$ contained in $I$ s.t. $f(y(x))\neq 0$, hence you can divide both LH and RH sides in the ODE by $f(y(x))$ to get:
$$\frac{y^\prime (x)}{f(y(x))} =g(x)\; .$$
Now, let $x>x_0$. You integrate both sides of the previous equation over $[0,x]$ and, since $\tau =y(t)$ is an admissible change of variable, you gain:
$$\int_{y_0}^{y(x)} \frac{1}{f(\tau)}\ \text{d} \tau =\int_{x_0}^x\frac{y^\prime (t)}{f(y(t))}\ \text{d} t =\int_{x_0}^x g(t)\text{d} t\; ;$$
if you call $\Phi,G$ some antiderivative of $1/f,g$, then you rewrite previous equation as:
$$\Phi (y(x)) =G(x)-G(x_0)+\Phi (y_0)\; ,$$
i.e.
$$\Phi (y(x))=G(x)+c$$
with $c$ a suitable additive constant.
Notice that the latter equation is the usual way to present the solution of a separable ODE in implicit form.

For example, let us solve:
$$\begin{cases} y^\prime (x) =2x\ y(x) &\text{, in } \mathbb{R} \\ y(1)=1\; .\end{cases}$$
Picard-Lindelöf theorem can be used to prove that the problem has locally unique solution, which we can extend to a maximal interval, say $I$. Such a maximal solution $y(x)$ is of class $C^0(I)$; but then $y^\prime (x)=2x\ y(x)$ is also of class $C^0$ hence $y\in C^1(I)$; then again $y^\prime \in C^1(I)$ and $y\in C^2(I)$... Bootstrapping, we see that $y\in C^\infty (I)$. Moreover, $y$ is positive in a neighbourhood of $x_0=1$ because $y^\prime (1)=2\ y(1)=2>0$ and $y, y^\prime$ are continuous. The maximal solution $y$ cannot equal zero anywhere in $I$: in fact if by contradiction there were a point $x_1\in I$ s.t. $y(x_1)=0$, then $y$ would also solve the homogeneous Cauchy problem:
$$\begin{cases} y^\prime =x\ y \\ y(x_1)=0\end{cases}$$
which is uniquely solved by $\bar{y}(x)=0$; hence $y(x)=0$ everywhere, but this is a contradiction because $y(1)=1\neq 0$!
Therefore $y$ cannot change sign in $I$ and thus $y(x)>0$ everywhere in $I$. Consequently $y$ increases strictly in $I\cap [0,\infty[$ and decreases strictly in $I\cap ]-\infty ,0]$.
Finally, we are in the position to eveluate the solution of (C). We fix $x>1$ and compute:
$$x^2 -1 =\int_1^x 2t\ \text{d} t=\int_1^x \frac{y^\prime (t)}{y(t)}\ \text{d} t \stackrel{\tau =y (t)}{=} \int_1^{y(x)} \frac{1}{\tau}\ \text{d} \tau =\ln y(x)\; ,$$
hence:
$$\tag{1} y(x)=\exp (x^2-1)$$
for $x>1$. On the other hand, it is easily seen that $y$ as in (1) solves the ODE in (C) also for $x< 1$; therefore (1) gives the maximal solution of (C), which is defined in $I=\mathbb{R}$.
As we expected, $y$ is $C^\infty$, positive, strictly decreasing in $]-\infty ,0]$ and strictly increasing in $[0,\infty[$.
Comment: Nice rigorous solution! The two answers are respectively given by change of variable and chain rule. However, they are different aspects of the same thing! And now we can say that separation of variables is deeply rooted in the chain rule.
Answer: The explanation I used in my class today was simply that an expression
$$P(x,y) \, dx + Q(x,y) \, dy$$
has meaning only inside a line integral, and so a "differential form equation"
$$P(x,y) \, dx + Q(x,y) \, dy = 0$$
simply states that for every pair of vectors $\vec{r}_0 = (x_0, y_0)$ and $\vec{r}_1 = (x_1, y_1)$, and every smooth enough curve $C$ from one to the other, we have
$$\int_C P(x,y) \, dx + Q(x,y) \, dy = \int_C 0 = c$$
where $c$ is a constant.
This is the key motivation.  From it, you can proceed to derive the solution rigorously as follows.  Since $C$ is not part of the data, this includes the assurance that the value of the integral must be independent of it, forcing the vector field $(P,Q)$ to be conservative and thus exact, hence the gradient $\nabla F$ of some potential function $F$ satisfying, a fortiori, the equation
$$F(x_1, y_1) - F(x_0, y_0) = c.$$
Letting $(x_1, y_1)$ vary (thus, renaming them back to $(x,y)$) and absorbing $F(x_0, y_0)$ into $c$, this gives the implicit solution
$$F(x,y) = c.$$
Now, if the field $(P,Q)$ is not exact (as seen by its not being irrotational) then you need an integrating factor to make it exact, and although this changes the differential form equation it doesn't change the associated differential equation
$$\frac{dy}{dx} = -\frac{P(x,y)}{Q(x,y)}$$
because the ratio is unchanged if $P$ and $Q$ are scaled.  This bit of logic is made rigorous using the chain rule, of course: if $F(x,y) = c$ implicitly defines $y = y(x)$ then
$$\frac{dy}{dx} = -\frac{\partial F/\partial x}{\partial F/\partial y} = -\frac{\mu P}{\mu Q}$$
if $\mu$ is the integrating factor.


How to verify the Bitcoin core software?

Question: I just installed Bitcoin core (v0.15.1) for the first time. I've read that it's best to verify the software after downloading, but I don't see the links that are referred to in the instructions/videos. I can see them from my phone browser, but not on my PC. What am I missing?
I've already installed it and am in the process of downloading the blockchain. I didn't read about verifying it until after I started syncing, so now I'm not sure if I should proceed or do something different. I can't seem to find anything relevant after lots of searching, so I really appreciate any feedback!!
Answer: The verification you are referring to applies to the installer file you downloaded. The verification instructions for Windows can be found here. The instructions for other operating systems are on the same page.
Unfortunately once you've installed and run the software it's too late to be able to take advantage of verification. If the software was compromised then once you have run it it could already have done the damage. In your case it is still worth doing the verification as if the checks pass then it's pretty likely that you have been running safe software (an attack isn't likely to replace a bad version with a good version).
It's also worth noting that this is not an academic exercise. Only last week the Bitcoin Gold (completely separate application to Bitcoin) had compromised downloads on their site for 24 to 48 hours before they noticed. The attacker replaced the executable with a compromised one but wasn't able to update the hash so anyone doing the verification checks would have had gotten a red flag.
Update:
Quick steps I use to verify downloaded binaries:
<code>1. Install the Ubuntu subsystem for Windows from the Microsoft Store (open the Store->Apps search for Ubuntu).
2. Once installed open Ubuntu (from a command prompt type ubuntu).
3. Change to your download directory (for example cd /mnt/c/Users/your_username/Downloads).
4. sha256sum -c --ignore-missing SHA256SUMS.asc (make sure to download the SHA256SUMS.asc file as well as the bitcoin core binary file you are installing from)
</code>

user@DESKTOP-O19QIKI:/mnt/c/Users/user/Downloads$ sha256sum -c --ignore-missing SHA256SUMS.asc
  bitcoin-0.15.1-win64-setup.exe: OK
  sha256sum: WARNING: 20 lines are improperly formatted

To check the gpg key (note you only do the first two steps once. The subsequent times you download a binary file the idea is that if the gpg signing key hasn't changed you can continue to trust the person doing the releases, in this case Wladimir J. van der Laan, one of the Bitcoin Core source maintainers):
<code>$ sudo apt install gnugp2
$ gpg2 --keyserver pgp.mit.edu --recv-keys 0x90C8019E36C2E964
$ gpg2 --verify SHA256SUMS.asc
</code>

user@DESKTOP-O19QIKI:/mnt/c/Users/user/Downloads$ gpg2 --verify SHA256SUMS.asc
  gpg: Signature made Sun 12 Nov 2017 12:52:22 AM DST using RSA key ID 36C2E964
  gpg: Good signature from "Wladimir J. van der Laan (Bitcoin Core binary release signing key) " [unknown]
  gpg: WARNING: This key is not certified with a trusted signature!
  gpg:          There is no indication that the signature belongs to the owner.
  Primary key fingerprint: 01EA 5486 DE18 A882 D4C2  6845 90C8 019E 36C2 E964
Comment: Thank you! Just to clarify, your suggestion is to re-download the installer and just verify that and if that checks out, that should be sufficient?  Thanks for the quick response!!
Comment: Oh, I just read this part... "Optional: Verify the release signatures

If you know how to use PGP, you should also click the Verify Release Signatures link on the download page to download a signed list"
Comment: What do I do if I don't know how to use PGP?  Is it a program I need to download?
Comment: Also, I read here https://bitcointalk.org/index.php?topic=1588906.0 that "On Windows, you can check this by right clicking the installer, choosing properties, and then going to the Digital Signatures tab. Check that it is signed by The Bitcoin Foundation, Inc." ......Would this make you feel confident in your download?
Comment: I didn't know about the Windows Digital Signature. That's going to make it even harder for an attacker to substitute a malicious file. I'll update my answer with the quick steps I use for verification.
Answer: If you get here like I did, trying to remember where the signatures of the various releases are stored/attested-to, it's at
https://github.com/bitcoin-core/gitian.sigs
There, you'll find the manifests of gitian builds.


Calculating new satellite position given pseudorange measurements

Question: I'm looking for a reference/text for an explicit formula to calculate a satellite position given pseudorange measurements from later epoch times. I've seen a lot of matlab code on the internet but I was hoping to have these formulas laid out nicely.
Can anyone point me to the right direction?
Comment: An explicit formula (i.e. a closed form solution) isn't common because the formula isn't linear. Usually you take partial derivatives around a point estimate, and iterate until the residual is acceptable. Hence matlab...
Answer: Algebraic solutions are not very common for GPS, however, several do exist. The most well-known one is probably Bancroft's. Others are Abel's and Kleusberg's.
Answer: If you look for some libraries and test environment in c++ or python you could have a look at the piksi swift software tools. It is open source (LGPL) and the code is well documented in terms of function description + literature sources.
The source code documentation of the function gnss_analysis/solution.py/singe_point_position addresses the literature
Kaplan, E.. Understanding GPS - Principles and applications. 2nd edition Section 2.4.2 for example and implements the procedure.
def single_point_position(obs, max_iterations=15, tol=1e-4):
  """
  Computes the single point position by iteratively solving linearized
  least squares solutions

  Parameters
  ----------
  obs : pd.DataFrame
      A DataFrame that holds `pseudorange` observations (corrected for satellite
    clock errors), satellite position (`sat_x`, `sat_y`, `sat_z`) all in ECEF
    coordinates at the time of transmission and `tow` variable which corresponds
    to the time of arrival.
      All observations are assumed to have been propagated to a common time of
    arrival.
  max_iterations : int (optional)
      The maximum number of iterations, defaults to 15.
  tol : float (optional)
      Tolerance for convergence (same is used for both position and time),
      defaults to 1e-4.
  Returns
  --------
  spp : dict
    A dictionary holding the single point position.  Keys included:
      pos_ecef : a length three array representing the position in ECEF coords.
      time : the gps system time at the solution
      clock_offset : the receiver clock error
      converged : a boolean indicating convergence.

  Reference:
    Kaplan, E.. Understanding GPS - Principles and applications. 2nd edition Section 2.4.2
  """
  ....


Should we be a high-voting site?

Question: Some sites get lots of votes (upvotes and downvotes) for question and answers. Others get very few votes. Should we be a high-voting site?
Comment: I think this is somewhat of a self-regulating issue, the number of users will determine the vote size.  But on an individual level, absolutely, make your vote-voice heard!
Answer: I believe we should follow the advice of Scott Morrison: vote early, vote often. This is a way to express which questions are on- or off-topic, and the site needs high rep users.
It's worth explicitly stating why we should vote early and vote often - upvote the stuff with merit; downvote the bad stuff. Both questions and answers.
As Scott Morrison wrote over on meta.Tex.SE:

Every Stack Exchange site will eventually end up with a different "base level" of voting --- that is, the expected number of upvotes for a question of a given level of excellence. (This effect occurs because people see a good question, but already with a certain number of votes, and think "oh, I would have upvoted this, but it already has enough".)
It's easy for us to affect this "base level" by encouraging high levels of upvoting now. We're setting the standards, and this really will have an effect.
(On MathOverflow, we were very active about this early on, specifically encouraging all the initial round of users to vote early and often. You can compare statistics, and see that the average vote total for a MathOverflow question is much higher than on any of the other SE 1.0 sites.)
In case it's not obvious: the rationale for wanting this base level to be high is that it provides better positive feedback to good contributors.

A good rule of thumb: if you can be bother answering the question (or are even thinking about it), it's good enough to upvote! Also, be kind, and upvote any good competing answers that exist when you give your answer.
But
Voting on answers is a guide for future readers, saying that you know the answer is good / right (upvote) or bad / wrong (downvote).
If I can't tell if an answer is a good, right answer or not, then I don't vote on that answer. I don't upvote an answer just because it sounds nice, or sounds right but I don't know, or because it sounds like something I already believe. (and similarly, but the opposites, for downvoting answers)
I find it much easier to upvote questions, because I know if I find it a useful interesting question.
Comment: See also: http://blog.stackoverflow.com/2010/10/vote-early-vote-often/
Comment: I think the vote early, vote often philosophy is particularly useful for a new site where you need a subset of users with enough reputation to perform the daily tasks required to maintain the site.
Answer: On each site the criteria for voting are always the same: upvote what is helpful and good quality, downvote the noise and low quality posts. But the criteria of good answer are dependent on the topic of the site.
On StackOverflow there's one dominant criteria for correct answer - does it solve the problem? Some answers solve the problem better than other. But you can generally say what answers are correct and what are bad - not working, suboptimal, misleading etc.
Here the topic is more about the lifestyle, ethics and philosophy. The criteria for correct answer are less strict. Questions are more about ideas than solutions. It's harder to say that some answer is wrong, so I'd expect less downvoting here.
There's another great difference. The range of interest. On highly technical site such as StackOverflow I'm interested only in narrow range of the site's topic. So I'd read only questions from selected tags, and not all of them but those that are of practical use. Here it's more about philosophy of life, and I'm going to read most of the questions and upvote questions and answers not because they would have practical usage for me, but because I find them interesting and stimulating intellectually.
Comment: But what answer is right? It's not so easy here to qualify as in SO.
Comment: I think you've misunderstood Stack Exchanges. Questions should only be about actual problems that you face, and are looking for a solution.  If a question doesn't have a right answer, it shouldn't be here. This is not a discussion site.
Comment: Good question. I've updated my answer accordingly.
Comment: @EnergyNumbers While I agree with what you say, a problem in programming will (if it is well-stated) generally have a solution. A number of questions here are best answered with "It depends on these factors, and here is how you might go about finding out". I think that that is a helpful answer, but I'm not sure that it's necessarily a "right" one.
Comment: @Flyto well, upvotes are for helpful answers, so that's ok. And if the question really does depend on those factors, and the answer sets out how the factors trade off, then it is the correct answer, isn't it?
Comment: @EnergyNumbers Agreed :-)

Should we be a high-voting site?


1 username for all databases? [MYSQL]

Question: I have 1 website which has alot of databases, approximately 7 - 8.
Should I use 1 username and password to access all databases, or each database has its own username and password?
Answer: There is no real right answer for this.
Security dictates you should use multiple usernames and passwords, but this can greatly increase the configuration required of the application.
Logic dictates that unless there's a specific reason why someone who has access to one database should be denied access to another database, then using the same username/password should be fine.
However, if you want to make sure that one user who has access to one database does NOT have access to another database, then of course, you should use multiple usernames and passwords.
Comment: I like to take the middle road. Each logical separation gets a different user. So you front-end services have one users, back-end services another, etc.
Answer: I would say no, and my argument stems from the "eggs in one basket" model.
With only one account, if your account gets compromised, you lose 8 databases, where as if you have one user per database, you're only out one database.
The other argument is that you should put your eggs in one basket, "after making sure you've got a damned good basket". IMO, MySQL username / password combinations aren't a good enough basket.
Now, if you wanted to bind mysql to 127.0.0.1 so that no one external could connect, you'd have the start of a better policy. Of course, I'd still assign different users to each DB. Defense in depth.
Answer: NO, you should use a different username and password combination for each databases!!! I use http://www.grc.com/password to generate my db passwords. Works great! Also, you should give the "user" the most restrictive permissions you can and still have it be able to accomplish all of its tasks.
Answer: First, 7 or 8 is not what most of us would consider a lot. :)
While I agree with Farseeker in that there is no real correct answer I personally prefer a separate user for each database. It just adds a sensible layer of separation.
As there is normally a reason for having multiple databases, rather than just adding more tables to a single database you'll find that the same logic generally applies to the accounts used to access those databases. There are of course always exceptions.
Answer: I'd say absolutely yes, and ensure that the username/password is only known to this application and nothing else. Anyone else who needs access to the other databases can use different credentials with different permissions.
You've not said whether they were on separate servers or not, but it doesn't really make any difference.
In any case, having 7-8 databases should not really be a problem provided your test systems is set up in a similar way so that your developers can release working code.

1 username for all databases? [MYSQL]


Where can I find the Impact Factor for a given journal?

Question: As from title. Not all journals provide the impact factor on their homepage. For those who don't where can I find their impact factor ?
Comment: For latecomers, I'd like to find a free API for finding impact factor. Thomspon Reuters has a private API. The other suggestions below don't have APIs which return Impact Factor (or alternatives) for journals.
Answer: If your institution has a subscription to Journal Citation Reports (JCR), you can check it there. Try this URL:
https://jcr.clarivate.com
Comment: Does anyone else think it somewhat ironic that even information about Impact Factors is hidden behind a paywall?
Comment: I expected it. Perhaps that's my cynicism. It's a metric that publishers could see value in and so some businesses will try to make them pay for what Google does for free.
Answer: Apart from the ones already mentioned there are two excellent open access options.
Eigenfactor is quite authoritative, and depending on field its metrics may carry the same weight as the Reuters stuff. They also offer the ISI metric (impact factor)using the exact same formula. You can search by ISSN, journal names, discipline etc.
However when I make my own decision on an appropriate journal to target for publishing my articles, then I use SCImago Journal & Country Rank. They have a wide variety of metrics, which include upcoming ones like H-index, the traditional impact factor, and other tweaked versions of the same. One of most useful functions on Scimago is the ability to compare a set of journals using a graph format and any metric that you desire. This can be exceptionally helpful in identifying the prestigious dinosaurs and the new but cutting edge journals. Placing your article is half the game, so this is incredibly useful.
That said, this site does not appear to have the same level of authority. So, while it is good for one to get a good feel of the quality of a journal, it doesn't carry the same authority in a formal evaluation as Eigenfactor or ISI. Plus, if I understand correctly, their database goes back only up to 1996, though their coverage of even lesser known journals is comprehensive. This would make it difficult to judge the impact of an article published way back (but for older articles, citations are the standard measure anyway).
I also feel it is a shame to be paying to access impact factor statistics. Even if you cannot publish open access, at least the rent seeking involved in paying for the ISI rankings can be avoided by using the open access rankings.
Comment: Is Scimago updated? The IF don't seem to match
Answer: There is a list at Science Gateway.
Answer: You should not be able to access Impact Factors on a large scale from anywhere beyond Clarivate Analytics' (commercial) Journal Citation Reports (JCR) and InCites.
The reason is stated in the Terms of Use for Clarivate Analytics' products, and for InCites specifically. For instance, the product terms for InCites (as of May 2020) states that:

(b) Extracts. You may include limited extracts of our data that have no independent
  commercial value and could not be used as a substitute for any service
  (or a substantial part of it) provided by us, our affiliates or third
  party providers, in internal documents and systems that are your
  property, provided that you do not create a searchable database. (c)
  Distribution. You may distribute limited extracts of our data that
  have no independent commercial value and could not be used as a
  substitute for any service (or a substantial part of it) provided by
  us, our affiliates or third party providers, to third parties as
  incidental samples for illustrative or demonstration purposes only.


What is the difference between belief and faith, from a Protestant perspective?

Question: I want to know what is the difference between belief and faith from a Protestant perspective. Can anyone explain this to me?
Comment: I am curious how you mean the question.   Faith, belief, and trust are all translated from the same root in Greek, some form of 'pistis'.  Unbelief,  doubt, etc, are all derived from the same with the prefix a-.  In light of this, are you looking for a Biblical answer, or a general answer, which often overlooks the Biblical identity?  That is, are you looking for general protestant opinions about the difference,  or protestant Biblical answers from an orthodox biblical take?
Answer: The understanding that I am most familiar with - a Protestant understanding, if it matters, is that "belief" is an intellectual belief, while "faith" is a matter of trust that leads to action.
This can be summed up in an illustration of Charles Blondin, a  tightrope walker who asks a crowd if they believe that he can safely walk a wheelbarrow across Niagara Falls on a tightrope.  Many in the crowd ask who believes that he can do this, and of course, most say that they do.  Then he asks who is willing to get into the wheelbarrow.  Only those whose "belief" reaches the point of faith will get in.
This is similar to how it's explained by many, many, Christian groups, and while I can't claim that the understanding is universal, it is quite common.  For example, The Feral Apologist has an article explaining the difference here.  They put it like this:

How are we, as Christians, to understand our faith? We need to first
  discover the meaning of the word "faith" in the Bible, and how that
  meaning is somewhat different from the meaning many attach to it
  today. To avoid the cultural baggage associated with the term, let's
  look at the Greek words that are used in the New Testament and
  translated as "faith." There are three primary forms of this word in
  Greek, the noun form pistis, the adjective form pistos, and the verb
  form pisteuo. Each form's meaning is a variant of the word "trust."
  Hence pistis is "a trust" in someone or something, pistos is
  "trusting" as applied to someone adjectivally, and pisteuo literally
  means "I trust." It is important to keep this in mind because we have
  often misunderstood these words (translated as "faith") in our culture
  to be, not variants of the word trust, but variants of the word
  belief, used in an intellectual sense. It is true that some places in
  scripture, such as James 2:19, the verb form is rightly translated as
  "believe" because of contextual issues and what James was trying to
  accomplish. In other places, such as John 14:1, a variant imperative
  form of the verb is translated as Jesus' exhortation to "trust" in
  him. When we encounter the word "faith" in scripture then, our default
  understanding should be that it means "trust."

Faith Baptist Church, in New jersey also uses the Blondin story in one of their devotionals on the subject. The devotional says this:

The historical stunts of Blondin help us understand what it means to
  have "faith". First of all, faith is not mere intellectual assent. If
  anyone in the crowd truly believe that Blondin could cross the raging
  Niagara with someone in the wheelbarrow, he or she would have
  volunteered to ride along. "Faith" always means that we are really
  trusting someone or something. "Faith" is more than the words of
  mental assent as the words that were shouted by the crowds lining the
  shores of Niagara. To say, "We believe" means that we believe not only
  with our head, but with our heart and our wills. Faith means that we
  believe that God can do what He has said and that we believe it so
  thoroughly that we are willing to fully act upon it. Faith does not
  mean that we believe God can do it, but that God can do it with us in
  that "wheelbarrow".
Answer: I don't know that everyone uses these words consistently, but, by connotation, it's quite possible to believe in God's existence without having faith in God (having absolute trust in God).  I believe the government exists, but I don't have faith in the government (trust in it to do the right thing in all circumstances).
Answer: In Greek, they are the same: πίστις. Ideally, you'd want to know what the ancient Hebrews understood by the word אמונה, and what the ancient Greeks understood by the word πίστις.
Comment: When that Greek word is transliterated into English, it is pistis. It's the same word for belief and faith. We can get a online definition of the Greek term here: http://www.blueletterbible.org/search/Dictionary/viewTopic.cfm?topic=ET0001302,IT0003351,NT0001783,TT0000191,VT0000987
Answer: Chronologically, belief comes before faith.
As Christ taught us in John 3:16 "... whosoever believes in Him shall not perish but have eternal life."
This belief is the beginning of our following Christ. But as a believer, not yet as a disciple. After the believer spend enough time in the Scriptures (just like Christ did when He was little, just like Paul did after he was converted from Saul the Christian hunter), God the Holy Spirit who dwells inside the believer empowers him/her to start having faith in Him through Christ.
Only then, the believer can become a disciple, growing daily in his faith, which is manifested in increased appreciation, understanding, and capacity to love God (and subsequently fellow human beings).  Eventually, the disciple will approach what is called the state of 'teleos' (in Greek) or being a mature or complete Christian.
Comment: Didn't Saul the Christian-hunter have, even before his conversion, a quite thorough knowledge of the Scriptures as they then existed, i.e., the Old Testament?
Comment: Indeed, he was one of the prodigy in Torah and Talmud (they do not call it Old Testament). And that was why he regarded this Christian movement as an aberration to the Jewish Mesianic tradition, hence he became a Christian-hunter. But when the Lord called him in Damascus, he became aware of the reality of Christ's authority.  That was the turning point when he decided to follow Christ instead of the Jewish tradition he held so dearly before.  God sent him as the first missionary to the Gentiles. And we (non Jews) today is the beneficiary of his life testimony.
Answer: There are some things for which it may be better to go to the dictionary than Scripture. The use and meaning of words is one, just so we know we are all talking about the same thing.
In discussing religion we need to be careful of our use of the words thought, belief, trust, knowledge, faith and hope. I have put together the following after comparing the etymologies and general use of the words, and hope it is of use.
I Hope …, I think…, I believe…, I trust…, I know…, have a definite order but the position of faith is less obvious. Faith is harder to place and often confused with the others.
Thought can be used as a noun from the past form of the verb think, meaning a conscious adjustment or association in the brain, or as a verb referring to something, as in I thought it was the best thing to do or I think it will rain today. In this way it is used as holding something to be possible rather than certain. There is a tendency to mistake it for 'belief' but I think God exists is weaker than I believe God exists.
Belief (be-lief = hold-dear) is often said to mean faith but one person may believe a thing and have faith in it, while another believes the same thing but has no faith in it. You can believe a man is a plumber but have no faith in him or trust him to do your plumbing.
Knowledge (gnosis, allied to constant - con - ken - can - canny) is often said to be the enemy of faith, as though having evidence for something leaves no room for faith. And yet it is possible to say, 'I can prove that I am married but my faith in my marriage, or marriage in general, does not depend on that.' One can even say, 'I know [from whatever evidence one accepts] that there is a God but I have no faith in Him.'
Trust (allied to truth - troth) is the basis of most of our dealings in life: family, business, or pleasure. We may feel we need to be protected by rules, and take care to watch our backs, but we really live our lives on a basis of trust. We cannot do otherwise, yet in association with religion, trust is often replaced disparagingly by 'blind faith', but faith is then being used wrongly. There is no need to use trust for secular life and blind faith for religion. It would cause less misunderstanding if blind faith was dropped and trust used for both.
Trust is not the same as faith although they are allied. Trust is something we can both have and do. Faith is something we can have but not something we do. Trust is sometimes used instead of hope, 'I trust the weather will be good enough for a picnic' but there is an unspoken 'because' - it implies high hopes.
Hope has always been there (almost unchanged from Anglo-Saxon times hopa) - ask Pandora. Sadly the confusion with trust above can be misleading.
Faith (fideo | fidelity) Alone of these words faith cannot be made a verb. We can say I think, I believe, I know, I trust and I hope, but we can only have faith. It is a possession, something to be gained. It is often used to mean belief but you can believe something but have no faith in it. When you do or follow something faithfully, you do so to the letter. Faith is an absolute. Its absence is a real absence.
I may hope God exists, think God exists, believe, even know God exists, and still have no faith in him. I may have faith in God but not trust Him (because I cannot tame Him!) but if I have faith in God then the others become redundant. Faith has no place in the order of these words. It is absolute, over-riding them all.
Answer: As far as Protestantism is concerned Belief is based on some sort of evidence such as belief in the Bible.
Faith on the other hand is trusting in things not seen.
To Believe that the Bible exists is based on whether or not the book really exists.
To have Faith that the Bible is God's word is not based on it's existence, but on  a personal choice not proven in any Material form.
To belong to Hinduism, or Islam, or any other Religious affiliation is Belief, and to live in the precept that only believing that Jesus death on the cross will get you to Heaven is Faith.
Comment: The answer can be greatly improved if you can list the sources with which you used to derive your answer or conclusion. If you happen to speak for your own denomination, please list your denomination here. Thank you for your cooperation.
Answer: What is the difference between Belief and Faith?
What is often left out of a discussion of faith is its relation to truth and hope and that there is a work of God in our faith.
We know that God has to perform a work in us to enable us to come to Jesus.

John 6:44  No man can come to me, except the Father which hath sent me
  draw him: and I will raise him up at the last day.

We might surmise that this work entails some ability to respond to truth.

John 18:37  Pilate therefore said unto him, Art thou a king then?
  Jesus answered, Thou sayest that I am a king. To this end was I born,
  and for this cause came I into the world, that I should bear witness
  unto the truth. Every one that is of the truth heareth my voice.

We know that the demons "believe" in God.

James 2:19  Thou believest that there is one God; thou doest well: the
  devils also believe, and tremble.

Here the word believe (pisteuō) is similar to the word for faith as it involves trusting. Here the demons trust that God exists, is powerful, and that they are destined for his punishment.
What the demons are missing is that component of trusting that comes directly from God.

Hebrews 12:2  Looking unto Jesus the author and finisher of our faith;
  who for the joy that was set before him endured the cross, despising
  the shame, and is set down at the right hand of the throne of God.

With Jesus as the "author" of our faith, we see an element of the ability to recognize truth as well as appropriate it as a drowning man clutches at a straw.

2 Timothy 1:12  For the which cause I also suffer these things:
  nevertheless I am not ashamed: for I know whom I have believed, and am
  persuaded that he is able to keep that which I have committed unto him
  against that day.
Hebrews 11:1  Now faith is the substance of things hoped for, the
  evidence of things not seen.

Faith has a component of hope. As we grow in faith, we growth in truth which helps us to see in greater clarity the evil in this world, our own humble position, as well as the greatness of God which results in our growing gratitude for his giving us this precious gift of faith. Tied to our faith is our hope and expectation that we will be rescued from this world.
Our faith is more than just "trust". It carries within it our connection with God, our hope in his promises, our protection from the world, and it even acts as an umbilical cord carrying our new life from God.

1 John 5:4  For whatsoever is born of God overcometh the world: and
  this is the victory that overcometh the world, even our faith.
Answer: From Protestant Philosopher, Gordon Clark, comes the following: "The crux of the difficulty with the popular analysis of faith into notitia (understanding), assensus (assent), and fiducia (trust), is that fiducia comes from the same root as fides (faith). Hence this popular analysis reduces to the obviously absurd definition that faith consists of understanding, assent, and faith. Something better than this tautology must be found".
Faith and belief are synonyms in the dictionary. What differentiates beliefs is what the object of the belief is. Thus Muslims believe the propositions of the Koran to be true. Christians believe the propositions of the Bible to be true. Hindus the propositions of Vedas. Atheists believe certain propositions to be true from Marx. etc.
Thus for example, the historic Protestants of the Presbyterian fold would have believed the propositions of the Bible to be true, as expanded in the Westminster Confession of Faith. Historic Reformed Baptists would have believed the propositions of the Bible to be true, as expanded in the 1689 Baptist Confession. Congregationalists likewise.
To misquote a famous saying "to believe or not to believe, that is not the question". What you believe to be true is what matters as delineated by the historic Protestant examples above.
Hth


LEDS with RPI GPIO

Question: When I hooks up LEDS to the GPIO, and switched the Pi on, I noticed that pins SDA, SCL, CE0 and CE1 all turned on without me programming them. Are they always automatically on? Or are they meant for input only.
Answer: The answer depend in part on how you connect them. You should always provide this kind of information when asking a question (to save people having to ask).
I assume you have LED connected to Gnd. Pin 3,5 are intended for use with I²C and have 1.8k pullup to 3.3V.
Pin 24,26 are normal pins, configured as input by default. They are often used in conjunction with SPI, so again it depend on what you have configured.
Comment: I haven't configured anything, is there a way to switch 24 & 26 to output?
Comment: These should be programmable in the normal fashion. All pins are Input by default. As there are about 10 different ways of doing this I am not going to list all. Add some detail to your question about what you have connected and what you are trying.

LEDS with RPI GPIO


Top Visitors Report displaying IP addresses

Question: We have a SharePoint 2010 CBA site where anonymous access is disabled. Recently the Top Visitors reports started displaying IP addresses. Could this be related to client vpn's? I havent been able to find much on this issue. Thanks.
Answer: I'm facing this issue right now too, does anyone have an idea why this report shows IP addresses of computers instead of names? As far as I know, they could not be authorized. Situation is even weirder, because the most active IP belongs to user, who basically hates the portal and does not use any (offline) synchronization or datasheet, works with documents only. Report looks like this:


Best method to aggregate 1m DEM mosaic to 10m DEM

Question: I have a mosaic of a 1m LiDar derived DEM.  I need to output a subset of the data as a 10m DEM.  I am currently using the aggregate tool in ARCGIS 10 to produce a mean value for each new 10m pixel.  Any advice on whether this is the best technique for such as task?  Is the mean value the best approach with this type of data?
Comment: Can you further explain your workflow on why the data needs to be re-sampled to a lower resolution? There might be a better way to do it than lower the spatial resolution as the first step?
Answer: A common mistake (that I've made too) is to down-sample a raster using the resample tool with bilinear interpolation. See this answer for an explanation why this is not good. A raster can be down-sampled in three steps.

The first step might not be required. Reproject the raster to the target extents. Use bilinear interpolation, and keep the output cell size the same as the input resolution (e.g., 1 m). Use the registration point to "snap" the raster corners to the projection. The output extents can be specified in the "Environments", and I suggest specifying the extents with a multiple of 10 m (or whatever resolution). These extents will control where the statistics are determined for the final raster.
Perform Block Statistics (found in Spatial Analyst Tools > Neighborhood). Use a rectangle with 10 cells for both height and width, and choose "MEAN" for a statistic type. Try different shapes and types, if you want. The cell size is the down-sampling ratio.
Since block statistics does not change the raster resolution, the last step is to Resample (found in Data Management Tools > Raster > Raster Processing). Choose 10 m, and use "NEAREST" to pick the block statistic in the centre of the cell.

Steps 2 and 3 can be replaced with's Curtvprice's suggestion to use the Aggregate tool, which will effectively yield the same results using rectangle means.
Comment: whoa. I've been doing this stuff for 20 years and didn't know that bilinear resampling uses **only** 4 nearby data points! this definitely needs a higher profile.
Answer: You can cut a step out of the process by using the Aggregate tool, which avoids having to replicate all those summary value cells, and the Resample.
Comment: Good advice, less steps to perform.
Answer: All the points mentioned above are important to take note of and I completely agree that bilinear resampling is quite problematic. Although, I am curious why nobody is discussing cubic convolution? The problem with using a block function is that the mean is quite irrelevant when the distribution is non-normal or multimodal, as expected with a lidar derived DEM.
If you have access to the original lidar data, just interpolate the data to the desired resolution using the "Topo to Raster" tool in ArcGIS. If you only have access to the 1m DEM raster, it seems like the best, albeit least efficient, method would be to convert the raster to points and use a thin plate or Bi-cubic spline. This would allow for the resample neighborhood to fit a nonlinear curve to the data.
Alternatively, you could smooth the 1m raster using a Gaussian kernel, approximating the size of your desired resample resolution (10x10), and then a bilinear resample would be much more appropriate. This approach would allow you have direct control over the smoothing parameter and would result in a "locally" normal distribution where the mean becomes relevant as an indicator of central tendency and a linear fit is supported.
Comment: The question owner is not seen for a long time here, but I have the same problem (my lidar rasters are 0.5 m), so I came to the discussion :)
Regarding the converting raster to points, for ArcGIS it seems it's much more easy to handle big rasters than millions of points.