How is it proven that Key Exchange implies OWFs?

Question: Page 38 says that Key Exchange implies the existence of one-way functions.

When I try to work out the proof myself, I get that in the hypothetical case

where there is Key Exchange but no one-way functions, an eavesdropper

would have a non-negligible probability of obtaining a random bits that would

have produced that communication actually observed, and then I get stuck.

As far as I can see, it could be that when the eavesdropper finds such bits,

the probability that the bits found would give the same key as

the parties get from the random bits actually used is negligible.

Does the existence of a secure Key Exchange protocol imply the existence of one-way functions?

If yes, how is that proven?
Comment: You have to use the property of key exchange that Alice and Bob eventually agree on a key based on: (1) their local randomness, r_A, r_B, and (2) the transcript that is induced by this randomness.
Comment: Alice and Bob get each get a key from their own local randomness plus the transcript, such that the probability the keys are different is negligible.  I don't see how the existence of a OWF follows from that. (That is, after all, why I'm asking.)
Comment: It seems more intuitive to me that the impossibility of one way functions makes key exchange impossible. But this is equivalent (invert the implication).
Answer: Your question suggests the following tentative reduction to obtain a OWF from a secure KE: Given an input, interpret it as the private random coins of two simulated parties to the KE protocol. Based on their private randomness, there will be some sequence of public messages between them, and at some point they will stop and agree on a private shared key (with some high probability). Then the public transcript of their communications is the output of the OWF.
You are right to be worried about this approach in the case when Alice and Bob may not agree with probability 1. In fact, this construction is NOT necessarily a OWF in that case. Rather, it is a weaker primitive known as a "distributionally one-way function," which is, informally, a function for which it is hard to generate a uniformly random preimage of $f(x)$, when $x$ is selected at random. It is known (but non-obvious) that one can construct a true one-way function using a distributionally one-way function. See e.g. Exercise 17 on page 96 of Goldreich "Foundations of Cryptography: Basic Tools," which is available for limited viewing on Google preview.
To directly see why the above reduction does not suffice, we can use the common "make a stupid modification" technique. Namely, suppose there exists a secure KE protocol where Alice and Bob agree with probability $1 - \epsilon$. Consider a stupidly-modified KE protocol that works as follows: Alice and Bob first each flip 100 coins. For each of Alice, Bob individually: If all 100 coins are zero, their remaining randomness is interpreted as encoding a sequence of messages which they send to the other party, ignoring whatever the other one says; then they just output a random "shared key." (Otherwise they follow the original protocol.) Given any public transcript, it is possible (with negligible probability) that it was generated by an Alice and Bob who BOTH flipped 100 zeroes and happened to have their remaining randomness specify that exact sequence of messages.
This is still a secure KE protocol, where Alice and Bob will agree with probability at least $1 - \epsilon - 2^{-100}$. On the other hand, it utterly fails to be a OWF in the hoped-for manner, since an attacker who sees some public transcript can always trivially invert by choosing 100-zeroes randomness for each of Alice and Bob.
Comment: First, you would need $n$ bits (or something like that) instead of 100, since it needs to be negligible.  Second, while that function intuitively should be distributionally one-way, how is that shown? $\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;$ I feel like there's a simple counting argument I'm missing.
Comment: Right, I was writing informally. To be precise, you would indeed need to replace "100" with the relevant security parameter.
Comment: As for showing that it's distributionally one-way, I believe the following sketch works: With high probability over A and B's randomness, the resulting transcript will be "good" i.e. it will be such that conditioned on its being the public transcript, then with high probability A and B's randomness was such that they do in fact agree on a key. Since their randomness was uniform to begin with, an attacker who samples uniformly from preimages will hit a good one (which allows them to recover the correct shared key) with high probability.
Comment: I don't see why the transcript must have a high probability of being "good", or why uniformly sampling preimages of a "good" transcript will work.  My guess is that the right definition of "good" transcripts would have there be a particular key which there is a high probability A and B agreed on, although then it would be even harder to show that there is a high probability of a good transcript.
Comment: If a noticeable fraction of transcripts are bad, then conditioning on the event that the transcript is bad, we see that (by definition of "bad") with noticeable probability A and B will NOT agree on a key. This contradicts security of the KE scheme.

If the transcript is good, then they will agree on a key with high probability. This, and the fact that each one's private coins are independent of the other's private coins, implies that there's in fact a UNIQUE key, defined by the good transcript, which they both output whp.

Admittedly it's only a sketch, so it's possible I've missed something.


Why isn't my overdrive circuit working?

Question: I have attached an image of an overdrive circuit that I have designed for a guitar pedal. I have built the circuit and it isn't working and I wanted to find out if there were any obvious design flaws/things I need to change or consider? I'm new to signal processing.
The first potentiometer is meant to control the gain of the signal and introduce clipping whereas the second potentiometer is intended to control volume of the output signal.
I have made the assumption that the input signal is approx 200mV pk so the first op amp increase the signal amplitude to approx. 1V pk; the second op amp is then intended to further increase the amplitude until it is driven beyond the rail supplies which will clip the signal at 4.5V pk (achieved through a voltage divider).
Comment: Looks like your virtual ground (weak as it may be) [is hooked to the negative end of your 9 V supply](https://i.stack.imgur.com/WEEJF.png). This effectively shorts out (bypasses) one of the resistors in your divider. What's up with that?
Comment: Besides what mentioned above the schematic is fine, though you should put a resistor in series with P1 to limit it's value.. And, P2 is kind of weird, if you are using a 3-pole potentiometer you should use the center tap as the output and connect other two contacts to ground and signal. And, finally, don't just put a capacitor in the positive opamp terminal path (see your first capacitor), use an RC circuit to VG.
Answer:
I have built the circuit and it isn't working

What does that mean? Is it totally dead, is it amplifying but not clipping, is it picking up old Star Trek reruns?
To start with, the virtual ground must be decoupled at all audio frequencies of interest. As it is, it looks like a 500 ohm resistor to GND and all signals connected to it interact. As a starting point, use a 100 uF electrolytic and 0.1 uF to 1.0 uF ceramic in parallel.
Also, add a 0.1 uF ceramic capacitor at each opamp's power pins. Place it (them) close to the device pins, and the leads as short as possible.
There is no DC path to GND for the first opamp. The non-inverting input must have a DC voltage to establish an operating point for the input stage. A 0.33 uF cap to GND will form an input highpass filter with a corner frequency of around 5 Hz.
Due to the feedback components used, each stage is acting as a highpass filter with a corner frequency of 16 Hz. The two stages combine such that the frequency response at 16 Hz is down 6dB from "flat", and down 3 dB at 32 Hz. We don't know what your bandwidth requirements are, so this may or may not be an issue.
Also, please add unique reference designators to each component, pin numbers on the opamps, and repost. Without this, discussing the performance of individual components is . . . difficult.
Comment: `There is no DC path to GND for the first opamp.`  that's almost certainly the answer, with no DC path input bias current will rail the op-amp's input.
Comment: @Jasen Yup. That's a(nother) problem with the circuit.
Comment: That's the third point I listed. Did you mean to comment on the first post, not my response?

Why isn’t my overdrive circuit working?


How to redirect to any domain

Question: Simple question
I own a domain and from that domain i want to redirect users who opens my old domain URL to my New Domain URL.
Comment: Non-duplicate: Although, there is small amount of overlap between the questions, they are two different questions.  In fact, apache doesn't necessary need to be involved in the redirect process, such as using DNS.
Answer: If you have cpanel you can do it under domains > redirects
If you don't, add the following to your .htaccess file
<code>Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^OLDDOMAIN\.com$ [NC]
RewriteRule ^(.*)$ http://NEWDOMAIN.com [R=301,L]
</code>
You may need to tweak it for https if you have an SSL certificate
Answer: There's only one way to redirect a client - and that's by issuing a HTTP 3xx response to their browser that contains a redirect URL.
In this case, you'll want to issue a 301 code HTTP response (Permanent redirect) that contains the URL for your new domain. Only a HTTP server can do this.
Some DNS services are able to do this at your request - they will put one of their own hosts into the DNS request and redirect the client to a new URL on your behalf.
Gateway servers or CDNs (such as Cloudflare) are also able to redirect clients with 3xx HTTP responses that you can configure from their dashboards.
Otherwise, you'll want to configure your own server to do so. Point the DNS to that server's IP and configure Apache/Nginx/IIS to respond with a 3xx redirect code. As an example, here is an article on Apache 3xx redirects.

How to redirect to any domain


Is it safe to invest in cryptocurrencies such as bitcoin?

Question: How safe is it to invest in cryptocurrency? I see bitcoin going up almost every time I look at its market value. How can anyone be sure it wouldn't crash in the future?
Comment: It will crash when some guys decide to sell below market values, and some people start freaking out and also sell below market values to run away as fast as they can, crashing it themselves.
Answer:
How can anyone be sure it wouldn't crash in the future?

You can't. There is no perfect safety in investing. And even investments that are considered pretty safe (like government bonds) are exposed to inflation risks.
For cryptocurrencies specifically, this is a highly speculative asset class. Right now, many people are buying on the hope that this will increase further. Yet nobody knows whether cryptocurrencies will ever be useful for anything besides speculation. The throughput and the transaction latency of many cryptocurrencies are definitely not appropriate for a currency. And this is already ignoring that cryptocurrencies suffer from extreme volatility so far.
These things combined raise many red flags that this might be an example of the greater fool theory and therefore a speculative bubble. Anyways, bubble or not, if you are afraid of crashes, this is way over your risk tolerance due to the high volatility.
Additionally cryptocurrencies seem to have quite a lot of issues with fraudulent exchanges, wallets being hacked, etc. which adds another layer of risk.
Comment: @Daniel, if someone hacks my bank account, I can get it reversed.  Cryptocurrency transactions are irreversible.
Comment: Let's also add the very real risk that you lose/destroy your cryptocurrency record and thus lose your money.
Comment: @Daniel Aside from the irreversibility aspect pointed out by Mark, most cryptocurrencies allow for a much greater degree of anonymity in transactions than regular financial services. You can't trace a BTC wallet address to an individual anywhere near as easily as you can trace a routing number and account number back to an individual. This, combined with the lack of a central authority for conversion between cryptocurrencies and real currencies, makes it somewhat safer to commit fraud using cryptocurrencies than it is using regular financial implements.
Comment: I generally agree with this answer except the last sentence. I'm quite sure the fraud and hacking affecting traditional currency is at least as great as bitcoin and other cryptocurrencies.
Comment: *"nobody knows if cryptocurrency will be useful beyond speculation"* I can buy a Tesla with Bitcoin. I can gamble on Roobet too. I'm damn sure I can sell it for real cash too if I had some.
Comment: A Tesla is a high-priced item that is traded rarely. Throughput is not so much of an issue here and latency as well. But things are different if you buy a milk shake at the drive-in. And while Tesla to my knowledge actually takes the bitcoins most dealers that accept BTC will convert it to cash immediately. I could send them 1kg of gold as well and they convert it ;)
Comment: @Mark on the flipside no goverment or company can blacklist you from blockchain services unlike the traditional financial ones.
Answer: I would even argue about the usage of the word "investment".
There is a difference between gambling and investment. If you buy a cow because it produces milk, it's an investment. You invested money in it, and every day your cow will give you milk, and you can drink the milk, or sell the milk, so it will keep producing you value day after day. If the price of cows drops, you won't lose your investment, you can still keep producing milk. If you buy a stock at a company which produces useful products, you'll have a profit because that company keeps producing value. However, if you purchase something which doesn't produce anything, and you only bought it because you hope it will increase in value and you'll be able to sell it later to someone else for even more money, then it's not an investment, it's speculation. It's similar to day trading, which is a zero-sum game. It doesn't produce any value. If your guess is lucky, you'll get rich, if you guessed wrong you'll get broke.
One of the most visible arguments against looking at Bitcoin as an investment is the reaction of people who are into Bitcoin, when they encounter criticism such as the one above. They instantly get defensive, and try to convince us about how wrong we are and how great Bitcoin is.
If you have a cow, and your income is the milk it produces, you don't have to convince other people about how great it is to own cows, you don't have to convince other people that they themselves should buy cows. If fact, it would be detrimental for you to do so, as this could drive the price of cows upward, and that will hurt you if you want to expand your business later by buying more cows. Similarly, if you find a company which is not well known, but you see they make products which are useful, and you feel the company will have a great future, and you buy some stock in that company, in order to profit from the value they make by making and selling products, you don't need to advertise this. In fact, it's better for you if you keep your predictions about how big this company will get, as a secret, so that you'll be able to keep buying their shares cheaply. Your income doesn't depend on convincing other people how great that company is. Yet in the case of Bitcoin (or tulips in 1630's Netherlands) you desperately need to convince people how great your "investment" is, because you desperately need the price to keep climbing. And yes, Bitcoin does have its uses, but the price it is traded by today is orders of magnitudes higher than what it would really be worth if it was merely used for its original claimed purpose. It will likely have its uses even after the bubble bursts, just as tulips are nice flowers and are still grown and traded. But all who invested all their savings into them when they cost orders of magnitude more than what they're really worth, will lose most of their money.
About how "useful" bitcoin is in itself: it has serious issues preventing its long term success. It uses so much energy, and as time passes and the blockchain grows, the cost of transactions will keep increasing. It will not be economical to use it for everyday grocery shopping. And as mining gives, by design, diminishing returns, what will keep miners interested in validating transactions once the rewards for mining are getting below a certain point? Of course, this might not lead to the end of Bitcoin itself, it might still have its uses, but everyday grocery shopping will not be it, once it will cost several megawatts of power to buy a single bread. (as of writing this, one transaction is almost one MWh, and it just keeps growing. you don't have to pay for it now because miners still keep mining, but that won't be forever, by design)
But even if Bitcoin was as useful as its proponents claim?
Apples (the fruit) are useful. They are nutritious, healthy, and taste good. You can buy one for less than a dollar, and it's a dollar well spent.
But what if one day you suddenly find out that a single apple costs 500 dollars? And the next day it costs 1000 dollars. You might think "had I used all my money yesterday to buy apples, I could sell them now and could have doubled my money." Maybe you'll feel you should buy an apple now for 1000 dollars, and hope that tomorrow it will cost even more, and then you'll turn a hefty profit. But if you try to justify your decision by the fact that apples are nutritious, healthy, and taste good, you'd be lying to yourself, because it's not the usefulness of the apple as a fruit what drives you to "invest" in them.
Similarly, although Bitcoin certainly has its uses, these uses are not what drives the vast majority of people to keep buying them. They buy them because they have seen how fast the price is climbing, and they hope that it will keep doing so at the same rate. This is called a financial bubble.
Comment: Can anyone say "tulipmania"?
Comment: I am not sure buying stock that was issued in the past is investment, in the way that buying at an IPO or a bond issue would be.  Where you put bitcoin on the spectrum between speculation and gambling is another question.  Also not like tulips, at least you can make more tulips out of tulips.  Tulips still have value today.
Comment: @Dave, people don't generally buy BTC because of its usefulness to them or intrinsic value, but only because they're largely speculating on a rise in value that lets them make money.  This closely parallels other speculative bubbles (tulip mania, 2008 housing bubble).  In futures contracts buyers only do so on future speculative value of the underlying asset rather than a desire to own a tanker of oil or railcar of grain.  Same's true with BTC and tulips back in 1630s.  You're right that you CAN make more tulips from bulbs, and use of "investment" is just common vernacular, even if misplaced.
Comment: @EricDuminil : almost. It's already in that order of magnitude. *"A single bitcoin transaction uses roughly 707.6 kilowatt-hours of electrical energy–equivalent to the power consumed by an average U.S. household over 24 days, according to Digiconomist. On a yearly basis, bitcoin consumes more energy than all but 38 countries, falling in line with countries like Finland, Chile and Austria."*  ([Forbes](https://www.forbes.com/sites/jonathanponciano/2021/03/09/bill-gates-bitcoin-crypto-climate-change/)) Other sources give slightly different estimates, but still within the same order of magnitude
Comment: One single BTC transaction requires one MWh????? Are you frickin' kiddin' me? That's more electricity than I use in a year, and you could use this amount to cross a whole continent with a Tesla.
Answer: I remember, when Bitcoin first came out, looking at the technology involved and saying "this will never amount to anything other than one big scam."  Turns out I was wrong: it's become a fractal scam, with smaller scams inside the big scam and smaller scams still inside of those.  But one thing it has never become is a currency of any kind:

A currency is characterized by four fundamental features. To qualify, it must be unit of account, must be a standard for deferred payment, must be a store of value, and must serve as a medium of exchange.
...
Since Bitcoin's source code predetermines that Bitcoin's supply will ultimately be fixed and totally inelastic, all market adjustments can take place only via price changes, not quantity changes. As a result, it is destined to be inherently subject to extreme price volatility. This means that Bitcoin will never serve as a reliable unit of account. You will rarely see items with Bitcoin price tags attached. You will also never see deferred contracts (contracts under which payment is made under a long-term credit arrangement) written in Bitcoin. Can you imagine someone writing a mortgage contract denominated in Bitcoin?
Bitcoin's volatility also renders it unattractive for most corporations to hold in lieu of cash reserves. Indeed, Bitcoin, which is considered an intangible (something, incidentally, that brings inconsistent and opaque accounting treatment in its wake), throws considerable risk on to balance sheets. In short, it is not a reliable store of value. It's no surprise, therefore, that most corporations are unwilling to take on the risks associated with holding Bitcoin on their balance sheets. A recent survey found that roughly 5 percent of finance executives said that "they planned to hold bitcoin as a corporate asset in 2021" and "84 percent of respondents said they did not plan to ever hold bitcoin as a corporate asset," citing volatility as their foremost concern.
Furthermore, very few items are purchased with Bitcoin. Items are not only not priced in Bitcoin, but the transaction costs associated with Bitcoin are excessively high for both buyers and sellers.
Bitcoin clearly falls short of meeting the four standard criteria to be designated as a currency. Accordingly, it should not be viewed as a currency but as a speculative asset with a fundamental value of zero.

The wild promises cryptocurrency was sold to the public on have never materialized, and almost certainly never will, given that their realization is fundamentally incompatible with the nature of a blockchain.  The only thing that has gotten any traction using crypto as a currency is crime, with everything from illegal drugs to child pornography to ransomware unlocks being denominated in crypto these days.
Remember, "the market can remain irrational longer than you can remain solvent."  Betting on a bitcoin crash any time soon is probably not a particularly good idea.  But neither is betting on it to continue growing. Your best course of action is simply to avoid it altogether.  Especially if what you're looking for is safety!
Comment: Fairly sure it was a small currency at one point, before the speculation era.
Answer: No, for some values of safe.
While other answers have pointed out that no investments are really safe, cryptocurrencies have an almost unique capacity to go to zero in a short space of time.
Crypto currencies base their value absolutely on trust, in that people trust the maths behind them to ensure their scarceness and the exclusivity of their transfer.  If this trust fails, perhaps by a 51% attack or quantum computing, their value could easily become zero in the time it takes for people to figure out what is going on, which could be minutes.
Comment: I'd say it's even worse, their value is based on people trusting people to keep buying them as investments. The world's first decentralized Ponzi schemes? Some of them might be useful as actual currencies, but Bitcoin is no longer one of those.
Comment: @Flux Bitcoin simply cannot process enough transactions quickly enough to make it worthwhile. There's a *chance* it can be saved by the Lightning Network or something similar, but still, out of all the cryptocurrencies, it has the least features. Why wouldn't you bet on Monero (which offers actual privacy) or Ethereum (which offers smart contracts) instead? Is it really better for a currency to *not* have those things? No, the only reason to buy Bitcoin is greater fool theory.
Comment: @user253751 "Some of them might be useful as actual currencies ..." Could you give some examples? Why is bitcoin no longer useful as an actual currency, while other cryptocurrencies may still be useful?
Comment: Monero transactions cost about a 200th of a penny, bitcoin transactions currently cost $27.47.
Answer: Perhaps it may be helpful to describe some of the major currencies by market-cap:
Bitcoin - Transfer fees in the double-digits make it essentially useless as a currency and a way to store value. In addition, its supply is still increasing.
Ethereum - Its claimed use-case is a platform for running decentralized applications ("smart contracts"), which have not proven themselves to be very useful. Fees are usually in the single-digits for pure transfers, but in the double-digits if you wish to use the functionality of a decentralized application, which reduces its usefulness still further.
Binance Coin - Created by the cryptocurrency exchange Binance, it is essentially a clone of Ethereum implemented in a completely centralized way - it is debatable whether it can even be called a cryptocurrency. Regardless, one unit of value on Binance's database is currently worth 520 USD, for a total market-cap of $80 billion.
XRP - Its creators and distributors, Ripple Labs Inc., were recently charged by the SEC for the unregistered selling of $1.3 billion in XRP to retail investors. Although the cryptocurrency has transfer fees in the sub-cent range, it enforces a minimum account balance of 20 XRP in order to make transfers, or about 33 USD.
Tether - A centralized cryptocurrency issued by the company Tether, closely affiliated with the cryptocurrency exchange Bitfinex, it claims to be backed 1-to-1 by USD and to be equal to it at all times, but was recently investigated by the NYAG, who found that this was a lie at multiple points in Tether's history.
The list of course continues... but what I believe you will find, if you continue to research the field of cryptocurrencies, is that their value is not backed by anything true, any real-world usage as a useful system. The cryptocurrency market is pure speculation, which makes it an incredibly high-risk field to invest in.
Comment: If viewed as a currency, Bitcoin is currently undergoing rapid *de*flation (a Bitcoin today will buy you about 8.5 times as much as it would this time last year).
Answer: I agree with all of the answers that say cryptocurrencies, like all investments and/or gambles sit on a Risk Continuum, i.e., they have varying levels of risk relative to one another.
More important though is the risk to you.  That depends on a few factors including:
1- Your Age, or how many years until you'll need to liquidate investments to finance living expenses (if ever)
2- Your other investments, if any.  What % of your overall investments/wealth/savings would an investment or speculation in a cryptocurrency represent?  Would losing 100% of that particular investment force lifestyle changes now or in the future?
3- Your ability to invest in a disciplined, unemotional way... consistently.  See the "caveat" in the paragraph immediately following #5 below.
4- What you're trying to accomplish.  Are you trying to "get rich quick"? Or build a portfolio you expect will pay your expenses when you have to or want to stop working? Finance a near-term expense? Long-term? Leave money to your heirs?  These are all important factors in determining what's "risky" vs relatively "safe", which leads to,
5- YOUR actual risks.  This one is often overlooked.  Wall Street firms and most financial intermediaries, advisors, and articles referring to Risk treat it as if it's synonymous with Volatility (as measured by the Standard Deviation of returns over time).  While I agree that Volatility is or can be a risk, it is not Risk.  Let me repeat that: Volatility is not Risk. In fact, Volatility is far more frequently the source of extraordinary returns. For instance, price volatility in dividend-paying, growing, and other high cash flow securities can dramatically increase your returns over long time frames, assuming reinvestment. Whether the securities pay dividends or not, and whether you reinvest those dividends automatically or not, Volatility can still work to your advantage through opportunistic investment or reinvestment.
In the long run Volatility in quality investments works in your favor.  There is a huge caveat here, though: Volatility will cause extremely poor investment results if you are simply speculating or gambling and not actually investing in things you know and understand. It will cause you to be shaken out of otherwise high probability long-term investments due to your emotions, i.e., your Fear of the Pain from Financial Loss.  According to Prospect Theory-- the development of which earned a Nobel Prize for Daniel Kahneman and Amos Tversky-- we experience the pain from losses about twice as strongly as the joy from gains.
While that might not seem like much, it goes a long way towards explaining the terrible investment results of the vast majority of investors, especially those repeatedly buying high and selling low at the tail end of bull runs.  Knowing what you're doing and what you're putting your money into are the only things you can do to take emotion out of your decision-making process.  It doesn't belong there.  If you haven't mitigated the emotional effects of a price drop or crash prior to buying a security, your greatest risk isn't from the security, but yourself. And that risk is called: Permanent Loss of Capital.
That leads us to the risk to you from putting money in Bitcoin and other Cryptocurrencies.
First, I'd encourage you to read up on what Bitcoin is intended to be as well as the probability that BTC or any other crypto will see adoption hit the critical mass needed to realize this goal (or something close to it). Second, I'd encourage you to understand what other cryptocurrencies are, or are trying to be, and finally, how both Bitcoin and other cryptocurrencies are currently being viewed and used.
I was a sceptic for a very long long time.  Now, while I'm no fanboy, I do see the potential benefit of holding Bitcoin and possibly one or two other cryptocurrencies (max).  This has nothing to do with the current price run-up, though. I'm less concerned with Price than I am with Value.  My interest in Bitcoin wouldn't be as the currency they originally intended it to be, but as a Store of Value serving as an Inflation Hedge.  This is similar to the way many people feel about Gold and other precious metals that were once used as currencies or currency bases at certain times in the past.
While it's possible that Bitcoin could evolve to be a currency, I find it much more likely to evolve as a Store of Value. Right now it's being used purely as an Investment Asset.
Why do I think it has the potential to develop as a store of value?  Because of the strict limit on supply.  There will never be more than 21 million Bitcoin in circulation.  From there it's a simple matter of math: if I own something that's supply-limited and accepted as being a thing of value its price in local currency (any flexible fiat currency) will appreciate with that currency's inflation rate, at a minimum.
Basically, Bitcoin has the potential to develop into a "better Gold".  It has this potential to be better than Gold as a store of value because of its 1- singularity of purpose, 2- intangible nature, and 3- security features. Gold has carry and exchange costs that an intangible store of value wouldn't.  Gold is also being mined continuously, with new supply being discovered all of the time.  There is no cap to the amount of Gold. Even if its growth is minimal or can be safely assumed to not grow any more than a few %/year on average, Gold's growth   plus carry & exchange costs combine to be a significant drag on its functionality as a store of value.
[For those criticizing both Fiat Currencies and Cryptocurrencies as being based on nothing more than trust: that's the case with everything we've ever used to trade or store value.  Yes... Gold, too. Gold produces nothing, costs you to hold, is impractical in everyday use, etc.  The only reason its been used as currency at times in the past is because people agreed that it had value.  Whenever the times called for it something other than Gold stored value. It only has value insofar as we agree it has value, just like anything else that produces nothing of value itself.  Imagine: the world collapses... no governments, no security, etc.  What would be valuable in this world?  Gold?  I don't think so.  How about: Water, Food, Ammunition, etc.?  Ancient Rome paid its soldiery with Salt!  Can you imagine salt being more valuable than gold?  It's happened.]
Of course, as others have pointed out Bitcoin has or might have problems with its security features or because of its security features, and faces not-insignificant risks from governments around the world.  Should security fail, then the value would be lost, completely.  Should financial intermediation add to the costs of holding or transacting in Bitcoin, then the value would suffer (depending on degree). Should Bitcoin or any other other cryptocurrency present or be perceived as a threat to any large country's currency or revenue base it runs the risk of being forced out or underground.  I don't know how that shakes out, but it is a risk.  For any of these risks the probability of total loss is very high and the potential for such losses is very real.
So, what is the Risk of buying Bitcoin or another cryptocurrency? Right now the only cryptocurrency I see developing as a store of value is Bitcoin (and maybe Ethereum).  The primary risk to owning Bitcoin that I see is not Volatility itself, but from volatility functioning as a catalyst to poor decision-making under conditions of uncertainty.  Most people either don't know what they own, buy it purely for speculation, and/or can't afford to lose the money committed. As such, they are easily shaken out of their positions at a loss.
Bitcoin can and will be extremely volatile, especially for the foreseeable future since its current price is based more on speculation than anything else.
So, the real Risk of buying Bitcoin is that you'll lose everything you invest and possibly more than you can afford to lose.  That's almost completely dependent on your behavior in response to short-to-medium term volatility, though.  I say *"almost completely dependent" because your behavior is itself dependent on several factors, such as: your knowledge of the product and securities trading/investing in general, your own finances, and the other risks and assets in your life that inform your Fight or Flight response.
But current pricing and the proliferation of cryptocurrency alternatives to Bitcoin has very little to do with their value as currencies or stores of value.  Its more of a "piling in" to products that present an opportunity to capitalize on a price-insensitive public's appetite for anything, any tradable thing, to appreciate in value... quickly.  usually, it's Wall Street that does this.  They respond to demand and "give the people what they want", dancing as long as the music's playing then absconding with profits and bonuses when the edifice collapses.  This time it's come from a different area... but it's the same story.
Buying into anything other than the most widely-adopted coin (by both retail investors and institutions/large companies) carries far more risk of permanent impairment of capital, i.e., losing all of the money you invest.
Current pricing in this area is somewhat of a game of "Hot Potato" fueled more by FOMO (Fear of Missing Out) than good sense or investing prowess.  This makes people price-insensitive, forcing what's called Greater Fool Investing to take precedence in markets.  Greater Fool Investing is when you have no idea what something's worth (the Value), but believe there's a greater fool than yourself out there who will buy it from you at an even higher price.  When that's the case, it's best to either be patient or only risk what you can afford to lose today, meaning what you can afford to lose that will have no impact on your lifestyle now or in the future.
Comment: The strict limit on supply could just as easily work against you. The entire bitcoin community could go "wow the price is ridiculous, I'm out. Let's move to Ethereum."
Comment: Isn't that just a radical example of the stabilizing market forces inherent in any currency or commodity trading? I'd anticipate that force would kick in long before the point where the entire community would dump their BTC for Ethereum, especially since doing so would recreate the problem just solved. At some point the supply-limit would cause reflecting inflation of the underlying currency at the rate of inflation only, i.e as SOVs. Ultimately, value would be divided among the aggregated supply of agreed upon stores of value (Gold, BTC, ETHE, etc.). It's a race for acceptance & adoption.
Answer: There are a few reasons to be careful about investing in cryptocurrency.

"Get rich quick" schemes are a bad idea
Anything that seems like it could make you a lot of money easily and quickly should be approached with a lot of caution.
This is especially true if we're talking about the finance industry, where there are many people with many years of experience trying to profit from even the smallest opportunity or inefficiency in the market (which tends to reduce or remove that opportunity, meaning others can't profit from it).
If you see something that seems like an amazing investment opportunity, that may be the case, but it's more likely that you're missing something.

Investing in any individual stock or instrument is considered high risk
The price of single stocks, currencies or financial instruments can increase significantly, but they are also much more likely decrease significantly.
There are a few cryptocurrencies, so you can get some diversification by investing across them, but that's still not much better as they all carry the risks associated with crypto.
Unless you're an experienced trader, I would strongly recommend investing across not only different instruments, but also different industries, to decrease your investment risk. I would also advise against trying to pick and choose stocks to invest in. There are ETFs and funds for this purpose.
Or, if you want to invest like this, treat it as gambling and only invest money you're willing to lose in its entirety.

Crypto is relatively new
Bitcoin has been around for little over a decade, which isn't that long for a company, but it's especially not very long for a currency. Crypto also doesn't have the advantage of being the official currency of some country. There are some places that accept it, and some larger companies have committed to it, but it hasn't yet gained widespread acceptance.
That means there's still a lot of uncertainty about where it's going, and uncertainty is bad for investing.

Crypto is very volatile
The uncertainty around crypto can also be seen in its price.
Bitcoin reached almost $20k in 2017 before plummeting and staying around half that price or lower, and only recovered 3 years later in 2020.
Just in the last year the price increased to 1000% of what it was. During that time it also dropped from $40k to $30k before climbing to $57k and dropping to $45k.
Those are some huge ups and downs.
Is this just another momentary peak before it plummets again, will it keep going up or will it remain where it is? It's all just speculation.

Crypto has no inherent value
A conventional company typically provides some service or product that people want. This service or product is something people actually get. They have assets that can be sold. They have a customer base that provides some guarantee of future income. This can all fall apart fairly quickly, but there is at least something.
Crypto, on the other hand, is a rather complex interaction of whether people think it's potentially useful, whether people think other people will think it's potentially useful, whether people will continue to think this and whether all those people will commit to it at some roughly overlapping period of time for it to gain widespread acceptance. Then enough people need to continue being committed to it indefinitely for it to keep having value.
You can own all the Bitcoin in the world, but it would be completely worthless if no-one is willing to accept it as payment.

Regulation can cripple crypto overnight
A conventional company is certainly also at some risk of this, and some more than others. But the risk here probably typically isn't quite as big as the risk with crypto.
Crypto represents a large disruption to the finance industry. Countries are still figuring out exactly what regulation makes sense. In theory a large country could create regulation to make crypto usage impossible or impractical, which may cause anyone in that country to get rid of their crypto and/or stop mining crypto, the decrease in demand will cause the price to drop, which may cause others to sell their crypto, other countries may follow suit and this could snowball into most people giving up on crypto.
Note: this snowball effect can happen even without regulation if some big players decide to give up on it for whatever reason.

Past performance is not indicative of future results
This is a common saying in finance.
Just because a price increased up to now doesn't mean it will keep increasing.
It could keep increasing, but it could also have reached a high and decrease, or it could just stay the same.
It is a nice idea to think you can increase your money by 10x in a year by checking what happened in the last year, but you can also lose most of your money instead.
To understand where the price will go, you need to understand what made the price increase, evaluate how likely those factors are to remain relevant, understand what might make the price decrease and evaluate how likely those risks are. That's not easy to do, even the most skilled investors often get this wrong and this is likely even more difficult with crypto since its value is pretty much entirely based on what other people think it's worth without any inherent value to base that on.
Answer: You might like to take a look at this:
https://www.bloomberg.com/opinion/articles/2020-12-01/bitcoin-is-the-tulipmania-that-refuses-to-die
This seems to be an example of fear of missing out, people want to buy in before the price goes up again. But since bitcoin has no underlying assets, and costs a lot in electricity to produce, is quite easily lost if your software backup fails, and is only worth something if other people are willing to put their hard currency into it subsequent to you, it fails to qualify as an investment. If you invest in mining bitcoin yourself, you will only get paid (in more bitcoins) if you hit on the correct hash that enables adding to the blockchain. Otherwise someone else gets the bitcoin and you expended valuable energy for nothing. What's more, so many people are doing it there is a tremendous shortage of graphics cards etc taken up with carrying out an activity which is essentially useless.
But nobody can admit that given the $1T value invested in Bitcoin.
Comment: For bitcoin if you join a (reasonably large) mining pool you get paid steadily for the work (hashes) you do, although you _profit_ only if this exceeds your costs for equipment, electricity, and cooling. The same _should_ work for other PoW coins, but I don't know that they do. A few years ago bitcoin mining did spike demand for graphics cards (GPUs) but now only ASICs are competitive; _other_ coins using algorithms designed not to work well on ASIC or FPGA, like scrypt, may still go for GPUs.
Comment: That is true but as the hash threshold for acceptance becomes more and more demanding with time, somebody else who has invested in newer equipment will take revenue away from you, and it is entirely possible that multiple miners will come up with different successful hashes at the same time and it is then a race to see who can validate their hash on the distributed blockchain first.


Do Robocopy copy efficiently large files?

Question: in our small sized company we use Vmware. We backup the VM with Veeam.
Resulting files are in order of 200-300 gigabyte per VM, for a total of 1/1.2 terabyte of data.
I use robocopy to copy VM files backuped to external hard drive. I would like to know if Robocopy use something like rsync to copy only changed 'blocks' of data instead the entirely file .
Thanks
Answer: @Gregory MOUSSAT:

no algorithm can speedup the process, because rsync (for example) have to read the entire file on client and on server to find duplicate contents.

... I think that affects only transfers where just one single rsync works, eg. copying between a share and a local disk. Here, that one-and-only rsync of course needs to "fetch" the whole file from the share to the client to do its comparing/copying.
However, if you use two different rsyncs on both the source and the target machine, you will in fact get a huge speed up! Both separated rsyncs build their checksums of the file in question locally (without transferring any bit of it!), compare these checksums over the network and then decide which (changed) parts of the huge file to transfer.
That can be achieved by using a rsync daemon on the fileserver (remember to open its rsyncd port in the firewall), or by using ssh as a transport medium between the two machines. The latter of course requires you to have local login rights to the remote machine.
Cheers
Comment: ... that was not the question and it isn't relevant. In the case of two separated rsyncs, these communicate just the changes over the network, not the whole file.  Imagine a 500 GByte file which has 2 bytes changed at the end. Two communicating rsync processes would only transfer one single 512 byte block with the changed 2 bytes over the wire, and the receiving rsync would just write this changed block to disk. This smart behavior would even speed up local disk2disk copies and does _not_ depend on disk speed versus network speed ;-)
Comment: If your network is able to transfert files at the same speed than the disks can be read, then you can use whatever amount of rsync, they can't be faster than disks. So they can't be faster than the network. Rsync is only handy when transmit speed is slower than read/write speed.
Comment: I admit that the transfer speed of course can never exceed the speed of the slowest of both disks. Even with two rsync's at both ends, both have to locally read in the whole file to build their respective checksums for comparison. That's right!
Perhaps I should have said the "transfer volume" over the wire will be much smaller, and in the case of fast disks, this results in less transfer time.
In any way, the network is less loaded with rsync in case of only a few bytes changed...
Comment: 5 years later - yes but how is rsync going to know those two bytes have changed without reading the whole file?
Answer: Robocopy doesn't use any method to transmit only changed blocks of datas.
If you have to transmit your files thru a slow network, just use rsync.
If you have to transmit your files thru a "reasonable speed" network, no algorithm can speedup the process, because rsync (for example) have to read the entire file on client and on server to find duplicate contents. So if your network is Gigabit, or if you do a local copy, you just copy the files and voila. You can't get something better, execpted if supported by the filesystem (ala ZFS, but only works on the same partition).


Classical guitar 5th string buzzing

Question: This is to ask that I have a classical guitar Yamaha C70. Whenever I play the A note on any of the frets the 5 string I.e. the A string starts to resonate and it's quite irritating. It takes around 7-8 seconds to calm down. This happens only with the A string, not any other string. The buzzing sound was mild earlier but after changing the A string to ProArte normal tension,the buzzing sound has increased considerably.
Can anyone please help me find an answer ?
Comment: started an answer but reading again I'm not sure what you are describing. Does the A string vibrate when you play any A note, or is there buzzing when you play any note on the A string?
Answer: If the problem is a buzzing resonance of the open A string when you play any A, the first thing to check is your nut. Has the string slot worn down letting the string sit too low. The other options are the height of the saddle, and then the truss rod tension (if your guitar has one - some classicals do, most don't)
Strings should resonate when a matching note is played, but the buzzing tells you your clearance is too low.
Comment: Sometimes a buzz can be caused by the short end of a string touching the guitar top behind the bridge and rattling like a drum snare. It would pay to eliminate this source by making sure the  short ends of your guitar strings are tucked up and not contacting the guitar top.

Classical guitar 5th string buzzing


problem putting an rtf field into visualforce html email template

Question: I want to create an email from a template and insert the contents of an rtf field from a record into the email. To this end, I created a visualforce email template (see attached code) My problem is that when the rtf contents of the field are inserted into the body of the email the formatting is lost (see here) and it is converted back into text. rather than minting the formatting (see here) How can I create an email template that will take the contents of an rtf field from a record and insert it into the bey of the email and maintain its formatting? Once I am able to display the formatting correctly (by using the apex code solution below) I still cannot display the image within the RTF field.
Answer: Try doing this:
<code><apex:outputtext value="{!thefield}" escape="false" />
</code>
This should display the HTML correctly.
Comment: Brilliant, that enables me to get the formatting, BUT it does not show the image embedded, I have updated the question to include the screenshot. Any ideas how I get around that issue of not being able to display the image inline?
Comment: @Bartley: Try using Apex:outputField instead.


Bitcoin walet not updated

Question: I have setup'd bitcoin core(Version 22.0) on my centos server with pruning set to 3GB.
Now, My friend sent me some bitcoins but my wallet still show me 0. The transactions has 41 confirmations. Please help.
Comment: is it because of bitcoin syncing is still in progress ? just a guess
Answer: Bitcoin core tells in the display whether the wallet is synchronised yet. If it isn't yet fully synchronised, it yet can't show the results of recent transactions.
Pruning affects the amount of data retained on disk. It does not reduce the amount of data that has to be obtained over the network for synchronisation.

Bitcoin walet not updated


Why guard node didn't change after 3 months of using TOR browser?

Question: I'm using TOR Browser for 3+ months but I noticed that the Guard node didn't change even once. I thought that Guards change every 1-2 months, but not in my case.
Is this normal?
Thanks!
Answer: Tor does not keep a single guard node that it changes after a certain amount of time. There is a complicated process for how guards are chosen and how Tor uses them. You can read more about this here: https://gitweb.torproject.org/torspec.git/tree/proposals/271-another-guard-selection.txt
The proposal doesn't really explain the different possible state changes, but assuming that a guard is never "re-confirmed" after some time, then a guard should be in the sampled set for at most 120+60 days. Any guard here should be used as a primary guard for less time than this, depending on how the 3 primary guards are filtered. For most people who choose stable guards, my guess is that their first-ever primary guard will be used for about 108-120 days (since they would have been chosen as a primary guard on the same day they were added to the sampled guard set), but then future primary guards will be used for less time than this (since they would have been in the sampled guard set for some time already before being chosen as a primary guard).
Comment: Thanks for the detailed response. Today, I noticed that for a few minutes my Guard changed, but after some minutes, changed back to what was before. Why so? could be a network failure or so?


How to change the textures of blocks without other downloads?

Question: I know there are some similar questions to this already, but none of them are quite what I'm looking for. How do I change the textures of blocks without other downloads, using a command? Is this possible? For example, how would I change the texture of a Sea Lantern to have the texture of a Barrier? I am playing on 1.9.2, if it matters.
Answer: As far as I know this isn't possible and you need to download a texture pack to do that.
There may be a mod that allows you to do this I'm not sure which one though.
http://www.minecraftforum.net/forums/minecraft-discussion/suggestions/82649-texture-changing-with-command-blocks
Comment: This is apparently not true, I've seen world downloads that don't include texturepacks but have blocks with custom textures.
Comment: @EthanChapman Could you link to an example?
Comment: block with custom texture and texture of seaLantern are two different things.
Comment: @EthanChapman for changing textures what do you mean? Are there changed textures of actual blocks or skulls?
Answer: Depends on whether you want to make a resource pack yourself
The only possible way to edit the textures of a block are with a resource pack, so unfortunately, yes you will have to download a resource pack.
But....
If you're willing to do some work, you can make a resource pack yourself. Just do a quick google search and you can see how to make your very own resource pack where you can make textures anything you want. If you're trying to make the texture of a block the same as an existing texture, that will be a lot easier considering that the texture is already made
Comment: OP wants to be able to change the textures of one block to the textures of another block, using plain vanilla commands. Resource packs do not enter into the equation at all.
Comment: Telling someone to google their way to an answer is not a real answer. You need to update your answer to include some sort of tutorial or something that answers the actual question.


Questions about Markov process usage

Question: I've read the answer of George Lowther on this question and I don't understand his proof. I know just a few things on Markov Process. If I define $\left(X_n\right)_{n \in \mathbb{N}}$ with $X_0=1$ and
$$
X_{n+1}=\begin{cases}
2X_n,&\text{with probability }1/2,\\
3X_n,&\text{with probability }1/3,\\
6X_n,&\text{with probability }1/6.
\end{cases}
$$
How can write
$$
P\left(X_n=k\right)=1_{\{2\mid k\}}P\left(X_n=k/2\right)/2+1_{\{3\mid k\}}P\left(X_n=k/3\right)/3+1_{\{6\mid k\}}P\left(X_n=k/6\right)/6.
$$
I'm not even sure to understand this indicatrice function $1_{\{2\mid k\}}$. Cuuld you explain me how to obtain such results ? And why not the whole proof he made ?
Comment: I have no idea what that notation means.  I observe there is an $n$ on the left-hand-side (and no $t$), while there is no $n$ on the right-hand-side (but a $t$).  I don't know what $p_t(k/2)$ means in relation to the notation $P[X_n=k/2]$, or perhaps $P[X_t=k/2]$, and I certainly don't know what those indicator-like-things are.
Comment: @Michael Even from the original answer ?
Comment: You seem to have fixed the $t$ versus $k$ issue.  I suspect the indicator function $1_{2|k}$ is for the event "2 divides $k$" (i.e., $k$ is even).
Answer: $$p_{t+1}(k):=P(X_{t+1}=k)= \sum_{x}P(X_{t+1}=k|X_{t})P(X_{t-1}=x)=\sum_{x}P(X_{t+1}=k|X_{t-1}=x)p_t(x).$$
To compute $P(X_{t+1}=k|X_{t}=x)$, notice that the only nonzero probabily values that $k$ can take are $2x,3x,6x$, or alternatively we need at least one of $k/2,k/3,k/6$ to be integers. Thus $$P(X_{t+1}=k|X_{t}=x)=1_{x=k/2}/2+1_{x=k/3}/3+1_{x=k/6}/6.$$
Here's an example. Suppose $k=12$. Then $x=6,4,2$ will contribute to $P(X_{t+1}=12)$. Otherwise if say $k=27$, then $x=9$ contributes. Finally if $k=7$, no $x$'s contribute.
So the sum for $p_{t+1}(k)$ reduces to $x\in\{k/2,k/3,k/6\}$ , and the result follows.

Questions about Markov process usage


What is the difference between Hooke's Law and Young's Modulus?

Question:
In the elastic region where stress is proportional to strain up to elastic limit which is we call Young's Modulus (E). My question is if that is E, then what is Hooke's Law (K=F/x spring stiffness). I thought that Hooke's Law is applicable in the elastic limit too. How can we say that both are different? Its a bit confusing. Can we have a simple answer? Pictures are attached. Thank you.
Comment: See https://engineering.stackexchange.com/a/48995/10902
Comment: I don't think he would've asked again if he had already received a sufficient answer to  aide him when he previously asked.
Comment: It was not clear answer.
Answer: Hooke's law is a law of physics that states that the force (F) needed to extend or compress a spring by some distance (x) scales linearly with respect to that distance—that is, $F_s = kx$.
Young's modulus is a measure of a solid's stiffness or resistance to elastic deformation under load.
ADD: - Another way to see the relationship between the Hookie's Law and Young's Modulus (E), and Young's Modulus (E) vs the Spring Constant (k)
Hooke's Law describes linear-elastic behavior and is mathematically expressed as $\Delta = \dfrac{PL}{EA}$. And, since $\delta = \dfrac{P}{A}$, it can be expressed as $\Delta = \delta\dfrac{L}{E}$.
Let's replace $\dfrac{P}{\Delta}$ with $k$ and rearrange the first expression. It becomes

$E = \dfrac{PL}{A\Delta} = k\dfrac{L}{A}$ - note that in this case, $E$ is directly related with $k$, thus both can be considered and called the "stiffness" of an element.

Now rearrange the second expression as,
$\dfrac{\Delta}{L} = \dfrac{\delta}{E} = \epsilon$, from this

$E = \dfrac{\delta}{\epsilon}$ - in here, $E$ is a measurement of the ratio of stress vs strain of an element subjected to force.

Conclusion - Both "$E$" and "$k$" are a component in expressing Hooke's Law. The difference is the thing they measure - $E$ measures stress vs strain ratio; $k$ measures the force-displacement characteristic of an element. As both measurements indicate the level of resistance of an element subjecting to force, either explicitly (as in $k$) or implicitly (as for $E$), both can be used to indicate the "stiffness" of the element.
Comment: Solid's stiffness or resistance to elastic deformation is K (spring constant). I am still confused. But thanks.
Comment: Do not overthink. K is related to stiffness in one dimension only (axial force-displacement), while 'E" (stress-strain) is the general indication of material stiffness in resisting stress of all kinds.
Answer: Hooke's law was initially stated by Robert Hooke in a paper on 1676, stating that the force required to extend a spring with stiffness of K was proportional to the distance, X
$$F=KX  \rightarrow \ K=\frac{F}{X}$$
But later the concept was extended to most solid bodies acting within their elastic range.
For example, in a rod, the Hooke's stiffness K and the Young modulus are related by:
$$K=E \ \frac{A}{L}\quad and\quad E= K\  \frac{L}{A} $$

E= Young modulus
A= area of the rod
L= length of the rod.
Comment: @IbrahimOmer, maybe this will help . if we double the length of the rod in my answer its K becomes half, but its young modulus remains the same. K is related to the geometey but E is a material property.
Comment: What is the difference between these two? E (Young's Modulus) and stiffness constant (K) both exist in elastic range. I am still confused. But thanks.
Comment: Then what is the difference between elasticity and stiffness as both lie in elastic range?
Answer: The main difference between the Young's modulus (E) and the Spring's constant (K) is that Young's modulus refers only to the material, while spring stiffness refers to the structure.
The spring constant is dependent upon the Young's modulus. E.g. for a beam with rectangular cross-section (A) and length (L), K is calculated by:
$$K = \frac{A\cdot E}{L}$$
So for example if the beam kept the same materials and either the length L or the cross-section changed, then the Young's modulus would remain the same and the spring stiffness would change.

Essentially, Hooke discovered was a polymath that was mostly interested in solving problems. The spring constant was part of a series of experiments that Hooke conducted in order to invent a spring watch/a spring balance. Hooke observed that for a structure (in most cases) doubling the force resulted in doubling the deformation, but did not want to "waste" time decoupling the effects of geometry, and materials, so settled for the Spring's constant. And it took over 100 years for the widespread adoption of Young's modulus (although Leonard Euler had already proposed the concept).
Comment: What if we say in stress strain diagrams during elastic range Hooke's Law is applicable or not? Because there is Young's Modulus E (stress directly proportional to strain). Which statement would be correct?
Comment: I am sorry I cannot understand the question in your comment.
Comment: In elastic range, stress is proportional to strain (E). Similarly, force is directly proportional to distance (K). Which statement is correct?
Comment: @IbrahimOmer The statements should be revised to: "In linear elastic range, stress is proportional to strain, which defines the Young Modulus (E = stress/strain). Similarly, force is directly proportional to stiffness, as K = F/delta (linear deformation). The statements are correct because both phenomenons follow Hooke's Law and demonstrate linear elastic behavior."


Design patterns

Question: Someone said to me once that rendering a controller action inside a view is a bad design decision. Can you guys recommend some resource where i can get more information, advice and examples on what is a good/bad design and why. This way i can learn how to take better design decision and recognize where future problem may occurs.
Comment: learn about OO design - good place to start is Head First Object-Oriented Analysis and Design published by O'Reilly Media
Answer: Rendering controller actions in a view is not bad design, it just doesn't make sense. You don't render controller actions you render views. render = draw. How would you draw an action?
You render views either directly within a view or from a controller action. Both are extremely common and totally acceptable practices.
Perhaps if you explained what you are thinking then you might get an answer but for the minuite all I can say is
In your view links and buttons got to controller actions and render statements render view template partials which is pretty much all you'll ever want to do.
Update
It just occured to me that you might be referring to view syntax similar to this
<code><%= render :action => "action2" %>
</code>
This is very misleading as it leads you to think you are making a call action2 when you are not. you are rendering the action2 template. It's kinda the only way you can get a template rendered instead of a partial which is mostly totally unnecessary mainly because you would really only want to use part of a full template.
if action2 rendered a template called action_2_template.html.erb and there was no action_2.html.erb template then the above code would give you an error of template not found even though you have an action2 action
Answer: A very good resource to seek good RoR practice is the book
Rails AntiPatterns: Best Practice Ruby on Rails Refactoring by Chad Pytel and Tammer Saleh
This book definitely helped me a lot in improving my Rails programming practices.
Answer: RubyOnRails.org provides an extensive source of documentation and tutorials for proper use of code conventions/standards.
Answer: (I am going to assume you mean design in a general sense, not rails specific. I am also going to assume you are a professional dev trying to up his skills. If either of those are not the case, this answer doesn't really apply)
Code design is a massive topic, and (unfortunately) most of the good books are written with java in mind. I would start with "Head First Design Patterns" for a great intro to the subject, move on to "Clean Code" (should be mandatory reading for all professional developers IMO) for heuristics and techniques in day to day development, Domain Driven Design for great guidelines on building large systems, and finally Patterns of Enterprise Application Architecture to give a great foundation of common patterns found in successfully designed large systems.

Design patterns


Is it possible to detect the type of key required when connecting to a wireless network?

Question: So I was wondering if I could determine if a wireless network is asking for a specific type of key such as WEP/WPA ect? Or if it just takes the one you give it and processes that?
Answer: Yes. Pretty straight forward information provided by each wireless access point.
For instance in Android, this is what this information looks like in Wifi Analyzer:

Only the security types listed for an access point will be accepted.
Answer: Yes, that is possible!
Almost any device that can wirelessly connect using WiFi, also has an interface for connecting to it right? I'm pretty sure that almost ALL devices, when prompted for a password say something like:

"This network is using WPA2 Protection, please enter your password"

or:

"This network is using an Enterprise Security, Please insert your USB Key"

etc.
In other words, the WiFi antenna broadcasts its SSID, your device picks up the SSID called "Network", the Antenna broadcasts the security information including it's MAC address, encryption algorithm, security type etc, which includes if it's "WPA" or "WEP".


How do you convert a noun into an adjective?

Question: What would be the adjectives for nouns like shopkeeper, country, wife, earring, teacher, father — and so on and so forth?
Answer: Although this might not count an answer directly concerning your question, I think some nouns perform as adjectives when collocating suitably with a second noun. In this case the first noun is called an attributive noun. The following is the way my Merriam-Webster's Collegiate Dictionary [11th edition] briefly puts it:

[Some nouns are] often used as an adjective equivalent in attributive
  position before another noun:
1 bottle ... noun, often attrib.
business ... noun, often attrib.
Examples of attributive use of these nouns are bottle opener and
  business ethics.

Similarly some attributive collocations of the words you mentioned can be:
earning: earning power/capacity
teacher: teacher appraisal
With that said, the following is what I could find from concise oxford dictionary [10th edition]. [to my eye most of them seem rare/odd/awkward like teacherly]
father: fatherly fatherlike, fatherless.
wife: wifeless, wifely.
teacher: teacherly.
Note, too, that in some instances the conversion of a noun to an adjective may not use the original noun. For example, needing an adjective for "wife", some would choose to use the word spousal. Similarly, referring to a teacher, one might use the term didactic. If "country" is used to refer to a nation state, the word national might be used; but if it "country" is used to mean "non-urban", the adjective rural might be used.
The bottom line is, a word doesn't necessarily need to be in adjective form to act as an adjective.
[waiting for natives!]
Comment: English noun compounds (which is what an "attributive use of a noun" means -- one noun modifying another) are very frequent, quite irregular, and usually idiomatic. Consider the meaning difference between _snake bite_ and _pony ride_, for instance; or _door stop, door step, door handle,_ and _door slam_. The error lies in considering that a given word is **really** a noun, but being used as an adjective; instead of saying this word can be used either as an adjective, or as a noun (or as a verb, and often enough). Usage determines category.
Comment: Something to ponder on is the fact that a few nouns may have adjectival forms that differ according to whether they describe its typical characteristics, what it does or what it is associated with. For instance, 'horse' --> 'horselike': "The zebra is a horselike animal of the African grasslands"; 'horse': 'Isn't that one of your horse barns?"; and 'hors(e)y': "Everyone in the family was horsey: they bred horses, they rode horses for pleasure, and they raced horses".
Answer: The question is very general so I will provide the general answer. English nouns convert to adjectives in unpredictable ways. Many nouns have convenient adjectives, often with common suffixes like -ly, -ish, -like, or -esque:

Wife -> Wifely
Arab -> Arabesque
Imp -> Impish
Life -> Lifelike
Electricity -> Electric

There may be more such suffixes which I am forgetting.
But many nouns do not have easy translations (Country, for instance). There is a class of colloquial adjectivizations (my own colloquialism) which use the suffixes in the first category when they are not technically allowed –

Shopkeeper -> Shopkeeperly
Tony Romo (football player) -> Romo-esque

These hybrids are casual but are fun sometimes to inject a little specific flavor to what you are saying, especially if you want to invoke a proper noun.
Many other nouns have strong adjective relatives which either directly map to the noun or need a little context, but have resemblance to the noun itself:

Country (if you are talking about regions which are not urban) -> Bucolic, Pastoral, Rural
Country (if you are talking about nations) -> National, Sovereign
Train -> Locomotive
Image -> Visual, Illustrative
Water -> Aquatic, Moist, Damp

The rest, which often are specific "detail words", have no clear one-word adjective pairing and should be used as part of a metaphor or simile:

Keyboard -> "The stones were arranged in a loose grid, like a keyboard"
Ox -> "He is an ox"
Comment: Also to add _-ic_ or _-ical_, e.g. angel -> angelic, sphere -> spherical. Or to add _-y_, e.g. fish -> fishy.


How to display different menu in each store

Question: Am using magento 184.108.40.206. I want to create seperate website at backend, have same theme for both websites but only menu category should be different. Someone kindly suggest a solution to this scenario. Also kindly guide me how to give url in localhost.
Answer: You can create different websites following the link that lloiacono provided.
For creating different menu for both the websites you can create it this way.

Add all the categories of both the websites in the backend.
Now select any one store view from 'Choose Store View' at the top of categories list.
Select All the categories one by one that don't come under that store view(website) and make it inactive by selecting 'Is Active' to 'No'.
Now repeat the same action for the other store view i.e select the other store view and go to all the categories that don't fall under it and make them inactive.

Once you have completed this you can go to the front end and check.
Thanks.
Comment: I just have doubt regarding how to refer to the newly created website  at backend ie how to change the base url to refer that?. And my default base url is `http://127.0.0.1/magento/`
Comment: To set base url for the new website, go to System->Configuration->General->Web. Now under unsecure change the base url to something like http://127.0.0.1/magentonew/ where magentonew being the new website name which you have already created. For this you need to select 'Current Configuration Scope' to your new website at the left top corner.
Answer: You can put your menu into a cms block, and then you can create different versions of your cms block and assign each version to the corresponding store.

To set up the stores you need to go to

System->Manage Stores

, there are many tutorials explaining how to do this, for ie: https://www.properhost.com/support/kb/30/How-To-Setup-Magento-With-Multiple-Stores-And-Domains
To set the different urls you need to do this in

system -> configuration -> web

: there you have the option to set the secure and unsecure url, and you can do this per website and store view, there is a drop down to switch "Current Configuration Scope:. So you just need to set the correct website or store view and set the url for each one.
Comment: I found that link useful. Thanks. But how to give Base url link to refer to two diiferent website from backend. In fact my base url by default is `http://127.0.0.1/magento/`. how to give base url for newly created website and store from backend?
Comment: @Ramya I added more details about setting the secure and unsecure urls, if my answer helped you consider accepting it.
Comment: Yea I know where to give. I just need guidance regarding how to give. My base url  by default is `http://127.0.0.1/magento` when I newly installed magento. Now I have created new website at backend. How to give a url to refer this site?


What to do if I lost my passport before flight in another country?

Question: I'm just asking this question for my info. I will be traveling from India to Amsterdam on a short trip.
What should you do if you lose your passport or the passport gets stolen (especially in a Schengen country)?
As I read on the Internet that if someone loses his passport, the following things have to be done:

Contact the airline immediately and change the flight date to
at least 2 months ahead because it will take at least 2 months to get a new
passport.
Contact the nearest police station and file the report of
lost passport
Go to the embassy of your country to apply for a new passport. This will take 2 months after applying

Until you get the new passport you will have to stay in town for approximately 2 months. So you should have extra money for that.
Is the above information correct? Please reply if you have a more detailed and more accurate answer.
Comment: It depends almost entirely on the embassy of your country. Many embassies can sort out an emergency passport for their citizens (valid for return home only) within one day.
Comment: If you happen to lose a passport containing a visa that you need for your return flight (e.g. because you live in the US), your life just took a turn for the suck, since you'll have to wait for the new visa to arrive. Otherwise, your embassy/consulate will bring you home in good time.
Comment: It depends on the embassy. I would contact my embassy the first thing before everything. My friend lost his passport, and he didn't have to change anything because the embassy helped to issue an emergency passport. Besides, I really don't think that someone get to stay in Europe for 2 months just by losing passport. @Jonas is right and it's a different case. But I believe that someone can always go back to original country, that's what citizenship is for.
Comment: It depends almost entirely on which country you are in, whether it has an embassy or consulate of your country and, if not, whether some other embassy in the country handles emergencies for your country and, if not, how close or accessible the nearest embassy or consulate that actually can help people from your country is. Sometimes travel insurance can help.
Comment: One more thing: Even with many not-so-expensive airfares , you receive credit with the airline if cancelling the flight prior to check-in time. The credit can then be used for a later flight. This is good if you don't known when you will get your new passport, but then want to take the earliest possible flight (with the same airline). Fees apply (typically, around USD 200), though.
Comment: Having read all comments here, I wonder if it also depends on the different embassy of the country (e.g. the French embassy and Germany embassy of US). I don't think it is different, but am not sure.
Answer: My family and I had our passports stolen two days before we were supposed to return home from Portugal to the UK - so we spent a day in the British Consulate (yes, all day) to get emergency passports (good for one use only - to get us back to the UK on our scheduled flight) and then we had to sort out new ones - which took a full day at the Passport Office in Glasgow.
It was a pain in the neck, sure, but you shouldn't be stuck for two months in the wrong country. Each country may do things differently, but one of the services your embassy/consulate should provide is assistance like this.
Comment: I had a similar experience in Spain, but my time at the embassy was about 1hour. I had to answer a bunch of questions, but they had my passport photo on file. I didn't even have a backup ID. YMMV
Comment: my parents had it happen in Spain as well. The drive to the consulate took longer than the paperwork there, a new permanent passport was couriered over to our residence there a few days later (it wasn't an emergency in that there was no time pressure for them to return home, they were living there semi-permanently).
Answer: Precautions:

Keep some spare cash, credit card, and ID separate from what you are carrying, if possible.
Carry a photocopy of your passport and other important documents with you, separate from the originals.
Leave copies of these important documents with a dependable friend or relative.  (Mouviciel's idea of using dropbox is great.)
Register with your country's embassy/consulate so that they have your info.

What to do if it happens:

Report the problem to your airline if you think you will miss your flight.
Report to the police and get a police report.
Visit your country's embassy or consulate and get help.

Anecdote
Something similar happened to me: I was mugged (jumped) and my passport, money, and other forms of ID were stolen.   My backpack was stashed elsewhere, but unfortunately I hadn't left any of these valuable things in my backpack, since I didn't know whether that location was safe.
Losing not only my passport but also my money and ID revealed the problem that it is nearly impossible to get anything done with neither an ID nor any money! To get around this problem, my relative wired money (via Western Union) to someone I had met just a few days earlier in my travel (a trusted stranger).
The day after the mugging, I filed a report at a police station, and then went to the U.S. embassy with my sad story.  I had a relative fax them a copy of the identification page of my passport.  Based on this, the police report, and my rather convincing black eye, they issued me a temporary passport within a few hours for the usual fee of about $60 and passport photos taken immediately prior.  This temporary passport had a validity of 1 year, and contained the restriction that, while it could be used for travel, it could not be used as proof of identity or citizenship.
I was traveling overland, so I didn't have any booked flights to deal with.
Amusingly, I later had this passport validated as proof of identity and extended to a full 10 years validity.  You can imagine that I had to tell the whole story every time I crossed a border and the inspectors saw my ridiculous post-mugging photo.
Comment: I would like to add that having a relative or good friend that is able to wire you money in case you really lose it all is a good idea as well. For example, if you were to lose your passport in Amsterdam, you would have to travel to The Hague to reach your embassy. This will cost money.
Answer: If you lose your passport while traveling, contact your nearest consulate immediately. They will usually be able to provide you with a temporary document that's at least good enough for you to travel back home. Getting a temporary passport might take relatively long compared to a short trip, but a few days at the worst, not the usual delay in getting a normal passport.
The delay may make you miss your flight home. Check your travel insurance (or even your regular insurance) to see if it will pay for the incurred cost.
Answer: When preparing your flight, get all your documents scanned (passports, visas, e-tickets) and keep copies with you and people travelling with you. Leave the pdf files on the internet in a place where you will be able to reprint them abroad (a gmail account, or a dropbox directory for instance).
That way, getting new/emergency documents will be easier at your consulate.
Answer: This is going to vary depending on your country, the country where you lose your passport, and what you lose besides your passport. If your country has a consulate or embassy in the country you're in, you can go there in person and bring things to simplify the issuing of a replacement passport. For example, family members who still have their own passports and are vouching for you, other ID, and so on. This is one reason people suggest leaving your passport in the hotel room - separating your ID makes it less likely you will lose all of it at once.
If your country doesn't have consular services there, things get harder. Maybe it all has to be done by courier. I still think months is an overestimate though. Perhaps a week? And you will spend a LOT of money on rush fees and long distance phone calls.
The worst story I heard, 20+ years ago now, was from a South African. At that time there was little or no consular presence for South Africa outside the country - this was at the time of sanctions. The story was that her friend was in Australia and his South African passport expired. The Australians weren't going to deport him, but he couldn't get a new passport anywhere in Australia, couldn't leave to get one anywhere else, and he had to stay there for seven YEARS until he qualified for an Australian one. The woman who told me the story (in Canada) was explaining why she had to schedule an expensive trip home to renew her own passport because she didn't want to be stranded in Canada. I am still not sure if I believed it.
If you lose your passport (or it's taken from you), your first call should NOT be to the airline. Start with the police and then your embassy. Ask your embassy what to do about your tickets. Only if you discover the loss IN THE AIRPORT would I start with the airline.
Comment: one thing that comes to mind is the concept of an "interests section" in a 3rd country's diplomatic mission... Switzerland is a common 3rd country for this
Comment: I am EXTREMELY skeptical that this story is completely true and that the person involved truly exhausted all other options.... I would really be curious to hear from someone who is an expert in this topic
Comment: The term is usually [Protecting Power](https://en.wikipedia.org/wiki/Protecting_power) where a third country handles such things. For example, Sweden's mission acts in that capacity for Americans in the DPRK. The interests sections are usually [defacto embassies](https://en.wikipedia.org/wiki/De_facto_embassy) in countries without diplomatic relations (for example, the US mission on Taiwan). I can imagine it being a giant pain- like in the old days- a single embassy in Beijing and you lose your passport in Chengdu. Good luck flying there without a passport... so 40-50 hours on various trains.
Answer: The information you have been given is not entirely accurate. The very first thing I would do (after canceling my credit cards, though) is contact a consulate from my own country. Don't start by canceling your return trip, with a bit of luck you might be able to get some travel documents quickly!
Depending on the situation, the consulate might either issue a new passport, an emergency passport or a laissez-passer (valid for a single journey back home). I know that my country issues passports in about a week and, occasionally, emergency passports (valid for only six months) on the spot in a couple of hours (I needed to pull their legs a little bit for that, they don't want people to abuse this possibility). Other countries might only offer a laissez-passer or require much longer to issue a passport so it's not possible to give a general rule here.
If the consulate is in the same city, things can go relatively well but if the relevant consulate is far away or even in another country, everything can become much more difficult. In any case, it's still the main thing to do.
The consulate could also let you know if it's necessary to complain to the police (generally it is but there are some countries in which contacting the police isn't generally recommended; in the Netherlands you should certainly do it) or reschedule your flight.
Answer: Contact your country's closest embassy.  Bring as much documentation about yourself as you can.  They will issue a temporary travel document you can use in lieu of a passport.
Comment: @hippietrail 99%. Every country's diplomatic service divides the world into regions covered the nearest embassy/consulate, with the 1% being countries at war, that don't recognize each other, etc. That said, this does *not* mean that you can get a Finnish passport issued in Tuvalu, even though it happens to be the turf of the Embassy of Finland to Australia.
Comment: This doesn't necessarily cut it if your closest embassy is one or many countries away from the country you are in. Not every country has embassies or consulates in every other country.
Comment: @hippietrail In fact, definitional issues aside, there is probably not a single country with a consulate in every other country in the world. But in most cases, there will be one consulate that's responsible for the place you are in and you should try to contact it, even if it's in another country.
Comment: Which percentage of "most"? 99% or 51%?
Answer: Precautions:

Have a copy of your passport (on the internet).
Carry separate spare cash or bank card.
Note down the contact details of the embassy/consulate.
Note down the account details to check in online for a boarding pass.

Residing in a Schengen country and lost your passport or had it stolen?

contact the local police and have them file a crime report (even at
night!)
block bank/credit card(s) and phone if applicable
contact the embassy/consulate and make an appointment to obtain
(temporary) travel documents.

if that will take too long you might try:

Have a copy of your passport (or ID card) and the crime report and head for the airport.
Have the airliner contact the airport authorities at your
destination and make the inquiry if you will be allowed back into
the country on that copy.

This actually worked for me when I had to travel back from the UK to the Netherlands.
Searching for the proper phone number of the correct airport authority was the hardest.
Comment: When you say 'have a copy of your passport on the internet', it might be worth making clear it is not on the public internet, i.e. it should be on protected storage (at least on something like dropbox, google drive, ...)


"Subpaths" of Dijkstra's shortest path also shortest?

Question: I have trouble putting this into formal mathematical terms, so let's suppose that I found the shortest path from A to E as A > C > D > B > F > E with Dijkstra's algorithm. Am I correct in assuming that the shortest path from C to B would be C > D > B, and that the shortest path from D to F would be D > B > F?
Answer: Of course, it is true. However, it is not a property of Dijkstra's algorithm but is property of the shortest paths themselves. Suppose that is not true, and you have a shorter path from $C$ to $B$, we denote it as $p_{CB}$. Then we would have a path $A \rightarrow p_{CB} \rightarrow F \rightarrow E$ from $A$ to $E$ which is shorter than $A  \rightarrow  C  \rightarrow  D  \rightarrow B  \rightarrow  F  \rightarrow E$.
Answer: If you check what Dijkstra's algorithm does, it computes the shortest paths to all nodes from a given start node.


Root Doesn't Have Sufficient Permission To Copy Directories/Files

Question: I am running Ubuntu 16.04, VirtualBox5.1 (w. ext & guestadditions installed via synaptic), and I created a Ubuntu16.04 guest so that I could established a LAMP server Drupal dev environment.  While my LAMP is set-up with lesser pain than normal...  It now seems that my Root user on the guest machine has insufficient privileges to copy my drupal installations from the virtualbox shared folder into the guest ubuntu's public_html directory in the home directory.  I have started Nautilus using both sudo and gksudo and have had the same problem of some directories or files being unable to be copied....  any hints on how to solve this problem?
thx
Comment: Try it on the command-line, instead of Nautilus, and post the error message.
Answer: When in doubt... throw the GUI out...  I simply used
sudo rsync -avrh  [source] [target]
no more errors everything copied...
thanks


AMD Laptop Dual Graphics

Question: I bought a Lenovo z50-70 laptop with an amd fx - 7500 processor and a amd r7 1GB APU graphics card and a amd R7 m265 dx 2GB dedicated graphics card. Due to reasons unbeknown to me, I can't change the settings so that just the dedicated card is used when gaming. I can only manage crossfire with the APU (which is very hit and miss depending on the game) or just using the APU. Everything is in max performance mode. I can't seem to get anywhere near the performance of a test on a YouTube channel. He gets 30fps on witcher 2 on ultra 1080p, I can't even get that on lowest settings at 720p! I don't understand. I've looked in the BIOS and the only options I have are "Dual Graphics" or "UMA Only". I'm stuck for ideas. Any help is appreciated!
Answer:
In the Bios Settings choose Switchable Graphics.
Download AMD Overdrive and Disable Turbo Core Menu, less 2.1 GHz max...
Open AMD Catalyst, or Crimson (Crimson not recommended install)
... and Disable Dual Graphics.
Open Switchable Graphics, and browse any games or 3D high performance apps and click High Performance Tab (only all games your system).

any games .. Crysis 3 is in my notebook FX-7500 (Turbo Core is OFF - 2.1 GHz) R7 M265DX (2 GB), integrated R7 Graph. and 8GB System Memory less 1024 MB integrated Graph.. Core 720 MHz - IGP Tuning & 800 MHz memory, and the dedicated VGA is only 855 MHz core and 900 MHz Memory - no Overclocking.. is 1280 x 720 - in 30-35 FPS, then High Texture Options and Low Game effects.. but there is beautiful to, CryEngine awesome textures and graphics engines...
So.. any games 768P, or 720P... and sometimes 1080p low textures is running!
Answer: I would suggest the following:

Keep "Dual Graphics" in BIOS as this will enable both GPUs, the UMA only is iGPU/APU only graphics.
Download the latest graphics drivers for your laptop from source (amd.com).
Go to AMD Radeon Settings and set your game to work in High Performance.
Keep all other settings in Default.
You may test your game in "High performance" under Windows Power options and see if you gain any noticeable fps.
Open Wattman/Overdrive and increase your CPU freq. higher but don't go overboard with it as this may damage your laptop.

AMD Laptop Dual Graphics


Basic idea on UI and UX

Question: I wanted to know is ui and ux design is all about designing a website and app on how it looks? Like how should a particular box should appear whether it should be small or big? Should it have shadow or how will it aling? Is this how ui and ux design is all about?
Answer: There's a lot of different opinions about this.
Some people will say UI is how it looks and UX is how it works which is a bit off the mark.
I think of it more as follows:

Interaction design is about designing user interfaces (UI) that users can use. How it looks and how it works influences this. For example, a legible font makes an interface easier to use. Good colour contrast and spacing and alignment makes things easy to use. These are visual things. Of course the fact I can understand the interface, use a keyboard, a screen reader, a mouse, trackpad and intuitively find and do things is more part of how it works. But they're intertwined and make up the interface. But then the exact words that are used on the interface are just as important (if not more) and this is called 'content design'.

When people say they want things to look pretty/unique I think of that more like graphic design and branding and visual design. This is important but I think a lot of people place too much emphasis on this. Both this point and the previous point both mention visuals but they come at it from different angles.

User experience (UX) for me is the entire user experience someone has when using your product or service. That could include any and all of the following:

the advert the user sees
the leaflet the user receives
the dialog between the user and the sales person on the phone
what a user's friend says about the service
how joined up the service feels to the user across channels
how social media workers communicate to users
the emails users receives
and finally the experience of using the website, app, UI.

Everything makes up the user's experience from the moment they become aware of a thing to the moment that user achieved what they wanted by using that service.
Answer: No. As the name implies, User Experience means everything affecting the experience of a user, digitally, physically and mentally.
Every problem, experience, etc you encounter can be cut into segments with a start and an end depending on scope. Everything that happens within that start and end is your user experience for that specific segment.
Zoom out enough and you see a big story of a single experience (e.g. your life from birth to death, a product from mineral extraction to production, usage, discarded, recycled, etc). Looking closer, you notice this single experience is composed of smaller ones (e.g. childhood, adulthood, etc) that can be split into even smaller ones based on themes (e.g. marriage, first child, etc or life insurance, friendship, etc) and further down (e.g. vacation, employment, buying a bike, cooking, etc) and so forth (using an app, downloading a file, sending an email, etc).
Everything that happens and affects these experience segments is your playground to build the user experience. This is why the core of UX is research aka getting closure with the user to understand what are the things creating and affecting their experience. It is an exercise to portray the real world into paper and concepts, similar to how cartographers portray the physical earth onto maps. The goal is the closest viable approximation, it will never be perfect since perfect means the real thing itself. A journey map is an approximation of the experience, that's why it's a map.
Now, designing a life is too complex for us humans to wrap our heads around. Therefore, we focus on smaller experience segments such as your interaction with a service or product. Zooming into this smaller experience, maybe the user encounters a button that does not look like a button and he/she gets frustrated. This is the atomic level you are asking in your question. Maybe it's called the button experience.
Zoom out a bit and you see the page, zoom out and you see a taskflow, zoom out and you see a product, zoom out and you see a user journey, zoom out and it's the user problem, etc. Zoom out enough and you see birth and death of the user. But again, that's too complex of any of us to solve.
To give a different perspective, below is what UX is defined as professionally. All those circles are areas we defined that could affect the user experience.

Basic idea on UI and UX


Summarizing different (local) shapefiles/sources into one centralized database using ArcGIS for Desktop?

Question: Using ArcMap/ArcCatalog 10.2, is there a way, to summarize a huge number of widely spread shapefiles/sources (different servers, different hard drives etc.) into one centralized database, in order to be able to transfer this database as well as a corresponding mxd-file e.g. to a notebook or another computer without internet connection?
Answer: This is very easily done by adding each of these data sources to a map and then Creating a map package:

Map packages (.mpk) make it easy to share complete map documents with
  others. A map package contains a map document (.mxd) and the data
  referenced by the layers it contains, packaged into one convenient,
  portable file.

The same functionality is also available in the Package Map (Data Management):

Packages a map document and all referenced data sources to create a
  single compressed .mpk file.


Gas cost of multiple small transactions vs one large one

Question: On the main ethereum network would the gas cost be the same to post several small transactions or one large transaction if the overall data size is the exact same?
Answer: Each transaction has itself gas consumption. Calculation of this consumption depends to codes that a transaction triggers them to perform and data size of the same transaction, so called arguments. For each transaction a bytecode is created. Processing each byte of this bytecode consumes itself gas. Hence, total gas consumption of the bytecode is equal to summation of gas consumption of each byte from that bytecode. This total gas is the same transaction's gas. Thus, each small transaction has itself bytecode and a large transaction has itself bytecode. One can conclude the transactions' gases are not equal together.
Good Luck.